ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum IndexWebSphere Message Broker SupportNoClassDefFoundError

Post new topicReply to topic Goto page 1, 2  Next
NoClassDefFoundError View previous topic :: View next topic
Author Message
andrewfemin
PostPosted: Tue Jan 23, 2018 9:04 pm Post subject: NoClassDefFoundError Reply with quote

Apprentice

Joined: 26 Aug 2017
Posts: 27

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
View user's profile Send private message
abhi_thri
PostPosted: Wed Jan 24, 2018 12:13 am Post subject: Reply with quote

Acolyte

Joined: 17 Jul 2017
Posts: 64
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
View user's profile Send private message
andrewfemin
PostPosted: Wed Jan 24, 2018 2:01 am Post subject: Reply with quote

Apprentice

Joined: 26 Aug 2017
Posts: 27

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
View user's profile Send private message
abhi_thri
PostPosted: Wed Jan 24, 2018 2:14 am Post subject: Reply with quote

Acolyte

Joined: 17 Jul 2017
Posts: 64
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
View user's profile Send private message
andrewfemin
PostPosted: Wed Jan 24, 2018 11:08 pm Post subject: Reply with quote

Apprentice

Joined: 26 Aug 2017
Posts: 27

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
View user's profile Send private message
abhi_thri
PostPosted: Thu Jan 25, 2018 5:26 am Post subject: Reply with quote

Acolyte

Joined: 17 Jul 2017
Posts: 64
Location: UK

Hi...can you try putting the jars at the broker level (<workpath>/shared-classes) and see that helps

Also, you could enable the broker jvm trace to see whether the jar files got loaded to classpath or not,

http://www-01.ibm.com/support/docview.wss?uid=swg21588070
Back to top
View user's profile Send private message
andrewfemin
PostPosted: Sat Jan 27, 2018 4:36 am Post subject: Reply with quote

Apprentice

Joined: 26 Aug 2017
Posts: 27

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
View user's profile Send private message
andrewfemin
PostPosted: Sun Jan 28, 2018 5:58 am Post subject: Reply with quote

Apprentice

Joined: 26 Aug 2017
Posts: 27

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
View user's profile Send private message
abhi_thri
PostPosted: Mon Jan 29, 2018 12:46 am Post subject: Reply with quote

Acolyte

Joined: 17 Jul 2017
Posts: 64
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
View user's profile Send private message
andrewfemin
PostPosted: Mon Jan 29, 2018 7:20 am Post subject: Reply with quote

Apprentice

Joined: 26 Aug 2017
Posts: 27

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
View user's profile Send private message
abhi_thri
PostPosted: Tue Jan 30, 2018 1:15 am Post subject: Reply with quote

Acolyte

Joined: 17 Jul 2017
Posts: 64
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
View user's profile Send private message
andrewfemin
PostPosted: Tue Jan 30, 2018 4:15 am Post subject: Reply with quote

Apprentice

Joined: 26 Aug 2017
Posts: 27

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
View user's profile Send private message
andrewfemin
PostPosted: Thu Feb 01, 2018 3:30 am Post subject: Reply with quote

Apprentice

Joined: 26 Aug 2017
Posts: 27

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
View user's profile Send private message
andrewfemin
PostPosted: Mon Feb 12, 2018 4:25 am Post subject: Reply with quote

Apprentice

Joined: 26 Aug 2017
Posts: 27

Please help..
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Feb 12, 2018 5:32 am Post subject: Reply with quote

Grand Poobah

Joined: 18 Nov 2003
Posts: 19544
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
View user's profile Send private message Send e-mail
Display posts from previous:
Post new topicReply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum IndexWebSphere Message Broker SupportNoClassDefFoundError
Jump to:



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP


Theme by Dustin Baccetti
Powered by phpBB 2001, 2002 phpBB Group

Copyright MQSeries.net. All rights reserved.