Page 1 of 1

Java Transformer Parallel Config

Posted: Tue Jan 29, 2008 2:08 pm
by StephenB
I'm having an issue getting the Java Transformer Stage to work. At this point, I'm just using the sample UpperCase class and am able to run it successfully in a server job.

When running a parallel job with a Java Transformer, the following error is returned and the job is aborted:
Java_Transformer_10,0: Error: TJClient::initialize: unable to create Java Virtual Machine; classpath = E:/IBM/InformationServer/Server/DSEngine/java/lib/tr4j.jar

I have tried 2 solutions found in the 8.0.1 release notes which involve setting DSHOME and DATASTAGE_JRE, or setting DATASTAGE_JVM in addition. I have also created a symbolic link from DSHOME/java/jre to the ASBNode jre folder which fixed some errors.

Anyone have experience getting Java Transformer to work on Windows?

Any help would be appreciated. -Stephen

Posted: Tue Jan 29, 2008 4:43 pm
by lstsaur
Your User's classpath under the Geneal tab of java_transformer stage is incorrect. Your classpath is pointing to tr4j.jar that wouldn't do you any good.

Posted: Tue Jan 29, 2008 6:33 pm
by StephenB
Got it working but the problem was quite odd. At one point I had tr4j.jar as my classpath within the Java Transformer, but I had since changed it and it was not referenced anywhere I could see. However, when I deleted the Transformer Stage and added a new one... no more error :D I guess there was metadata hiding behind the stage.

Anyways, thanks for pointing me at the classpath as that was where I found the problem.

-Stephen

Posted: Tue Jan 29, 2008 9:28 pm
by lstsaur
Stephen,
Tr4j.jar should be in your machine's system variable, classpath. Your java
transformer's User's Classpath should point to your ASBNode's jre\bin directory.

Posted: Wed Jan 30, 2008 8:08 am
by StephenB
In that case, where should the classpath for the new compiled java code go? Is there a specific folder to put that into?

Posted: Wed Jan 30, 2008 1:51 pm
by lstsaur
For Windows platform, you put your .class in C:\IBM\InformationServer\ASBNode\apps\jre\bin.

On your java_transformer stage's User's Classpath, the above directory should be populated in there and the name of the .class should be populated in the Transformer Class Name.