Announcement Announcement Module
Collapse
No announcement yet.
Cannot activate SimpleNamingContextBuilder: there is already a JNDI provider register Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Cannot activate SimpleNamingContextBuilder: there is already a JNDI provider register

    Getting follwing error when I run junit test case report through ant srcipt:

    PHP Code:
    Cannot activate SimpleNamingContextBuilderthere is already a JNDI provider registeredNote that JNDI is a JVM-wide serviceshared at the JVM system class loader levelwith no reset option. As a consequencea JNDI provider must only be registered once per JVM.

    java.lang.IllegalStateExceptionCannot activate SimpleNamingContextBuilderthere is already a JNDI provider registeredNote that JNDI is a JVM-wide serviceshared at the JVM system class loader levelwith no reset option. As a consequencea JNDI provider must only be registered once per JVM.
    at org.springframework.mock.jndi.SimpleNamingContextBuilder.activate(SimpleNamingContextBuilder.java:135)
    at org.springframework.mock.jndi.SimpleNamingContextBuilder.emptyActivatedContextBuilder(SimpleNamingContextBuilder.java:113)
    at com.bgc.ecm.core.test.ElNinoAbstractTestCase.prepareTestInstance(ElNinoAbstractTestCase.java:216)
    at org.springframework.test.AbstractSingleSpringContextTests.setUp(AbstractSingleSpringContextTests.java:100)
    at org.springframework.test.ConditionalTestCase.runBare(ConditionalTestCase.java:76)
    at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
    at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
    at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137
    PHP Code:
     this.callerContext = (CallerContextgetApplicationContext().getBean("CallerContext");
     
    assertNotNull(this.callerContext);
     
    SimpleNamingContextBuilder builder =    
     
    SimpleNamingContextBuilder.emptyActivatedContextBuilder(); 
    Junit target:

    HTML Code:
    <junit printsummary="on" fork="yes" forkmode="perBatch" haltonfailure="false" failureproperty="junit.failure" showoutput="false">
    	<classpath>
    		<path refid="CLASSPATH_JUNIT"/>			
    	</classpath>
    	<batchtest fork="no"  todir="${TEST_BUILD_DIR}">
    	   <fileset dir="${APP_DIR_CORE}\src\test">
    	      <include name="**/*Test.java" />
    	      <include name="**/Test*.java" />
    	   </fileset>
    	</batchtest>
    </junit>

  • #2
    any suggestions?
    Last edited by kasim; Aug 1st, 2011, 04:28 AM.

    Comment

    Working...
    X