Discussions

EJB programming & troubleshooting: Sap NetWeaver - Was6 incompatible with org.omg.CORBA.portable...

  1. Hi, I'm facing a problem while I am trying to migrate an J2EE application from SAP NetWeaver to Websphere 6. My app contains EJB Sessions and EJB entities. All of those are use in local through JNDI reference. I found my exception when I try to get a reference to an EJB Session declared in JNDI during the deployment phasis. Here are the code lines responsible for the exception (row 2) : Object object = ctx.lookup("java:comp/env/ejb/local_LockBean"); row 1 lockHome = (LockHome) PortableRemoteObject.narrow(object, LockHome.class); row 2 The stack of the exception is : 15/05/08 09:25:49:850 CEST] 00000026 WebApp E [Servlet Error]-[LdapjsapServlet]: java.lang.ClassCastException: com.XXXX.ldapjsap.queue.entity.lock.EJSLocalCMPLockBeanHome_71fbda4d incompatible with org.omg.CORBA.portable.ObjectImpl at com.ibm.rmi.javax.rmi.PortableRemoteObject.getObjectImpl(PortableRemoteObject.java:620) at com.ibm.rmi.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:341) at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:156) at com.XXXX.ldapjsap.queue.clientside.LdapjsapServlet.deleteLocks(LdapjsapServlet.java:67) at com.XXXX.ldapjsap.queue.clientside.LdapjsapServlet.init(LdapjsapServlet.java:102) at com.ibm.ws.wswebcontainer.servlet.TimedServletPool.createNewElement(TimedServletPool.java:58) at com.ibm.ws.webcontainer.servlet.TimedServletPool.(TimedServletPool.java:53) at com.ibm.ws.wswebcontainer.servlet.SingleThreadModelServlet.getTimedServletPool(SingleThreadModelServlet.java:41) at com.ibm.ws.webcontainer.servlet.SingleThreadModelServlet.init(SingleThreadModelServlet.java:109) at javax.servlet.GenericServlet.init(GenericServlet.java:256) at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:190) at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.init(ServletWrapper.java:317) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:346) at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:464) at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3276) at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:267) at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811) at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1455) at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:113) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:454) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:383) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:263) at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214) at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113) at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165) at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217) at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161) at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136) at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:195) at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:743) at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:873) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469) I'm not so sure to understand the mecanism of generation of such class (com.XXXX.ldapjsap.queue.entity.lock.EJSLocalCMPLockBeanHome_71fbda4d). But It looks like this class is generated by Websphere during deployment. Thks for your help!
  2. Hi; Go to WSAD preferences, J2EE, Select 1.3 as the highest J2EE version. Check the radio button "Enable Server Targeting Support" Click Apply, OK.! Then go to J2EE Perspective in WSAD, Right click your Project(s)>>Target Server>> MODIFY>> Select 5.1. OK After That RightClick your EJB Projects, Generate>>Deployment and RMIC Code... Try the above steps, and your issue could be solved!