javax.xml.bind.annotation error using Java 11 for CA Gen Java proxy build
search cancel

javax.xml.bind.annotation error using Java 11 for CA Gen Java proxy build

book

Article ID: 218770

calendar_today

Updated On:

Products

Gen

Issue/Introduction

Installed Oracle Java Development Kit 11.0.2 for Windows as per technical requirements but getting the below error when trying to generate and build a first CA Gen 8.6 java proxy

java:27: error: package javax.xml.bind.annotation does not exist
    [javac] @javax.xml.bind.annotation.XmlType(name="FmvGetCertificateV03Import",

Getting the following message from the third party sites while searching google

 javax.xml.bind package not available in Java 11 

Environment

Release : 8.6 Complete
Component : CA Gen Build Tool

Resolution

When using Java 11 the BT profile tokens for the JAVA section should be set as follows:

LOC.JDK_HOME=<Oracle Java 11 JDK install directory>

LOC.JAVAEE_HOME=C:\Program Files (x86)\CA\Gen86\Gen\classes\java11\modules\ (Assuming Gen is installed in default location. The Gen 8.6 java11\modules directory provides required Java EE runtime classes that are no longer included in Java 11)

OPT.JAVAVERSION=11 (the default is 8 for Java 8)

This is documented under: CA GEN 8.6 - Developing > Working with Build Tool > Profile Token Descriptions > JAVA Profile Tokens

Additional Information

NOTE:
Gen 8.6 PTFs RTJ86109 and BTN86117 originally introduced support for building Gen 8.6 Java applications with Oracle Java Development Kit (JDK) version 11.
Those PTFs have since been superseded by the Gen 8.6 Complete PTF WKS86200/SO09618