This website is not affiliated with, sponsored by, or approved by SAP AG.

EJBException when running web service.

All postings related to SAP XI

Moderators: Snowy, thx4allthefish

EJBException when running web service.

Postby srinivasM » Thu Jun 10, 2010 7:49 am

Hello PI Experts,

I am working on testing the Service interface, as we migrated the interface from XI 2.0 to PI 7.1

For this I generated a client proxy, and created a EJB client in the same project. I created a web service from this EJB client.

When I run this web service, I get following exception:

Error com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding # java.lang.ClassCastException: class com.sap.engine.services.jndi.persistent.UnsatisfiedReferenceImpl:service:naming@com.sap.engine.boot.loader.ResourceMultiParentClassLoader@456d3d51@alive incompatible with interface com.sap.engine.services.webservices.espbase.xi.ESPXIMessageProcessor:library:webservices_lib@com.sap.engine.boot.loader.ResourceMultiParentClassLoader@1e6ee98@alive
[EXCEPTION]
javax.xml.ws.WebServiceException: java.lang.ClassCastException: class com.sap.engine.services.jndi.persistent.UnsatisfiedReferenceImpl:service:naming@com.sap.engine.boot.loader.ResourceMultiParentClassLoader@456d3d51@alive incompatible with interface com.sap.engine.services.webservices.espbase.xi.ESPXIMessageProcessor:library:webservices_lib@com.sap.engine.boot.loader.ResourceMultiParentClassLoader@1e6ee98@alive
at com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding.call_XI(SOAPTransportBinding.java:2067)
at com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding.callWOLogging(SOAPTransportBinding.java:812)
at com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding.call(SOAPTransportBinding.java:759)
at com.sap.engine.services.webservices.espbase.client.jaxws.core.WSInvocationHandler.processTransportBindingCall(WSInvocationHandler.java:167)
at com.sap.engine.services.webservices.espbase.client.jaxws.core.WSInvocationHandler.invokeSEISyncMethod(WSInvocationHandler.java:120)
at com.sap.engine.services.webservices.espbase.client.jaxws.core.WSInvocationHandler.invokeSEIMethod(WSInvocationHandler.java:83)
at com.sap.engine.services.webservices.espbase.client.jaxws.core.WSInvocationHandler.invoke(WSInvocationHandler.java:64)
at $Proxy3148.salesOrderCreateOut(Unknown Source)
at com...doe.salesheader.DoeToSapBean.doeHeader(DoeToSapBean.java:58)
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:585)
at com.sap.engine.services.ejb3.runtime.impl.RequestInvocationContext.proceedFinal(RequestInvocationContext.java:46)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:166)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_WS.invoke(Interceptors_WS.java:31)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatesTransition.invoke(Interceptors_StatesTransition.java:19)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Resource.invoke(Interceptors_Resource.java:71)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.doWorkWithAttribute(Interceptors_Transaction.java:38)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.invoke(Interceptors_Transaction.java:22)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:189)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatelessInstanceGetter.invoke(Interceptors_StatelessInstanceGetter.java:16)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_SecurityCheck.invoke(Interceptors_SecurityCheck.java:21)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_ExceptionTracer.invoke(Interceptors_ExceptionTracer.java:16)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
at com.sap.engine.services.ejb3.runtime.impl.DefaultInvocationChainsManager.startChain(DefaultInvocationChainsManager.java:133)
at com.sap.engine.services.ejb3.webservice.impl.DefaultImplementationContainer.invokeMethod(DefaultImplementationContainer.java:203)
at com.sap.engine.services.webservices.espbase.server.runtime.RuntimeProcessingEnvironment.process0(RuntimeProcessingEnvironment.java:512)
at com.sap.engine.services.webservices.espbase.server.runtime.RuntimeProcessingEnvironment.preProcess(RuntimeProcessingEnvironment.java:486)
at com.sap.engine.services.webservices.espbase.server.runtime.RuntimeProcessingEnvironment.process(RuntimeProcessingEnvironment.java:256)
at com.sap.engine.services.webservices.runtime.servlet.ServletDispatcherImpl.doPostWOLogging(ServletDispatcherImpl.java:176)
at com.sap.engine.services.webservices.runtime.servlet.ServletDispatcherImpl.doPostWithLogging(ServletDispatcherImpl.java:112)
at com.sap.engine.services.webservices.runtime.servlet.ServletDispatcherImpl.doPost(ServletDispatcherImpl.java:70)
at SoapServlet.doPost(SoapServlet.java:51)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at com.sap.engine.services.servlets_jsp.server.Invokable.invoke(Invokable.java:140)
at com.sap.engine.services.servlets_jsp.server.Invokable.invoke(Invokable.java:37)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:486)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:298)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:396)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:385)
at com.sap.engine.services.servlets_jsp.filters.DSRWebContainerFilter.process(DSRWebContainerFilter.java:48)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.servlets_jsp.filters.ServletSelector.process(ServletSelector.java:76)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.servlets_jsp.filters.ApplicationSelector.process(ApplicationSelector.java:243)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.httpserver.filters.WebContainerInvoker.process(WebContainerInvoker.java:78)
at com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.httpserver.filters.ResponseLogWriter.process(ResponseLogWriter.java:60)
at com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.httpserver.filters.DefineHostFilter.process(DefineHostFilter.java:27)
at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.httpserver.filters.MonitoringFilter.process(MonitoringFilter.java:29)
at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.httpserver.filters.MemoryStatisticFilter.process(MemoryStatisticFilter.java:43)
at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.httpserver.filters.DSRHttpFilter.process(DSRHttpFilter.java:42)
at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.httpserver.server.Processor.chainedRequest(Processor.java:428)
at com.sap.engine.services.httpserver.server.Processor$FCAProcessorThread.process(Processor.java:247)
at com.sap.engine.services.httpserver.server.rcm.RequestProcessorThread.run(RequestProcessorThread.java:45)
at com.sap.engine.core.thread.execution.Executable.run(Executable.java:115)
at com.sap.engine.core.thread.execution.Executable.run(Executable.java:96)
at com.sap.engine.core.thread.execution.CentralExecutor$SingleThread.run(CentralExecutor.java:314)
Caused by: java.lang.ClassCastException: class com.sap.engine.services.jndi.persistent.UnsatisfiedReferenceImpl:service:naming@com.sap.engine.boot.loader.ResourceMultiParentClassLoader@456d3d51@alive incompatible with interface com.sap.engine.services.webservices.espbase.xi.ESPXIMessageProcessor:library:webservices_lib@com.sap.engine.boot.loader.ResourceMultiParentClassLoader@1e6ee98@alive
at com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding.getESPXIMessageProcessorFromNaming(SOAPTransportBinding.java:2098)
at com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding.getESPXIMessageProcessor(SOAPTransportBinding.java:2091)
at com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding.createESPXIMessageProcessor(SOAPTransportBinding.java:2083)
at com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding.call_XI(SOAPTransportBinding.java:2035)
... 77 more


