Author |
Message
|
andrewfemin |
Posted: Tue Jan 23, 2018 9:04 pm Post subject: NoClassDefFoundError |
|
|
 Acolyte
Joined: 26 Aug 2017 Posts: 54
|
I have a JavaCompute Node in my flow and it references third party jar files. There are no errors given during compilation or building of BAR file. But while deploying the BAR file, I'm getting the below error:
Code: |
BIP2087E: Broker 'BROKER' was unable to process the internal configuration message.
The entire internal configuration message failed to be processed successfully.
Use the messages following this message to determine the reasons for the failure. If the problem cannot be resolved after reviewing these messages, contact your IBM Support center. Enabling service trace may help determine the cause of the failure.
BIP4041E: Execution group 'EG1' received an administration request that encountered an exception.
While attempting to process an administration request, an exception was encountered. No updates have been made to the configuration of the execution group.
Review related error messages to determine why the administration request failed.
BIP4500E: Failed to deploy Java code resource 'JAR'. The Java stack trace is: 'Frame : 0 java.lang.NoClassDefFoundError: org.apache.poi.ss.usermodel.Font'
The Java JAR file deployment to the broker failed.
This is an internal error. Contact your IBM support center.
|
The class org.apache.poi.ss.usermodel.Font is present in the external JAR file.
Is this error happening because the JAR file is available in workspace, but not in runtime? If so, how do I import the JAR files to runtime? Is it by copying the files to "%INSTALLATION PATH%/mqsi/9.0.0.7/jplugin"? Kindly advise. |
|
Back to top |
|
 |
abhi_thri |
Posted: Wed Jan 24, 2018 12:13 am Post subject: |
|
|
 Knight
Joined: 17 Jul 2017 Posts: 516 Location: UK
|
Hi...Yes, any external jar files used need to be loaded at the runtime as well. There are three main options - integration server level, integration node level and shared b/w integration nodes. Have a look at infocenter topic 'Java shared classloader', you need to select a suitable approach.
https://www.ibm.com/support/knowledgecenter/en/SSMKHH_9.0.0/com.ibm.etools.mft.doc/bk58210_.htm#bk58210_
For eg:- if you want the jars to be shared across multiple nodes the jars need to be loaded at <workpath>/shared-classes and restart the node. |
|
Back to top |
|
 |
andrewfemin |
Posted: Wed Jan 24, 2018 2:01 am Post subject: |
|
|
 Acolyte
Joined: 26 Aug 2017 Posts: 54
|
Thanks for the link. I placed the external jar files in this folder:
Code: |
workpath/config/<my_broker_name>/<my_eg_label>/shared-classes |
and restarted the Integration Node and tried deploying again. I'm still getting the same error. Is there anything I'm missing? Please help. |
|
Back to top |
|
 |
abhi_thri |
Posted: Wed Jan 24, 2018 2:14 am Post subject: |
|
|
 Knight
Joined: 17 Jul 2017 Posts: 516 Location: UK
|
Can you please crosscheck,
- whether the failing class is definitely available at one of the external jars (you can use 7zip or so to check for classes within the jar file)
- the broker application user id do have the right permissions to the external jars |
|
Back to top |
|
 |
andrewfemin |
Posted: Wed Jan 24, 2018 11:08 pm Post subject: |
|
|
 Acolyte
Joined: 26 Aug 2017 Posts: 54
|
Just verified this. The failing class is present in one of the jar files and the broker application userid has all the required permissions over the files. What could I be missing? Any property value needs to be updated?
 |
|
Back to top |
|
 |
abhi_thri |
Posted: Thu Jan 25, 2018 5:26 am Post subject: |
|
|
 Knight
Joined: 17 Jul 2017 Posts: 516 Location: UK
|
|
Back to top |
|
 |
andrewfemin |
Posted: Sat Jan 27, 2018 4:36 am Post subject: |
|
|
 Acolyte
Joined: 26 Aug 2017 Posts: 54
|
From the log generated by the command in the link, I see that no jar file placed in <workpath>/config/<BrokerName>/shared-classes has been loaded into the classpath. No mention of any of the jar files or classes in the stdout file. Any idea why? What am I missing? Is there any property that needs to be enabled? Please help.  |
|
Back to top |
|
 |
andrewfemin |
Posted: Sun Jan 28, 2018 5:58 am Post subject: |
|
|
 Acolyte
Joined: 26 Aug 2017 Posts: 54
|
I just did a "echo $CLASSPATH" and found that none of the shared-classes folders are listed there. Should I add the folders and try restarting the broker?
I'm running AIX version 6 and IIB 9.0.0.7. Please help.  |
|
Back to top |
|
 |
abhi_thri |
Posted: Mon Jan 29, 2018 12:46 am Post subject: |
|
|
 Knight
Joined: 17 Jul 2017 Posts: 516 Location: UK
|
If java trace doesn't show the jars at '<workpath>/config/<BrokerName>/shared-classes' that suggests that broker doesn't recognize the <workpath>, can you crosscheck whether this is the correct workpath configured for the broker node (use mqisreportbroker <node>)....also as mentioned earlier you could try using the higher level <workpath>/shared-classes and see that helps but this also relies that workpath used is the right one.
Regarding your other query, no you shouldn't require to add the jars at CLASSPATH if it is already configured at one of the shared-classes directories even though adding jars in CLASSPATH is also one of the class loading strategies. Have a look at 'Javacompute class loading' topic to understand how & precedence order used by broker,
https://www.ibm.com/support/knowledgecenter/en/SSMKHH_9.0.0/com.ibm.etools.mft.doc/ac37125_.htm#ac37125_
PS: Also worth crosschecking whether the JCN is relying on a 'JavaClassLoader configurable service' at all, if so crosscheck whether it is overriding the 'sharedJarPath' path to a different directory.
Last edited by abhi_thri on Tue Jan 30, 2018 2:29 am; edited 1 time in total |
|
Back to top |
|
 |
andrewfemin |
Posted: Mon Jan 29, 2018 7:20 am Post subject: |
|
|
 Acolyte
Joined: 26 Aug 2017 Posts: 54
|
This is getting interesting.
mqsireportbroker command shows Work path as "/var/mqsi" and that's the same folder I'm using in <workpath>/config/<BrokerName>/shared-classes(/var/mqsi/config/<BrokerName>/shared-classes). Also, there are no JavaClassLoader configurable service created in the server.
What can be wrong here?!  |
|
Back to top |
|
 |
abhi_thri |
Posted: Tue Jan 30, 2018 1:15 am Post subject: |
|
|
 Knight
Joined: 17 Jul 2017 Posts: 516 Location: UK
|
Can you load the jars at the generic folder '/var/mqsi/shared-classes' restart the node and see that helps. Also have you got the 'shared work path' for the node set at all (use mqsireportbroker to verify)? |
|
Back to top |
|
 |
andrewfemin |
Posted: Tue Jan 30, 2018 4:15 am Post subject: |
|
|
 Acolyte
Joined: 26 Aug 2017 Posts: 54
|
Shared work path is set as 'none'. The only folder in /var/mqsi that is listed during an echo $CLASSPATH is /var/mqsi/common/wsrr. I'll try placing the jars in /var/mqsi/shared-classes and update in some time. |
|
Back to top |
|
 |
andrewfemin |
Posted: Thu Feb 01, 2018 3:30 am Post subject: |
|
|
 Acolyte
Joined: 26 Aug 2017 Posts: 54
|
More bad news. I tried placing the jars in /var/mqsi/shared-classes and restarting the broker. Still they aren't loaded.
Please help me out. Could it have something to do with /var/mqsi/shared-classes not being present in CLASSPATH? |
|
Back to top |
|
 |
andrewfemin |
Posted: Mon Feb 12, 2018 4:25 am Post subject: |
|
|
 Acolyte
Joined: 26 Aug 2017 Posts: 54
|
Please help..  |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Feb 12, 2018 5:32 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
andrewfemin wrote: |
Shared work path is set as 'none'. The only folder in /var/mqsi that is listed during an echo $CLASSPATH is /var/mqsi/common/wsrr. |
Could it be that you are setting the classpath when running mqsiprofile? Verify the way the command environment was built. Possibly you need to make sure that you're setting the classpath there as
Code: |
export CLASSPATH=${CLASSPATH}:/var/mqsi/common/wsrr... |
or even source that command.
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|