IBM Support

IV12331: MISSING JAR FILE WHEN USING JAVA API WITH TWS 8.6

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • When we try to use the Java API for version 8.6 we get
    a class not
    found exception:
     ------------------------
    Code:
    // The following example lists the first five jobs that begin
    with the
    letter "A":
    // Create Query filter
    
        QueryFilter qf = new QueryFilter();
    qf.setFilter(JobStreamInPlanFilters.JOB_STREAM_NAME,
    "PHOENIX_10");
    // Execute query and load first howMany elements
    QueryResult qr = plan.queryPlanObject(JobStreamInPlan.class, qf,
    25,
    null);
    QueryContext qc = qr.getQueryContext();
    boolean finished = false;
    while (!finished) {
        List<JobStreamInPlan> JOBStreamList  = qr.getList();
        for (JobStreamInPlan j : JOBStreamList ) {
            JobStreamInPlan f= (JobStreamInPlan)
    plan.getPlanObject(JobStreamInPlan.class, j.getId(), null);
            System.out.println("Number of JOBS = "
    +f.getNumberOfJob() + "
    : " +" JOBS in the list = "+ f.getJobs());
        }
        if (qc != null && qc.getLastObject() != null) {
            Code:
          // Load the next blocks of howMany elements
            qr = plan.queryNext((QueryPlanContext) qc);
            qc = qr.getQueryContext();
        } else {
            finished = true;
        }
    }
    output:
    java.lang.NoClassDefFoundError:
    com.ibm.tws.planner.compiler.UniUint32
    at java.lang.Class.getDeclaredFieldsImpl(Native Method)
    at java.lang.Class.getDeclaredFields(Class.java:550)
    at
    com.ibm.rmi.io.ObjectStreamClass$2.run(ObjectStreamClass.java:15
    20)
    at
    java.security.AccessController.doPrivileged(AccessController.jav
    a:202)
    at
    com.ibm.rmi.io.ObjectStreamClass.getDeclaredFields(ObjectStreamC
    lass.jav
    
         a:1517)
    ,
    at
    ,
    com.ibm.rmi.io.ObjectStreamClass.getSerialFields(ObjectStreamCla
    ss.java:,
    1079)
    ,
    at
    com.ibm.rmi.io.ObjectStreamClass.initFields(ObjectStreamClass.ja
    va:79,
    7)
    ,
    at
    com.ibm.rmi.io.ObjectStreamClass.init0(ObjectStreamClass.java:10
    58)  ,
    at
    com.ibm.rmi.io.ObjectStreamClass.init(ObjectStreamClass.java:755
    )    ,
    at
    ,
    com.ibm.rmi.io.ObjectStreamClass.access$100(ObjectStreamClass.ja
    va:120) ,
    at
    ,
    com.ibm.rmi.io.ObjectStreamClass$ObjectStreamClassCache.get(Obje
    ctStream,
    Class.java:229)
    ,
    at
    com.ibm.rmi.io.ObjectStreamClass.lookup(ObjectStreamClass.java:4
    68)  ,
    at
    ,
    com.ibm.rmi.io.ObjectStreamField.getObjectStreamClass(ObjectStre
    amField.at
    com.ibm.rmi.io.ObjectStreamField.getObjectStreamClass(ObjectStre
    amField.
    java:126)
    at
    com.ibm.rmi.io.IIOPInputStream.inputClassFields(IIOPInputStream.
    java:191
    6)
    at
    com.ibm.rmi.io.IIOPInputStream.continueSimpleReadObject(IIOPInpu
    tStream.
    java:575)
    at
    com.ibm.rmi.io.IIOPInputStream.simpleReadObjectLoop(IIOPInputStr
    eam.java
    :537)
    at
    com.ibm.rmi.io.IIOPInputStream.defaultReadObject(IIOPInputStream
    .java:69
    0)
    at
    com.ibm.tws.objects.plan.JobInPlan.readObject(JobInPlan.java:152
    5)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessor
    Impl.jav
    a:60)
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethod
    Accessor
    Impl.java:37)
    at java.lang.reflect.Method.invoke(Method.java:611)
    at
    com.ibm.rmi.io.IIOPInputStream.invokeObjectReader(IIOPInputStrea
    m.java:1
    708)
    at
    com.ibm.rmi.io.IIOPInputStream.inputObjectUsingClassDesc(IIOPInp
    utStream
    .java:1443)
    at
    com.ibm.rmi.io.IIOPInputStream.continueSimpleReadObject(IIOPInpu
    tStream.
    ,      java:554)
    at
    com.ibm.rmi.io.IIOPInputStream.simpleReadObjectLoop(IIOPInputStr
    eam.java
    :537)
    at
    com.ibm.rmi.io.IIOPInputStream.readObjectDelegate(IIOPInputStrea
    m.java:3
    86)
    at
    com.ibm.rmi.io.IIOPInputStream.readObjectOverride(IIOPInputStrea
    m.java:6
    49)
    at
    java.io.ObjectInputStream.readObject(ObjectInputStream.java:359)
    at java.util.ArrayList.readObject(ArrayList.java:731)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessor
    Impl.jav
    a:60) at
    ,
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethod
    Accessor,
    Impl.java:37)
    ,
    at java.lang.reflect.Method.invoke(Method.java:611)
    ,
    at
    ,
    com.ibm.rmi.io.IIOPInputStream.invokeObjectReader(IIOPInputStrea
    m.java:1,
    708)
    ,
    at
    ,
    com.ibm.rmi.io.IIOPInputStream.inputObjectUsingClassDesc(IIOPInp
    utStream,
    .java:1443)
    ,
    at
    ,
    com.ibm.rmi.io.IIOPInputStream.inputObjectClassDesc(IIOPInputStr
    eam.java,
    :1418)
    ,
    at
    ,
    com.ibm.rmi.io.IIOPInputStream.readSerializable(IIOPInputStream.
    java:115,
    0)
    ------------------------
    

