2 Replies Latest reply on Aug 17, 2009 8:02 PM by user8136345

    EJB3 EntityBean remote Standalone-Client Exception "BAD_PARAM"

    717428
      Hi

      In the chain
      1) Remote Standalone-Client
      2) Stateless Session-Bean
      3) EAO (POJO) (does a EntityManager.find(MyClass.class, 1)

      The find() method completes successfully and I can read the Entity within the Stateless Session-Bean.
      But when I want to return the Entity instance 'MyClass' as a result to the remote client (I expect a 'detached' entity getting sent to the client.)
      I get the Exception:
      org.omg.CORBA.BAD_PARAM: Could not find FVD class for: RMI: (full stack on server-side and client side below)

      The same works fine if I do a query.getResultList() and return the resulting List<MyClass> to the remote client.

      What could it be?

      I'd appreciate a hint. Thx and Regards.

      Code in EAOImpl
      ---------------------------------------------------------------------------
           public GreetedName findById(long id) {
                EntityManager em = getEntityManager();
           GreetedName name = em.find(GreetedName.class, new Long(id));
                return name;
           }

      Code in stateless Session Bean HelloWorld
      ---------------------------------------------------------------------------
           public GreetedName find(long primaryKey) {
           GreetedNameEAO greetingSaver = new GreetedNameEAOImpl();
           GreetedName greeter = greetingSaver.findById(primaryKey);
           return greeter;
           }

      Code in remote Client
      ---------------------------------------------------------------------------
           Hashtable<String, String> env = new Hashtable<String, String>();
           env.put(Context.INITIAL_CONTEXT_FACTORY,
           "weblogic.jndi.WLInitialContextFactory");      
           env.put("java.naming.provider.url", "t3://localhost:7001");
           Context context = new InitialContext(env);      
      HelloWorld greeter = (HelloWorld)context.lookup("HelloWorld#helloworld.HelloWorld");      
           System.out.println("trying to find");
      GreetedName name =
           greeter.find(10);


      Server-side Exception
      ---------------------------------------------------------------------------
      <14.08.2009 17:35 Uhr MESZ> <Warning> <RMI> <BEA-080003> <RuntimeException throw
      n by rmi server: weblogic.corba.cos.codebase.CodeBaseImpl.meta(Ljava.lang.String
      ;)
      org.omg.CORBA.BAD_PARAM: Could not find FVD class for: RMI:helloworld.persisten
      ce.GreetedName:F7278CC14D027040:BB056658D20BA706 vmcid: 0x0 minor code: 0 com
      pleted: No.
      org.omg.CORBA.BAD_PARAM: Could not find FVD class for: RMI:helloworld.persistenc
      e.GreetedName:F7278CC14D027040:BB056658D20BA706 vmcid: 0x0 minor code: 0 comp
      leted: No
      at weblogic.corba.cos.codebase.CodeBaseImpl.meta(CodeBaseImpl.java:104)
      at org.omg.SendingContext._CodeBaseImplBase._invoke(_CodeBaseImplBase.ja
      va:94)
      at weblogic.corba.idl.CorbaServerRef.invoke(CorbaServerRef.java:249)
      at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:477)
      at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
      dSubject.java:363)
      Truncated. see log file for complete stacktrace
      >

      Client-side Exception
      ---------------------------------------------------------------------------
      javax.ejb.EJBException: CORBA BAD_PARAM 0 No; nested exception is:
           org.omg.CORBA.BAD_PARAM: vmcid: 0x0 minor code: 0 completed: No; nested exception is: org.omg.CORBA.BAD_PARAM: vmcid: 0x0 minor code: 0 completed: No
      org.omg.CORBA.BAD_PARAM: vmcid: 0x0 minor code: 0 completed: No
           at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
           at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
           at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
           at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
           at java.lang.Class.newInstance0(Class.java:355)
           at java.lang.Class.newInstance(Class.java:308)
           at com.sun.corba.se.impl.protocol.giopmsgheaders.MessageBase.getSystemException(MessageBase.java:897)
           at com.sun.corba.se.impl.protocol.giopmsgheaders.ReplyMessage_1_2.getSystemException(ReplyMessage_1_2.java:99)
           at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.getSystemExceptionReply(CorbaMessageMediatorImpl.java:572)
           at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.processResponse(CorbaClientRequestDispatcherImpl.java:430)
           at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.marshalingComplete(CorbaClientRequestDispatcherImpl.java:326)
           at com.sun.corba.se.impl.protocol.CorbaClientDelegateImpl.invoke(CorbaClientDelegateImpl.java:129)
           at org.omg.CORBA.portable.ObjectImpl._invoke(ObjectImpl.java:457)
           at com.sun.org.omg.SendingContext._CodeBaseStub.meta(_CodeBaseStub.java:105)
           at com.sun.corba.se.impl.encoding.CachedCodeBase.meta(CachedCodeBase.java:89)
           at com.sun.corba.se.impl.io.IIOPInputStream.getOrderedDescriptions(IIOPInputStream.java:1276)
           at com.sun.corba.se.impl.io.IIOPInputStream.inputObjectUsingFVD(IIOPInputStream.java:1455)
           at com.sun.corba.se.impl.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:398)
           at com.sun.corba.se.impl.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:327)
           at com.sun.corba.se.impl.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:293)
           at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1034)
           at com.sun.corba.se.impl.encoding.CDRInputStream.read_value(CDRInputStream.java:253)
           at helloworld._HelloWorldBean_kap09s_HelloWorldIntf_Stub.find(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:597)
           at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:73)
           at $Proxy0.find(Unknown Source)
           at helloworld.HelloWorldClient2.main(HelloWorldClient2.java:26)
      javax.ejb.EJBException: CORBA BAD_PARAM 0 No; nested exception is:
           org.omg.CORBA.BAD_PARAM: vmcid: 0x0 minor code: 0 completed: No; nested exception is: org.omg.CORBA.BAD_PARAM: vmcid: 0x0 minor code: 0 completed: No
           at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.unwrapRemoteException(RemoteBusinessIntfProxy.java:109)
           at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:91)
           at $Proxy0.find(Unknown Source)
           at helloworld.HelloWorldClient2.main(HelloWorldClient2.java:26)
      Caused by: org.omg.CORBA.BAD_PARAM: vmcid: 0x0 minor code: 0 completed: No
           at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
           at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
           at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
           at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
           at java.lang.Class.newInstance0(Class.java:355)
           at java.lang.Class.newInstance(Class.java:308)
           at com.sun.corba.se.impl.protocol.giopmsgheaders.MessageBase.getSystemException(MessageBase.java:897)
           at com.sun.corba.se.impl.protocol.giopmsgheaders.ReplyMessage_1_2.getSystemException(ReplyMessage_1_2.java:99)
           at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.getSystemExceptionReply(CorbaMessageMediatorImpl.java:572)
           at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.processResponse(CorbaClientRequestDispatcherImpl.java:430)
           at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.marshalingComplete(CorbaClientRequestDispatcherImpl.java:326)
           at com.sun.corba.se.impl.protocol.CorbaClientDelegateImpl.invoke(CorbaClientDelegateImpl.java:129)
           at org.omg.CORBA.portable.ObjectImpl._invoke(ObjectImpl.java:457)
           at com.sun.org.omg.SendingContext._CodeBaseStub.meta(_CodeBaseStub.java:105)
           at com.sun.corba.se.impl.encoding.CachedCodeBase.meta(CachedCodeBase.java:89)
           at com.sun.corba.se.impl.io.IIOPInputStream.getOrderedDescriptions(IIOPInputStream.java:1276)
           at com.sun.corba.se.impl.io.IIOPInputStream.inputObjectUsingFVD(IIOPInputStream.java:1455)
           at com.sun.corba.se.impl.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:398)
           at com.sun.corba.se.impl.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:327)
           at com.sun.corba.se.impl.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:293)
           at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1034)
           at com.sun.corba.se.impl.encoding.CDRInputStream.read_value(CDRInputStream.java:253)
           at helloworld._HelloWorldBean_kap09s_HelloWorldIntf_Stub.find(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:597)
           at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:73)
           ... 2 more