0 Replies Latest reply on Apr 3, 2007 3:16 AM by Vairavan Chandrasekhar

    Problem in Looking UP EJB

    Vairavan Chandrasekhar Newbie

      Hi All,


      Problem:

      I am using Jboss4.0.4 GA. Basically I am getting problem when I try to lookup the EJB?s lookup name. I am using EJB3.0.

      My client code to invoke EJB objects is:

      props.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
      props.put(Context.PROVIDER_URL,"jnp://10.207.55.92:7884");
      props.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");

      Context ctx = new InitialContext(props);
      logger.info("**Initial Context Created***");
      Object obj = ctx.lookup("jndi.GVSessionFacadeHome");
      logger.info("***Lookup Name created ***");
      GVSessionFacadeHome home = (GVSessionFacadeHome) PortableRemoteObject
      .narrow(obj, GVSessionFacadeHome.class);
      logger.info("***Getting the Home Object ***");
      test = home.create();
      logger.info("Invoking EJB completed");



      The Error when I try to execute my ejb client program. I can see ***Initial Context Created*** in my console. Then it fails. This is the exception.

      javax.naming.CommunicationException [Root exception is java.io.InvalidClassException: org.jboss.invocation.MarshallingInvokerInter
      ceptor; unable to create instance]
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:722)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
      at javax.naming.InitialContext.lookup(InitialContext.java:351)
      at com.intel.e2e.bes.handler.PHSWebServiceHandler.getGVSessionFacade(PHSWebServiceHandler.java:225)
      at com.intel.e2e.bes.handler.PHSWebServiceHandler.retrieveActivationSetupDetails(PHSWebServiceHandler.java:67)
      at com.intel.e2e.bes.processor.PHSWebService.retrieveActivationSetupDetails(PHSWebService.java:53)
      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 org.codehaus.xfire.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:54)
      at org.codehaus.xfire.service.binding.ServiceInvocationHandler.sendMessage(ServiceInvocationHandler.java:271)
      at org.codehaus.xfire.service.binding.ServiceInvocationHandler$1.run(ServiceInvocationHandler.java:84)
      at org.codehaus.xfire.service.binding.ServiceInvocationHandler.execute(ServiceInvocationHandler.java:132)
      at org.codehaus.xfire.service.binding.ServiceInvocationHandler.invoke(ServiceInvocationHandler.java:107)
      at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
      at org.codehaus.xfire.transport.DefaultEndpoint.onReceive(DefaultEndpoint.java:64)
      at org.codehaus.xfire.transport.AbstractChannel.receive(AbstractChannel.java:38)
      at org.apache.servicemix.jsr181.Jsr181ExchangeProcessor.process(Jsr181ExchangeProcessor.java:110)
      at org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:489)
      at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:441)
      at org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
      at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:593)
      at org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:174)
      at org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:176)
      at org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
      at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
      at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
      at java.lang.Thread.run(Thread.java:595)
      Caused by: java.io.InvalidClassException: org.jboss.invocation.MarshallingInvokerInterceptor; unable to create instance
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1700)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
      at org.jboss.proxy.Interceptor.readExternal(Interceptor.java:80)
      at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1753)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1711)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
      at org.jboss.proxy.Interceptor.readExternal(Interceptor.java:80)
      at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1753)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1711)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
      at org.jboss.proxy.Interceptor.readExternal(Interceptor.java:80)
      at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1753)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1711)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
      at org.jboss.proxy.ClientContainer.readExternal(ClientContainer.java:156)
      at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1753)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1711)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
      at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1912)
      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1836)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
      at java.rmi.MarshalledObject.get(MarshalledObject.java:135)
      at org.jnp.interfaces.MarshalledValuePair.get(MarshalledValuePair.java:72)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:652)