on 12-30-2004 4:10 PM
I built a very simple bean for an SAP to J2EE call. The bean is named after the calling function module and has a processFunction method with one parm JCO.Function. But when I make a call from SAP, I get an Incompatible bean type - no 'processFunction' found error. The ejb-jar.xml has the method. The JNDI service browser shows the method. Any ideas?
Thanks for you help,
Erin
maybe wrong case, IFAIK jndi names are case sensitive -> ABAP RFMs always upper case!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Erin,
Sorry for the late response. Have you defined a weak reference from your J2EE application to the com.sap.mw.jco library? This must be done in the application-j2ee-engine.xml. Note that you must NOT put the jrfc.jar or sapjco.jar in the EAR file of the application.
You can also check the following thread
and my replies there.
Best regards,
Vladimir
Hello, Vladimir!
Please, help me.
I have NW 7.0 (Kernel Version: 7.00 PatchLevel 109886.44 + VM Version: 1.4.2_26-b03) and NWDS 7.0.28
I built a simple EJB-application for ABAP calls Java like here http://scn.sap.com/people/thorstenster/blog/2008/11/21/abap-calls-java-via-rfc-1-introduction
All works fine. Bean return some string to ABAP.
I need to extend the application for make http(s) connection from. I downloaded the external jar "common-httpclient3.0" from http://hc.apache.org and all dependent jars.
Add it to ejb-project as External Jars. Build and Deploy. I have "Exception in method processFunction." message in ABAP.
Than i create deployable unit like DC with those jars and deploy it to NW as describing here http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/60d99678-1a29-2d10-94b4-9d9a67b71...
I see the component in Visual Admin. i add the my DC like sapjco.jar in EAR with a weak reference.
And i have the same problem. I think the application doesn't see classes from jar "common-httpclient" or from his dependency.
In default.log in VA a found that:
1 error message
Severity : Error
Category :
Location : com.sap.engine.services.ejb
Application : sap.com/EchoTestEAR
Thread : SAPEngine_Application_Thread[impl:3]_26
Datasource : 3342650:C:\usr\sap\DPL\DVEBMGS00\j2ee\cluster\server0\log\defaultTrace.trc
Message ID : 000C297925FC00610000006900000FFC0004DA920E379118
Source Name : com.sap.engine.services.ejb
Argument Objs : com.sap.engine.services.ejb.exceptions.BaseEJBException: Exception in method processFunction.
at com.sap.examples.echotest.EchoTestLocalLocalObjectImpl0_0.processFunction(EchoTestLocalLocalObjectImpl0_0.java:119)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:331)
at com.sap.engine.services.rfcengine.RFCDefaultRequestHandler.call(RFCDefaultRequestHandler.java:277)
at com.sap.engine.services.rfcengine.RFCDefaultRequestHandler.handleRequest(RFCDefaultRequestHandler.java:219)
at com.sap.engine.services.rfcengine.RFCJCOServer$J2EEApplicationRunnable.run(RFCJCOServer.java:260)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:102)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172)
Caused by: java.lang.NoClassDefFoundError
at com.sap.examples.echotest.EchoTestBean.processFunction(EchoTestBean.java:60)
at com.sap.examples.echotest.EchoTestLocalLocalObjectImpl0_0.processFunction(EchoTestLocalLocalObjectImpl0_0.java:103)
... 11 more
Arguments : com.sap.engine.services.ejb.exceptions.BaseEJBException: Exception in method processFunction.
at com.sap.examples.echotest.EchoTestLocalLocalObjectImpl0_0.processFunction(EchoTestLocalLocalObjectImpl0_0.java:119)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:331)
at com.sap.engine.services.rfcengine.RFCDefaultRequestHandler.call(RFCDefaultRequestHandler.java:277)
at com.sap.engine.services.rfcengine.RFCDefaultRequestHandler.handleRequest(RFCDefaultRequestHandler.java:219)
at com.sap.engine.services.rfcengine.RFCJCOServer$J2EEApplicationRunnable.run(RFCJCOServer.java:260)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:102)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172)
Caused by: java.lang.NoClassDefFoundError
at com.sap.examples.echotest.EchoTestBean.processFunction(EchoTestBean.java:60)
at com.sap.examples.echotest.EchoTestLocalLocalObjectImpl0_0.processFunction(EchoTestLocalLocalObjectImpl0_0.java:103)
... 11 more
,
Dsr Component : n/a
Dsr Transaction : ecc24f10a74711e2ad77000c297925fc
Dsr User :
Indent : 0
Level : 0
Message Code :
Message Type : 1
Relatives :
Resource Bundlename :
Session : 0
Source : com.sap.engine.services.ejb
ThreadObject : SAPEngine_Application_Thread[impl:3]_26
Transaction :
User : J2EE_GUEST
2 error message
Date : 04/17/2013
Time : 18:45:37:387
Message : java.lang.reflect.InvocationTargetException
Severity : Error
Category :
Location : com.sap.engine.services.rfcengine.DefaultRequestHandler.handleRequest(JCO.Function function)
Application :
Thread : SAPEngine_Application_Thread[impl:3]_24
Datasource : 3342650:C:\usr\sap\DPL\DVEBMGS00\j2ee\cluster\server0\log\defaultTrace.trc
Message ID : 000C297925FC006C0000002600000FFC0004DA8F8A0124CE
Source Name : com.sap.engine.services.rfcengine
Argument Objs :
Arguments :
Dsr Component : n/a
Dsr Transaction : e54870b0a74811e2aa16000c297925fc
Dsr User :
Indent : 0
Level : 0
Message Code :
Message Type : 0
Relatives :
Resource Bundlename :
Session : 0
Source : com.sap.engine.services.rfcengine
ThreadObject : SAPEngine_Application_Thread[impl:3]_24
Transaction :
User : J2EE_GUEST
3 error message
Date : 04/17/2013
Time : 18:45:37:387
Message : java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:331)
at com.sap.engine.services.rfcengine.RFCDefaultRequestHandler.call(RFCDefaultRequestHandler.java:277)
at com.sap.engine.services.rfcengine.RFCDefaultRequestHandler.handleRequest(RFCDefaultRequestHandler.java:219)
at com.sap.engine.services.rfcengine.RFCJCOServer$J2EEApplicationRunnable.run(RFCJCOServer.java:260)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:102)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172)
Caused by: com.sap.engine.services.ejb.exceptions.BaseEJBException: Exception in method processFunction.
at com.sap.examples.echotest.EchoTestLocalLocalObjectImpl0_0.processFunction(EchoTestLocalLocalObjectImpl0_0.java:119)
... 11 more
Caused by: java.lang.NoClassDefFoundError
at com.sap.examples.echotest.EchoTestBean.processFunction(EchoTestBean.java:60)
at com.sap.examples.echotest.EchoTestLocalLocalObjectImpl0_0.processFunction(EchoTestLocalLocalObjectImpl0_0.java:103)
... 11 more
Severity : Error
Category :
Location : com.sap.engine.services.rfcengine.DefaultRequestHandler.handleRequest(JCO.Function function)
Application :
Thread : SAPEngine_Application_Thread[impl:3]_24
Datasource : 3342650:C:\usr\sap\DPL\DVEBMGS00\j2ee\cluster\server0\log\defaultTrace.trc
Message ID : 000C297925FC006C0000002700000FFC0004DA8F8A012516
Source Name : com.sap.engine.services.rfcengine
Argument Objs :
Arguments :
Dsr Component : n/a
Dsr Transaction : e54870b0a74811e2aa16000c297925fc
Dsr User :
Indent : 0
Level : 0
Message Code :
Message Type : 0
Relatives :
Resource Bundlename :
Session : 0
Source : com.sap.engine.services.rfcengine
ThreadObject : SAPEngine_Application_Thread[impl:3]_24
Transaction :
User : J2EE_GUEST
If the problem with libraries - how can i add it to j2ee server?
Thank you!
Hello. I found a solution. The tutorial http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/60d99678-1a29-2d10-94b4-9d9a67b71... have some mistakes.
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.