Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GlassFish » Glassfish ORB.init() java.lang.IllegalStateException: cannot modify frozen instance (Glassfish ORB.init() in wildfly23 throwing java.lang.IllegalStateException: Cannot modify frozen instance for org.omg.CORBA.portable.InputStream)
Glassfish ORB.init() java.lang.IllegalStateException: cannot modify frozen instance [message #1840613] Tue, 20 April 2021 16:48 Go to next message
Earl Nordgren is currently offline Earl NordgrenFriend
Messages: 2
Registered: April 2021
Junior Member
I have a war file I has been used in weblogic that I am in the process of porting to wildfly 23 docker image. The WS-RS services make corba calls using the glassfish orb to an oracle Tuxedo system). The war file deploys correctly (can see services in wildfly console) but when the webservice is invoked the initial time the orb is created (code snippet):
props.put("org.omg.CORBA.ORBSingletonClass", "com.sun.corba.ee.impl.orb.ORBImpl");
props.put("org.omg.CORBA.ORBClass", "com.sun.corba.ee.impl.orb.ORBImpl");
props.put("com.sun.corba.ee.transport.ORBSocketFactoryClass", YSocketFactory.class.getName());
myOrb = ORB.init(new String[] {}, props);

The following exception is thrown in ORB.init():
2021-04-20 15:31:20,225 ERROR [com.ge.trans.tms.mws.MWSTracksCorba] (default task-1) initializeOrb() failed; : java.lang.IllegalStateException: Cannot modify frozen instance for org.omg.CORBA.portable.InputStream
at deployment.mobility-ws.war//org.glassfish.gmbal.typelib.DeclarationFactory$EvaluatedClassDeclarationImpl.checkFrozen(DeclarationFactory.java:324)
...
at deployment.mobility-ws.war//com.sun.corba.ee.impl.orb.ORBImpl.postInit(ORBImpl.java:553)
at deployment.mobility-ws.war//com.sun.corba.ee.impl.orb.ORBImpl.set_parameters(ORBImpl.java:676)
at deployment.mobility-ws.war//org.omg.CORBA.ORB.init(ORB.java:352)


snippet of maven dependency tree info:
[INFO] +- org.glassfish.corba:glassfish-corba-omgapi:jar:4.2.3:compile
[INFO] +- org.glassfish.corba:glassfish-corba-csiv2-idl:jar:4.2.3:compile
[INFO] \- org.glassfish.corba:glassfish-corba-orb:jar:4.2.3:compile
[INFO] +- org.glassfish.corba:glassfish-corba-internal-api:jar:4.2.3:compile
[INFO] +- org.glassfish.corba:exception-annotation-processor:jar:4.2.3:compile
[INFO] +- org.osgi:org.osgi.core:jar:6.0.0:compile
[INFO] +- org.glassfish.gmbal:gmbal:jar:4.0.0:compile
[INFO] | +- org.glassfish.external:management-api:jar:3.2.1:compile
[INFO] | +- org.glassfish.pfl:pfl-basic-tools:jar:4.0.1:compile
[INFO] | \- org.glassfish.pfl:pfl-tf-tools:jar:4.0.1:compile
[INFO] +- org.glassfish.pfl:pfl-basic:jar:4.1.0:compile
[INFO] +- org.glassfish.pfl:pfl-dynamic:jar:4.1.0:compile
[INFO] | \- org.glassfish.pfl:pfl-asm:jar:4.1.0:compile
[INFO] \- org.glassfish.pfl:pfl-tf:jar:4.1.0:compile

I saw a reference to a similar case where the parent loader priority was mentioned as the issue... but no further details were provided.
Anyone know the cause and how I might resolve this issue or track it down? I am fairly new to java and its my first time using wildfly. Any information would help. I have also posted this to the wildfly community.
Thanks
Re: Glassfish ORB.init() java.lang.IllegalStateException: cannot modify frozen instance [message #1840733 is a reply to message #1840613] Fri, 23 April 2021 00:33 Go to previous message
Earl Nordgren is currently offline Earl NordgrenFriend
Messages: 2
Registered: April 2021
Junior Member
Problem:
Incompatibility with version of org.glassfish.corba 4.24 (latest) in the war file lib/ and wildfly's (version 23.0.1 latest as of 22Apr2021) javax.rmi.api module being exported to the war. Wildfly is run with openjdk 11.0.8. The war was compiled with java 1.8.

Solution:
Use WEB-INF/jboss-deployment-structure.xml to direct wildfly to exclude exporting its version of javax.rmi.api
You will note another change that was required to get this to work was to direct wildfly to export java's sun/reflect package (though not tied to this issue).

Here is the full WEB-INF/jboss-deployment-structure.xml:

<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
   <deployment>
      <!-- allow jre sun reflect package be accessible in war -->
      <dependencies>
         <system export="true">
            <paths>
               <path name="sun/reflect"/>
            </paths>
         </system>
      </dependencies>
      <exclusions>
         <module name="javax.rmi.api" /> <!-- prevent Wildfly from exporting its javax.rmi.api to the war -->
      </exclusions>
   </deployment>
</jboss-deployment-structure>

Previous Topic:Weird behavior with glassfish service
Next Topic:Glassfish & broker
Goto Forum:
  


Current Time: Tue Apr 23 13:28:19 GMT 2024

Powered by FUDForum. Page generated in 0.03393 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top