Page 1 of 2

java pack

Posted: Wed Feb 13, 2008 8:40 am
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.

Posted: Wed Feb 13, 2008 9:17 am
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

Posted: Wed Feb 13, 2008 9:46 am
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

Posted: Wed Feb 13, 2008 11:30 am
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

Posted: Wed Feb 13, 2008 12:00 pm
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

Posted: Wed Feb 13, 2008 12:17 pm
by lstsaur
That's because your User's Classpath is incorrect. It's pointing to the tr4j.jar that's not what you want.

Posted: Wed Feb 13, 2008 12:43 pm
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

Posted: Wed Feb 13, 2008 2:05 pm
by lstsaur
You mean that you still getting the this error, classpth=/opt/IBM/InformationServer/Server/DSEngine/java/lib/tr4j.jar?

Posted: Wed Feb 13, 2008 2:17 pm
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....

Posted: Wed Feb 13, 2008 2:54 pm
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.

Posted: Wed Feb 13, 2008 3:22 pm
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...

Posted: Wed Feb 13, 2008 3:31 pm
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

Posted: Wed Feb 13, 2008 3:52 pm
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).

Posted: Wed Feb 13, 2008 3:57 pm
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.

Posted: Wed Feb 13, 2008 10:20 pm
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.