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 » calling java method form ESQL

Post new topic  Reply to topic
 calling java method form ESQL « View previous topic :: View next topic » 
Author Message
jeeth_m
PostPosted: Fri Nov 14, 2008 4:23 am    Post subject: calling java method form ESQL Reply with quote

Voyager

Joined: 21 Jan 2002
Posts: 93

Hi,

I have a jar file which calls the BO server to get the report out of it. I want to call the methods in the jar file from ESQL.

Here is what i have done so far:

My ESQL code:

CREATE COMPUTE MODULE BoFlowTest_Compute
CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
CALL CopyMessageHeaders();
-- CALL CopyEntireMessage();
DECLARE Result CHAR;
SET Result = TestBO();
SET OutputRoot.XML.BOResult.Result = Result;

RETURN TRUE;
END;

CREATE PROCEDURE TestBO()
RETURNS CHAR
LANGUAGE JAVA
EXTERNAL NAME "com.test.Sample.callBOService";

I have placed the jar file in
C:\Documents and Settings\All Users\Application Data\IBM\MQSI\shared-classes
jar file name is sample.jar
package name is com.test
Class name is Sample
Method is callBOService'
But when i run the flow, it says it cannot find the class.

Here is the error:

The Java Method ''com.test.Sample.callBOService'' could not be found as its containing class could not be found in the broker classpath

The specified Java Method ''com.test.Sample.callBOService'' 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.

Any idea what i am doing wrong?
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
jeeth_m
PostPosted: Fri Nov 14, 2008 7:48 am    Post subject: Reply with quote

Voyager

Joined: 21 Jan 2002
Posts: 93

The JAR file has some property files in it. Could it be a problem. I have tried calling jar file javacompute which is provided by WMB. It has worked fine.
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
Esa
PostPosted: Mon Nov 17, 2008 11:23 am    Post subject: Reply with quote

Grand Master

Joined: 22 May 2008
Posts: 1387
Location: Finland

Did you restart the broker after placing the jar file in the working directory?

Also make sure that the method you call is a static one.
Back to top
View user's profile Send private message
jeeth_m
PostPosted: Wed Nov 26, 2008 4:17 am    Post subject: Reply with quote

Voyager

Joined: 21 Jan 2002
Posts: 93

Hi Esa,
i was on vacation. hence couldnt reply. We tried all you mentioned. still no luck. Which version of java is supported by WMB 6.0.0.7? any idea?

regards,
Jeeth
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
mqmatt
PostPosted: Wed Nov 26, 2008 9:57 am    Post subject: Reply with quote

Grand Master

Joined: 04 Aug 2004
Posts: 1213
Location: Hursley, UK

jeeth_m wrote:
Which version of java is supported by WMB 6.0.0.7? any idea?

Java 1.4.2 and Java 5.
Back to top
View user's profile Send private message
golam1983
PostPosted: Thu Nov 27, 2008 5:12 am    Post subject: Reply with quote

Apprentice

Joined: 27 Jun 2008
Posts: 35

I am not sure...did u tried deploying the jar in execution group where ur ESQL code is deployed. Just add the jar file along with ESQL and deploy...
Back to top
View user's profile Send private message
jeeth_m
PostPosted: Mon Dec 01, 2008 9:40 pm    Post subject: Reply with quote

Voyager

Joined: 21 Jan 2002
Posts: 93

Hi,
Jars were compiled using RSA. compiler version was 1.6 we changed it to 1.4 and it worked. It was a compiler problem but the error message showed unable to find classes.

Thanks much for all the input.
Regards,
Jeeth
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » calling java method form ESQL
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.