glassfish
  1. glassfish
  2. GLASSFISH-21063

Getting Exception during Junit testing of Ejb

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 3.1.2_b02
    • Fix Version/s: None
    • Component/s: ejb_container
    • Labels:
      None
    • Environment:

      Windows 7 64 bit, eclipse 3.2, Junit 4, glassfish3.1.2

    • Status Whiteboard:
      Hide

      org.jvnet.hk2.component.ComponentException: injection failed on com.sun.enterprise.v3.server.ServerContextImpl.env with class caused by NullpointerException

      Show
      org.jvnet.hk2.component.ComponentException: injection failed on com.sun.enterprise.v3.server.ServerContextImpl.env with class caused by NullpointerException

      Description

      org.jvnet.hk2.component.ComponentException: injection failed on com.sun.enterprise.v3.server.ServerContextImpl.env with class org.glassfish.server.ServerEnvironmentImpl
      at org.jvnet.hk2.component.InjectionManager.error_injectionException(InjectionManager.java:284)
      at org.jvnet.hk2.component.InjectionManager.inject(InjectionManager.java:165)
      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$1.run(ConstructorCreator.java:86)
      at java.security.AccessController.doPrivileged(Native Method)
      at com.sun.hk2.component.ConstructorCreator.initialize(ConstructorCreator.java:83)
      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 com.sun.enterprise.naming.impl.SerialContext.<init>(SerialContext.java:322)
      at com.sun.enterprise.naming.impl.SerialContext.<init>(SerialContext.java:334)
      at com.sun.enterprise.naming.impl.SerialInitContextFactory.createInitialContext(SerialInitContextFactory.java:358)
      at com.sun.enterprise.naming.impl.SerialInitContextFactory.getInitialContext(SerialInitContextFactory.java:353)
      at com.sun.enterprise.naming.SerialInitContextFactory.getInitialContext(SerialInitContextFactory.java:69)
      at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:684)
      at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:307)
      at javax.naming.InitialContext.init(InitialContext.java:242)
      at javax.naming.InitialContext.<init>(InitialContext.java:216)
      at com.test.pluginlib.test.UserManagerTest.setUp(UserManagerTest.java:58)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
      at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
      at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
      at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
      at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
      at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
      at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
      at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
      at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
      at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
      at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
      at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
      at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
      Caused by: java.lang.NullPointerException
      at org.glassfish.server.ServerEnvironmentImpl.postConstruct(ServerEnvironmentImpl.java:155)
      at com.sun.hk2.component.AbstractCreatorImpl.inject(AbstractCreatorImpl.java:131)
      at com.sun.hk2.component.ConstructorCreator$1.run(ConstructorCreator.java:86)
      at java.security.AccessController.doPrivileged(Native Method)
      at com.sun.hk2.component.ConstructorCreator.initialize(ConstructorCreator.java:83)
      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)
      ... 44 more

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Srini
            Reporter:
            brainwash10
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: