javax.ejb.EJBException

org.glassfish.embeddable.GlassFishException: org.jvnet.hk2.component.ComponentException: Failed to create a habitat

Samebug tips0

We couldn't find tips for this exception.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web115

  • via Unknown by Romain Grécourt,
  • via Unknown by philippe.bastiani,
  • Stack trace

    • javax.ejb.EJBException: org.glassfish.embeddable.GlassFishException: org.jvnet.hk2.component.ComponentException: Failed to create a habitat at org.glassfish.ejb.embedded.EJBContainerProviderImpl.createContainer(EJBContainerProviderImpl.java:233) at org.glassfish.ejb.embedded.EJBContainerProviderImpl.createEJBContainer(EJBContainerProviderImpl.java:128) at javax.ejb.embeddable.EJBContainer.createEJBContainer(EJBContainer.java:127) at org.glassfish.distributions.test.UnitTest.test(UnitTest.java:67) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99) at org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81) at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34) at org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75) at org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45) at org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:66) at org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35) at org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42) at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34) at org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52) at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:165) at org.apache.maven.surefire.Surefire.run(Surefire.java:107) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:289) at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:993) Caused by: org.glassfish.embeddable.GlassFishException: org.jvnet.hk2.component.ComponentException: Failed to create a habitat at com.sun.enterprise.glassfish.bootstrap.StaticGlassFishRuntime.newGlassFish(StaticGlassFishRuntime.java:130) at org.glassfish.ejb.embedded.EJBContainerProviderImpl.createContainer(EJBContainerProviderImpl.java:200) ... 27 more Caused by: org.jvnet.hk2.component.ComponentException: Failed to create a habitat at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.createHabitat(AbstractModulesRegistryImpl.java:180) at com.sun.enterprise.module.bootstrap.Main.createHabitat(Main.java:459) at com.sun.enterprise.glassfish.bootstrap.StaticGlassFishRuntime.newGlassFish(StaticGlassFishRuntime.java:104) ... 28 more Caused by: java.lang.RuntimeException: java.io.IOException: invalid header field at com.sun.enterprise.module.single.ProxyModuleDefinition.generate(ProxyModuleDefinition.java:219) at com.sun.enterprise.module.single.ProxyModuleDefinition.getMetadata(ProxyModuleDefinition.java:181) at com.sun.enterprise.module.single.ProxyModule.getMetadata(ProxyModule.java:100) at com.sun.enterprise.module.single.SingleModulesRegistry.parseInhabitants(SingleModulesRegistry.java:124) at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.createHabitat(AbstractModulesRegistryImpl.java:167) ... 30 more Caused by: java.io.IOException: invalid header field at java.util.jar.Attributes.read(Attributes.java:389) at java.util.jar.Manifest.read(Manifest.java:182) at java.util.jar.Manifest.<init>(Manifest.java:52) at com.sun.enterprise.module.single.ManifestProxy.<init>(ManifestProxy.java:107) at com.sun.enterprise.module.single.ProxyModuleDefinition.generate(ProxyModuleDefinition.java:188) ... 34 more

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown visitor
    Unknown visitorOnce,