Java Transformer Parallel Config

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
StephenB
Premium Member
Premium Member
Posts: 8
Joined: Mon Oct 29, 2007 6:27 pm
Location: Richmond, VA

Java Transformer Parallel Config

Post 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
lstsaur
Participant
Posts: 1139
Joined: Thu Oct 21, 2004 9:59 pm

Post 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.
StephenB
Premium Member
Premium Member
Posts: 8
Joined: Mon Oct 29, 2007 6:27 pm
Location: Richmond, VA

Post 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
lstsaur
Participant
Posts: 1139
Joined: Thu Oct 21, 2004 9:59 pm

Post 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.
StephenB
Premium Member
Premium Member
Posts: 8
Joined: Mon Oct 29, 2007 6:27 pm
Location: Richmond, VA

Post 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?
lstsaur
Participant
Posts: 1139
Joined: Thu Oct 21, 2004 9:59 pm

Post 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.
Post Reply