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 » Invoking a jar file from Flow

Post new topic  Reply to topic
 Invoking a jar file from Flow « View previous topic :: View next topic » 
Author Message
kirankinnu
PostPosted: Fri Jan 16, 2009 12:12 pm    Post subject: Invoking a jar file from Flow Reply with quote

Centurion

Joined: 12 Jun 2004
Posts: 128
Location: Chicago, IL

Hello Folks,
I am having an interesting issue over here. Here is the scenario.

We have a MB flow MB1.flow which calls a java method JM1. This class is under jar file JAR1. JM1 uses other jar JAR2 for parsing the data. If I run the JM1 outside the broker by feeding in the input, it runs fine. I deployed the flow into execution group along with JAR1 and JAR2. At run time, we are able to call the JM1, but once it reaches the parsing stage, its not recognising the class in JAR2. We are getting an error as Class not found error. I hope I did make sense. I did try putting the JAR2 under /shared-classes, but of no use. how does the broker load the classes of JAR2.

Would appreciate any inputs to this.

Thank You,
Kiran
Back to top
View user's profile Send private message
jr_martin
PostPosted: Fri Jan 16, 2009 6:25 pm    Post subject: Reply with quote

Apprentice

Joined: 24 Aug 2005
Posts: 36
Location: NY

I had the same issue...

I placed the jar file in some other directory and referenced it in mqsiprofile's CLASSPATH variable, bounced broker, then it was working ok.
Back to top
View user's profile Send private message
kirankinnu
PostPosted: Sun Jan 18, 2009 4:26 pm    Post subject: Reply with quote

Centurion

Joined: 12 Jun 2004
Posts: 128
Location: Chicago, IL

How are you setting the mqsiprofile's CLASSPATH variable. I did try setting the class path variable under environment variables and bounced the broker, but did not take it.

Thank You,
Kiran
Back to top
View user's profile Send private message
joebuckeye
PostPosted: Tue Jan 20, 2009 7:41 am    Post subject: Reply with quote

Partisan

Joined: 24 Aug 2007
Posts: 365
Location: Columbus, OH

Be aware that placing jar files in the shared-classes directory requires a broker restart to pick up any new jars in the directory or even changes to existing jar files.

We only place very stable, 3rd party jars in that directory (ie log4j and ojdbc).

For any other jars we use we deploy them via bar files. This way any new jars or changes to existing jar files are picked up at deployment time. The only downside to this is that each jar file would then need to be deployed to each execution group. It can become an issue if the jars are large and/or you have many execution groups.
Back to top
View user's profile Send private message
radha*
PostPosted: Wed Jan 21, 2009 9:52 pm    Post subject: Reply with quote

Newbie

Joined: 21 Jan 2009
Posts: 5

hi, I have some problem with jar file..I am trying to read a property file from a java class, via esql. I am getting a missing resource bundle exception, when I place the property file outside jar file. But, if I bundle the property file along with the jar file, my flow is successfully processed.

Ideally the propery file should have been detected even if it is placed outside the jar file..cant broker detect propery files placed in the sharedclasses folder?
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Jan 22, 2009 3:41 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

radha* wrote:
hi, I have some problem with jar file..I am trying to read a property file from a java class, via esql. I am getting a missing resource bundle exception, when I place the property file outside jar file. But, if I bundle the property file along with the jar file, my flow is successfully processed.

Ideally the propery file should have been detected even if it is placed outside the jar file..cant broker detect propery files placed in the sharedclasses folder?

Did you restart the broker after putting the properties file into the folder?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
radha*
PostPosted: Thu Jan 22, 2009 4:05 am    Post subject: Reply with quote

Newbie

Joined: 21 Jan 2009
Posts: 5

ya, I did. (quite a lot of times) , it didnt work in Windows...strangely..I found same jar, with property file out of jar..worked in unix...
why so??
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Jan 22, 2009 4:10 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

radha* wrote:
ya, I did. (quite a lot of times) , it didnt work in Windows...strangely..I found same jar, with property file out of jar..worked in unix...
why so??

Possibly because the relative or absolute path to the file contained a space?

_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
radha*
PostPosted: Thu Jan 22, 2009 6:13 am    Post subject: Reply with quote

Newbie

Joined: 21 Jan 2009
Posts: 5

I used ResourceBundle class, so no need to provide any path to the file..i
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 » WebSphere Message Broker (ACE) Support » Invoking a jar file from Flow
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.