glassfish
  1. glassfish
  2. GLASSFISH-15984

Validation error in remote EJB gives ClassNotFoundException: ... : Unknown protocol: osgi

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: v3.0.1, 3.1_b41
    • Fix Version/s: 4.1
    • Component/s: orb
    • Labels:
      None
    • Environment:

      linux, windows

      Description

      When a validation error occurs in a remote ejb (at least with org.hibernate.validator.constraints.Length), this results in the following stacktrace:

      [#|2011-02-15T10:26:46.765+0100|WARNING|glassfish3.1|javax.enterprise.resource.corba.ORBUtil|_ThreadID=21;_ThreadName=Thread-1;|IOP00810013: Could not find class org.hibernate.validator.constraints.Length in CDRInputStream.readClass
      org.omg.CORBA.MARSHAL: WARNING: IOP00810013: Could not find class org.hibernate.validator.constraints.Length in CDRInputStream.readClass vmcid: OMG minor code: 13 completed: Maybe
      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 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 $Proxy285.cnfeReadClass(Unknown Source)
      at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.readClass(CDRInputStream_1_0.java:1441)
      at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1085)
      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.defaultReadObjectDelegate(IIOPInputStream.java:596)
      at com.sun.corba.ee.impl.io.InputStreamHook.defaultReadObject(InputStreamHook.java:233)
      at sun.reflect.annotation.AnnotationInvocationHandler.readObject(AnnotationInvocationHandler.java:312)
      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 com.sun.corba.ee.impl.io.IIOPInputStream.invokeObjectReader(IIOPInputStream.java:1832)
      at com.sun.corba.ee.impl.io.IIOPInputStream.inputObject(IIOPInputStream.java:1214)
      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.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:935)
      at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_abstract_interface(CDRInputStream_1_0.java:928)
      at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_abstract_interface(CDRInputStream_1_0.java:918)
      at com.sun.corba.ee.impl.encoding.CDRInputObject.read_abstract_interface(CDRInputObject.java:557)
      at com.sun.corba.ee.impl.util.Utility.readAbstractAndNarrow(Utility.java:1026)
      at com.sun.corba.ee.impl.io.IIOPInputStream.inputObjectField(IIOPInputStream.java:2157)
      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.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.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:935)
      at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_abstract_interface(CDRInputStream_1_0.java:928)
      at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_abstract_interface(CDRInputStream_1_0.java:918)
      at com.sun.corba.ee.impl.encoding.CDRInputObject.read_abstract_interface(CDRInputObject.java:557)
      at com.sun.corba.ee.impl.io.IIOPInputStream.readObjectDelegate(IIOPInputStream.java:391)
      at com.sun.corba.ee.impl.io.IIOPInputStream.readObjectOverride(IIOPInputStream.java:544)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:345)
      at java.util.HashSet.readObject(HashSet.java:291)
      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 com.sun.corba.ee.impl.io.IIOPInputStream.invokeObjectReader(IIOPInputStream.java:1832)
      at com.sun.corba.ee.impl.io.IIOPInputStream.inputObject(IIOPInputStream.java:1214)
      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.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.ExceptionHandlerImpl$ExceptionRWRMIImpl.read(ExceptionHandlerImpl.java:180)
      at com.sun.corba.ee.impl.presentation.rmi.ExceptionHandlerImpl.readException(ExceptionHandlerImpl.java:290)
      at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl.readException(DynamicMethodMarshallerImpl.java:502)
      at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:205)
      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 no.evote.service._OperatorService_Remote_DynamicStub.updateOperator(no/evote/service/_OperatorService_Remote_DynamicStub.java)
      at no.evote.service._OperatorService_Wrapper.updateOperator(no/evote/service/_OperatorService_Wrapper.java)
      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 no.evote.service.cache.ServiceInvocationHandler.invoke(ServiceInvocationHandler.java:80)
      at no.evote.service.cache.ServiceInvocationHandler.invoke(ServiceInvocationHandler.java:110)
      at $Proxy323.updateOperator(Unknown Source)
      at no.evote.presentation.OperatorController.saveOperator(OperatorController.java:244)
      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 com.sun.el.parser.AstValue.invoke(AstValue.java:234)
      at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:297)
      at org.jboss.weld.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:43)
      at org.jboss.weld.el.WeldMethodExpression.invoke(WeldMethodExpression.java:56)
      at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
      at javax.faces.event.MethodExpressionActionListener.processAction(MethodExpressionActionListener.java:148)
      at javax.faces.event.ActionEvent.processListener(ActionEvent.java:88)
      at javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:769)
      at javax.faces.component.UICommand.broadcast(UICommand.java:300)
      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)
      at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
      at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:409)
      at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1534)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:215)
      at no.evote.service.security.DisableCachingFilter.doFilter(DisableCachingFilter.java:28)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:215)
      at no.evote.service.security.SelectRoleFilter.doFilter(SelectRoleFilter.java:47)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:215)
      at no.evote.service.security.CookieFilter.doFilter(CookieFilter.java:52)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:215)
      at no.evote.service.security.CSRFFilter.doFilter(CSRFFilter.java:68)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:215)
      at net.balusc.http.multipart.MultipartFilter.doFilter(MultipartFilter.java:78)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:215)
      at no.evote.service.security.saml.SAMLAccessFilter.doFilter(SAMLAccessFilter.java:54)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:215)
      at no.evote.presentation.MonitorFilter.doFilter(MonitorFilter.java:25)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:215)
      at no.evote.presentation.ForceLocaleFilter.doFilter(ForceLocaleFilter.java:54)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:215)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
      at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:98)
      at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:91)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162)
      at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:326)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:227)
      at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:170)
      at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:822)
      at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:719)
      at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1013)
      at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
      at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
      at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
      at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
      at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
      at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
      at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
      at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
      at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
      at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
      at java.lang.Thread.run(Thread.java:619)
      Caused by: java.lang.ClassNotFoundException: org.hibernate.validator.constraints.Length: java.net.MalformedURLException: Unknown protocol: osgi
      at com.sun.corba.ee.impl.util.JDKBridge.loadClassM(JDKBridge.java:325)
      at com.sun.corba.ee.impl.util.JDKBridge.loadClass(JDKBridge.java:228)
      at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.loadClass(Util.java:640)
      at com.sun.corba.ee.impl.util.RepositoryId.getClassFromType(RepositoryId.java:628)
      at com.sun.corba.ee.impl.orbutil.RepIdDelegator.getClassFromType(RepIdDelegator.java:169)
      at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.readClass(CDRInputStream_1_0.java:1439)
      ... 182 more

      #]

      It has been around for a while, also discussed in the forum by someone else:
      http://www.java.net/forum/topic/glassfish/glassfish/jpa-20-validaton-exceptions-and-unknown-protocol-osgi-0

        Activity

        Hide
        Ken Cavanaugh added a comment -

        Much too late to fix in 3.1.

        The osgi: protocol is one I added in GF 3.0 to use in a codebase
        where the sender and receiver are running under OSGi. The tradtional
        RMI-style classpath does not work in this environment because
        there is no classpath in OSGi. Instead, I defined a
        osgi://<bundle name>:<version> URL to allow the receiver to find
        the appropriate OSGi bundle in which to locate the class from the
        class name passed in the value type that is being unmarshaled.

        Unfortunately it appears that I did not find all the places in the
        ORB that need to be modified in this case. It is also a bit hard
        to set up an ORB-level OSGi-based regression test, but I really need
        to take the time to do this.

        Show
        Ken Cavanaugh added a comment - Much too late to fix in 3.1. The osgi: protocol is one I added in GF 3.0 to use in a codebase where the sender and receiver are running under OSGi. The tradtional RMI-style classpath does not work in this environment because there is no classpath in OSGi. Instead, I defined a osgi://<bundle name>:<version> URL to allow the receiver to find the appropriate OSGi bundle in which to locate the class from the class name passed in the value type that is being unmarshaled. Unfortunately it appears that I did not find all the places in the ORB that need to be modified in this case. It is also a bit hard to set up an ORB-level OSGi-based regression test, but I really need to take the time to do this.
        Hide
        Ken Cavanaugh added a comment -

        It looks like the problem is a missing call to the classCodeBaseHandler in readClass. The
        code is present in the more common case of reading a valueType (see CDRInputStream_1_0.getClassFromString
        starting at line 2267 in the GF 3.1 ORB code). But it's missing in readClass.
        Looks like the fix is basically to add:

        ClassCodeBaseHandler ccbh = orb.classCodeBaseHandler() ;
        if (ccbh != null) {
        String className = repositoryID.getClassName() ;
        Class<?> result = ccbh.loadClass( codebaseURL, className ) ;

        if (result != null)

        { return result ; }

        }

        in readClass after the repIdStrings.getFromString(classRepId) call in readClass.

        5 minutes to fix, 2 days to write a suitable regression test .

        Show
        Ken Cavanaugh added a comment - It looks like the problem is a missing call to the classCodeBaseHandler in readClass. The code is present in the more common case of reading a valueType (see CDRInputStream_1_0.getClassFromString starting at line 2267 in the GF 3.1 ORB code). But it's missing in readClass. Looks like the fix is basically to add: ClassCodeBaseHandler ccbh = orb.classCodeBaseHandler() ; if (ccbh != null) { String className = repositoryID.getClassName() ; Class<?> result = ccbh.loadClass( codebaseURL, className ) ; if (result != null) { return result ; } } in readClass after the repIdStrings.getFromString(classRepId) call in readClass. 5 minutes to fix, 2 days to write a suitable regression test .
        Hide
        jdbuys added a comment -

        I implemented the fix on our side but we still get the same error.

        Do you have any other ideas?

        Show
        jdbuys added a comment - I implemented the fix on our side but we still get the same error. Do you have any other ideas?
        Hide
        Tom Mueller added a comment -

        Targeting for 4.0.1 as bugs related to the orb do not need to be fixed for the RI/SDK.

        Show
        Tom Mueller added a comment - Targeting for 4.0.1 as bugs related to the orb do not need to be fixed for the RI/SDK.

          People

          • Assignee:
            Harshad Vilekar
            Reporter:
            andersaab
          • Votes:
            5 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

            • Created:
              Updated: