Page 1 of 1

Urgent.... Routine call java fail

Posted: Tue Oct 20, 2015 10:24 pm
by wuruima
Dear,

I develop a routine to call a java program

================routine=============
Cmd='sh /xxxx/abm/common/script/1.sh'
Call DSExecute("UNIX", Cmd, Output, ExitCode)
Ans=Output
================routine=============

================script==============
#!/usr/bin/ksh
cd /xxxx/abm/java
/usr/java6/jre/bin/java com.T a b
================script==============

I use SSH to login the AIX server and run the 1.sh script, it could run successfully.
However, when I call the routine, it throws exception! Class not found. I don't know what happens. the routine worked in another datastage environment. Does anyone can give any advise? THANKS SO MUCH.

Code: Select all

Result = Exception in thread "main" java.lang.NoClassDefFoundError: com.T
Caused by: java.lang.ClassNotFoundException: com.T
	at java.net.URLClassLoader.findClass(URLClassLoader.java:434)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:660)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:358)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:626)
Could not find the main class: com.T.  Program will exit.

Re: Urgent.... Routine call java fail

Posted: Wed Oct 21, 2015 12:55 am
by wuruima
wierd!

After import the dsx of the routine again, the problem dispear!

Posted: Wed Oct 21, 2015 3:13 pm
by ray.wurlod
So I guess it's not urgent any more?

DSXchange is not the place for "urgent". Members post as and when they can, and are under no obligation to do so.

If you need urgent assistance, sign up with your official support provider for premium service, and learn just how much "urgent" can cost.