-
Bug
-
Resolution: Done
-
Major
-
EAP_EWP 5.3.0.ER1
-
None
-
Not Required
-
NEW
The org.jboss.test.naming.test.SimpleUnitTestCase intermittently fails on a testLookup method with the following exception:
javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:307) at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:344) at javax.naming.InitialContext.lookup(InitialContext.java:411) at org.jboss.test.naming.test.SimpleUnitTestCase.testLookup(SimpleUnitTestCase.java:96) at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24) at junit.extensions.TestSetup$1.protect(TestSetup.java:21) at junit.extensions.TestSetup.run(TestSetup.java:25)
It seems it can fail when its test methods run in a certain order. Perhaps something closes a delegate.initialContext and then tries to re-use it again. Note that the delegate.initialContext is cached and cannot cope with it.