Page 1 of 1

Java client stage error

Posted: Mon Feb 02, 2009 11:09 pm
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

Class not found exception

Posted: Tue Feb 03, 2009 2:45 am
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

Posted: Tue Feb 03, 2009 8:21 am
by chulett
Sounds like a classpath issue to me.

Posted: Tue Feb 03, 2009 9:45 am
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.

Posted: Tue Feb 03, 2009 10:16 am
by chulett
You need to ensure the $CLASSPATH includes the directory where your class lives. Should be as simple as that.