Subject:Use EDI Adapter within Sap BC Author:Julia Poplawski Date:08 Dec 2006 10:31 AM
Hello,
today I tried to create a java step within the SAP BC where I wanted to use the EDI Adapter.
I copied the sample code
------------------------
if (!StylusFileFactory.unlockAPI("xxxxxxxxx")) {
idc.insertAfter("error", tylusFileFactory.getUnlockAPIError());
return;
}
// From EDI to XML
Converter toXML = ConverterFactory.newInstance().newConvertToXML("adapter:EDI");
toXML.convert(new StreamSource(args[0]), new StreamResult(args[1]));
---------------------
and after compiling no error occurred. But every time I tried to run the flow I got a "NoClassDefFoundError" message.
The BC uses java version 1.3.1_07, maybe this is the cause?
Perhaps you have some suggestions how to solve the problem?
Subject:Use EDI Adapter within Sap BC Author:Julia Poplawski Date:11 Dec 2006 01:38 AM
Hello,
thanks for your answer. As far as I know the BC does not run with java version higher than 1.3.
I get the following error information:
Could not run the service 'EdiToXml'.
java.lang.reflect.InvocationTargetException: NoClassDefFoundError
2006-12-11 07:32:35 CET java.lang.reflect.InvocationTargetException: java.lang.reflect.InvocationTargetException: java.lang.NoClassDefFoundError
at edi.EdiToXml(edi.java:60)
at java.lang.reflect.Method.invoke(Native Method)
at com.wm.app.b2b.server.JavaService.baseInvoke(JavaService.java:281)
at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:709)
at com.wm.app.b2b.server.comm.DefaultServerRequestHandler.handleMessage(DefaultServerRequestHandler.java:89)
at com.wm.app.b2b.server.HTTPMessageHandler.process(HTTPMessageHandler.java:166)
at com.wm.app.b2b.server.HTTPDispatch.run(HTTPDispatch.java:446)
at com.wm.util.pool.PooledThread.run(PooledThread.java:109)
at java.lang.Thread.run(Thread.java:479)
Now I'll try to start a x.bat file in the BC that compiles and runs a java class like in the examples.