java pack

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

reddy12
Participant
Posts: 99
Joined: Tue Aug 08, 2006 9:34 pm

java pack

Post by reddy12 »

gurus,
i am trying to use java pack transformer.
i am working on DS8 on AIX 5.3.
first i want to try with already existing .jar files (uppercase conversion).for this i dont know the .jar file name.
kindly some one mention how to set the properties in the transformer. what goes in each of these fileds...
GENERAL TAB
transformer class name....
user's classpath....
PROPERTIES TAB
user properties....
OPTIONS TAB.
jvm options....

thanks in advance.
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

Start with some reading. JavaPack is more powerful than just allowing you to call a particular class.... instead, it extends the normal stage api and allows you to have a class that "interacts" with the DataStage engine at run-time, obtain meta data (what links are attached, what columns) and read and write data to/from such links. There is a java based api that you include in your classes to bring your java function into the flow. You include specific methods in your code that DataStage looks for at the point when it is ready present your class with a row, or ready to ask your class for a row.

JavaPack is very well documented, with examples and descriptions of the API.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
reddy12
Participant
Posts: 99
Joined: Tue Aug 08, 2006 9:34 pm

Post by reddy12 »

thanks for the reply,
i have gone through the documentation..i just want to know what value goes into what filed in the java transformer...fileds mentioned in my post..so that i can use the sample .jar files for now.
that is my question and that is all i need.

thanks
lstsaur
Participant
Posts: 1139
Joined: Thu Oct 21, 2004 9:59 pm

Post by lstsaur »

transformer class name.... UpperCase
user's classpath.... /IBM/InformationServer/Server/DSEngine/java/jre/bin
PROPERTIES TAB...Nothing
user properties.... Nothing
OPTIONS TAB...... Nothing
jvm options....-verbose:class
reddy12
Participant
Posts: 99
Joined: Tue Aug 08, 2006 9:34 pm

Post by reddy12 »

thanks for the reply but it does not work...
here is the warnin..

Java_Transformer_13,0: Error: TJClient::initialize: unable to create Java Virtual Machine; classpath = /opt/IBM/InformationServer/Server/DSEngine/java/lib/tr4j.jar
ASCL-DSJNI-00011`:`JNIWrapper: load library failed: directory C:\IBM\InformationServer\ASBNode\apps /jre\bin\j9vm , name jvm
0509-022 Cannot load module C:/IBM/InformationServer/ASBNode/apps(/jre/bin/j9vm).
0509-026 System error: A file or directory in the path name does not exist.


regards
lstsaur
Participant
Posts: 1139
Joined: Thu Oct 21, 2004 9:59 pm

Post by lstsaur »

That's because your User's Classpath is incorrect. It's pointing to the tr4j.jar that's not what you want.
reddy12
Participant
Posts: 99
Joined: Tue Aug 08, 2006 9:34 pm

Post by reddy12 »

i gave the same path as u mentioned...may be that it is not overwriting the ones given previously...
yesterday i tried giving these paths mentioned in the error message...
today i tired in a new job with the values u have mentioned...but it still throws the same error...

Regards
lstsaur
Participant
Posts: 1139
Joined: Thu Oct 21, 2004 9:59 pm

Post by lstsaur »

You mean that you still getting the this error, classpth=/opt/IBM/InformationServer/Server/DSEngine/java/lib/tr4j.jar?
reddy12
Participant
Posts: 99
Joined: Tue Aug 08, 2006 9:34 pm

Post by reddy12 »

lstsaur wrote:You mean that you still getting the this error, classpth=/opt/IBM/InformationServer/Server/DSEngine/java/lib/tr4j.jar?
yes i am still getting the same error....
lstsaur
Participant
Posts: 1139
Joined: Thu Oct 21, 2004 9:59 pm

Post by lstsaur »

Make sure that your Java Transformer stage's "User's Classpath" is pointed to the /IBM/InformationServer/Server/DSEngine/java/jre/bin and your environment variable for Java_Home is pointed to /IBM/InformationServer/ASBNode/apps/jre/bin.
reddy12
Participant
Posts: 99
Joined: Tue Aug 08, 2006 9:34 pm

Post by reddy12 »

lstsaur wrote:Make sure that your Java Transformer stage's "User's Classpath" is pointed to the /IBM/InformationServer/Server/DSEngine/java/jre/bin and your environment variable for Java_Home is pointed to /IBM/InformationServer/ASBNode/apps/jre/bin.
yes i idid but the same error...
reddy12
Participant
Posts: 99
Joined: Tue Aug 08, 2006 9:34 pm

Post by reddy12 »

i see this warning message inaddition to the one i mentioned above..
APT_CombinedOperatorController,0: Resource bundle corresponding to message key DSTAGE-TODC-00017 not found! Check that DSHOME or APT_RESPATH is set.


Regards
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

That most recent message is about not being able to find the error message text in the "resource" file. It's unrelated to the earlier problem, and probably solved by setting the indicated environment variable to the location of the resource file (probably DS_RESENU for US English).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
reddy12
Participant
Posts: 99
Joined: Tue Aug 08, 2006 9:34 pm

Post by reddy12 »

ray.wurlod wrote:That most recent message is about not being able to find the error message text in the "resource" file. It's unrelated to the earlier problem, and probably solved by setting the indicated environment ...
ray,
i see both the errors..
Java_Transformer_3,0: Error: TJClient::initialize: unable to create Java Virtual Machine; classpath = /opt/IBM/InformationServer/Server/DSEngine/java/lib/tr4j.jar
ASCL-DSJNI-00011`:`JNIWrapper: load library failed: directory C:\IBM\InformationServer\ASBNode\apps /jre\bin\j9vm , name jvm
0509-022 Cannot load module C:/IBM/InformationServer/ASBNode/apps(/jre/bin/j9vm).
0509-026 System error: A file or directory in the path name does not exist.

and

APT_CombinedOperatorController,0: Resource bundle corresponding to message key DSTAGE-TODC-00017 not found! Check that DSHOME or APT_RESPATH is set.

regards.
lstsaur
Participant
Posts: 1139
Joined: Thu Oct 21, 2004 9:59 pm

Post by lstsaur »

To fix your earlier error, unable to create Java Virtual Machine; classpath = /opt/IBM/InformationServer/Server/DSEngine/java/lib/tr4j.jar, check to make sure that in the Java directory there is a link, i.e. jre-->/IBM/InformationServer/ASBNode/apps/jre/bin. Your Java job is aborted due to the system is trying to load the tr4j.jar which contains all the .class files for Java stage.

What you need is the "java" in the /IBM/InformationServer/ASBNode/apps/jre/bin directory to execute your Java job.

Not sure what you have changed to cause the second error, DSTAGE-TODC-00017 not found.
Post Reply