EntirX Java RPC Tester

Help! I am a Natural Programmer who has recently had EntireX Java RPC tester installed on my PC. I usually write the “stub” that is called by the Java RPC application to extract data from the Adabas files and return it to the Java team… we have had a problem with some of the data not being returned once it gets back to the Java IDL… I write the data out to a file BEFORE returning through RPC and the data all looks fine… But what they get on their side is different. I am trying to CAPTURE the data in a text file once it is returned so I can store it for future comparison… As it is now, the RPC TESTER will show me the data in a window, but I want to CAPTURE it… Is this possible?

Thanks!

Dan Cantrell
Florida State College at Jacksonville
(Formally FCCJ - Florida Community College at Jacksonville)

Hello Dan,

you can run the Tester in batch mode, then the input and output values are written to standard output.

See Using the Tester in Batch Mode for details.

Rolf,

Thanks for the reply… I am not sure how to find my classpath… does it appear anywhere when I run the RPC Tester?

Thanks again!

Dan

I tried running the Tester in batch (hoping it somehow knew my “classpath” as a default)… no such luck. Then I took a wild-guess at the classpath by entering the name that was in the “Server:” window in th eRPC Tester- which was RPC/SRV3/CALLNAT

According to the link you sent me the command looks like:

java -classpath T -batch

My library is LIB1 and my program is PROG1 so my command looked like this:

java -classpath RPC/SRV3/CALLNAT LIB1TPROG1 -batch

I question that “T” that is stuck in the middle of the Library and the Program…? Is that the correct syntax? - I mean assuming I can figure out what the classpath is…

Thanks Again!

Dan Cantrell
Florida State College at Jacksonville

If your library is LIB1 and your program is PROG1 you should have 2 class files:

Lib1.class & Lib1Tprog1.class

To run the tester cd to the directory where you have these 2 class files and then

java -classpath “.;c:\program files\software ag\entirex\classes\entirex.jar” Lib1Tprog1 -batch

You might have to change the path name to entirex.jar.

Rolf,

I feel I am getting close…

I found the two classes you were talking about in the directory:

Directory of C:\Documents and Settings\dcantrel\workspace\suptester\WebRoot\WEB-INF\classes\staw30n3

03/05/2009 09:08 AM .
03/05/2009 09:08 AM …
03/04/2009 02:15 PM 2,023 AbstractOrionwebServer$Staw30n3Web_pass.class
03/04/2009 02:15 PM 818 AbstractOrionwebServer.class
03/04/2009 02:15 PM 1,422 Orioonweb$Staw30n3Web_pass.class
03/04/2009 02:15 PM 7,638 Orioonweb.class
03/04/2009 02:15 PM 372 OrioonwebServer.class
03/04/2009 02:15 PM 6,880 OrioonwebStub.class
03/04/2009 02:15 PM 3,744 OrioonwebTstaw30n3.class
7 File(s) 22,897 bytes
2 Dir(s) 82,089,947,136 bytes free

note i had to spell orioon with two o’s because your website has flagged orioon (with one o) as a virus name

so I typed in verbatium:
(including the quotes)

java -classpath “.;c:\program files\software ag\entirex\classes\entirex.jar” orioonwebTstaw30n3 -batch

and it comes back and says:

java.lang.NoClassDefFoundError: orioonwebTstaw30n3/class
Caused by: java.lang.ClassNotFoundException: orioonwebTstaw30n3.class
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
Could not find the main class: orionwebTstaw30n3.class. Program will exit.
Exception in thread “main”

Try

java -classpath “.;c:\program files\software ag\entirex\classes\entirex.jar” OrionwebTstaw30n3 -batch

I am setting at directory:

C:\Documents and Settings\dcantrel\workspace\suptester\WebRoot\WEB-INF\classes\staw30n3

and I I typed in:

java -classpath “.;c:\program files\software ag\entirex\classes\entirex.jar” OrionwebTstaw30n3 -batch

and I get this error:

java.lang.NoClassDefFoundError: OrionwebTstaw30n3 (wrong name: staw30n3/OrionwebTstaw30n3)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
Could not find the main class: OrionwebTstaw30n3. Program will exit.
Exception in thread “main”

Looks like a specified a package name “staw30n3”.

Try:

cd C:\Documents and Settings\dcantrel\workspace\suptester\WebRoot\WEB-INF\classes
java -classpath “.;c:\program files\software ag\entirex\classes\entirex.jar” OrionwebTstaw30n3 -batch

or (from any directory):

java -classpath “C:\Documents and Settings\dcantrel\workspace\suptester\WebRoot\WEB-INF\classes;c:\program files\software ag\entirex\classes\entirex.jar” OrionwebTstaw30n3 -batch

tried both ways… .got the same error (see below)

java.lang.NoClassDefFoundError: OrionwebTstaw30n3
Caused by: java.lang.ClassNotFoundException: OrionwebTstaw30n3
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
Exception in thread “main”

Can you come to my desk and help? :smiley:

Sure. Send me your credit card # and I will buy a ticket immediately :smiley:

Looks like the weather is much nicer in Florida …

Next try (I forgot how to deal with package names :frowning: )

java -classpath “C:\Documents and Settings\dcantrel\workspace\suptester\WebRoot\WEB-INF\classes;c:\program files\software ag\entirex\classes\entirex.jar” staw30n3.OrionwebTstaw30n3 -batch

WoW! It Worked! Thanks Rolf - You da man!

I re-directed standard out using the normal >myfile.txt and errors using 2>myerrors.txt - but the subprogram has INPUT statements in it which I tried to redirect using <myinput.txt but it didn’t pick it up…

Oops - I was wrong - it’s not INPUT statements, it’s data in the PARAMETER DATA area of the subprogram… any way to fill in the data before the batch call? Or am I pushing my luck now?

I can always hard-code teh values for testing and then take the values out later - but it would be icing-on-the-cake to be able to feed the data to the subprogram as part of the batch-call…

Any suggettions?

Thanks again!

Dan Cantrell

You have to specify the input params on the command line, e.g.

java … -batch param1 param2 param3

or in case an alpha parameter has embedded blanks:

java … -batch “param1” “param2” “param3”

I suggest that you create a .sh or .cmd file which contains the call to the tester with the input parameters.

Rolf,

Thanks for your help! We have been able to trace down the problem we had thanks to the tips you gave me…

One final question. When running java with the -batch option like we were doing are we actually running through RPC or through BATCH?
I guess the real question is "Is it running through the same process it would if we were running through the RPC Tester?

Thanks Again!

Dan Cantrell
dcantrel@fccj.edu

Dan,

I’m not really sure if I understand your question. Anyway, the Tester in Eclipse is using exactly the same Java class.

You might want to change the command line and omit the -batch parameter or replace it with -both and see what happens.