CA Gen

Expand all | Collapse all

Gen 8.6 Complete Release and Java Proxy Build

  • 1.  Gen 8.6 Complete Release and Java Proxy Build

    Posted 02-06-2020 10:23 AM
    Hello,

    I am just doing some initial verification of Gen 8.6 Complete Release. Testing our shop configuration and verifying that all our current builds are working correctly.

    I ran into a problem trying to build the Java Proxy using Complete Release. I do not have this problem at our current PTF level of 8.6.

    Here is the error I am getting from the Build Tool output using the Gen sample model as source:
    ____________________________________________________________________________

    CA Gen Build Tool Compose
    Copyright (c) 2016 CA. All rights reserved.


    Compose Succeeded

    Microsoft Windows [Version 10.0.17134.1246]
    (c) 2018 Microsoft Corporation. All rights reserved.

    C:\Program Files (x86)\CA\Gen86\gen>"C:\Program Files (x86)\CA\SharedComponents\JRE\1.8.0_60\\bin\java.exe " -classpath "C:\Program Files (x86)\CA\Gen86\gen\bt\bt.jar" com.ca.gen.bt.Execute "C:\models86\sample.ief\proxy\java\P900.bat"

    =====================Load Module Script Environment=================
    Operating System: JVM
    Environment: JAVAVM
    Language: JAVA
    Codepage:
    Proxy Version: 2
    ISO Encoding: UTF-8

    ==============================SUMMARY===============================
    Summary of Load Module Script Results for Load Module P900:
    ==============================LEGEND================================
    Legend: ... precedes information about an operation to be performed.
    --- precedes results from an operation which just completed.
    *** precedes error info from an operation which just failed.
    (Symbols preceding info are indented to convey step levels.)

    ==============================DETAILS===============================
    Details of P900 Load Module Script Results:
    CLASSPATH=C:\models86\sample.ief\proxy\java\\src;C:\Program Files (x86)\CA\Gen86\gen\classes\csu.jar;C:\Program Files (x86)\CA\Gen86\gen\classes\vwrt.jar;C:\Program Files (x86)\CA\Gen86\gen\classes\odc.jar;C:\Program Files (x86)\CA\Gen86\gen\classes\jprt.jar;C:\Program Files (x86)\CA\Gen86\gen\classes\jprt.xml.jar;C:\Program Files (x86)\CA\Gen86\gen\bt\bt.jar;c:\java\lib\tools.jar;.;C:\PROGRA~2\IBM\IBMDAT~1\java\db2jcc.jar;C:\PROGRA~2\IBM\IBMDAT~1\java\sqlj.zip;C:\PROGRA~2\IBM\IBMDAT~1\bin
    Exception in thread "main" java.lang.ClassFormatError: JVMCFRE067 unknown constant pool entry tag; class=org/apache/tools/ant/Main, offset=66
    at java.lang.ClassLoader.defineClassImpl(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:275)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:69)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:540)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:451)
    at java.net.URLClassLoader.access$300(URLClassLoader.java:79)
    at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:1038)
    at java.security.AccessController.doPrivileged(AccessController.java:284)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:429)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:653)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:358)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:619)
    Could not find the main class: org.apache.tools.ant.Main. Program will exit.
    IEFSIGNAL:FAIL
    *** Build for Load Module P900 Failed. ***
    Important! Review above for any errors.

    C:\Program Files (x86)\CA\Gen86\gen>
    ____________________________________________________________________

    Does anyone have an idea of what I might be doing wrong?

    I have not yet opened a support case, but am wondering if anyone else has run into this problem.

    ------------------------------
    Doug Seaver
    Systems Development Services Specialist
    CA Gen Tool Support
    WisDOT
    Madison, WI, USA
    ------------------------------


  • 2.  RE: Gen 8.6 Complete Release and Java Proxy Build

    Posted 02-06-2020 05:02 PM
    Edited by Lynn Williams 02-06-2020 10:58 PM

    Hi Douglas,
    I could not find your error reported previously in our support database so I suspect it is specific to your Build Tool configuration or Windows environment settings.
    Here is the CLASSPATH file list I see when I successfully build the 8.6 sample model Java Proxy with 8.6 Complete.
    ***********************************
    ==============================DETAILS===============================
    Details of P900 Load Module Script Results:CLASSPATH=C:\Users\Administrator\Documents\CA\Gen 8.6\Models\samp86.ief\proxy\java\\src;C:\Program Files (x86)\CA\Gen86\gen\classes\csu.jar;C:\Program Files (x86)\CA\Gen86\gen\classes\vwrt.jar;C:\Program Files (x86)\CA\Gen86\gen\classes\odc.jar;C:\Program Files (x86)\CA\Gen86\gen\classes\jprt.jar;C:\Program Files (x86)\CA\Gen86\gen\classes\jprt.xml.jar;C:\Program Files (x86)\CA\Gen86\gen\bt\bt.jar;C:\Program Files\Java\jdk1.8.0_201\\lib\tools.jar
    Buildfile: C:\Users\Administrator\Documents\CA\Gen 8.6\Models\samp86.ief\proxy\java\P900.XML

    Trying to override old definition of task manifest
    build:     
    [echo]     
    [echo] ... Verifying TESTAPP P900 Classes
    ...
    ***********************************
    Are those extra IBM java related files in the CLASSPATH coming from your Windows CLASSPATH environment variable?
    I am wondering if they are causing a problem with the loading of org.apache.tools.ant.Main. There are few web hits for the JVMCFRE067 error, although not specific to org.apache.tools.ant.Main e.g. https://www.ibm.com/support/pages/unknown-constant-pool-entry-tag-offset-error-message-when-running-trigger-class-file
    If this is a separate/new environment you have setup for Gen 8.6 Complete does the output file from the Java Proxy build in your working 8.6 PTF environment show the same IBM files in the CLASSPATH ?
    If that does not help please create a support case for us to research further.

    Hope that helps.

    Regards,

    Lynn

    ------------------------------
    Lynn Williams
    Senior Principal Support Engineer
    Broadcom
    Australia
    ------------------------------



  • 3.  RE: Gen 8.6 Complete Release and Java Proxy Build

    Posted 02-07-2020 12:44 AM
    Hi Douglas,
    Some more information
    When building the standard Java Proxy BT script build_proxy_java_2.scr is used and the main command executed is:
    "{OPT.JRE_HOME}\bin\java.exe" {OPT.JAVAFLAGS} -cp "%MYCP%" org.apache.tools.ant.Main -buildfile "{LOC.MAKE_DIR}{component.MEMBER}.XML"

    The MYCP value is the CLASSPATH which includes set entries for required Gen jar files plus will append the system CLASSPATH if BT Java token "OPT.USECLASSPATH" is set to YES (default is NO).
    The org.apache.tools.ant.Main class comes from the BT jar file "C:\Program Files (x86)\CA\Gen86\gen\bt\bt.jar" which is one of the CLASSPATH entries.

    I downloaded similar DB2 JDBC driver files that you are using and had no build problem after setting system CLASSPATH to ".;C:\db2_files\db2jcc4.jar;C:\db2_files\sqlj4.zip" and then set OPT.USECLASSPATH=YES
    ===
    Details of P900 Load Module Script Results:
    CLASSPATH=C:\Users\Administrator\Documents\CA\Gen 8.6\Models\samp86.ief\proxy\java\\src;C:\Program Files (x86)\CA\Gen86\gen\classes\csu.jar;C:\Program Files (x86)\CA\Gen86\gen\classes\vwrt.jar;C:\Program Files (x86)\CA\Gen86\gen\classes\odc.jar;C:\Program Files (x86)\CA\Gen86\gen\classes\jprt.jar;C:\Program Files (x86)\CA\Gen86\gen\classes\jprt.xml.jar;C:\Program Files (x86)\CA\Gen86\gen\bt\bt.jar;C:\Program Files\Java\jdk1.8.0_201\\lib\tools.jar;.;C:\db2_files\db2jcc4.jar;C:\db2_files\sqlj4.zip
    Buildfile: C:\Users\Administrator\Documents\CA\Gen 8.6\Models\samp86.ief\proxy\java\P900.XML
    Trying to override old definition of task manifest

    build:     [echo] 
    ===

    Thinking it might be related to using 32-bit/64-bit JDK I also tested with a 32-bit JDK and again no problems:
    ===
    Details of P900 Load Module Script Results:
    CLASSPATH=C:\Users\Administrator\Documents\CA\Gen 8.6\Models\samp86.ief\proxy\java\\src;C:\Program Files (x86)\CA\Gen86\gen\classes\csu.jar;C:\Program Files (x86)\CA\Gen86\gen\classes\vwrt.jar;C:\Program Files (x86)\CA\Gen86\gen\classes\odc.jar;C:\Program Files (x86)\CA\Gen86\gen\classes\jprt.jar;C:\Program Files (x86)\CA\Gen86\gen\classes\jprt.xml.jar;C:\Program Files (x86)\CA\Gen86\gen\bt\bt.jar;C:\Program Files (x86)\Java\jdk1.8.0_201\\lib\tools.jar;.;C:\db2_files\db2jcc4.jar;C:\db2_files\sqlj4.zip
    Buildfile: C:\Users\Administrator\Documents\CA\Gen 8.6\Models\samp86.ief\proxy\java\P900.XML
    Trying to override old definition of task manifest
    build:
    [echo]
    ===
    So I am at a bit of a loss as to what is causing your problem unless it is something in that 3rd directory C:\PROGRA~2\IBM\IBMDAT~1\bin
    As a simple test to see if you can get org.apache.tools.ant.Main to load you can just exclude all CLASSPATH entries apart from bt.jar with this manual test:
    1. cd to your directory C:\models86\sample.ief\proxy\java
    2. Run this command (assumes your java directory is c:\java\ based on your output):
    c:\java\bin\java.exe -cp "C:\Program Files (x86)\CA\Gen86\gen\bt\bt.jar" org.apache.tools.ant.Main -buildfile .\P900.XML
    That command will ultimately fail (Unable to find a javac compiler;com.sun.tools.javac.Main is not on the classpath) but would be interesting to see if you at least can load org.apache.tools.ant.Main

    Hope it helps.
    If you continue to have problems please create a support case for us to research further and reference this discussion.

    Regards,

    Lynn

    ------------------------------
    Lynn Williams
    Senior Principal Support Engineer
    Broadcom
    Australia
    ------------------------------



  • 4.  RE: Gen 8.6 Complete Release and Java Proxy Build

    Posted 02-07-2020 11:17 AM

    Lynn,

     

    When I tried your suggested simple test, I got the same failure:


    Microsoft Windows [Version 10.0.17134.1246]

    (c) 2018 Microsoft Corporation. All rights reserved.

     

    U:\>cd C:\models86\sample.ief\proxy\java

     

    U:\>c:

     

    C:\models86\sample.ief\proxy\java>c:\java\bin\java.exe -cp "C:\Program Files (x86)\CA\Gen86\gen\bt\bt.jar" org.apache.tools.ant.Main -buildfile .\P900.XML

    Exception in thread "main" java.lang.ClassFormatError: JVMCFRE067 unknown constant pool entry tag; class=org/apache/tools/ant/Main, offset=66

            at java.lang.ClassLoader.defineClassImpl(Native Method)

            at java.lang.ClassLoader.defineClass(ClassLoader.java:275)

            at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:69)

            at java.net.URLClassLoader.defineClass(URLClassLoader.java:540)

            at java.net.URLClassLoader.defineClass(URLClassLoader.java:451)

            at java.net.URLClassLoader.access$300(URLClassLoader.java:79)

            at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:1038)

            at java.security.AccessController.doPrivileged(AccessController.java:284)

            at java.net.URLClassLoader.findClass(URLClassLoader.java:429)

            at java.lang.ClassLoader.loadClass(ClassLoader.java:653)

            at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:358)

            at java.lang.ClassLoader.loadClass(ClassLoader.java:619)

    Could not find the main class: org.apache.tools.ant.Main.  Program will exit.

     

    C:\models86\sample.ief\proxy\java>


     

    My next idea was to try changing the USECLASSPATH to NO (the default). I am not sure why we ever changed it to YES, but it has been continued for historical purposes.

     

    The sample Java proxy build was successful on my "current" PTF level of Gen 8.6 (no 8.6 Complete Release).

     

    When I tried again with USECLASSPATH set to NO on the Complete Release, I still get the same failure.

     

    I noticed that there is a new JAVA option in the Build Tool Profile Manager for the Complete Release; OPT.JAVAVERSION is set to 8 (can be set to either 8 or 11).

     

    So, I checked. The Java level installed on my test PC is 1.6 according to this query:

     

    C:\models86\sample.ief\proxy\java>c:\java\bin\java.exe -version

    java version "1.6.0"

    Java(TM) SE Runtime Environment (build pwi3260sr9fp1ifix-20110401_01(SR9 FP1+IZ95392+IZ95393+IZ97453))

    IBM J9 VM (build 2.4, JRE 1.6.0 IBM J9 2.4 Windows Vista x86-32 jvmwi3260sr9-20110216_75791 (JIT enabled, AOT enabled)

    J9VM - 20110216_075791

    JIT  - r9_20101028_17488ifx4

    GC   - 20101027_AA)

    JCL  - 20110401_02

     

    I'm guessing maybe I need to update my Java level on this PC.

     

    Once I've done that, if I still have any problems, I will open a support ticket.

     

    Thanks for your help!

     

     






  • 5.  RE: Gen 8.6 Complete Release and Java Proxy Build

    Posted 02-07-2020 09:32 AM

    Thanks Lynn,

     

    You are correct, the IBM java related files in the CLASSPATH are coming from my Windows CLASSPATH environment variable.

     

    U:\>echo %Classpath%

    .;C:\PROGRA~2\IBM\IBMDAT~1\java\db2jcc.jar;C:\PROGRA~2\IBM\IBMDAT~1\java\sqlj.zip;C:\PROGRA~2\IBM\IBMDAT~1\bin

     

    I compared the output from the failing build with my working build, and the CLASSPATHs are identical.

    The PC is a new Windows build with a new version of .Net (4.8) as the major new software addition.

    As soon as I can get some time, I will test my current working build on this new build (a different PC with the same Windows, .Net build).

     

    �� ����

    Doug

     

     






  • 6.  RE: Gen 8.6 Complete Release and Java Proxy Build

    Posted 02-09-2020 05:23 PM
    Hi Doug,
    Thanks for the updates.
    I think the use of Java 6 would explain the problem because the class files in the bt.jar would have been compiled with Java 8 and thus be incompatible with Java 6. I tested using Java 6 SE JDK that I downloaded from Oracle Java Archive page and I get this error:
    ===
    java.lang.UnsupportedClassVersionError: org/apache/tools/ant/Main : Unsupported major.minor version 52.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
    at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    Could not find the main class: org.apache.tools.ant.Main.  Program will exit.
    ===

    Java 6 is version 50 and Java 8 is version 52 (https://en.wikipedia.org/wiki/Java_class_file#General_layout)

    I am also using Oracle Java 6
    C:\>C:\Progra~1\Java\jdk1.6.0_45\bin\java.exe -version
    java version "1.6.0_45"
    Java(TM) SE Runtime Environment (build 1.6.0_45-b06)
    Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode)

    As you are using the IBM version of Java 6 you get JVMCFRE067 but the root cause is fundamentally the same.

    Regards,

    Lynn

    ------------------------------
    Lynn Williams
    Senior Principal Support Engineer
    Broadcom
    Australia
    ------------------------------



  • 7.  RE: Gen 8.6 Complete Release and Java Proxy Build

    Posted 02-26-2020 12:23 PM
    UPDATE/RESOLVED:
    I was able to obtain a current Java 8 install from our software group. interesting, when I use that with our "current" non-COMPLETE toolset, the Java proxy builds successfully. When I try on a COMPLETE install, I still have an issue because our Java 8 install did not include the Java Platform, Enterprise Edition development kit.(javaee.jar)
    I downloaded the JavaEE API 8.0 from the Maven Repository, renamed it to javaee.jar, and not my Gen 8.6 COMPLETE release will build the Java proxy with no errors (only warnings) from the sample model.
    URL of Maven repository for this solution:  https://mvnrepository.com/artifact/javax/javaee-api/8.0

    ------------------------------
    Doug Seaver
    Systems Development Services Specialist
    CA Gen Tool Support
    WisDOT
    Madison, WI, USA
    ------------------------------