Author |
Message
|
goffinf |
Posted: Tue Sep 11, 2007 11:40 am Post subject: JavaCompute Failed Deploy |
|
|
Chevalier
Joined: 05 Nov 2005 Posts: 401
|
Env: MessageBroker v6 / Windows
I created my first flow containing a JavaCompute node. When I create the BAR the JAR file was added, but when I attempt to deploy I get the following message, any ideas ?.
The actual JAR file (called - miscTestsJava.jar) I found in :-
workspace6_Phase2\.metadata\.plugins\com.ibm.etools.mft.jcn
BIP4500E: Failed to deploy Java code resource 'JAR'. The Java stack trace is: 'java.lang.ClassLoader.findBootstrapClass(Native Method) java.lang.ClassLoader.findBootstrapClass0(ClassLoader.java(Inlined Compiled Code)) java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code)) java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code)) sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java(Compiled Code)) java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code)) com.ibm.broker.classloading.DummyClassLoader.loadClass(DummyClassLoader.java:207) java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code)) java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code)) com.ibm.broker.javacompute.MbRuntimeJavaComputeNode.createJavaComputeNode(Native Method) com.ibm.broker.javacompute.MbRuntimeJavaComputeNode.updateNodeClass(MbRuntimeJavaComputeNode.java:251) com.ibm.broker.javacompute.MbRuntimeJavaComputeNode.updateNodeClass(MbRuntimeJavaComputeNode.java:197) com.ibm.broker.javacompute.MbRuntimeJavaComputeNode.setJavaClass(MbRuntimeJavaComputeNode.java:179)'
The Java JAR file deployment to the broker failed. |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Sep 11, 2007 11:42 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Open a PMR. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
goffinf |
Posted: Tue Sep 11, 2007 11:52 am Post subject: |
|
|
Chevalier
Joined: 05 Nov 2005 Posts: 401
|
Slight update. After reading through some other posts I copied the JAR to jre/lib/ext (although I noted Jeff that you had said that this wasn't the correct approach - I'm not much of a Java person so happy to follow further advice on this). Restarted the broker and now I get this :-
BIP4395E: Java exception: 'java.lang.ArrayIndexOutOfBoundsException'; thrown from class name: 'com.ibm.broker.javacompute.MbRuntimeJavaComputeNode', method name: 'updateNodeClass', file: 'MbRuntimeJavaComputeNode.java', line: '239'
Something else to look into tommorrow I guess . Any ideas welcome.
Fraser. |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Sep 11, 2007 12:33 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Make sure you're at the latest maintenance levels on Toolkit and Runtime.
NEVER copy anything to jre/lib/ext.
EVER.
Never follow bad advice if you don't know what you're doing, especially when it's been identified as bad advice.
Something is clearly wrong either with your project(s) or your installation.
The documentation on your error message is very clear that your only recourse is to Open a PMR.
If it's something simple you've done wrong, then L2 support will clear it up for you. If it's something more complicated, it's going to take you at least as long, if not longer, to work through it here rather than with L3. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Sep 12, 2007 8:14 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
I saw a similar situation yesterday, actually.
In that case, the Java code was dependent on classes that were not deployed or otherwise on the classpath. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
goffinf |
Posted: Thu Sep 13, 2007 4:11 am Post subject: |
|
|
Chevalier
Joined: 05 Nov 2005 Posts: 401
|
jefflowrey wrote: |
I saw a similar situation yesterday, actually.
In that case, the Java code was dependent on classes that were not deployed or otherwise on the classpath. |
Thanks Jeff, this, and your previous post are (as per usual) good advice. I strongly suspect that there is a dependency with an external JAR.
I did add that JAR to the BAR file manually and deployed to the broker but that didn't resolve the issue. Was that the correct approach or is there another way of ensuring that the JAR will be found ??
Sorry for the simplicity of this question, how do I determine the current class path that the broker is using ?
Thanks again
Fraser. |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Sep 13, 2007 4:14 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Adding it to the BAR is a good way.
You may not have solved all the dependencies, though.
You might also be trying to run things or talk to things that simply can't be done in the Broker JVM. The Broker JVM should be considered just another J2SE JVM - it's not in any way a J2EE environment. So if you're trying to for example create an EJB... you may have a lot of work in front of you.
Or if you're trying to look stuff up in JNDI, again... not so much. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
goffinf |
Posted: Thu Sep 13, 2007 4:28 am Post subject: |
|
|
Chevalier
Joined: 05 Nov 2005 Posts: 401
|
jefflowrey wrote: |
You might also be trying to run things or talk to things that simply can't be done in the Broker JVM. |
I see. To make things more precise, I am calling a JAR which contains classes to compareXML instances (its called DiffX and was written by Christophe Lauret - its available from the Topologi site).
It makes use of SAX amongst other things but doesn't require any enterprise features or JNDI as far as I know. It *may* require a particular JDK version though ??
I have made further progress, from the point of view that I can delpoy my code the the broker and I have isolated the failure down to the single line of code that calls a method in the external library that actually starts the comparison process. Other code runs before this and makes use of functions within the same library.
I thought I'd try calling the classes from eSQL to see if that makes any difference. At the moment the eSQL cannot find the class but I'll persevere (it personal now
Fraser. |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Sep 13, 2007 4:33 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Yes, it could be that your external JAR is compiled for JDK 1.5.
Without manual intervention, Broker is JDK 1.4. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
goffinf |
Posted: Thu Sep 13, 2007 8:57 am Post subject: |
|
|
Chevalier
Joined: 05 Nov 2005 Posts: 401
|
jefflowrey wrote: |
Yes, it could be that your external JAR is compiled for JDK 1.5.
Without manual intervention, Broker is JDK 1.4. |
Right now we're getting somewhere. I recompiled the dependant classes using JDK 1.4, redeployed and voila, I can call the methods (oh after I had removed a throw or two !).
Anyway now I have a slightly different problem, but I'll raise that as a separate post so as not to create a massive thread.
Thanks a lot Jeff. |
|
Back to top |
|
 |
francoisvdm |
Posted: Thu Nov 22, 2007 11:18 am Post subject: |
|
|
Partisan
Joined: 09 Aug 2001 Posts: 332
|
jefflowrey wrote: |
Make sure you're at the latest maintenance levels on Toolkit and Runtime.
NEVER copy anything to jre/lib/ext.
EVER.
Never follow bad advice if you don't know what you're doing, especially when it's been identified as bad advice.
Something is clearly wrong either with your project(s) or your installation.
The documentation on your error message is very clear that your only recourse is to Open a PMR.
If it's something simple you've done wrong, then L2 support will clear it up for you. If it's something more complicated, it's going to take you at least as long, if not longer, to work through it here rather than with L3. |
.... but, will it work? Say I need to quickly test something, will this work or is there another way to get big jars to the broker?
Thanks _________________ If you do not know the answer or you get the urge to answer with "RTFM" or "Search better in this forum", please refrain from doing so, just move on to the next question. Much appreciated.
Francois van der Merwe |
|
Back to top |
|
 |
|