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 » Workflow Engines - IBM MQ Workflow & Business Process Choreographer » [SOLVED] agent.locate() with 3.6 native fmcjapi.jar

Post new topic  Reply to topic
 [SOLVED] agent.locate() with 3.6 native fmcjapi.jar « View previous topic :: View next topic » 
Author Message
chintu
PostPosted: Thu Jun 22, 2006 11:04 am    Post subject: [SOLVED] agent.locate() with 3.6 native fmcjapi.jar Reply with quote

Acolyte

Joined: 27 Dec 2004
Posts: 64

We have a java program which suspends process instances. This was working as desired using the fmcojagt.jar. We have since migrated from 3.4 to 3.6 and replaced the fmcojagt.jar with the new fmcjapi.jar. Now I get a java.javax...ClassNotfound error at agent.locate() when I run this script. I have included the directory where the fmcrc file is located to the classpath. There are several directories which have this file, so I am using the directory in which the file has the latest time stamp. Still no luck. I then enabled tracing on the initialization of the native api using

Code:

java -DFMC_INSTANT_TRACE=TRUE Completor


This generated the FmcInstantTrace.log file.

The contents of this file are greek to me. Can any one please point out what me be wrong?


2006-06-22, 14:53:10.124, com.ibm.workflow.api.Agent.java(340), ( 3,Fl,Ap), com.ibm.workflow.api.Agent.java(-644492625-main), com.ibm.workflow.api.Agent::setConfigurationID, >entry: Parameter: new ConfigId: BPI
2006-06-22, 14:53:10.436, com.ibm.workflow.api.Agent.java(447), ( 3,Fl,Ap), com.ibm.workflow.api.Agent.java(-644492625-main), com.ibm.workflow.api.Agent::setLocator, >entry: Parameter: locator: 4
2006-06-22, 14:53:10.493, com.ibm.workflow.api.Agent.java(479), ( 3,Fl,Ap), com.ibm.workflow.api.Agent.java(-644492625-main), com.ibm.workflow.api.Agent::setLocator, <exit
2006-06-22, 14:53:10.496, com.ibm.workflow.catalog.FmcProfile.java(408), ( 3,Fl,Ap), com.ibm.workflow.api.Agent.java(-644492625-main), com.ibm.workflow.catalog.FmcProfile::GetInstance, >entry
2006-06-22, 14:53:10.496, com.ibm.workflow.catalog.FmcProfile.java(65), ( 3,Fl,Ap), com.ibm.workflow.api.Agent.java(-644492625-main), com.ibm.workflow.catalog.FmcProfile::CreateInstance, >entry
2006-06-22, 14:53:10.499, com.ibm.workflow.catalog.FmcProfile.java(81), ( 3,Fl,Ap), com.ibm.workflow.api.Agent.java(-644492625-main), com.ibm.workflow.catalog.FmcProfile::loadProfile, >entry: Parameter: (null)
2006-06-22, 14:53:10.609, com.ibm.workflow.catalog.FmcProfile.java(82), ( 3,Fl,Ap), com.ibm.workflow.api.Agent.java(-644492625-main), com.ibm.workflow.catalog.FmcProfile::loadProfile, encoding: ISO8859_1
2006-06-22, 14:53:10.609, com.ibm.workflow.catalog.FmcProfile.java(241), ( 3,Fl,Ap), com.ibm.workflow.api.Agent.java(-644492625-main), com.ibm.workflow.catalog.FmcProfile::loadInstallationProfile, >entry
2006-06-22, 14:53:10.613, com.ibm.workflow.catalog.FmcProfile.java(243), ( 3,Fl,Ap), com.ibm.workflow.api.Agent.java(-644492625-main), com.ibm.workflow.catalog.FmcProfile::loadInstallationProfile, platform: 2
2006-06-22, 14:53:10.614, com.ibm.workflow.catalog.FmcProfile.java(293), ( 3,Fl,Ap), com.ibm.workflow.api.Agent.java(-644492625-main), com.ibm.workflow.catalog.FmcProfile::loadInstallationProfile, <exit: Returning String: found
2006-06-22, 14:53:10.615, com.ibm.workflow.catalog.FmcProfile.java(99), ( 3,Fl,Ap), com.ibm.workflow.api.Agent.java(-644492625-main), com.ibm.workflow.catalog.FmcProfile::loadProfile, root: /var/fmc
2006-06-22, 14:53:10.616, com.ibm.workflow.catalog.FmcProfile.java(303), ( 3,Fl,Ap), com.ibm.workflow.api.Agent.java(-644492625-main), com.ibm.workflow.catalog.FmcProfile::loadGeneralProperties, >entry: Parameter: /var/fmc
2006-06-22, 14:53:10.655, com.ibm.workflow.catalog.FmcProfile.java(314), ( 3,Fl,Ap), com.ibm.workflow.api.Agent.java(-644492625-main), com.ibm.workflow.catalog.FmcProfile::loadGeneralProperties, <exit
2006-06-22, 14:53:10.655, com.ibm.workflow.catalog.FmcProfile.java(107), ( 3,Fl,Ap), com.ibm.workflow.api.Agent.java(-644492625-main), com.ibm.workflow.catalog.FmcProfile::loadProfile, defaultConfig: BPI
2006-06-22, 14:53:10.655, com.ibm.workflow.catalog.FmcProfile.java(325), ( 3,Fl,Ap), com.ibm.workflow.api.Agent.java(-644492625-main), com.ibm.workflow.catalog.FmcProfile::loadConfigurationProperties, >entry: Parameter: root: /var/fmc cfg: BPI
2006-06-22, 14:53:10.657, com.ibm.workflow.catalog.FmcProfile.java(346), ( 3,Fl,Ap), com.ibm.workflow.api.Agent.java(-644492625-main), com.ibm.workflow.catalog.FmcProfile::loadConfigurationProperties, <exit
2006-06-22, 14:53:10.657, com.ibm.workflow.catalog.FmcProfile.java(413), ( 3,Fl,Ap), com.ibm.workflow.api.Agent.java(-644492625-main), com.ibm.workflow.catalog.FmcProfile::GetInstance, <exit
2006-06-22, 14:53:10.657, com.ibm.workflow.catalog.FmcProfile.java(357), ( 3,Fl,Ap), com.ibm.workflow.api.Agent.java(-644492625-main), com.ibm.workflow.catalog.FmcProfile::Find, >entry: Parameter: cfg: BPI key: SystemGroup
2006-06-22, 14:53:10.658, com.ibm.workflow.catalog.FmcProfile.java(81), ( 3,Fl,Ap), com.ibm.workflow.api.Agent.java(-644492625-main), com.ibm.workflow.catalog.FmcProfile::loadProfile, >entry: Parameter: BPI
2006-06-22, 14:53:10.658, com.ibm.workflow.catalog.FmcProfile.java(82), ( 3,Fl,Ap), com.ibm.workflow.api.Agent.java(-644492625-main), com.ibm.workflow.catalog.FmcProfile::loadProfile, encoding: ISO8859_1
2006-06-22, 14:53:10.658, com.ibm.workflow.catalog.FmcProfile.java(378), ( 3,Fl,Ap), com.ibm.workflow.api.Agent.java(-644492625-main), com.ibm.workflow.catalog.FmcProfile::Find, <exit: Returning String: BPIGRP
2006-06-22, 14:53:10.659, com.ibm.workflow.api.Agent.java(393), ( 3,Fl,Ap), com.ibm.workflow.api.Agent.java(-644492625-main), com.ibm.workflow.api.Agent::setConfigurationID, setConfigurationID = BPI
2006-06-22, 14:53:10.659, com.ibm.workflow.api.Agent.java(403), ( 3,Fl,Ap), com.ibm.workflow.api.Agent.java(-644492625-main), com.ibm.workflow.api.Agent::setConfigurationID, <exit
2006-06-22, 14:53:10.660, com.ibm.workflow.api.Agent.java(265), ( 3,Fl,Ap), com.ibm.workflow.api.Agent.java(-644492625-main), com.ibm.workflow.api.Agent::setName, >entry: Parameter: name: Completor
2006-06-22, 14:53:10.661, com.ibm.workflow.catalog.FmcProfile.java(408), ( 3,Fl,Ap), com.ibm.workflow.api.Agent.java(-644492625-main), com.ibm.workflow.catalog.FmcProfile::GetInstance, >entry
2006-06-22, 14:53:10.661, com.ibm.workflow.catalog.FmcProfile.java(413), ( 3,Fl,Ap), com.ibm.workflow.api.Agent.java(-644492625-main), com.ibm.workflow.catalog.FmcProfile::GetInstance, <exit
2006-06-22, 14:53:10.683, com.ibm.workflow.api.Agent.java(309), ( 3,Fl,Ap), com.ibm.workflow.api.Agent.java(-644492625-main), com.ibm.workflow.api.Agent::setName, <exit
2006-06-22, 14:53:10.684, com.ibm.workflow.api.Agent.java(183), ( 3,Fl,Ap), com.ibm.workflow.api.Agent.java(-644492625-main), com.ibm.workflow.api.Agent::locate, >entry: Parameter: group: , system:
2006-06-22, 14:53:10.684, com.ibm.workflow.api.Agent.java(195), ( 3,Fl,Ap), com.ibm.workflow.api.Agent.java(-644492625-main), com.ibm.workflow.api.Agent::locate, >entry
2006-06-22, 14:53:10.684, com.ibm.workflow.api.Agent.java(195), ( 3,Fl,Ap), com.ibm.workflow.api.Agent.java(-644492625-main), com.ibm.workflow.api.Agent::locate, <exit
2006-06-22, 14:53:10.685, com.ibm.workflow.api.Agent.java(195), ( 3,Fl,Ap), com.ibm.workflow.api.Agent.java(-644492625-main), com.ibm.workflow.api.Agent::locate, >entry
2006-06-22, 14:53:10.685, com.ibm.workflow.api.Agent.java(195), ( 3,Fl,Ap), com.ibm.workflow.api.Agent.java(-644492625-main), com.ibm.workflow.api.Agent::locate, <exit: Returning String: BPI
2006-06-22, 14:53:10.686, com.ibm.workflow.api.Agent.java(195), ( 3,Fl,Ap), com.ibm.workflow.api.Agent.java(-644492625-main), com.ibm.workflow.api.Agent::locate, >entry: Parameter: cfg: BPI key: FMC_TRACE_FILE
2006-06-22, 14:53:10.686, com.ibm.workflow.api.Agent.java(195), ( 3,Fl,Ap), com.ibm.workflow.api.Agent.java(-644492625-main), com.ibm.workflow.api.Agent::locate, >entry: Parameter: BPI
2006-06-22, 14:53:10.686, com.ibm.workflow.api.Agent.java(195), ( 3,Fl,Ap), com.ibm.workflow.api.Agent.java(-644492625-main), com.ibm.workflow.api.Agent::locate, encoding: ISO8859_1
2006-06-22, 14:53:10.687, com.ibm.workflow.api.Agent.java(195), ( 3,Fl,Ap), com.ibm.workflow.api.Agent.java(-644492625-main), com.ibm.workflow.api.Agent::locate, <exit: Returning String: null
2006-06-22, 14:53:10.687, com.ibm.workflow.api.Agent.java(195), ( 3,Fl,Ap), com.ibm.workflow.api.Agent.java(-644492625-main), com.ibm.workflow.api.Agent::locate, >entry: Parameter: cfg: BPI key: FMC_TRACE_CRITERIA
2006-06-22, 14:53:10.687, com.ibm.workflow.api.Agent.java(195), ( 3,Fl,Ap), com.ibm.workflow.api.Agent.java(-644492625-main), com.ibm.workflow.api.Agent::locate, >entry: Parameter: BPI
2006-06-22, 14:53:10.688, com.ibm.workflow.api.Agent.java(195), ( 3,Fl,Ap), com.ibm.workflow.api.Agent.java(-644492625-main), com.ibm.workflow.api.Agent::locate, encoding: ISO8859_1
2006-06-22, 14:53:10.688, com.ibm.workflow.api.Agent.java(195), ( 3,Fl,Ap), com.ibm.workflow.api.Agent.java(-644492625-main), com.ibm.workflow.api.Agent::locate, <exit: Returning String: null
2006-06-22, 14:53:10.689, com.ibm.workflow.api.Agent.java(195), ( 3,Fl,Ap), com.ibm.workflow.api.Agent.java(-644492625-main), com.ibm.workflow.api.Agent::locate, >entry: Parameter: cfg: BPI key: FMC_SPLIT_TRACES
2006-06-22, 14:53:10.690, com.ibm.workflow.api.Agent.java(195), ( 3,Fl,Ap), com.ibm.workflow.api.Agent.java(-644492625-main), com.ibm.workflow.api.Agent::locate, >entry: Parameter: BPI
2006-06-22, 14:53:10.690, com.ibm.workflow.api.Agent.java(195), ( 3,Fl,Ap), com.ibm.workflow.api.Agent.java(-644492625-main), com.ibm.workflow.api.Agent::locate, encoding: ISO8859_1
2006-06-22, 14:53:10.690, com.ibm.workflow.api.Agent.java(195), ( 3,Fl,Ap), com.ibm.workflow.api.Agent.java(-644492625-main), com.ibm.workflow.api.Agent::locate, <exit: Returning String: null
2006-06-22, 14:53:10.690, com.ibm.workflow.api.Agent.java(195), ( 3,Fl,Ap), com.ibm.workflow.api.Agent.java(-644492625-main), com.ibm.workflow.api.Agent::locate, >entry: Parameter: cfg: BPI key: FMC_FLIP_FLOP_TRACES
2006-06-22, 14:53:10.691, com.ibm.workflow.api.Agent.java(195), ( 3,Fl,Ap), com.ibm.workflow.api.Agent.java(-644492625-main), com.ibm.workflow.api.Agent::locate, >entry: Parameter: BPI
2006-06-22, 14:53:10.691, com.ibm.workflow.api.Agent.java(195), ( 3,Fl,Ap), com.ibm.workflow.api.Agent.java(-644492625-main), com.ibm.workflow.api.Agent::locate, encoding: ISO8859_1
2006-06-22, 14:53:10.691, com.ibm.workflow.api.Agent.java(195), ( 3,Fl,Ap), com.ibm.workflow.api.Agent.java(-644492625-main), com.ibm.workflow.api.Agent::locate, <exit: Returning String: null
2006-06-22, 14:53:10.692, com.ibm.workflow.api.Agent.java(195), ( 3,Fl,Ap), com.ibm.workflow.api.Agent.java(-644492625-main), com.ibm.workflow.api.Agent::locate, >entry: Parameter: cfg: BPI key: FMC_ASYNCHRONOUS_TRACE
2006-06-22, 14:53:10.693, com.ibm.workflow.api.Agent.java(195), ( 3,Fl,Ap), com.ibm.workflow.api.Agent.java(-644492625-main), com.ibm.workflow.api.Agent::locate, >entry: Parameter: BPI
2006-06-22, 14:53:10.693, com.ibm.workflow.api.Agent.java(195), ( 3,Fl,Ap), com.ibm.workflow.api.Agent.java(-644492625-main), com.ibm.workflow.api.Agent::locate, encoding: ISO8859_1
2006-06-22, 14:53:10.693, com.ibm.workflow.api.Agent.java(195), ( 3,Fl,Ap), com.ibm.workflow.api.Agent.java(-644492625-main), com.ibm.workflow.api.Agent::locate, <exit: Returning String: null
2006-06-22, 14:53:10.694, com.ibm.workflow.api.Agent.java(195), ( 3,Fl,Ap), com.ibm.workflow.api.Agent.java(-644492625-main), com.ibm.workflow.api.Agent::locate, >entry: Parameter: cfg: BPI key: FMC_TRACE_FILE_SIZE
2006-06-22, 14:53:10.694, com.ibm.workflow.api.Agent.java(195), ( 3,Fl,Ap), com.ibm.workflow.api.Agent.java(-644492625-main), com.ibm.workflow.api.Agent::locate, >entry: Parameter: BPI
2006-06-22, 14:53:10.696, com.ibm.workflow.api.Agent.java(195), ( 3,Fl,Ap), com.ibm.workflow.api.Agent.java(-644492625-main), com.ibm.workflow.api.Agent::locate, encoding: ISO8859_1
2006-06-22, 14:53:10.696, com.ibm.workflow.api.Agent.java(195), ( 3,Fl,Ap), com.ibm.workflow.api.Agent.java(-644492625-main), com.ibm.workflow.api.Agent::locate, <exit: Returning String: null


