Java client stage error

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
psk_270185
Participant
Posts: 21
Joined: Wed Mar 12, 2008 4:05 am

Java client stage error

Post by psk_270185 »

Hi All,
I am new to java client stage. Currently i wrote a sample program and trying to load into a dataset.The sample code is
package com.ascentialsoftware.jds.test;
import com.ascentialsoftware.jds.Row;
import com.ascentialsoftware.jds.Stage;

public class TableSource extends Stage {

private int _rowCount;
private int _rowNumber;


public void initialize() {

_rowNumber = 0;
_rowCount = 20;


}

public int process() {
_rowNumber++;

if (_rowNumber > _rowCount ) {

return OUTPUT_STATUS_END_OF_DATA;

}


Row outputRow = createOutputRow();
int columnCount = outputRow.getColumnCount();

for (int columnNumber = 0; columnNumber < columnCount; columnNumber++)
{ String value = Integer.toString(_rowNumber) + ":" + Integer.toString(columnNumber + 1); outputRow.setValueAsString(columnNumber, value); }


writeRow(outputRow);
return OUTPUT_STATUS_READY;

}
}

The error that i am getting is APT_CombinedOperatorController,0: Fatal Error: Fatal: TJClient::initialize: unable to create Java Virtual Machine; classpath = E:\IBM\InformationServer\Server\DSEngine\java/lib/tr4j.jar
ASCL-DSJNI-00011`:`JNIWrapper: load library failed: directory C:\IBM\InformationServer\ASBNode\apps\jre\bin/classic, name jvm
The specified module could not be found.

I gave the settings in the java client stage as follows:
1)JVM options:
E:\IBM\InformationServer\ASBNode\apps\jre\bin

2)user classpath :
when i am giving the entire classpath it is breaking into separate lines where ever spaces are found.

3)Transformer class name:
E:\Licensing_java\TableSource.class

Gurus guide me in this process. What exactly have to be given in the above mentioned paths.


Thanks
P.Santosh Kumar
psk_270185
Participant
Posts: 21
Joined: Wed Mar 12, 2008 4:05 am

Class not found exception

Post by psk_270185 »

Hi All,
The above mentioned error is resolved.The DATASTAGE_JVM variable was not set up properly.
Now i am getting a new error.
APT_CombinedOperatorController,0: Fatal Error: Fatal: java.lang.ClassNotFoundException: TableSource.class

I have placed the class file in every possible location like
E:\IBM\InformationServer\ASBNode\apps\jre\bin
but not able to find the problem.
In the user
Thanks
Santosh
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Sounds like a classpath issue to me.
-craig

"You can never have too many knives" -- Logan Nine Fingers
psk_270185
Participant
Posts: 21
Joined: Wed Mar 12, 2008 4:05 am

Post by psk_270185 »

chulett wrote:Sounds like a classpath issue to me. ...
Pl explain clearly.Is it a classpath issue at the system level or at datastage level.Becoz other java files outside datastage are executing properly.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You need to ensure the $CLASSPATH includes the directory where your class lives. Should be as simple as that.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply