Changes for Glassfish?

RMIIO Help
SurfMan
2013-03-08
2013-10-01
  • SurfMan
    SurfMan
    2013-03-08

    I want to use RMIIO on Glassfish but struggle to get it to work. According to the FAQ here I need a custom ResourceStreamExporter. I managed to dig up an old post about it on the Sun Oracle forums. I have set the property in Glassfish: com.healthmarketscience.rmiio.exporter=my.class.as.in.the.ForumPost. But the breakpoint I placed in that CorbaRemoteStreamExporter never gets hit.

    This has always worked on JBoss (obviously without the custom RemoteStreamExporter).

    In the end I get this message. I am not sure if this is RMIIO code or the infamous NoSuchEJBException for Glassfish after a redeploy. Ofcourse I tried this without a redeploy, i.e. with a freshly started server, but the message is the same.

    Could you please give me an idea on how to get this to work on Glassfish?

    Thanks!

    WarnerJan

    2013-03-08 14:35:56,963 ERROR [MassModelImportManager        ] javax.ejb.NoSuchEJBException
    javax.ejb.NoSuchEJBException
        at com.mycompany.server.facade._TransferDataFacadeRemote_Wrapper.executeTask(com/mycompany/server/facade/_TransferDataFacadeRemote_Wrapper.java)
        at com.mycompany.client.transferdataview.TaskListExecuteController.executeImportTask(TaskListExecuteController.java:627)
        at com.mycompany.util.MassModelImportManager$ImportThread.doActualImport(MassModelImportManager.java:625)
        at com.mycompany.util.MassModelImportManager$ImportThread.importModel(MassModelImportManager.java:431)
        at com.mycompany.util.MassModelImportManager$ImportThread.execute(MassModelImportManager.java:180)
        at com.mycompany.util.StoppableThread.run(StoppableThread.java:97)
    Caused by: java.rmi.NoSuchObjectException: CORBA INV_OBJREF 1330447539 No; nested exception is: 
        org.omg.CORBA.INV_OBJREF: WARNING: IOP00511203: Class com.healthmarketscience.rmiio.DirectRemoteInputStream not exported, or else is actually a JRMP stub  vmcid: OMG  minor code: 1203  completed: No
        at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.mapSystemException(Util.java:261)
        at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:213)
        at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:152)
        at com.sun.corba.ee.impl.presentation.rmi.codegen.CodegenStubBase.invoke(CodegenStubBase.java:227)
        at com.mycompany.server.facade.__TransferDataFacadeRemote_Remote_DynamicStub.executeTask(com/mycompany/server/facade/__TransferDataFacadeRemote_Remote_DynamicStub.java)
        ... 6 more
    Caused by: org.omg.CORBA.INV_OBJREF: WARNING: IOP00511203: Class com.healthmarketscience.rmiio.DirectRemoteInputStream not exported, or else is actually a JRMP stub  vmcid: OMG  minor code: 1203  completed: No
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
        at com.sun.corba.ee.spi.orbutil.logex.corba.CorbaExtension.makeException(CorbaExtension.java:248)
        at com.sun.corba.ee.spi.orbutil.logex.corba.CorbaExtension.makeException(CorbaExtension.java:95)
        at com.sun.corba.ee.spi.orbutil.logex.WrapperGenerator.handleFullLogging(WrapperGenerator.java:387)
        at com.sun.corba.ee.spi.orbutil.logex.WrapperGenerator.access$400(WrapperGenerator.java:107)
        at com.sun.corba.ee.spi.orbutil.logex.WrapperGenerator$2.invoke(WrapperGenerator.java:511)
        at com.sun.corba.ee.spi.orbutil.proxy.CompositeInvocationHandlerImpl.invoke(CompositeInvocationHandlerImpl.java:99)
        at com.sun.proxy.$Proxy50.objectNotExported(Unknown Source)
        at com.sun.corba.ee.impl.util.Utility.autoConnect(Utility.java:160)
        at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.writeRemoteObject(Util.java:474)
        at com.sun.corba.ee.impl.io.IIOPOutputStream.writeObjectField(IIOPOutputStream.java:768)
        at com.sun.corba.ee.impl.io.IIOPOutputStream.outputClassFields(IIOPOutputStream.java:846)
        at com.sun.corba.ee.impl.io.IIOPOutputStream.defaultWriteObjectDelegate(IIOPOutputStream.java:245)
        at com.sun.corba.ee.impl.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:614)
        at com.sun.corba.ee.impl.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:196)
        at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:235)
        at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueWithVersion(ValueHandlerImpl.java:216)
        at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:180)
        at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.callWriteValue(CDROutputStream_1_0.java:852)
        at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.writeRMIIIOPValueType(CDROutputStream_1_0.java:837)
        at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:962)
        at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:976)
        at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:706)
        at com.sun.corba.ee.impl.encoding.CDROutputObject.write_value(CDROutputObject.java:527)
        at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl$14.write(DynamicMethodMarshallerImpl.java:394)
        at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl.writeArguments(DynamicMethodMarshallerImpl.java:466)
        at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:198)
        ... 9 more
    
     
    Last edit: SurfMan 2013-03-08
  • SurfMan
    SurfMan
    2013-03-08

    Additional information: this is the stacktrace that I find in the server log:

    [#|2013-03-08T15:28:31.354+0100|WARNING|glassfish3.1.2|javax.enterprise.resource.corba.ORBUtil|_ThreadID=106;_ThreadName=Thread-2;|IOP00810011: Exception from readValue on ValueHandler in CDRInputStream
    org.omg.CORBA.MARSHAL: WARNING: IOP00810011: Exception from readValue on ValueHandler in CDRInputStream  vmcid: OMG  minor code: 11 completed: Maybe
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
        at com.sun.corba.ee.spi.orbutil.logex.corba.CorbaExtension.makeException(CorbaExtension.java:248)
        at com.sun.corba.ee.spi.orbutil.logex.corba.CorbaExtension.makeException(CorbaExtension.java:95)
        at com.sun.corba.ee.spi.orbutil.logex.WrapperGenerator.handleFullLogging(WrapperGenerator.java:387)
        at com.sun.corba.ee.spi.orbutil.logex.WrapperGenerator.access$400(WrapperGenerator.java:107)
        at com.sun.corba.ee.spi.orbutil.logex.WrapperGenerator$2.invoke(WrapperGenerator.java:511)
        at com.sun.corba.ee.spi.orbutil.proxy.CompositeInvocationHandlerImpl.invoke(CompositeInvocationHandlerImpl.java:99)
        at $Proxy132.valuehandlerReadException(Unknown Source)
        at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.readRMIIIOPValueType(CDRInputStream_1_0.java:1022)
        at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1123)
        at com.sun.corba.ee.impl.encoding.CDRInputObject.read_value(CDRInputObject.java:531)
        at com.sun.corba.ee.impl.io.IIOPInputStream.inputObjectField(IIOPInputStream.java:2162)
        at com.sun.corba.ee.impl.io.IIOPInputStream.inputClassFields(IIOPInputStream.java:2404)
        at com.sun.corba.ee.impl.io.IIOPInputStream.inputObject(IIOPInputStream.java:1224)
        at com.sun.corba.ee.impl.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:425)
        at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:308)
        at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:274)
        at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.readRMIIIOPValueType(CDRInputStream_1_0.java:1015)
        at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1123)
        at com.sun.corba.ee.impl.encoding.CDRInputObject.read_value(CDRInputObject.java:531)
        at com.sun.corba.ee.impl.io.IIOPInputStream.inputObjectField(IIOPInputStream.java:2162)
        at com.sun.corba.ee.impl.io.IIOPInputStream.inputClassFields(IIOPInputStream.java:2404)
        at com.sun.corba.ee.impl.io.IIOPInputStream.inputObject(IIOPInputStream.java:1224)
        at com.sun.corba.ee.impl.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:425)
        at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:308)
        at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:274)
        at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.readRMIIIOPValueType(CDRInputStream_1_0.java:1015)
        at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1123)
        at com.sun.corba.ee.impl.encoding.CDRInputObject.read_value(CDRInputObject.java:531)
        at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl$14.read(DynamicMethodMarshallerImpl.java:384)
        at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl.readArguments(DynamicMethodMarshallerImpl.java:451)
        at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:172)
        at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:528)
        at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:199)
        at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1624)
        at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1486)
        at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:990)
        at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:214)
        at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:742)
        at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.dispatch(CorbaMessageMediatorImpl.java:539)
        at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.doWork(CorbaMessageMediatorImpl.java:2324)
        at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.performWork(ThreadPoolImpl.java:497)
        at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:540)
    Caused by: com.sun.corba.ee.impl.protocol.RequestCanceledException
        at com.sun.corba.ee.impl.encoding.BufferManagerReadStream.underflow(BufferManagerReadStream.java:122)
        at com.sun.corba.ee.impl.encoding.CDRInputStream_1_1.grow(CDRInputStream_1_1.java:113)
        at com.sun.corba.ee.impl.encoding.CDRInputStream_1_2.alignAndCheck(CDRInputStream_1_2.java:126)
        at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_octet_array(CDRInputStream_1_0.java:709)
        at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.getConvertedChars(CDRInputStream_1_0.java:2340)
        at com.sun.corba.ee.impl.encoding.CDRInputStream_1_2.read_wstring(CDRInputStream_1_2.java:171)
        at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1082)
        at com.sun.corba.ee.impl.encoding.CDRInputObject.read_value(CDRInputObject.java:531)
        at com.sun.corba.ee.impl.io.ValueHandlerImpl.read_Array(ValueHandlerImpl.java:742)
        at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:305)
        at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:274)
        at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.readRMIIIOPValueType(CDRInputStream_1_0.java:1015)
        ... 34 more
    
     
  • James Ahlborn
    James Ahlborn
    2013-03-12

    Sorry, it's been awhile since i've touched much of anything CORBA related, so i'm not sure i have much in the way of suggestions. I think that the problem is that you are trying to use a DirectRemoteInputStream, which isn't really a RemoteInputStream (in that it doesn't use a remote connection under the hood). The DirectRemoteInputStream really uses normal java Serialization without any RMI. I don't know how the "advanced" features of java Serialization interact with rmi-iiop. It might work if you used the DirectRemoteInputStream type explicitly in your remote interface (although that wouldn't allow you to use a real RemoteInputStream at a later point in time). or, you could try one of the "real" RemoteInputStream implementations.

     
    Last edit: James Ahlborn 2013-03-12
  • lanthale
    lanthale
    2013-10-01

    The new library contains a fix for that issue which I have posted on the bug fix page. As I know it was integrated into the actual version.

     
    Last edit: lanthale 2013-10-01