Here are the contents of the fmcrc file
Code:

Installation/InstallationDirectory=/usr/lpp/fmc
Installation/ConfigurationRootDirectory=/var/fmc
Installation/InstalledComponents=WOSMEIHPGKUAD
Installation/MQWorkflowAdministrator=fmc
Installation/MQWorkflowGroup=fmcgrp
Installation/VRM=030600
Installation/ServiceLevel=2
Installation/Language=enu
Installation/RTDatabaseType=DB2
Installation/MQConnectionType=MQServer


Last edited by chintu on Mon Jun 26, 2006 12:58 pm; edited 2 times in total
Back to top
View user's profile Send private message
hos
PostPosted: Fri Jun 23, 2006 2:25 am    Post subject: Reply with quote

Chevalier

Joined: 03 Feb 2002
Posts: 470

Hi,

for me this looks like a CLASSPATH problem. However I cannot tell for sure as you do not document the exception in your append.
Back to top
View user's profile Send private message
chintu
PostPosted: Fri Jun 23, 2006 5:55 am    Post subject: Reply with quote

Acolyte

Joined: 27 Dec 2004
Posts: 64

Hos,

Here is script which calls the java program.

Code:

#export CLASSPATH=$CLASSPATH:.:/usr/lpp/fmc/bin/fmcojagt.jar
export CLASSPATH=$CLASSPATH:.:/usr/lpp/fmc/bin/fmcjapi.jar
export CLASSPATH=$CLASSPATH:.:/opt/fmc/bpi/
export EXTSHM=ON
java -DFMC_INSTANT_TRACE=TRUE Completor

/opt/fmc/bpi/ is where the fmcrc file is located. There is another fmcrc located at /usr/lpp/fmc whose contents are entirely from the one in /opt/fmc/bpi. I tried using both and got different errors.


Code:

         Agent agent = new Agent();
         System.out.println("new agent declared");
         agent.setConfigurationID(mqwfConfig);
         System.out.println(mqwfConfig + " is set as the agent's config ID");
         agent.setName("Completor");
         System.out.println("agent Name set");

         // Locate the default execution service in the default system group
         service = agent.locate("", "");   
         System.out.println("got execution service from agent");


output if the contents of the fmcrc file are
Code:

Configuration/BPI/ConfigurationAdministrator=fmc
Configuration/BPI/ConfigurationGroup=fmcgrp
Configuration/BPI/ConfiguredComponents=ASIU
Configuration/BPI/SystemGroup=BPIGRP
.....
...

is
Code:

Attaching to MQWF Configuration : BPI
new agent declared
BPI is set as the agent's config ID
agent Name set
Exception in thread "main" java.lang.NoClassDefFoundError: javax/jms/Queue

Thats all I get even though I am printing the stack trace.

output if the contents of the fmcrc file are
Code:

Installation/InstallationDirectory=/usr/lpp/fmc
Installation/ConfigurationRootDirectory=/var/fmc
.....
...

