-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Milestone
Description
Version: 5.0.0
If the ORB is created with system property -Dorg.omg.CORBA.SkipGmbalInit=true (see #204), a NullPointerException is thrown when shutting down, because POAFactory#removePoaManager expects a non-null ManagedObjectManager in field mom. But that field is null, because it's initialized from com.sun.corba.ee.spi.orb.ORB#mom, which is null with above system property.
java.lang.NullPointerException: Cannot invoke "org.glassfish.gmbal.ManagedObjectManager.unregister(Object)" because "this.mom" is null
at com.sun.corba.ee.impl.oa.poa.POAFactory.removePoaManager(POAFactory.java:246)
at com.sun.corba.ee.impl.oa.poa.POAManagerImpl$POAManagerDeactivator.run(POAManagerImpl.java:556)
at com.sun.corba.ee.impl.oa.poa.POAManagerImpl.deactivate(POAManagerImpl.java:492)
at com.sun.corba.ee.impl.oa.poa.POAFactory.shutdown(POAFactory.java:236)
at com.sun.corba.ee.impl.orb.ORBImpl.shutdownServants(ORBImpl.java:1395)
at com.sun.corba.ee.impl.orb.ORBImpl.shutdown(ORBImpl.java:1355)
at com.sun.corba.ee.impl.orb.ORBImpl.destroy(ORBImpl.java:1448)
orb/orbmain/src/main/java/com/sun/corba/ee/impl/oa/poa/POAFactory.java
Lines 243 to 247 in 713fe92
| public synchronized void removePoaManager( POAManager manager ) | |
| { | |
| poaManagers.remove(manager); | |
| mom.unregister( manager ) ; | |
| } |
Let me add some context, why I ended up trying to use that system property:
- With version 4.2.2, we excluded the gmbal dependency and replaced it with gmbal-api-only because the former requires a huge additional amount of heap memory (65MB in our case, compare [PERF] gmbal objects consuming large part of heap #5). Replacing the dependency worked fine though.
- Version 5.0.0 does not have a dependency on gmbal anymore, but on gmbal-api-only only. But we have to set
org.omg.CORBA.SkipGmbalInit=truenow because otherwiseorg.glassfish.gmbal.ManagedObjectManagerFactorythrows an IllegalStateException in its class initializer if the implementation from gmbal is not available (since Fixed cyclic dependency between api and impl forbidden by JPMS orb-gmbal#56).
dmatejpzygielo
Metadata
Metadata
Assignees
Labels
No labels