Gen Classic style Java Proxy build "package javax.servlet does not exist"
search cancel

Gen Classic style Java Proxy build "package javax.servlet does not exist"

book

Article ID: 38568

calendar_today

Updated On:

Products

Gen Gen - Workstation Toolset

Issue/Introduction

The build of a Gen 8.6 Classic style Java Proxy for the sample model fails with these messages in the .out file:

     [echo] ...Compiling ServerDetailDepartment.Servlet classes
    [javac] C:\Users\Administrator\Documents\CA\Gen 8.6\Models\samp86.ief\proxy\java\P900.XML:180: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
    [javac] Compiling 1 source file to C:\Users\Administrator\Documents\CA\Gen 8.6\Models\samp86.ief\proxy\java\src
    [javac] warning: [options] bootstrap class path not set in conjunction with -source 1.6
    [javac] C:\Users\Administrator\Documents\CA\Gen 8.6\Models\samp86.ief\proxy\java\src\P900\Servlet\ServerDetailDepartmentServlet.java:7: error: package javax.servlet does not exist
    [javac] import javax.servlet.*;
    [javac] ^
    [javac] C:\Users\Administrator\Documents\CA\Gen 8.6\Models\samp86.ief\proxy\java\src\P900\Servlet\ServerDetailDepartmentServlet.java:8: error: package javax.servlet.http does not exist
    [javac] import javax.servlet.http.*;
    [javac] ^
    [javac] C:\Users\Administrator\Documents\CA\Gen 8.6\Models\samp86.ief\proxy\java\src\P900\Servlet\ServerDetailDepartmentServlet.java:21: error: cannot find symbol
    [javac] public class ServerDetailDepartmentServlet extends HttpServlet
    [javac]                                                    ^
    [javac]   symbol: class HttpServlet
    [javac] C:\Users\Administrator\Documents\CA\Gen 8.6\Models\samp86.ief\proxy\java\src\P900\Servlet\ServerDetailDepartmentServlet.java:49: error: cannot find symbol
    [javac]   public void init (ServletConfig config)  throws ServletException

Environment

Gen Build Tool

Cause

The Build Tool Java token LOC.JAVAEE_HOME has been set to an incorrect value preventing all required Java EE SDK classes (jar files) from being correctly located at compile time.

Resolution

The related KB article covers how to set LOC.JAVAEE_HOME correctly: Gen applications needing Build Tool token LOC.JAVAEE_HOME
e.g. if Java EE SDK version 8 is installed in C:\java_ee_sdk-8u1 then set LOC.JAVAEE_HOME = C:\java_ee_sdk-8u1\glassfish5\glassfish