is
Code:
Attaching to MQWF Configuration : BPI
new agent declared
Exception caught during init: java.beans.PropertyVetoException: FMC38001E Configuration BPI cannot be set
java.beans.PropertyVetoException: FMC38001E Configuration BPI cannot be set
        at com.ibm.workflow.api.Agent.failureConfiguration(Agent.java:584)
        at com.ibm.workflow.api.Agent.setConfigurationID(Agent.java:374)
        at Completor.init(Completor.java:77)
        at Completor.<init>(Completor.java:24)
        at Completor.main(Completor.java:243)


So, I put a sytax error in
Installation/InstallationDirectory=/usr/lpp/fmc
Installation/ConfigurationRootDirectory=/var/fmc
....
and ran the script again, But the contents of FmcInstantTrace.log are the same. I am totally confused as to which fmcrc file is being used.


Last edited by chintu on Fri Jun 23, 2006 6:51 am; edited 1 time in total
Back to top
View user's profile Send private message
jmac
PostPosted: Fri Jun 23, 2006 6:46 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Jun 2001
Posts: 3081
Location: EmeriCon, LLC

chintu:

When I see this error
Quote:
Exception in thread "main" java.lang.NoClassDefFoundError: javax/jms/Queue


I assume you are missing this jar:
jms.jar

