This discussion is archived
2 Replies Latest reply: Nov 12, 2012 12:06 AM by 973655 RSS

EJB 3 JNDI lookup with WL 12c (12.1.1) Exception

973655 Newbie
Currently Being Moderated
Hi all,
I'm trying to lookup an EJB inside my application with the following code :
Context ctx = new InitialContext();
ctx.lookup("java:module/MyEJB");

it throws this Exception :
javax.naming.NamingException [Root exception is java.rmi.RemoteException: weblogic.ejb.container.internal.StatelessLocalObject; nested exception is:
     java.io.NotSerializableException: weblogic.ejb.container.internal.StatelessLocalObject]
     at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:118)
     at javax.faces.component.UICommand.broadcast(UICommand.java:315)
     at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794)
     at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259)
     at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
     Truncated. see log file for complete stacktrace
Caused By: javax.faces.el.EvaluationException: javax.naming.NamingException [Root exception is java.rmi.RemoteException: weblogic.ejb.container.internal.StatelessLocalObject; nested exception is:
     java.io.NotSerializableException: weblogic.ejb.container.internal.StatelessLocalObject]
     at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:102)
     at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
     at javax.faces.component.UICommand.broadcast(UICommand.java:315)
     at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794)
     at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259)
     Truncated. see log file for complete stacktrace
Caused By: javax.naming.NamingException [Root exception is java.rmi.RemoteException: weblogic.ejb.container.internal.StatelessLocalObject; nested exception is:
     java.io.NotSerializableException: weblogic.ejb.container.internal.StatelessLocalObject]
     at weblogic.jndi.internal.ExceptionTranslator.toNamingException(ExceptionTranslator.java:86)
     at weblogic.jndi.internal.WLContextImpl.translateException(WLContextImpl.java:466)
     at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.java:256)
     at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:406)
     at weblogic.jndi.internal.ApplicationNamingNode.resolveObject(ApplicationNamingNode.java:170)
     Truncated. see log file for complete stacktrace
Caused By: java.rmi.RemoteException: weblogic.ejb.container.internal.StatelessLocalObject; nested exception is:
     java.io.NotSerializableException: weblogic.ejb.container.internal.StatelessLocalObject
     at weblogic.jndi.internal.WLEventContextImpl.copyObject(WLEventContextImpl.java:384)
     at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.java:251)
     at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:406)
     at weblogic.jndi.internal.ApplicationNamingNode.resolveObject(ApplicationNamingNode.java:170)
     at weblogic.jndi.internal.BasicNamingNode.resolveObject(BasicNamingNode.java:856)
     Truncated. see log file for complete stacktrace
Caused By: java.io.NotSerializableException: weblogic.ejb.container.internal.StatelessLocalObject
     at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1164)
     at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
     at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
     at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
     at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
     Truncated. see log file for complete stacktrace


i'm using WL 12c, JDK 1.6.29.

regards.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points