[jacorb-developer] Bad type on operand stack error when using JacORB and JBoss modules

Nick Cross jacorb at goots.org
Mon Apr 24 13:02:40 CEST 2017


That 'no-rmi' functionality does not exist in the Maven build system. I 
suspect that even if the 'forname' classloaderpolicy you may still get 
issues. I'd be happy to take a look if you have any suggested pull 
requests with modifications to make.

Regards

Nick



On 23/04/17 02:48, Rob Ratcliff wrote:
> I tried
>
> mvn clean install -Dno-rmi=true -DskipTests=true
> (I don't think no-rmi does anything.)
>
> but I still get error when loading the jar files from my plugin:
> Bad type on operand stack
> Exception Details:
>    Location:
>     
> org/jacorb/orb/Delegate.getReference(Lorg/jacorb/poa/POA;)Lorg/omg/CORBA/portable/ObjectImpl;
> @100: invokevirtual
>    Reason:
>      Type 'org/jacorb/orb/Reference' (current frame, stack[0]) is not
> assignable to 'org/omg/CORBA/portable/ObjectImpl'
>    Current Frame:
>      bci: @100
>      flags: { }
>      locals: { 'org/jacorb/orb/Delegate', 'org/jacorb/poa/POA',
> 'java/lang/String', 'org/jacorb/orb/Reference' }
>      stack: { 'org/jacorb/orb/Reference', 'org/jacorb/orb/Delegate' }
>
> If I put jacorb.jar and jacorb-omgapi.jar in a separate JBoss module, I
> get this error:
> loader constraint violation: loader (instance of <bootloader>)
> previously initiated loading for a different type with name "or
> g/omg/CORBA/Object"
> java.lang.LinkageError: loader constraint violation: loader (instance of
> <bootloader>) previously initiated loading for a different
> type with name "org/omg/CORBA/Object"
>         at java.lang.ClassLoader.findBootstrapClass(Native Method)
>         at
> java.lang.ClassLoader.findBootstrapClassOrNull(ClassLoader.java:1015)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:413)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:411)
>         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
> It'd be nice to be able to build JacORB  with no dependencies on the JDK
> and no conflicting class names or build it with no duplicate of classes
> in the JDK.
> Too bad the OMG isn't modernizing the Java bindings and life-cycle as
> well. This is a PTA.
>
> This developer had a good explanation of what's going on:
> http://apache-felix.18485.x6.nabble.com/Bundelizing-Jacorb-getting-screwed-tp4843264p4843268.html
>
> Thanks,
>
> Rob
>
>
>
>
> On 4/22/2017 8:15 PM, Rob Ratcliff wrote:
>> Hi ,
>>
>> I found this old article on reworking JacORB to work with Felix by
>> compiling without RMI support using -Dno-rmi=true.
>>
>> http://apache-felix.18485.x6.nabble.com/Bundelizing-Jacorb-getting-screwed-tp4843264p4843270.html
>>
>> What's the equivalent maven command to do this?
>>
>> Any advice on this?
>>
>> Rob
>>
>>
>> On 4/19/2017 4:07 PM, Rob Ratcliff wrote:
>>> Hi,
>>>
>>> I am using a GUI framework that use JBoss modules to manage plugins. My
>>> plugin has a dependency on JacORB. I'm using the classloader for my
>>> plugin by setting
>>> Thread.getCurrentThread().setContextClassLoader(this.getClass().getClassLoader());
>>> and I set the tccl property in JacORB
>>> (System.setProperty("jacorb.classloaderpolicy", "tccl");
>>>
>>> Any ideas for resolving the Bad type on operand stack error in the stack
>>> trace below? Is there any way to eliminate the dependency on the JDK's
>>> CORBA classes?
>>>
>>> Thanks,
>>>
>>> Rob
>>>
>>>
>>> 19 Apr 2017 15:58:10,264  WARN [AWT-EventQueue-0] (singleton:208) -
>>> Warning - unknown codeset (Cp1252) - defaulting to ISO-8859-1
>>> 19 Apr 2017 15:58:10,266  WARN [AWT-EventQueue-0] (orb:208) - Warning -
>>> unknown codeset (Cp1252) - defaulting to ISO-8859-1
>>> 19 Apr 2017 15:58:10,939 ERROR [AWT-EventQueue-0] (RaptorUEHandler:14) -
>>> Thread unexpectedly terminated with exception: AWT-EventQue
>>> ue-0, Bad type on operand stack
>>> Exception Details:
>>>    Location:
>>>     
>>> org/jacorb/orb/Delegate.getReference(Lorg/jacorb/poa/POA;)Lorg/omg/CORBA/portable/ObjectImpl;
>>> @42: invokevirtual
>>>    Reason:
>>>      Type 'org/jacorb/orb/Reference' (current frame, stack[0]) is not
>>> assignable to 'org/omg/CORBA/portable/ObjectImpl'
>>>    Current Frame:
>>>      bci: @42
>>>      flags: { }
>>>      locals: { 'org/jacorb/orb/Delegate', 'org/jacorb/poa/POA',
>>> 'java/lang/String', 'org/jacorb/orb/Reference' }
>>>      stack: { 'org/jacorb/orb/Reference', 'org/jacorb/orb/Delegate' }
>>>    Bytecode:
>>>      0x0000000: 2bc6 0008 2a2b b500 e72a b400 10c7 000a
>>>      0x0000010: 2ab6 00e8 a700 0a2a b400 10b4 00e9 4dbb
>>>      0x0000020: 00ea 592c b700 eb4e 2d2a b600 ec2d b0
>>>    Stackmap Table:
>>>      same_frame(@9)
>>>      same_frame(@23)
>>>      same_locals_1_stack_item_frame(@30,Object[#675])
>>>
>>> java.lang.VerifyError: Bad type on operand stack
>>> Exception Details:
>>>    Location:
>>>     
>>> org/jacorb/orb/Delegate.getReference(Lorg/jacorb/poa/POA;)Lorg/omg/CORBA/portable/ObjectImpl;
>>> @42: invokevirtual
>>>    Reason:
>>>      Type 'org/jacorb/orb/Reference' (current frame, stack[0]) is not
>>> assignable to 'org/omg/CORBA/portable/ObjectImpl'
>>>    Current Frame:
>>>      bci: @42
>>>      flags: { }
>>>      locals: { 'org/jacorb/orb/Delegate', 'org/jacorb/poa/POA',
>>> 'java/lang/String', 'org/jacorb/orb/Reference' }
>>>      stack: { 'org/jacorb/orb/Reference', 'org/jacorb/orb/Delegate' }
>>>    Bytecode:
>>>      0x0000000: 2bc6 0008 2a2b b500 e72a b400 10c7 000a
>>>      0x0000010: 2ab6 00e8 a700 0a2a b400 10b4 00e9 4dbb
>>>      0x0000020: 00ea 592c b700 eb4e 2d2a b600 ec2d b0
>>>    Stackmap Table:
>>>      same_frame(@9)
>>>      same_frame(@23)
>>>      same_locals_1_stack_item_frame(@30,Object[#675])
>>>
>>>          at org.jacorb.orb.ORB._getDelegate(ORB.java:586)
>>>          at org.jacorb.orb.ORB.string_to_object(ORB.java:2466)
>>> _______________________________________________
>>> jacorb-developer maillist  -  jacorb-developer at lists.spline.inf.fu-berlin.de
>>> https://lists.spline.inf.fu-berlin.de/mailman/listinfo/jacorb-developer
>>>
>



More information about the jacorb-developer mailing list