Here is the EJB code:

Code: Select all
@WebService(endpointInterface="com...doe.salesheader.DoeToSapRemote", portName="DoeToSapBeanPort", targetNamespace="http://..com/doe/salesheader/", serviceName="DoeToSapService")
@Stateless
public class DoeToSapBean implements DoeToSapRemote, DoeToSapLocal {
   @WebServiceRef (name = "SalesOrderCreate_Out")
   SalesOrderCreateOutService service;
   public String doeHeader(String headerXml){
      SalesOrderCreateOut servicePort = service.getSalesOrderCreate_Out_Port();
      javax.xml.ws.BindingProvider bp = (javax.xml.ws.BindingProvider) servicePort;
      Map<String, Object> context = bp.getRequestContext();
      context.put(BindingProvider.USERNAME_PROPERTY, "doeoperator");
      context.put(BindingProvider.PASSWORD_PROPERTY, "wrong");

      SalesOrderResponse response = null;
      Project salesOrderCreateRequest = new Project();
      Header header = new Header();
      header.setTitle("EAST COAST SHEET METAL MOTOR WARRANTY");
      
      salesOrderCreateRequest.setHeader(header);
      try {
         response = servicePort.salesOrderCreateOut(salesOrderCreateRequest);
      } catch (SalesOrderError_Exception e) {
         // TODO Auto-generated catch block
         e.printStackTrace();
      }
      TRETURN treturn = response.getTRETURN();
      Iterator ls = treturn.getItem().iterator();
      while(ls.hasNext()){
         TRETURN.Item tempItem = (TRETURN.Item)ls.next();
         headerXml = tempItem.getMESSAGE();
         break;
      }
      return headerXml;
   }
}


Any clues how to fix this...

Thanks

Srinivas
srinivasM
 
Posts: 1
Joined: Thu Jun 10, 2010 7:42 am

Return to SAP Process Integration (SAP PI/XI)

Who is online

Users browsing this forum: No registered users and 1 guest





loading...


This website is not affiliated with, sponsored by, or approved by SAP AG.