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

Google Groups | Hubert Yang | 7 years ago
  1. 0

    Failed to config warp-persist for junit test

    Google Groups | 7 years ago | Hubert Yang
    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
  2. 0

    JBoss Hibernate conflict with SessionFactory and JNDI

    Stack Overflow | 5 years ago | user1171773
    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
  3. 0

    Unconfirmed Errata | O'Reilly Media Harnessing Hibernate

    oreilly.com | 8 months ago
    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
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Hi,All I create inheritance relationship entitys : @Entity(name="piece_achat") @Inheritance(strategy = InheritanceType.SINGLE_TABLE) @DiscriminatorColumn(name="type",discriminatorType = DiscriminatorType.STRING, length = 1) @DiscriminatorValue(value="G") public class PieceAchat extends BaseObject { ........................................ } @Entity @DiscriminatorValue("C") public class BonCommande extends PieceAchat { private static final long serialVersionUID = -4273404022092747726L; public BonCommande() { super(); } } I am getting the following error on running the 'mvn est' command : WARN - SessionFactoryObjectFactory.removeInstance(123) | Could not unbind factory from JNDI 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:645) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288) at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:325) at javax.naming.InitialContext.unbind(InitialContext.java:416) at org.hibernate.impl.SessionFactoryObjectFactory.removeInstance(SessionFactoryObjectFactory.java:116) at org.hibernate.impl.SessionFactoryImpl.close(SessionFactoryImpl.java:806) at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.destroy(AbstractSessionFactoryBean.java:251) at org.springframework.orm.hibernate3.LocalSessionFactoryBean.destroy(LocalSessionFactoryBean.java:865) at org.springframework.beans.factory.support.DisposableBeanAdapter.destroy(DisposableBeanAdapter.java:151) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBean(DefaultSingletonBeanRegistry.java:453) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingleton(DefaultSingletonBeanRegistry.java:431) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons(DefaultSingletonBeanRegistry.java:404) at org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:854) at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:832) at org.springframework.context.support.AbstractApplicationContext$1.run(AbstractApplicationContext.java:765) Any ideas how to fix this?

    AppFuse JIRA | 7 years ago | Hassen BEN SLIMA
    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
  6. 0

    Hi,All I create inheritance relationship entitys : @Entity(name="piece_achat") @Inheritance(strategy = InheritanceType.SINGLE_TABLE) @DiscriminatorColumn(name="type",discriminatorType = DiscriminatorType.STRING, length = 1) @DiscriminatorValue(value="G") public class PieceAchat extends BaseObject { ........................................ } @Entity @DiscriminatorValue("C") public class BonCommande extends PieceAchat { private static final long serialVersionUID = -4273404022092747726L; public BonCommande() { super(); } } I am getting the following error on running the 'mvn est' command : WARN - SessionFactoryObjectFactory.removeInstance(123) | Could not unbind factory from JNDI 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:645) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288) at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:325) at javax.naming.InitialContext.unbind(InitialContext.java:416) at org.hibernate.impl.SessionFactoryObjectFactory.removeInstance(SessionFactoryObjectFactory.java:116) at org.hibernate.impl.SessionFactoryImpl.close(SessionFactoryImpl.java:806) at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.destroy(AbstractSessionFactoryBean.java:251) at org.springframework.orm.hibernate3.LocalSessionFactoryBean.destroy(LocalSessionFactoryBean.java:865) at org.springframework.beans.factory.support.DisposableBeanAdapter.destroy(DisposableBeanAdapter.java:151) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBean(DefaultSingletonBeanRegistry.java:453) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingleton(DefaultSingletonBeanRegistry.java:431) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons(DefaultSingletonBeanRegistry.java:404) at org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:854) at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:832) at org.springframework.context.support.AbstractApplicationContext$1.run(AbstractApplicationContext.java:765) Any ideas how to fix this?

    AppFuse JIRA | 7 years ago | Hassen BEN SLIMA
    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

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. 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()
    2. Java RT
      InitialContext.unbind
      1. javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:645)
      2. javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
      3. javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:284)
      4. javax.naming.InitialContext.unbind(InitialContext.java:375)
      4 frames
    3. Hibernate
      SessionFactoryImpl.close
      1. org.hibernate.impl.SessionFactoryObjectFactory.removeInstance(SessionFactoryObjectFactory.java:139)
      2. org.hibernate.impl.SessionFactoryImpl.close(SessionFactoryImpl.java:894)
      2 frames
    4. com.wideplay.warp
      HibernatePersistenceService.shutdown
      1. com.wideplay.warp.persist.hibernate.HibernatePersistenceService.shutdown(HibernatePersistenceService.java:52)
      1 frame
    5. com.novionic.delphIL
      ILGroupServiceTest.tearDown
      1. com.novionic.delphIL.ext.JUnitWorkManager.endWork(JUnitWorkManager.java:22)
      2. com.novionic.delphIL.service.ILGroupServiceTest.tearDown(ILGroupServiceTest.java:32)
      2 frames
    6. JUnit
      TestSuite.run
      1. junit.framework.TestCase.runBare(TestCase.java:130)
      2. junit.framework.TestResult$1.protect(TestResult.java:106)
      3. junit.framework.TestResult.runProtected(TestResult.java:124)
      4. junit.framework.TestResult.run(TestResult.java:109)
      5. junit.framework.TestCase.run(TestCase.java:118)
      6. junit.framework.TestSuite.runTest(TestSuite.java:208)
      7. junit.framework.TestSuite.run(TestSuite.java:203)
      7 frames
    7. JUnit3 Runner
      RemoteTestRunner.main
      1. org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
      2. org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
      3. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
      4. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
      5. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
      6. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
      6 frames