2 Replies Latest reply on Aug 17, 2016 10:37 AM by Bruce Springfield

    WELD-ENV-002000: Weld SE container STATIC_INSTANCE is already running!

    Bruce Springfield Apprentice

      Trying to start Weld Container in a JUnit test and get the following message:

       

      WELD-ENV-002000: Weld SE container STATIC_INSTANCE is already running!

       

      What does this mean? And how can I fix it?

       

      Full Error message:

       

      java.lang.IllegalStateException: WELD-ENV-002000: Weld SE container STATIC_INSTANCE is already running!

        at org.jboss.weld.environment.se.WeldContainer.initialize(WeldContainer.java:136)

        at org.jboss.weld.environment.se.Weld.initialize(Weld.java:544)

        at com.mydomain.CdiContainer.initializeCdiContainer(CdiContainer.java:59)

        at com.mydomain.bc.acontact.test.AContactServiceExampleBCT.initializeCdiDependencies(AContactServiceExampleBCT.java:82)

        at com.mydomain.bc.acontact.test.AContactServiceExampleBCT.setUpClass(AContactServiceExampleBCT.java:75)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

        at java.lang.reflect.Method.invoke(Method.java:497)

        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.run(ParentRunner.java:309)

        at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)

        at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)

        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)

        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)

        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)

        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)