This error has only happened once and I don't need any sort of resolution
on it, just wanted to share the log because it implored me to do so:
"[junit] SEVERE: FATAL ERROR: Unknown error in Assembler. Please send the
following stack trace and this message to [email protected]"
I ran into the error (log is attached) when accessing InitialContext like
this from a long-running thread on a Windows 10 machine:
static {
try {
final InitialContext ctx = new InitialContext();
// .....
} catch (NamingException e) {
throw new IllegalStateException(e);
}
}
I replaced out our code with markers: <<< >>>
This happened when a thread tried to access new InitialContext() on startup.
-Kean
[junit] SEVERE: FATAL ERROR: Unknown error in Assembler. Please send the
following stack trace and this message to [email protected] :
[junit] org.apache.xbean.recipe.ConstructionException: Error invoking
factory method: public static
org.apache.geronimo.transaction.manager.GeronimoTransactionManager
org.apache.openejb.resource.GeronimoTransactionManagerFactory.create(java.lang.Integer,org.apache.openejb.util.Duration,boolean,byte[],java.lang.String,int,boolean,boolean,java.lang.Integer,org.apache.openejb.util.Duration,java.lang.String,java.lang.String,java.lang.String,int,int,int,int,int)
throws java.lang.Exception
[junit] at
org.apache.xbean.recipe.ReflectionUtil$StaticFactory.create(ReflectionUtil.java:1007)
[junit] at
org.apache.xbean.recipe.ObjectRecipe.internalCreate(ObjectRecipe.java:276)
[junit] at
org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:96)
[junit] at
org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:61)
[junit] at
org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:49)
[junit] at
org.apache.openejb.assembler.classic.Assembler.createTransactionManager(Assembler.java:3435)
[junit] at
org.apache.openejb.assembler.classic.Assembler.buildContainerSystem(Assembler.java:567)
[junit] at
org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:487)
[junit] at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:150)
[junit] at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:66)
[junit] at org.apache.openejb.OpenEJB.init(OpenEJB.java:307)
[junit] at org.apache.openejb.OpenEJB.init(OpenEJB.java:278)
[junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[junit] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[junit] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[junit] at java.lang.reflect.Method.invoke(Method.java:498)
[junit] at
org.apache.openejb.loader.OpenEJBInstance.init(OpenEJBInstance.java:36)
[junit] at
org.apache.openejb.core.LocalInitialContextFactory.init(LocalInitialContextFactory.java:99)
[junit] at
org.apache.openejb.core.LocalInitialContextFactory.init(LocalInitialContextFactory.java:63)
[junit] at
org.apache.openejb.core.LocalInitialContextFactory.getInitialContext(LocalInitialContextFactory.java:47)
[junit] at
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:684)
[junit] at
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:313)
[junit] at javax.naming.InitialContext.init(InitialContext.java:244)
[junit] at javax.naming.InitialContext.<init>(InitialContext.java:192)
[junit] <<< Method called from long-running thread, failing on:
final InitialContext ctx = new InitialContext(); >>>>>
[junit] <<< Long-running thread >>>
[junit] at java.lang.Thread.run(Thread.java:748)
[junit] Caused by: java.lang.LinkageError: loader constraint violation:
when resolving method
"java.lang.management.ManagementFactory.getPlatformMBeanServer()Ljavax/management/MBeanServer;"
the class loader (instance of org/powermock/core/classloader/MockClassLoader)
of the current class, org/apache/openejb/monitoring/LocalMBeanServer, and the
class loader (instance of <bootloader>) for the method's defining class,
java/lang/management/ManagementFactory, have different Class objects for the
type javax/management/MBeanServer used in the signature
[junit] at
org.apache.openejb.monitoring.LocalMBeanServer.s(LocalMBeanServer.java:145)
[junit] at
org.apache.openejb.monitoring.LocalMBeanServer.isRegistered(LocalMBeanServer.java:197)
[junit] at
org.apache.openejb.monitoring.LocalMBeanServer.registerSilently(LocalMBeanServer.java:85)
[junit] at
org.apache.openejb.monitoring.LocalMBeanServer.registerDynamicWrapperSilently(LocalMBeanServer.java:98)
[junit] at
org.apache.openejb.resource.GeronimoTransactionManagerFactory.create(GeronimoTransactionManagerFactory.java:119)
[junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[junit] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[junit] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[junit] at java.lang.reflect.Method.invoke(Method.java:498)
[junit] at
org.apache.xbean.recipe.ReflectionUtil$StaticFactory.create(ReflectionUtil.java:997)
[junit] ... 27 more
[junit]
[junit] Feb 21, 2019 10:55:00 AM org.apache.openejb.OpenEJB$Instance <init>
[junit] SEVERE: OpenEJB has encountered a fatal error and cannot be
started: Assembler failed to build the container system.
[junit] org.apache.openejb.OpenEJBException:
org.apache.xbean.recipe.ConstructionException: Error invoking factory method:
public static
org.apache.geronimo.transaction.manager.GeronimoTransactionManager
org.apache.openejb.resource.GeronimoTransactionManagerFactory.create(java.lang.Integer,org.apache.openejb.util.Duration,boolean,byte[],java.lang.String,int,boolean,boolean,java.lang.Integer,org.apache.openejb.util.Duration,java.lang.String,java.lang.String,java.lang.String,int,int,int,int,int)
throws java.lang.Exception: Error invoking factory method: public static
org.apache.geronimo.transaction.manager.GeronimoTransactionManager
org.apache.openejb.resource.GeronimoTransactionManagerFactory.create(java.lang.Integer,org.apache.openejb.util.Duration,boolean,byte[],java.lang.String,int,boolean,boolean,java.lang.Integer,org.apache.openejb.util.Duration,java.lang.String,java.lang.String,java.lang.String,int,int,int,int,int)
throws java.lang.Exception
[junit] at
org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:500)
[junit] at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:150)
[junit] at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:66)
[junit] at org.apache.openejb.OpenEJB.init(OpenEJB.java:307)
[junit] at org.apache.openejb.OpenEJB.init(OpenEJB.java:278)
[junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[junit] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[junit] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[junit] at java.lang.reflect.Method.invoke(Method.java:498)
[junit] at
org.apache.openejb.loader.OpenEJBInstance.init(OpenEJBInstance.java:36)
[junit] at
org.apache.openejb.core.LocalInitialContextFactory.init(LocalInitialContextFactory.java:99)
[junit] at
org.apache.openejb.core.LocalInitialContextFactory.init(LocalInitialContextFactory.java:63)
[junit] at
org.apache.openejb.core.LocalInitialContextFactory.getInitialContext(LocalInitialContextFactory.java:47)
[junit] at
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:684)
[junit] at
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:313)
[junit] at javax.naming.InitialContext.init(InitialContext.java:244)
[junit] at javax.naming.InitialContext.<init>(InitialContext.java:192)
[junit] <<< Method called from long-running thread, failing on:
final InitialContext ctx = new InitialContext(); >>>>>
[junit] <<< Long-running thread >>>
[junit] at java.lang.Thread.run(Thread.java:748)
[junit] Caused by: org.apache.xbean.recipe.ConstructionException: Error
invoking factory method: public static
org.apache.geronimo.transaction.manager.GeronimoTransactionManager
org.apache.openejb.resource.GeronimoTransactionManagerFactory.create(java.lang.Integer,org.apache.openejb.util.Duration,boolean,byte[],java.lang.String,int,boolean,boolean,java.lang.Integer,org.apache.openejb.util.Duration,java.lang.String,java.lang.String,java.lang.String,int,int,int,int,int)
throws java.lang.Exception
[junit] at
org.apache.xbean.recipe.ReflectionUtil$StaticFactory.create(ReflectionUtil.java:1007)
[junit] at
org.apache.xbean.recipe.ObjectRecipe.internalCreate(ObjectRecipe.java:276)
[junit] at
org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:96)
[junit] at
org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:61)
[junit] at
org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:49)
[junit] at
org.apache.openejb.assembler.classic.Assembler.createTransactionManager(Assembler.java:3435)
[junit] at
org.apache.openejb.assembler.classic.Assembler.buildContainerSystem(Assembler.java:567)
[junit] at
org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:487)
[junit] ... 20 more
[junit] Caused by: java.lang.LinkageError: loader constraint violation:
when resolving method
"java.lang.management.ManagementFactory.getPlatformMBeanServer()Ljavax/management/MBeanServer;"
the class loader (instance of org/powermock/core/classloader/MockClassLoader)
of the current class, org/apache/openejb/monitoring/LocalMBeanServer, and the
class loader (instance of <bootloader>) for the method's defining class,
java/lang/management/ManagementFactory, have different Class objects for the
type javax/management/MBeanServer used in the signature
[junit] at
org.apache.openejb.monitoring.LocalMBeanServer.s(LocalMBeanServer.java:145)
[junit] at
org.apache.openejb.monitoring.LocalMBeanServer.isRegistered(LocalMBeanServer.java:197)
[junit] at
org.apache.openejb.monitoring.LocalMBeanServer.registerSilently(LocalMBeanServer.java:85)
[junit] at
org.apache.openejb.monitoring.LocalMBeanServer.registerDynamicWrapperSilently(LocalMBeanServer.java:98)
[junit] at
org.apache.openejb.resource.GeronimoTransactionManagerFactory.create(GeronimoTransactionManagerFactory.java:119)
[junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[junit] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[junit] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[junit] at java.lang.reflect.Method.invoke(Method.java:498)
[junit] at
org.apache.xbean.recipe.ReflectionUtil$StaticFactory.create(ReflectionUtil.java:997)
[junit] ... 27 more
[junit]
[junit] Exception in thread "Thread-118"
java.lang.ExceptionInInitializerError
[junit] <<< Long-running thread >>>
[junit] at java.lang.Thread.run(Thread.java:748)
[junit] Caused by: java.lang.IllegalStateException:
javax.naming.NamingException: Attempted to load OpenEJB.
org.apache.xbean.recipe.ConstructionException: Error invoking factory method:
public static
org.apache.geronimo.transaction.manager.GeronimoTransactionManager
org.apache.openejb.resource.GeronimoTransactionManagerFactory.create(java.lang.Integer,org.apache.openejb.util.Duration,boolean,byte[],java.lang.String,int,boolean,boolean,java.lang.Integer,org.apache.openejb.util.Duration,java.lang.String,java.lang.String,java.lang.String,int,int,int,int,int)
throws java.lang.Exception: Error invoking factory method: public static
org.apache.geronimo.transaction.manager.GeronimoTransactionManager
org.apache.openejb.resource.GeronimoTransactionManagerFactory.create(java.lang.Integer,org.apache.openejb.util.Duration,boolean,byte[],java.lang.String,int,boolean,boolean,java.lang.Integer,org.apache.openejb.util.Duration,java.lang.String,java.lang.String,java.lang.String,int,int,int,int,int)
throws java.lang.Exception [Root exception is
org.apache.openejb.OpenEJBException:
org.apache.xbean.recipe.ConstructionException: Error invoking factory method:
public static
org.apache.geronimo.transaction.manager.GeronimoTransactionManager
org.apache.openejb.resource.GeronimoTransactionManagerFactory.create(java.lang.Integer,org.apache.openejb.util.Duration,boolean,byte[],java.lang.String,int,boolean,boolean,java.lang.Integer,org.apache.openejb.util.Duration,java.lang.String,java.lang.String,java.lang.String,int,int,int,int,int)
throws java.lang.Exception: Error invoking factory method: public static
org.apache.geronimo.transaction.manager.GeronimoTransactionManager
org.apache.openejb.resource.GeronimoTransactionManagerFactory.create(java.lang.Integer,org.apache.openejb.util.Duration,boolean,byte[],java.lang.String,int,boolean,boolean,java.lang.Integer,org.apache.openejb.util.Duration,java.lang.String,java.lang.String,java.lang.String,int,int,int,int,int)
throws java.lang.Exception]
[junit] <<< Method called from long-running thread, failing on:
final InitialContext ctx = new InitialContext(); >>>>>
[junit] <<< Long-running thread >>>
[junit] ... 3 more
[junit] Caused by: javax.naming.NamingException: Attempted to load OpenEJB.
org.apache.xbean.recipe.ConstructionException: Error invoking factory method:
public static
org.apache.geronimo.transaction.manager.GeronimoTransactionManager
org.apache.openejb.resource.GeronimoTransactionManagerFactory.create(java.lang.Integer,org.apache.openejb.util.Duration,boolean,byte[],java.lang.String,int,boolean,boolean,java.lang.Integer,org.apache.openejb.util.Duration,java.lang.String,java.lang.String,java.lang.String,int,int,int,int,int)
throws java.lang.Exception: Error invoking factory method: public static
org.apache.geronimo.transaction.manager.GeronimoTransactionManager
org.apache.openejb.resource.GeronimoTransactionManagerFactory.create(java.lang.Integer,org.apache.openejb.util.Duration,boolean,byte[],java.lang.String,int,boolean,boolean,java.lang.Integer,org.apache.openejb.util.Duration,java.lang.String,java.lang.String,java.lang.String,int,int,int,int,int)
throws java.lang.Exception [Root exception is
org.apache.openejb.OpenEJBException:
org.apache.xbean.recipe.ConstructionException: Error invoking factory method:
public static
org.apache.geronimo.transaction.manager.GeronimoTransactionManager
org.apache.openejb.resource.GeronimoTransactionManagerFactory.create(java.lang.Integer,org.apache.openejb.util.Duration,boolean,byte[],java.lang.String,int,boolean,boolean,java.lang.Integer,org.apache.openejb.util.Duration,java.lang.String,java.lang.String,java.lang.String,int,int,int,int,int)
throws java.lang.Exception: Error invoking factory method: public static
org.apache.geronimo.transaction.manager.GeronimoTransactionManager
org.apache.openejb.resource.GeronimoTransactionManagerFactory.create(java.lang.Integer,org.apache.openejb.util.Duration,boolean,byte[],java.lang.String,int,boolean,boolean,java.lang.Integer,org.apache.openejb.util.Duration,java.lang.String,java.lang.String,java.lang.String,int,int,int,int,int)
throws java.lang.Exception]
[junit] at
org.apache.openejb.core.LocalInitialContextFactory.init(LocalInitialContextFactory.java:65)
[junit] at
org.apache.openejb.core.LocalInitialContextFactory.getInitialContext(LocalInitialContextFactory.java:47)
[junit] at
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:684)
[junit] at
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:313)
[junit] at javax.naming.InitialContext.init(InitialContext.java:244)
[junit] at javax.naming.InitialContext.<init>(InitialContext.java:192)
[junit] <<< Method called from long-running thread, failing on:
final InitialContext ctx = new InitialContext(); >>>>>
[junit] <<< Long-running thread >>>
[junit] ... 3 more
[junit] Caused by: org.apache.openejb.OpenEJBException:
org.apache.xbean.recipe.ConstructionException: Error invoking factory method:
public static
org.apache.geronimo.transaction.manager.GeronimoTransactionManager
org.apache.openejb.resource.GeronimoTransactionManagerFactory.create(java.lang.Integer,org.apache.openejb.util.Duration,boolean,byte[],java.lang.String,int,boolean,boolean,java.lang.Integer,org.apache.openejb.util.Duration,java.lang.String,java.lang.String,java.lang.String,int,int,int,int,int)
throws java.lang.Exception: Error invoking factory method: public static
org.apache.geronimo.transaction.manager.GeronimoTransactionManager
org.apache.openejb.resource.GeronimoTransactionManagerFactory.create(java.lang.Integer,org.apache.openejb.util.Duration,boolean,byte[],java.lang.String,int,boolean,boolean,java.lang.Integer,org.apache.openejb.util.Duration,java.lang.String,java.lang.String,java.lang.String,int,int,int,int,int)
throws java.lang.Exception
[junit] at
org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:500)
[junit] at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:150)
[junit] at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:66)
[junit] at org.apache.openejb.OpenEJB.init(OpenEJB.java:307)
[junit] at org.apache.openejb.OpenEJB.init(OpenEJB.java:278)
[junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[junit] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[junit] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[junit] at java.lang.reflect.Method.invoke(Method.java:498)
[junit] at
org.apache.openejb.loader.OpenEJBInstance.init(OpenEJBInstance.java:36)
[junit] at
org.apache.openejb.core.LocalInitialContextFactory.init(LocalInitialContextFactory.java:99)
[junit] at
org.apache.openejb.core.LocalInitialContextFactory.init(LocalInitialContextFactory.java:63)
[junit] ... 9 more
[junit] Caused by: org.apache.xbean.recipe.ConstructionException: Error
invoking factory method: public static
org.apache.geronimo.transaction.manager.GeronimoTransactionManager
org.apache.openejb.resource.GeronimoTransactionManagerFactory.create(java.lang.Integer,org.apache.openejb.util.Duration,boolean,byte[],java.lang.String,int,boolean,boolean,java.lang.Integer,org.apache.openejb.util.Duration,java.lang.String,java.lang.String,java.lang.String,int,int,int,int,int)
throws java.lang.Exception
[junit] at
org.apache.xbean.recipe.ReflectionUtil$StaticFactory.create(ReflectionUtil.java:1007)
[junit] at
org.apache.xbean.recipe.ObjectRecipe.internalCreate(ObjectRecipe.java:276)
[junit] at
org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:96)
[junit] at
org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:61)
[junit] at
org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:49)
[junit] at
org.apache.openejb.assembler.classic.Assembler.createTransactionManager(Assembler.java:3435)
[junit] at
org.apache.openejb.assembler.classic.Assembler.buildContainerSystem(Assembler.java:567)
[junit] at
org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:487)
[junit] ... 20 more
[junit] Caused by: java.lang.LinkageError: loader constraint violation:
when resolving method
"java.lang.management.ManagementFactory.getPlatformMBeanServer()Ljavax/management/MBeanServer;"
the class loader (instance of org/powermock/core/classloader/MockClassLoader)
of the current class, org/apache/openejb/monitoring/LocalMBeanServer, and the
class loader (instance of <bootloader>) for the method's defining class,
java/lang/management/ManagementFactory, have different Class objects for the
type javax/management/MBeanServer used in the signature
[junit] at
org.apache.openejb.monitoring.LocalMBeanServer.s(LocalMBeanServer.java:145)
[junit] at
org.apache.openejb.monitoring.LocalMBeanServer.isRegistered(LocalMBeanServer.java:197)
[junit] at
org.apache.openejb.monitoring.LocalMBeanServer.registerSilently(LocalMBeanServer.java:85)
[junit] at
org.apache.openejb.monitoring.LocalMBeanServer.registerDynamicWrapperSilently(LocalMBeanServer.java:98)
[junit] at
org.apache.openejb.resource.GeronimoTransactionManagerFactory.create(GeronimoTransactionManagerFactory.java:119)
[junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[junit] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[junit] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[junit] at java.lang.reflect.Method.invoke(Method.java:498)
[junit] at
org.apache.xbean.recipe.ReflectionUtil$StaticFactory.create(ReflectionUtil.java:997)
[junit] ... 27 more