Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6233959
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T10:23:46+00:00 2026-05-24T10:23:46+00:00

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

  • 0

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

Cannot activate SimpleNamingContextBuilder: there is already a JNDI provider registered. Note that JNDI is a JVM-wide service, shared at the JVM system class loader level, with no reset option. As a consequence, a JNDI provider must only be registered once per JVM.

java.lang.IllegalStateException: Cannot activate SimpleNamingContextBuilder: there is already a JNDI provider registered. Note that JNDI is a JVM-wide service, shared at the JVM system class loader level, with no reset option. As a consequence, a 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)

code:

 this.callerContext = (CallerContext) getApplicationContext().getBean("CallerContext");
 assertNotNull(this.callerContext);
 SimpleNamingContextBuilder builder =    
 SimpleNamingContextBuilder.emptyActivatedContextBuilder();

Junit target:

<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>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T10:23:49+00:00Added an answer on May 24, 2026 at 10:23 am

    I had enabled JNDI datasource in Hibernate config file which causes 2 jndi reference and thows JNDI/JVM binding exception.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am getting following error while executing a unti test case(JUNIT).I am using it
I'm getting the following error when trying to run a JSP. I'm using Tomcat
I am getting this following error during run time. ERROR: thread attach failed My
Getting the following error when trying to run SPSS from an external Python IDE.
I am getting following error when I run an exe referencing a particular DLL.
I'm getting the following error when I run a webservice client I've created using:
I am getting the following error: Cannot implicitly convert type IValueProvider to IDictionary When
Someone asked a similar question before , getting the following error when I run
I am getting the following error when I try to run jgr-x64.exe on Windows
When I run my Kynetx app I am getting the following error: Can't use

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.