Hi,
i am not able to access the BAPI using EJB. I have written the code for accessing the BAPI inside the a business method in Bean.
Though the same peice of code works fine if i make a simple class file.
Can any one help me out in this case to resolve the problem
I ma getting the following exception :
Remote Exception java.rmi.RemoteException: com.sap.engine.services.ejb.exceptions.BaseRemoteException: Exception thrown by the com.lti.rfc.TestingRfcObjectImpl0.createPartner(java.lang.String,java.lang.String) method.
at com.lti.rfc.TestingRfcObjectImpl0.createPartner(TestingRfcObjectImpl0.java:152)
at com.lti.rfc.TestingRfc_Stub.createPartner(TestingRfc_Stub.java:55)
at com.lti.rfcClient.RfcTesting.doGet(RfcTesting.java:34)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:373)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:250)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:319)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:297)
at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:696)
at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:221)
at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:146)
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:37)
at com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:71)
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:94)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:140)
Caused by: java.lang.NoClassDefFoundError
at com.lti.rfc.rfcClass.callRfc(rfcClass.java:30)
at com.lti.rfc.TestingRfcBean.createPartner(TestingRfcBean.java:48)
at com.lti.rfc.TestingRfcObjectImpl0.createPartner(TestingRfcObjectImpl0.java:135)
... 18 more
; nested exception is:
java.lang.NoClassDefFoundError
Thanks in advance
Alok Sahu
Hi,
according to the stack trace logged by the EJB Container, the createPartner(java.lang.String,java.lang.String) business method of the bean has thrown java.lang.NoClassDefFoundError when calling the RFC. Probably this is a class loader problem, e.g. the parameters classes that are passed during the RFC call are not loaded with the proper class loader.
It will be helpful to check exactly which class causes the problem and which class loader has loaded it.
I hope this will help you.
Regards,
Svetoslav
Hi Alok,
Did you try Svetoslav's tips? Do you still get the NoClassDefFoundError? If yes, another reason could be that your EJB application is missing some classloader references. Is the com.lti.rfc.rfcClass part of the application or is it located in some external library? Did you check what exactly is done on line 30 of this class? It would also be helpful if you provided the code from the callRfc() method.
Best regards,
Vladimir
Add a comment