I succesfully built and deployed SignServer 3.5.1 to GlassFish 3.1.2.2 + Windows Server 2012. However, I cannot set properties or get status, because "bin\signserver" always fails with this exception:
Exception in thread "main" java.lang.LinkageError: injection failed on class com.sun.enterprise.iiop.security.SecurityContextUtil from sun.misc.Launcher$AppClassLoader@8ed465
at org.jvnet.hk2.component.InjectionManager$1.run(InjectionManager.java:259)
at java.security.AccessController.doPrivileged(Native Method)
at org.jvnet.hk2.component.InjectionManager.inject(InjectionManager.java:256)
at org.jvnet.hk2.component.InjectionManager.inject(InjectionManager.java:93)
at com.sun.hk2.component.AbstractCreatorImpl.inject(AbstractCreatorImpl.java:126)
at com.sun.hk2.component.ConstructorCreator.initialize(ConstructorCreator.java:91)
at com.sun.hk2.component.AbstractCreatorImpl.get(AbstractCreatorImpl.java:82)
at com.sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:67)
at com.sun.hk2.component.EventPublishingInhabitant.get(EventPublishingInhabitant.java:139)
at com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:78)
at org.jvnet.hk2.component.Habitat.getBy(Habitat.java:1056)
at org.jvnet.hk2.component.Habitat.getByType(Habitat.java:1037)
at org.jvnet.hk2.component.Habitat.getComponent(Habitat.java:781)
at com.sun.enterprise.iiop.security.Lookups._getSecurityContextUtil(Lookups.java:97)
at com.sun.enterprise.iiop.security.Lookups.getSecurityContextUtil(Lookups.java:92)
at com.sun.enterprise.iiop.security.SecClientRequestInterceptor.<init>(SecClientRequestInterceptor.java:119)
at com.sun.enterprise.security.appclient.AppclientIIOPInterceptorFactory.getClientInterceptorInstance(AppclientIIOPInterceptorFactory.java:127)
at com.sun.enterprise.security.appclient.AppclientIIOPInterceptorFactory.createClientRequestInterceptor(AppclientIIOPInterceptorFactory.java:96)
at org.glassfish.enterprise.iiop.impl.GlassFishORBInitializer.post_init(GlassFishORBInitializer.java:132)
at com.sun.corba.ee.impl.interceptors.PIHandlerImpl.postInitORBInitializers(PIHandlerImpl.java:915)
at com.sun.corba.ee.impl.interceptors.PIHandlerImpl.initialize(PIHandlerImpl.java:265)
at com.sun.corba.ee.impl.orb.ORBImpl.postInit(ORBImpl.java:643)
at com.sun.corba.ee.impl.orb.ORBImpl.set_parameters(ORBImpl.java:704)
at com.sun.corba.ee.impl.orb.ORBImpl.setParameters(ORBImpl.java:691)
at com.sun.corba.ee.spi.osgi.ORBFactory.initialize(ORBFactory.java:107)
at org.glassfish.enterprise.iiop.impl.GlassFishORBManager.initORB(GlassFishORBManager.java:581)
at org.glassfish.enterprise.iiop.impl.GlassFishORBManager.getORB(GlassFishORBManager.java:263)
at org.glassfish.enterprise.iiop.impl.GlassFishORBFactoryImpl.createORB(GlassFishORBFactoryImpl.java:93)
at org.glassfish.enterprise.iiop.api.GlassFishORBHelper.getORB(GlassFishORBHelper.java:152)
at com.sun.enterprise.naming.impl.SerialContext.getORB(SerialContext.java:364)
at com.sun.enterprise.naming.impl.SerialContext.getProviderCacheKey(SerialContext.java:371)
at com.sun.enterprise.naming.impl.SerialContext.getRemoteProvider(SerialContext.java:401)
at com.sun.enterprise.naming.impl.SerialContext.getProvider(SerialContext.java:346)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:504)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:455)
at javax.naming.InitialContext.lookup(InitialContext.java:411)
at org.signserver.common.ServiceLocator.lookup(ServiceLocator.java:117)
at org.signserver.common.ServiceLocator.lookupRemote(ServiceLocator.java:106)
at org.signserver.common.ServiceLocator.lookupRemote(ServiceLocator.java:94)
at org.signserver.admin.cli.defaultimpl.AdminCommandHelper.getGlobalConfigurationSession(AdminCommandHelper.java:59)
at org.signserver.admin.cli.defaultimpl.GetStatusCommand.execute(GetStatusCommand.java:72)
at org.signserver.cli.CommandLineInterface.execute(CommandLineInterface.java:97)
at org.signserver.admin.cli.AdminCLI.main(AdminCLI.java:51)
Caused by: java.lang.LinkageError: injection failed on class org.glassfish.api.invocation.InvocationManagerImpl from sun.misc.Launcher$AppClassLoader@8ed465
at org.jvnet.hk2.component.InjectionManager$1.run(InjectionManager.java:259)
at java.security.AccessController.doPrivileged(Native Method)
at org.jvnet.hk2.component.InjectionManager.inject(InjectionManager.java:256)
at org.jvnet.hk2.component.InjectionManager.inject(InjectionManager.java:93)
at com.sun.hk2.component.AbstractCreatorImpl.inject(AbstractCreatorImpl.java:126)
at com.sun.hk2.component.ConstructorCreator.initialize(ConstructorCreator.java:91)
at com.sun.hk2.component.AbstractCreatorImpl.get(AbstractCreatorImpl.java:82)
at com.sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:67)
at com.sun.hk2.component.EventPublishingInhabitant.get(EventPublishingInhabitant.java:139)
at com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:78)
at org.jvnet.hk2.component.Habitat.getByContract(Habitat.java:1050)
at org.jvnet.hk2.component.Habitat.getComponent(Habitat.java:779)
at com.sun.enterprise.iiop.security.SecurityMechanismSelector.postConstruct(SecurityMechanismSelector.java:166)
at com.sun.hk2.component.AbstractCreatorImpl.inject(AbstractCreatorImpl.java:131)
at com.sun.hk2.component.ConstructorCreator.initialize(ConstructorCreator.java:91)
at com.sun.hk2.component.AbstractCreatorImpl.get(AbstractCreatorImpl.java:82)
at com.sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:67)
at com.sun.hk2.component.EventPublishingInhabitant.get(EventPublishingInhabitant.java:139)
at com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:78)
at org.jvnet.hk2.component.Habitat.getBy(Habitat.java:1056)
at org.jvnet.hk2.component.Habitat.getByType(Habitat.java:1037)
at com.sun.hk2.component.InjectInjectionResolver.getComponentInjectValue(InjectInjectionResolver.java:159)
at com.sun.hk2.component.InjectInjectionResolver.getValue(InjectInjectionResolver.java:90)
at org.jvnet.hk2.component.InjectionManager.inject(InjectionManager.java:143)
... 40 more
Caused by: java.lang.LinkageError: injection failed on class com.sun.enterprise.resource.pool.PoolManagerImpl from sun.misc.Launcher$AppClassLoader@8ed465
at org.jvnet.hk2.component.InjectionManager$1.run(InjectionManager.java:259)
at java.security.AccessController.doPrivileged(Native Method)
at org.jvnet.hk2.component.InjectionManager.inject(InjectionManager.java:256)
at org.jvnet.hk2.component.InjectionManager.inject(InjectionManager.java:93)
at com.sun.hk2.component.AbstractCreatorImpl.inject(AbstractCreatorImpl.java:126)
at com.sun.hk2.component.ConstructorCreator.initialize(ConstructorCreator.java:91)
at com.sun.hk2.component.AbstractCreatorImpl.get(AbstractCreatorImpl.java:82)
at com.sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:67)
at com.sun.hk2.component.EventPublishingInhabitant.get(EventPublishingInhabitant.java:139)
at com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:78)
at org.jvnet.hk2.component.Habitat$5.get(Habitat.java:703)
at java.util.AbstractList$Itr.next(AbstractList.java:358)
at java.util.AbstractCollection.toArray(AbstractCollection.java:188)
at com.sun.hk2.component.InjectInjectionResolver.getArrayInjectValue(InjectInjectionResolver.java:113)
at com.sun.hk2.component.InjectInjectionResolver.getValue(InjectInjectionResolver.java:81)
at org.jvnet.hk2.component.InjectionManager.inject(InjectionManager.java:143)
... 61 more
Caused by: java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file javax/resource/spi/RetryableUnavailableException
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2451)
at java.lang.Class.getDeclaredMethods(Class.java:1810)
at org.jvnet.hk2.component.InjectionManager.inject(InjectionManager.java:170)
... 74 more
Do you have any idea what is wrong? Thanks.
Last edit: Juraj 2014-06-03
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The "ClassFormatError: Absent Code" when you try to run the Admin CLI would indicate a class path problem.
Probably one of the API JARs (which does not have an implementation - "absent code") is before a path to the JARs from the application server.
Make sure your APPSRV_HOME points correctly to the application server.
This could be a Windows- specific (probably file path) issue as we currently don't perform testing with GlassFish on the Windows platform. You could uncomment (remove "rem") from the "rem echo %CLASSPATH%" in bin/signserver.cmd to see the class path used and then check that the JARs are accessible.
Cheers,
Markus
PrimeKey Solutions
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I succesfully built and deployed SignServer 3.5.1 to GlassFish 3.1.2.2 + Windows Server 2012. However, I cannot set properties or get status, because "bin\signserver" always fails with this exception:
Exception in thread "main" java.lang.LinkageError: injection failed on class com.sun.enterprise.iiop.security.SecurityContextUtil from sun.misc.Launcher$AppClassLoader@8ed465
at org.jvnet.hk2.component.InjectionManager$1.run(InjectionManager.java:259)
at java.security.AccessController.doPrivileged(Native Method)
at org.jvnet.hk2.component.InjectionManager.inject(InjectionManager.java:256)
at org.jvnet.hk2.component.InjectionManager.inject(InjectionManager.java:93)
at com.sun.hk2.component.AbstractCreatorImpl.inject(AbstractCreatorImpl.java:126)
at com.sun.hk2.component.ConstructorCreator.initialize(ConstructorCreator.java:91)
at com.sun.hk2.component.AbstractCreatorImpl.get(AbstractCreatorImpl.java:82)
at com.sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:67)
at com.sun.hk2.component.EventPublishingInhabitant.get(EventPublishingInhabitant.java:139)
at com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:78)
at org.jvnet.hk2.component.Habitat.getBy(Habitat.java:1056)
at org.jvnet.hk2.component.Habitat.getByType(Habitat.java:1037)
at org.jvnet.hk2.component.Habitat.getComponent(Habitat.java:781)
at com.sun.enterprise.iiop.security.Lookups._getSecurityContextUtil(Lookups.java:97)
at com.sun.enterprise.iiop.security.Lookups.getSecurityContextUtil(Lookups.java:92)
at com.sun.enterprise.iiop.security.SecClientRequestInterceptor.<init>(SecClientRequestInterceptor.java:119)
at com.sun.enterprise.security.appclient.AppclientIIOPInterceptorFactory.getClientInterceptorInstance(AppclientIIOPInterceptorFactory.java:127)
at com.sun.enterprise.security.appclient.AppclientIIOPInterceptorFactory.createClientRequestInterceptor(AppclientIIOPInterceptorFactory.java:96)
at org.glassfish.enterprise.iiop.impl.GlassFishORBInitializer.post_init(GlassFishORBInitializer.java:132)
at com.sun.corba.ee.impl.interceptors.PIHandlerImpl.postInitORBInitializers(PIHandlerImpl.java:915)
at com.sun.corba.ee.impl.interceptors.PIHandlerImpl.initialize(PIHandlerImpl.java:265)
at com.sun.corba.ee.impl.orb.ORBImpl.postInit(ORBImpl.java:643)
at com.sun.corba.ee.impl.orb.ORBImpl.set_parameters(ORBImpl.java:704)
at com.sun.corba.ee.impl.orb.ORBImpl.setParameters(ORBImpl.java:691)
at com.sun.corba.ee.spi.osgi.ORBFactory.initialize(ORBFactory.java:107)
at org.glassfish.enterprise.iiop.impl.GlassFishORBManager.initORB(GlassFishORBManager.java:581)
at org.glassfish.enterprise.iiop.impl.GlassFishORBManager.getORB(GlassFishORBManager.java:263)
at org.glassfish.enterprise.iiop.impl.GlassFishORBFactoryImpl.createORB(GlassFishORBFactoryImpl.java:93)
at org.glassfish.enterprise.iiop.api.GlassFishORBHelper.getORB(GlassFishORBHelper.java:152)
at com.sun.enterprise.naming.impl.SerialContext.getORB(SerialContext.java:364)
at com.sun.enterprise.naming.impl.SerialContext.getProviderCacheKey(SerialContext.java:371)
at com.sun.enterprise.naming.impl.SerialContext.getRemoteProvider(SerialContext.java:401)
at com.sun.enterprise.naming.impl.SerialContext.getProvider(SerialContext.java:346)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:504)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:455)
at javax.naming.InitialContext.lookup(InitialContext.java:411)
at org.signserver.common.ServiceLocator.lookup(ServiceLocator.java:117)
at org.signserver.common.ServiceLocator.lookupRemote(ServiceLocator.java:106)
at org.signserver.common.ServiceLocator.lookupRemote(ServiceLocator.java:94)
at org.signserver.admin.cli.defaultimpl.AdminCommandHelper.getGlobalConfigurationSession(AdminCommandHelper.java:59)
at org.signserver.admin.cli.defaultimpl.GetStatusCommand.execute(GetStatusCommand.java:72)
at org.signserver.cli.CommandLineInterface.execute(CommandLineInterface.java:97)
at org.signserver.admin.cli.AdminCLI.main(AdminCLI.java:51)
Caused by: java.lang.LinkageError: injection failed on class org.glassfish.api.invocation.InvocationManagerImpl from sun.misc.Launcher$AppClassLoader@8ed465
at org.jvnet.hk2.component.InjectionManager$1.run(InjectionManager.java:259)
at java.security.AccessController.doPrivileged(Native Method)
at org.jvnet.hk2.component.InjectionManager.inject(InjectionManager.java:256)
at org.jvnet.hk2.component.InjectionManager.inject(InjectionManager.java:93)
at com.sun.hk2.component.AbstractCreatorImpl.inject(AbstractCreatorImpl.java:126)
at com.sun.hk2.component.ConstructorCreator.initialize(ConstructorCreator.java:91)
at com.sun.hk2.component.AbstractCreatorImpl.get(AbstractCreatorImpl.java:82)
at com.sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:67)
at com.sun.hk2.component.EventPublishingInhabitant.get(EventPublishingInhabitant.java:139)
at com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:78)
at org.jvnet.hk2.component.Habitat.getByContract(Habitat.java:1050)
at org.jvnet.hk2.component.Habitat.getComponent(Habitat.java:779)
at com.sun.enterprise.iiop.security.SecurityMechanismSelector.postConstruct(SecurityMechanismSelector.java:166)
at com.sun.hk2.component.AbstractCreatorImpl.inject(AbstractCreatorImpl.java:131)
at com.sun.hk2.component.ConstructorCreator.initialize(ConstructorCreator.java:91)
at com.sun.hk2.component.AbstractCreatorImpl.get(AbstractCreatorImpl.java:82)
at com.sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:67)
at com.sun.hk2.component.EventPublishingInhabitant.get(EventPublishingInhabitant.java:139)
at com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:78)
at org.jvnet.hk2.component.Habitat.getBy(Habitat.java:1056)
at org.jvnet.hk2.component.Habitat.getByType(Habitat.java:1037)
at com.sun.hk2.component.InjectInjectionResolver.getComponentInjectValue(InjectInjectionResolver.java:159)
at com.sun.hk2.component.InjectInjectionResolver.getValue(InjectInjectionResolver.java:90)
at org.jvnet.hk2.component.InjectionManager.inject(InjectionManager.java:143)
... 40 more
Caused by: java.lang.LinkageError: injection failed on class com.sun.enterprise.resource.pool.PoolManagerImpl from sun.misc.Launcher$AppClassLoader@8ed465
at org.jvnet.hk2.component.InjectionManager$1.run(InjectionManager.java:259)
at java.security.AccessController.doPrivileged(Native Method)
at org.jvnet.hk2.component.InjectionManager.inject(InjectionManager.java:256)
at org.jvnet.hk2.component.InjectionManager.inject(InjectionManager.java:93)
at com.sun.hk2.component.AbstractCreatorImpl.inject(AbstractCreatorImpl.java:126)
at com.sun.hk2.component.ConstructorCreator.initialize(ConstructorCreator.java:91)
at com.sun.hk2.component.AbstractCreatorImpl.get(AbstractCreatorImpl.java:82)
at com.sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:67)
at com.sun.hk2.component.EventPublishingInhabitant.get(EventPublishingInhabitant.java:139)
at com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:78)
at org.jvnet.hk2.component.Habitat$5.get(Habitat.java:703)
at java.util.AbstractList$Itr.next(AbstractList.java:358)
at java.util.AbstractCollection.toArray(AbstractCollection.java:188)
at com.sun.hk2.component.InjectInjectionResolver.getArrayInjectValue(InjectInjectionResolver.java:113)
at com.sun.hk2.component.InjectInjectionResolver.getValue(InjectInjectionResolver.java:81)
at org.jvnet.hk2.component.InjectionManager.inject(InjectionManager.java:143)
... 61 more
Caused by: java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file javax/resource/spi/RetryableUnavailableException
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2451)
at java.lang.Class.getDeclaredMethods(Class.java:1810)
at org.jvnet.hk2.component.InjectionManager.inject(InjectionManager.java:170)
... 74 more
Do you have any idea what is wrong? Thanks.
Last edit: Juraj 2014-06-03
Hi Juraj,
The "ClassFormatError: Absent Code" when you try to run the Admin CLI would indicate a class path problem.
Probably one of the API JARs (which does not have an implementation - "absent code") is before a path to the JARs from the application server.
Make sure your APPSRV_HOME points correctly to the application server.
This could be a Windows- specific (probably file path) issue as we currently don't perform testing with GlassFish on the Windows platform. You could uncomment (remove "rem") from the "rem echo %CLASSPATH%" in bin/signserver.cmd to see the class path used and then check that the JARs are accessible.
Cheers,
Markus
PrimeKey Solutions