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

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

book

Article ID: 218770

calendar_today

Updated On: 05-21-2025

Products

Gen

Issue/Introduction

Installed Oracle Java Development Kit 11.0.2 for Windows as per Gen™ 8.6 > Technical Requirements > Third-Party Software Version but getting the below error when trying to generate and build a first 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 : 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: Gen™ 8.6 > Developing > Working with Build Tool > Profile Token Descriptions

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.
For the latest PTFs see page: Gen 8.6 Solutions & Patches