1 Reply Latest reply on Jul 15, 2007 5:37 PM by jaikiran pai

    Could not bind factory to JNDI

    rrrrtrytrytr ytrytrytr Newbie

      Very Urgent........

      i use Jboss application server, i want to use hibernate of one class
      when i do so, there are exception occurs

      WARNING: Could not bind factory to 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(Unknown Source)
      at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
      at javax.naming.InitialContext.getURLOrDefaultInitCtx(Unknown Source)
      at javax.naming.InitialContext.getNameParser(Unknown Source)
      at org.hibernate.util.NamingHelper.bind(NamingHelper.java:52)
      at org.hibernate.impl.SessionFactoryObjectFactory.addInstance(SessionFactoryObjectFactory.java:90)
      at org.hibernate.impl.SessionFactoryImpl.(SessionFactoryImpl.java:306)
      at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294)
      at com.asal.Util.HibernateUtil.(HibernateUtil.java:20)
      at com.asal.person.PersonHome.getSessionFactory(PersonHome.java:42)
      at com.asal.person.PersonHome.(PersonHome.java:20)
      at com.myapp.runit.main(runit.java:15)
      1...3......................5
      1
      Exception in thread "main" org.hibernate.HibernateException: saveOrUpdate is not valid without active transaction
      at org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:297)
      at $Proxy0.saveOrUpdate(Unknown Source)
      at com.asal.person.PersonHome.savePerson(PersonHome.java:51)
      at com.myapp.runit.main(runit.java:17)

      i need detialed information about how can i bind it with JNDI...
      can any one Help? please reply me on rshakhsheer@asaltech.com