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 Index » WebSphere Message Broker (ACE) Support » Problem with Java Classloader service in WMB 7.0.0.2

Post new topic  Reply to topic Goto page 1, 2  Next
 Problem with Java Classloader service in WMB 7.0.0.2 « View previous topic :: View next topic » 
Author Message
paerjohan
PostPosted: Wed Mar 02, 2011 3:34 am    Post subject: Problem with Java Classloader service in WMB 7.0.0.2 Reply with quote

Newbie

Joined: 19 Jan 2010
Posts: 8

Hello

I have written a simple test flow with only an HTTPInput node and a JavaCompute node to test the Java classloader service in WMB 7.0.0.2. But when I deploy the flow I get a
ClassNotFoundException for the java class used by the JavaCompute node (the class given in the "Java class" property of the JavaCompute node).


Code:
BIP4157E: The user-defined node 'Java Compute' could not be deployed. Details: java.lang.ClassNotFoundException: dk.atp.iet.test.CLTest_JavaCompute

The node could not be deployed because an error in the node's 'onInitialize' method prevented the node from initializing.

Review the details given above. Report the error to the node's writer if you cannot correct the error yourself.

BIP4395E: Java exception: 'java.lang.ClassNotFoundException'; thrown from class name: 'java.lang.ClassNotFoundException', method name: '<init>', file: 'ClassNotFoundException.java', line: '77'

The message contains that data associated with a Java exception.

No user action required.


Here is my JavaClassLoader services:

Code:
C:\wmb7>mqsireportproperties MB7BROKER -c JavaClassLoader -o AllReportableEntity
Names -r

JavaClassLoader
  Template
    includedDeployedJars='automatic'
    sharedJarPath=''
  atpws
    includedDeployedJars='automatic'
    sharedJarPath='C:\WMBJavaClassLoaderServices\atpws\'

BIP8071I: Successful command completion.
I have tried both "atpws" and "Template" on the Java classloader service property of the JavaCompute node. In both cases I get the exception
when I deploy the flow. If I don't set the Java classloader service property, the flow in deployed successfully.
I also asked a colleugue to test the ClassLoader Service functionallity of WMB7 and she also got the same problem when deploying.

Pär-Johan
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Mar 02, 2011 4:15 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Hi -
The comments about the OnInitialize failing are pretty clear? That's a problem with your code somewhere, likely not finding a resource it needs.

Take a service trace of the deployment.

Examine the console.txt file for the EG you are deploying to.
Back to top
View user's profile Send private message
Esa
PostPosted: Wed Mar 02, 2011 4:45 am    Post subject: Reply with quote

Grand Master

Joined: 22 May 2008
Posts: 1387
Location: Finland

Hello Pär Johan,

I bet you just need to restart the broker after adding the configurable classloader. And every time you have added a jar file in the SharedJarPath
Back to top
View user's profile Send private message
paerjohan
PostPosted: Wed Mar 02, 2011 5:03 am    Post subject: Reply with quote

Newbie

Joined: 19 Jan 2010
Posts: 8

Hello again

I'm only trying to deploy the skeleton code for the JavaCompute node (see below),
I have not added any extra code.
I can only deploy when the Classloader service property is not set.

Esa:
I have restarted the broker after added the configurable classloader, but I'm still getting the same error.


Code:
package dk.atp.iet.test;

import com.ibm.broker.javacompute.MbJavaComputeNode;
import com.ibm.broker.plugin.*;

public class CLTest_JavaCompute extends MbJavaComputeNode {

   public void evaluate(MbMessageAssembly assembly) throws MbException {
      MbOutputTerminal out = getOutputTerminal("out");
      MbOutputTerminal alt = getOutputTerminal("alternate");

      MbMessage message = assembly.getMessage();

      // ----------------------------------------------------------
      // Add user code below

      // End of user code
      // ----------------------------------------------------------

      // The following should only be changed
      // if not propagating message to the 'out' terminal

      out.propagate(assembly);
   }

}
Back to top
View user's profile Send private message
Esa
PostPosted: Wed Mar 02, 2011 5:37 am    Post subject: Reply with quote

Grand Master

