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 » IBM MQ Java / JMS » Java method not found

Post new topic  Reply to topic
 Java method not found « View previous topic :: View next topic » 
Author Message
darren
PostPosted: Thu Mar 29, 2007 4:51 am    Post subject: Java method not found Reply with quote

Newbie

Joined: 29 Mar 2007
Posts: 6
Location: South Africa

Hi all,
I have written a java class that I have compiled and included into a zip file with all its relevant libraries. I then included the zip file into an unrelated java application just to test that it was working and that all the relevant libraries were found and that all file dependancies where fine. I have checked that the signature of the method follows the rules of the data type mapping between ESQL and Java.

I followed the help files on deploying the files to the system classpath and I have rebooted numerous times during testing.

The toolkit gives the following about the version

Message Brokers Toolkit for WebSphere Studio

Version: 5.0.4
Build id: 20040715_1621

However when I try to deploy my flows I get the following error:

Its a BIP2943E error.

( WBRK_BROKER.default ) The Java Method 'myPackage.myClass.myMethod' could not be found as its containing class could not be found in the broker classpath

The specified Java Method 'myPackage.myClass.myMethod' belongs to a class that could not be found in the broker classpath. Ensure that the fully qualified name of the method is correct and that its containing class or jar file is in the broker classpath.

Examine and correct the SQL program.

I have checked that the spelling is correct
I have checked that the package name is correct.
I have echoed the System Classpath variable to check that its there.

I am sure that its something small please could you suggest a few more checks that I could do.
_________________
Thanks
Darren
Back to top
View user's profile Send private message
pathipati
PostPosted: Wed Jun 27, 2007 1:21 pm    Post subject: Reply with quote

Master

Joined: 03 Mar 2006
Posts: 296

I am also getting the same error though I placed .jar file in shared-classes folder of Broker workpath. Can some one tell me how to fix this?
Back to top
View user's profile Send private message Yahoo Messenger
jbanoop
PostPosted: Wed Jun 27, 2007 9:15 pm    Post subject: Reply with quote

Chevalier

Joined: 17 Sep 2005
Posts: 401
Location: SC

I hope you have jared the class (assuming you developed on the toolkit itself in a java project, by exporting the project as a jar).

try using a small path to the jar file. like C:\mb\test.jar and try adding that path to the system class path, restart the machine and try.

could you show us the ESQL code you are using and the code for the java class ?
Back to top
View user's profile Send private message Yahoo Messenger
darren
PostPosted: Thu Jun 28, 2007 10:49 am    Post subject: I found a work around Reply with quote

Newbie

Joined: 29 Mar 2007
Posts: 6
Location: South Africa

Hey All.

My development environment is on a windows machine, so I cheated slightly but it works, I put my JAR file under <IBM PATH>\WBIMB\BIN folder and any classpath settings needed by the JAR itself, did a reboot and it worked.
Not as tidy as I'd like to be, but when it went to our AIX environment it could be put in the correct directories and classpaths.

This error has lead me to a few conclusions,
1) The dependant classes or JAR files need to be visible to your JAR file else you get this error

2) If you don't put your jar file in the bin folder then I'm afraid I'm not sure where it should go. But I'm teachable so if you know please tell us.

3) Older versions of MB/WBI run JRE 1.3 and you could get a third party JAR or class that needs 1.4 or higher. This very thing caused me to delve for the first time into RMI(quite fun really).

4) I had a funny occurence in a different jar file project where the necessary Java class(it was not in a JAR) had to be in the JRE's lib folder before it worked.

Please let me know if I am breaking any spoken or unspoken "Best practices", coz I don't want future readers to do these things if they are wrong.

Hope this helps.
_________________
Thanks
Darren
Back to top
View user's profile Send private message
marcin.kasinski
PostPosted: Thu Jun 28, 2007 11:03 am    Post subject: Re: Java method not found Reply with quote

Sentinel

Joined: 21 Dec 2004
Posts: 850
Location: Poland / Warsaw

darren wrote:
Hi all,
I have written a java class that I have compiled and included into a zip file


Hi, show ESQL code, JAVA method definition and entire error message.
_________________
Marcin
Back to top
View user's profile Send private message Visit poster's website
marcin.kasinski
PostPosted: Thu Jun 28, 2007 11:05 am    Post subject: Reply with quote

Sentinel

Joined: 21 Dec 2004
Posts: 850
Location: Poland / Warsaw

pathipati wrote:
I am also getting the same error though I placed .jar file in shared-classes folder of Broker workpath. Can some one tell me how to fix this?




Hi,

Open new thread, show ESQL code, JAVA method definition and entire error message.
_________________
Marcin
Back to top
View user's profile Send private message Visit poster's website
darren
PostPosted: Thu Jun 28, 2007 9:48 pm    Post subject: One more thing Reply with quote

Newbie

Joined: 29 Mar 2007
Posts: 6
Location: South Africa

I forgot to mention when I explained how I fixed it, that ESQL will not use arrays as parameters.

You also get that error if you use the wrong data type in your parameters of your java code eg. an integer in ESQL must be a Long in Java.

Hope you solve this.
_________________
Thanks
Darren
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » Java method not found
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.