on 07-01-2004 12:12 PM
Hi,
I have written a simple java program to get data from SAP using JCO code. It get compiled successfuly but when I run it, It gives the following error :
java.lang.NoClassDefFoundError
at com.sap.mw.jco.MiddlewareJRfc$Client.connect(MiddlewareJRfc.java:798)
at com.sap.mw.jco.JCO$Client.connect(JCO.java:2829)
at com.sap.test.SAPPoDetailMain.getPODetail(SAPPoDetailMain.java:39)
at com.sap.test.SAPPoDetailMain.main(SAPPoDetailMain.java:77)
Exception in thread "main"
Is there any way in which I can run this code in Netweaver Devloper Studio.
Thanks
Naresh
Hi Naresh,
standalone Java apps does not work with the JCO library normally used (declared via Set Additional Libraries for example), since the contained "jrfc.jar" seems now to be restricted for "inside server engine" usage.
Please remove the library usage and use the ECLIPSE_HOME/plugins/com.sap.mw.jco/lib/sapjco.jar instead.
Hope that helps.
Best regards
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Stefan,
I have tried that but still it is giving the same. I am using Generated proxied to call function module. Once again copying the detailed error :
java.lang.UnsatisfiedLinkError: no CpicNative in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1491)
at java.lang.Runtime.loadLibrary0(Runtime.java:788)
at java.lang.System.loadLibrary(System.java:834)
at com.sap.mw.rfc.api.RfcApi.initializeDLL(RfcApi.java:1285)
at com.sap.mw.rfc.api.RfcApi.<clinit>(RfcApi.java:1299)
at com.sap.mw.jco.MiddlewareJRfc.<clinit>(MiddlewareJRfc.java:228)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:141)
at com.sap.mw.jco.JCO.<clinit>(JCO.java:630)
at com.sap.test.SAPPoDetailMain.getPODetail(SAPPoDetailMain.java:26)
at com.sap.test.SAPPoDetailMain.main(SAPPoDetailMain.java:79)
java.lang.NoClassDefFoundError
at com.sap.mw.jco.MiddlewareJRfc$Client.connect(MiddlewareJRfc.java:798)
at com.sap.mw.jco.JCO$Client.connect(JCO.java:2829)
at com.sap.test.SAPPoDetailMain.getPODetail(SAPPoDetailMain.java:41)
at com.sap.test.SAPPoDetailMain.main(SAPPoDetailMain.java:79)
Exception in thread "main"
Thanks
Naresh
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.