Author |
Message
|
mqwhelp |
Posted: Sat Aug 10, 2002 4:23 am Post subject: Java Program inside PEA |
|
|
Voyager
Joined: 20 Dec 2001 Posts: 85 Location: TCS
|
Hi All,
I have associated a Java Program inside the Program of MQWF..
When I start the activity it does not show any output in PEA console which I am expecting..and it goes to executed state.
If I am associating the Visual Basic Program then that executable works ..
when I start the workitem
I have a doubt whether the PEA is not loading JVM correctly ..
Second Problem..
I have installed the MQWF at new machine with windows NT the program is not running there too..but a new windows open when I start the workitem remain untill workitem goes in executed state..
The dll it refers to is fmcx.dll...
Can anybody suggest on this.. |
|
Back to top |
|
 |
cstauss |
Posted: Tue Aug 13, 2002 5:21 am Post subject: |
|
|
Apprentice
Joined: 20 Feb 2002 Posts: 36
|
Launching a java app by PEA works well, but is not very well documented. In your
program properties, you must ensure that you have the following set correctly:
Path and file name of executable-this is your java interpretor-enter something like d:\WebSphere\AppServer\java\bin\java.exe
Command line parameters-this includes your classpath settings and the class you want to execute-enter something liks--classpath d:\fmcojagt.jar;.;d:\Apps RequestApproval
Working directory-this is the reference point from which the above commands will be issued- enter something like
d:\Apps
Assuming you have these parameters correctly set, and a JDK/JRE installed, things should work.
cas |
|
Back to top |
|
 |
mqwhelp |
Posted: Tue Aug 13, 2002 6:32 am Post subject: |
|
|
Voyager
Joined: 20 Dec 2001 Posts: 85 Location: TCS
|
Hi cas,
I have everything at right place...
According to you ,if my java file does not being getting loaded.
Then there has to be
"No class Def Found Error " must be printed inside PEA..console
But it is real surprise ,that program does not seem to work ..
What my assumption is something went wrong with JVM inside PEA...
I am able to execute the Visual Basic (example program) exe in actvity Impln..
With Java Program I am finding problem..earlier same was working ..
I have put the Thread.sleep(22223) in the beginnning of the Java Program
But my workitem immediately goes in executed mode..which I expect to be running state ..
How can I trouble shoot this problem...
Waiting for reply.. |
|
Back to top |
|
 |
cstauss |
Posted: Tue Aug 13, 2002 6:40 am Post subject: |
|
|
Apprentice
Joined: 20 Feb 2002 Posts: 36
|
For trouble-shooting, I would first try to ensure that everything java-wise is OK. Do this by running your java app standalone. I understand that you'll probably get some errors as container data is not being properly handled-but you should be able to validate that your java environment is setup correctly for this app. If there are any issues at this stage, you can use standard tools to debug-such as found in your IDE...
Unforntuately, there is no trace facility on the PEA that I know of. Also, the output should never appear in the PEA console window-if it involves stout, a new separate window will be launched....
cas |
|
Back to top |
|
 |
jmac |
Posted: Tue Aug 13, 2002 9:41 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Jun 2001 Posts: 3081 Location: EmeriCon, LLC
|
Are you really sure that this is in the "Executed" state?
According to how I read the doc, the only way to get into an Executed state is using a ManualExit (you are probably not doing this), or the activity expired.
See the Workitem State Diagrams in the programming manual. _________________ John McDonald
RETIRED |
|
Back to top |
|
 |
mqwhelp |
Posted: Tue Aug 13, 2002 7:16 pm Post subject: |
|
|
Voyager
Joined: 20 Dec 2001 Posts: 85 Location: TCS
|
Thanxs for the reply..
I have selected the exit option as manual..so the workitem will come to executed mode after running state..
But as I told that the program does not seems to be working (For Java Program only )..There could be some problem with JVM loading..
I thing all system.out.println will go tyo PEA out put..
Second Question.....
Is there any way that I can make PEA run in backgorund ..
Waiting for reply.. |
|
Back to top |
|
 |
jmac |
Posted: Wed Aug 14, 2002 4:25 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Jun 2001 Posts: 3081 Location: EmeriCon, LLC
|
If you are in the Executed state, then your activity has completed normally. If there was a problem it would be in the InError state. So I suggest that there is a problem with your java code.
Can you run it from the command line? If so, is the environment you have set for the Program Object the same as that in your command line environment?
I use the JVM from Program Activities all the time and never have a problem, unless my CLASSPATH is hosed. _________________ John McDonald
RETIRED |
|
Back to top |
|
 |
vennela |
Posted: Wed Aug 14, 2002 9:50 pm Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
To run PEA for the standard client in the background :
Write a DOS batch file that does a) PEA stop using fmcxpsd b) restarts the PEA fmcxpea with -f option.
To run your program in the background:
While defining your program in Buildtime specify that the program should run in invisible mode.
vinny |
|
Back to top |
|
 |
vennela |
Posted: Wed Aug 14, 2002 10:00 pm Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
I tried what I have said above (PEA in background) but it doesn't work. I don't know if I am missing something or am not sure if it can be done this way. I stand by the second point though(program in invisible mode). |
|
Back to top |
|
 |
|