Skip to Content
0
Former Member
Jun 06, 2005 at 07:12 AM

Error calling ejbRemove()

29 Views

Hi there,

I always get following error while trying to delete a row from the datasource.

Thrown error:

[code]com.sap.engine.services.ejb.exceptions.BaseRemoteException: Exception in method removeStatus.

at com.dcx.mcg.itp.aa.projects.eeim.beans.DataObjectImpl0.removeStatus(DataObjectImpl0.java:2889)

at com.dcx.mcg.itp.aa.projects.eeim.beans.Data_Stub.removeStatus(Data_Stub.java:2207)

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:324)

at com.sap.engine.services.ejb.session.stateless_sp5.ObjectStubProxyImpl.invoke(ObjectStubProxyImpl.java:187)

at $Proxy441.removeStatus(Unknown Source)

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:324)

at com.sap.engine.services.webservices.runtime.EJBImplementationContainer.invokeMethod(EJBImplementationContainer.java:126)

at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:146)

at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:68)

at com.sap.engine.services.webservices.runtime.servlet.ServletDispatcherImpl.doPost(ServletDispatcherImpl.java:92)

at SoapServlet.doPost(SoapServlet.java:51)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:385)

at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:263)

at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:340)

at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:318)

at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:821)

at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:239)

at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)

at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:147)

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:162)

Caused by: javax.ejb.EJBException: Exception in method com.dcx.mcg.itp.aa.projects.eeim.beans.StatusLocalHomeImpl0.remove(java.lang.Object).; nested exception is: com.sap.engine.services.ejb.exceptions.BaseEJBException: Exception in method com.dcx.mcg.itp.aa.projects.eeim.beans.StatusLocalHomeImpl0.remove(java.lang.Object).

at com.dcx.mcg.itp.aa.projects.eeim.beans.DataBean.removeStatus(DataBean.java:813)

at com.dcx.mcg.itp.aa.projects.eeim.beans.DataObjectImpl0.removeStatus(DataObjectImpl0.java:2861)

... 32 more

; nested exception is:

javax.ejb.EJBException: Exception in method com.dcx.mcg.itp.aa.projects.eeim.beans.StatusLocalHomeImpl0.remove(java.lang.Object).; nested exception is: javax.ejb.EJBException: com.sap.engine.services.ejb.exceptions.BaseEJBException: Exception in method com.dcx.mcg.itp.aa.projects.eeim.beans.StatusLocalHomeImpl0.remove(java.lang.Object).

at com.dcx.mcg.itp.aa.projects.eeim.beans.StatusLocalHomeImpl0.remove(StatusLocalHomeImpl0.java:197)

at com.dcx.mcg.itp.aa.projects.eeim.beans.DataBean.removeStatus(DataBean.java:807)

at com.dcx.mcg.itp.aa.projects.eeim.beans.DataObjectImpl0.removeStatus(DataObjectImpl0.java:2861)

at com.dcx.mcg.itp.aa.projects.eeim.beans.Data_Stub.removeStatus(Data_Stub.java:2207)

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:324)

at com.sap.engine.services.ejb.session.stateless_sp5.ObjectStubProxyImpl.invoke(ObjectStubProxyImpl.java:187)

at $Proxy441.removeStatus(Unknown Source)

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:324)

at com.sap.engine.services.webservices.runtime.EJBImplementationContainer.invokeMethod(EJBImplementationContainer.java:126)

at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:146)

at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:68)

at com.sap.engine.services.webservices.runtime.servlet.ServletDispatcherImpl.doPost(ServletDispatcherImpl.java:92)

at SoapServlet.doPost(SoapServlet.java:51)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:385)

at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:263)

at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:340)

at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:318)

at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:821)

at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:239)

at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)

at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:147)

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:162)

Caused by: com.sap.engine.services.ejb.entity.ContainerException: Exception in method ejbLoad().

at com.sap.engine.services.ejb.entity.ContextFP.activate(ContextFP.java:196)

at com.dcx.mcg.itp.aa.projects.eeim.beans.StatusLocalHomeImpl0.remove(StatusLocalHomeImpl0.java:125)

... 34 more

Caused by: java.lang.ClassCastException

at com.dcx.mcg.itp.aa.projects.eeim.beans.StatusBean0Persistent.init(StatusBean0Persistent.java:102)

at com.sap.engine.services.ejb.entity.pm.PersistentCache.supply(PersistentCache.java:85)

at com.dcx.mcg.itp.aa.projects.eeim.beans.StatusBean0PM.ejbLoad(StatusBean0PM.java:237)

at com.sap.engine.services.ejb.entity.ContextFP.activate(ContextFP.java:187)

... 35 more

com.sap.engine.services.ejb.entity.ContainerException: Exception in method ejbLoad().

at com.sap.engine.services.ejb.entity.ContextFP.activate(ContextFP.java:196)

at com.dcx.mcg.itp.aa.projects.eeim.beans.StatusLocalHomeImpl0.remove(StatusLocalHomeImpl0.java:125)

at com.dcx.mcg.itp.aa.projects.eeim.beans.DataBean.removeStatus(DataBean.java:807)

at com.dcx.mcg.itp.aa.projects.eeim.beans.DataObjectImpl0.removeStatus(DataObjectImpl0.java:2861)

at com.dcx.mcg.itp.aa.projects.eeim.beans.Data_Stub.removeStatus(Data_Stub.java:2207)

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:324)

at com.sap.engine.services.ejb.session.stateless_sp5.ObjectStubProxyImpl.invoke(ObjectStubProxyImpl.java:187)

at $Proxy441.removeStatus(Unknown Source)

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:324)

at com.sap.engine.services.webservices.runtime.EJBImplementationContainer.invokeMethod(EJBImplementationContainer.java:126)

at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:146)

at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:68)

at com.sap.engine.services.webservices.runtime.servlet.ServletDispatcherImpl.doPost(ServletDispatcherImpl.java:92)

at SoapServlet.doPost(SoapServlet.java:51)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:385)

at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:263)

at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:340)

at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:318)

at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:821)

at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:239)

at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)

at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:147)

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:162)

Caused by: java.lang.ClassCastException

at com.dcx.mcg.itp.aa.projects.eeim.beans.StatusBean0Persistent.init(StatusBean0Persistent.java:102)

at com.sap.engine.services.ejb.entity.pm.PersistentCache.supply(PersistentCache.java:85)

at com.dcx.mcg.itp.aa.projects.eeim.beans.StatusBean0PM.ejbLoad(StatusBean0PM.java:237)

at com.sap.engine.services.ejb.entity.ContextFP.activate(ContextFP.java:187)

... 35 more[/code]

My code:

[code]

private StatusLocalHome statusHome = null;

...

public void setSessionContext(SessionContext context)

{

...

Status obj = jndiContext.lookup("java:comp/env/ejb/EEIMStatus");

statusHome =

(StatusLocalHome) PortableRemoteObject.narrow(

obj,

StatusLocalHome.class);

...

}

...

public int removeStatus(long id)

{

try

{

StatusLocal statusLocal =

statusHome.findByPrimaryKey(new Long(id));

statusHome.remove(statusLocal);

return 1;

}

catch (EJBException ex)

{

throw new EJBException(ex.getMessage(), ex);

}

catch (FinderException ex)

{

throw new EJBException(ex.getMessage(), ex);

}

catch (RemoveException ex)

{

throw new EJBException(ex.getMessage(), ex);

}

}[/code]

Does somebody recoginzes what I've done wrong?

Thanks for all replies

Regard

Daniel