CA Gen Classic style Java Proxy fails with error "package javax.servlet does not exist"

book

Article ID: 38568

calendar_today

Updated On:

Products

CA Gen CA Gen - Run Time Distributed

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

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.

Environment

Release: 8.6
Component: CA Gen Build Tool (Classic Java Proxy build)

Resolution

The related KB article covers how to set LOC.JAVAEE_HOME correctly:
How to set the value of CA Gen 8.6 Build Tool Java 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