|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
JARs loaded at broker startup |
« View previous topic :: View next topic » |
Author |
Message
|
goffinf |
Posted: Sat Sep 15, 2007 2:24 am Post subject: JARs loaded at broker startup |
|
|
Chevalier
Joined: 05 Nov 2005 Posts: 401
|
Environment: Windows/WBIMB v6
I have a JavaCompute node that contains code that uses a dependant JAR (its actually the crimson parser - crimson.jar).
In debug, when the line of Java code is executed that makes use of this JAR I get an exception which contains the following detail :-
detailMessage= "java.lang.ClassNotFoundException: org.apache.crimson.parser.XMLReaderImpl"
So it would appear that the JAR is not being located and loaded.
I *have* done all of the following :-
- deployed crimson.jar to the broker as part of the BAR file.
- added crimson.jar to the CLASSPATH variable.
- tried putting crimson.jar in various locations suggested by other posts such as :-
- C:\Documents and Settings\All Users\Application Data\IBM\MQSI\shared-classes
- C:\Program Files\IBM\MQSI\6.0\classes
- C:\Program Files\IBM\MQSI\6.0\jre\lib\endorsed
restarting the broker between each change. But unfortunately all to no avail.
What is even more frustrating is this *was* all working fine, and only when I made a small change to the flow and redeployed, it just stopped working (the change was not even in the Java project, but I need have to recompile).
I realise this is a bit of a repeating 'chesnut' on this list, but I find myself somewhat stumped.
Is there any way that I can tell what JARs are loaded and from where ?
Am I missing something else
Thanks
Fraser. |
|
Back to top |
|
 |
goffinf |
Posted: Sat Sep 15, 2007 2:35 am Post subject: |
|
|
Chevalier
Joined: 05 Nov 2005 Posts: 401
|
I should have added that calling the code directly rather than from the Java compute node works fine.
Fraser. |
|
Back to top |
|
 |
jefflowrey |
Posted: Sat Sep 15, 2007 3:48 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
... Are you sure you recompiled this JAR as a 1.4 JDK?
The place it belongs is in the BAR file. If it goes there, and deploys successfully, then you will see it listed in the Domain topology view of the Execution Group (in the Admin perspective, the thing you "connect" to the ConfigMgr with)
If you see it listed there, and still get the same error... then turn on User trace to Debug level for your flow, and see what happens.
Also, any of the other places that you talk about putting the JAR file require you to restart the broker. Did you do that? The only good place on that list is shared-classes... all of the other places are dangerous and bad ideas. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
goffinf |
Posted: Sat Sep 15, 2007 4:36 am Post subject: |
|
|
Chevalier
Joined: 05 Nov 2005 Posts: 401
|
Hi Jeff,
The JAR does appear in the in the execution group (in fact the flow that uses the JavaCompute node would not deploy at all unless that JAR is deployed with it). And yes I restarted the broker.
I will turn on debug tracing as you suggest and see what appears.
Thanks
Fraser. |
|
Back to top |
|
 |
goffinf |
Posted: Sat Sep 15, 2007 6:07 am Post subject: |
|
|
Chevalier
Joined: 05 Nov 2005 Posts: 401
|
H'mmm .... after playing around with tracing for a bit, which didn't reveal anything especially useful I took another look at the Java source code and noted that when the exception occurs, in the Catch block there was only :-
e.printStackTrace();
So, expecting to get some richer exception information through, I changed this to create and propogate an exception, recompiled, redeployed, restarted the broker, .... and now everything is working OK.
There doesn't seem to much of a rationale to this since, the code that I changed was handling the exception after it had occurred, and now, well the exception doesn't occur ... go figure ?
Perhaps you Java guys know better ?
Fraser. |
|
Back to top |
|
 |
jefflowrey |
Posted: Sat Sep 15, 2007 6:49 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
..
I hate to say it, but it may just have been restarting the Broker that did it.
I've seen odd issues like with Broker class loaders where it seems they don't *always* load new stuff at startup. I can't really say for sure, and I certainly can't speculate why - but I've seen similar behavior myself.
It may be an optimization in the JVM code somewhere, where it tries to avoid reloading the entire class registry into the JVM if it doesn't think it has to. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|