Local fix

  • there is a workaround to solve this issue.
    
    The customer must follow these steps:
    1) copy the jar file SymphonyCreationJNI.jar from
    ${TWA_HOME}/eWAS/profiles/TIPProfile/installedApps/TIPCell/TWSEn
    gineMode
    l.ear to a location choosen by the customer
     (for example under ${API_PROJECT_HOME}/lib)
    2) add the jar SymphonyCreationJNI.jar to the java classpath
    (for
    example
    CLASSPATH=$CLASSPATH:${API_PROJECT_HOME}/lib/SymphonyCreationJNI
    .jar)
    3) export the classapth (export CLASSPATH)
    4) specify the CLASSPATH to run the example java api application
    (for
    example $JAVA_HOME/bin/java -cp "$CLASSPATH"
    MyTWSApiApplication)
    -------------------------------
    

Problem summary

  • After installing the SDK a java.lang.NoClassDefFoundError
    Exception is raised using Java API for version 8.6 with the
    following stack trace:
    
    java.lang.NoClassDefFoundError:
    com.ibm.tws.planner.compiler.UniUint32
    at java.lang.Class.getDeclaredFieldsImpl(Native Method)
    at java.lang.Class.getDeclaredFields(Class.java:550)
    at
    com.ibm.rmi.io.ObjectStreamClass$2.run(ObjectStreamClass.java:15
    20)
    at
    java.security.AccessController.doPrivileged(AccessController.jav
    a:202)
    at
    com.ibm.rmi.io.ObjectStreamClass.getDeclaredFields(ObjectStreamC
    lass.java:1517)
    ......
    

Problem conclusion

  • This apar will be fixed 8.6.0-TIV-TWS-FP0001
    

Temporary fix

  • The customer must follow these steps:
    
    1) copy the jar file SymphonyCreationJNI.jar from
    ${TWA_HOME}/eWAS/profiles/TIPProfile/installedApps/TIPCell/TWSEn
    gineModel.ear to a location choosen by the customer (for example
    under ${API_PROJECT_HOME}/lib)
    2) add the jar SymphonyCreationJNI.jar to the java classpath
    (for example
    CLASSPATH=$CLASSPATH:${API_PROJECT_HOME}/lib/SymphonyCreationJNI
    .jar)
    3) export the classapth (export CLASSPATH)
    4) specify the CLASSPATH to run the example java api application
    (for example $JAVA_HOME/bin/java -cp "$CLASSPATH"
    MyTWSApiApplication)
    

Comments

APAR Information

  • APAR number

    IV12331

  • Reported component name

    TIV WKLD SCHDL

  • Reported component ID

    5698WKB86

  • Reported release

    8L6

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2011-12-15

  • Closed date

    2012-01-11

  • Last modified date

    2012-01-11

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    TIV WKLD SCHDL

  • Fixed component ID

    5698WKB86

Applicable component levels

  • R8L6 PSY

       UP

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSGSPN","label":"IBM Workload Scheduler"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"8L6","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
11 January 2012