Joined: 22 May 2008
Posts: 1387
Location: Finland

Did you package your CLTest_JavaCompute class in a jar file and put the jar in your sharedJarPath (C:\WMBJavaClassLoaderServices\atpws) ?
Back to top
View user's profile Send private message
paerjohan
PostPosted: Wed Mar 02, 2011 5:57 am    Post subject: Reply with quote

Newbie

Joined: 19 Jan 2010
Posts: 8

Hello Esa

If I understand the documentation correct, the sharedJarPath is for additional classes.
If I choose automatic in the includedDeployedJars, the jar that contains the CLTest_JavaCompute class should be loaded, because this is the class associated by the JavaCompute node. So it should not be neccessary to add it to the sharedJarPath. Or have I misunderstood this completely?
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Mar 02, 2011 5:57 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

I just ran some tests on this. I'm able to reproduce the error you're seeing.

I'm also able to resolve it by putting the JCN Jar file in the classloader folder, as Esa mentions.

However, that shouldn't be necessary with an includedDeployedJars of automatic.

I suspect the problem is the deployment order - that the message flow is being deployed before the jar file.

So try deploying just the JAR file and then just the message flow.

And then open a PMR and report this. Include a specific link to this discussion.
Back to top
View user's profile Send private message
paerjohan
PostPosted: Wed Mar 02, 2011 6:12 am    Post subject: Reply with quote

Newbie

Joined: 19 Jan 2010
Posts: 8

Yes, I'm also able to resolve it if I'm putting JCN Jar file in the classloader folder.

I've also tried to deploy the jar-file first and then the flow. I can deploy the jar-file, but when I try to deploy to messageflow only I get the same error.

I will open a PMR, and while waiting for a fix I will use Esa's method.

Thank you
Back to top
View user's profile Send private message
Esa
PostPosted: Wed Mar 02, 2011 6:20 am    Post subject: Reply with quote

Grand Master

Joined: 22 May 2008
Posts: 1387
Location: Finland

I recall I never managed to make automatic work. But I soon ended up calling the JCN from a separate subflow project, and then automatic was not an option any more.

Did you try the third option, assigning a semicolon separated list of jar file names to IncludedDeployedJars?
Back to top
View user's profile Send private message
paerjohan
PostPosted: Wed Mar 02, 2011 6:27 am    Post subject: Reply with quote

Newbie

Joined: 19 Jan 2010
Posts: 8

Quote:
Did you try the third option, assigning a semicolon separated list of jar file names to IncludedDeployedJars?

Yes, I have tried it. It didn't help .
Back to top
View user's profile Send private message
lalit999
PostPosted: Sat Apr 07, 2012 9:32 am    Post subject: Same issue Reply with quote

Newbie

Joined: 07 Apr 2012
Posts: 3

We are facing the same issue with WMB 7.0.0.1. Can someone please post the solution if any.
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Mon Apr 09, 2012 5:11 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

"We are facing the same issue"?

paerjohan overwrote the default classloader which caused him to not be able to load classes from the standard locations.

Did you do this also?
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
lalit999
PostPosted: Mon Apr 09, 2012 10:27 am    Post subject: Reply with quote

Newbie

Joined: 07 Apr 2012
Posts: 3

Yes, I have created java class loader configurable service and had set the SharedDeploypath to local folder where all jar's are present.

While deploying the .bar file getting ClassNotFound exception for one of the class eventhough it is present in the Shared deployed path.

Please advise
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Mon Apr 09, 2012 10:46 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

Since this is a different problem than what paerjohan had, why not create a new thread instead of opening an old one.

Collect MustGather artifacts and post relevant parts of the service trace in your new thread, surrounded by [c o d e] tags.

Alternately, you could open a PMR with same.
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
lancelotlinc
PostPosted: Mon Apr 09, 2012 10:49 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

7.0.0.3 has two classloader APARs. you may like to upgrade to 7.0.0.3 and see if your problem is fixed:

http://www-01.ibm.com/support/docview.wss?rs=171&uid=swg1IC75710

http://www-01.ibm.com/support/docview.wss?rs=171&uid=swg1IC70189
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Problem with Java Classloader service in WMB 7.0.0.2
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.