Have you tried this?
_________________
John McDonald
RETIRED
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
chintu
PostPosted: Fri Jun 23, 2006 6:58 am    Post subject: Reply with quote

Acolyte

Joined: 27 Dec 2004
Posts: 64

John, The jms jar was already in the classpath and added it explicityand tried again. With the
Code:
Configuration/BPI/ConfigurationAdministrator=fmc
Configuration/BPI/ConfigurationGroup=fmcgrp
Configuration/BPI/ConfiguredComponents=ASIU
Configuration/BPI/SystemGroup=BPIGRP
.....
...
fmcrc file
I still get the same classpath error.
But if I use the
Code:
Installation/InstallationDirectory=/usr/lpp/fmc
Installation/ConfigurationRootDirectory=/var/fmc
.....
...

fmcrc file. I get a FMC38001E Configuration CONFIGID cannot be set, the same problem reported in
http://www.mqseries.net/phpBB2/viewtopic.php?t=22761

I have edited my previous post with some additional info.
Back to top
View user's profile Send private message
hos
PostPosted: Sun Jun 25, 2006 11:37 pm    Post subject: Reply with quote

Chevalier

Joined: 03 Feb 2002
Posts: 470

Chintu,

you should definitely read the Installation Guide! fmcrc files represent the structure of MQWF configuration steps and are not intended to be manipulated manually. There exists a hirarchy of several fmcrc files and they depend on each other. If you move an fmcrc file to a different place or change its content you will run into such errors as you describe. fmcrc files are managed by fmczutil during configuration of an MQWF configuration ID.

With respect to the jms.jar file: this is not the only one MQ jar file that needs to be in the CLASSPATH. The Installation Guide lists the MQ jar files that are required for the native Java API.

From what I hear in your problem description, my recommendation is to use the MQWF tools instead of arranging your dependencies manually.
Back to top
View user's profile Send private message
chintu
PostPosted: Mon Jun 26, 2006 12:54 pm    Post subject: Reply with quote

Acolyte

Joined: 27 Dec 2004
Posts: 64

jmac wrote:
chintu:

When I see this error
Quote:
Exception in thread "main" java.lang.NoClassDefFoundError: javax/jms/Queue


I assume you are missing this jar:
jms.jar

Have you tried this?


As john suggested, I added this file to the classpath. But there was a typo in the file location, hence I got the same classNotFound error. Me being super intelligent..messed with the locations of the fmcrc file assuming that the issue was with the fmcrc file not being in the classpath. This caused these chain of issues.Thanks all for your help.
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 » Workflow Engines - IBM MQ Workflow & Business Process Choreographer » [SOLVED] agent.locate() with 3.6 native fmcjapi.jar
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.