-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: JndiException: Error parsing JNDI name []
PostPosted: Thu Mar 15, 2012 10:38 am 
Newbie

Joined: Wed Mar 14, 2012 2:26 pm
Posts: 1
Slight intro to problem: Im in an accelerated Java class with 12 other people. This is the first time any of us have used hibernate, connecting Eclipse to MySQL using hibernate 4.0.1.

We are building a "movie library" for our class to learn all the proper syntax and such. We have our program working but it prints a large error in console.

Ive tried to look online for what could be causing this with very minimal results, thanks in advance for any help.

org.hibernate.service.jndi.JndiException: Error parsing JNDI name []
at org.hibernate.service.jndi.internal.JndiServiceImpl.parseName(JndiServiceImpl.java:92)
at org.hibernate.service.jndi.internal.JndiServiceImpl.bind(JndiServiceImpl.java:108)
at org.hibernate.internal.SessionFactoryRegistry.addSessionFactory(SessionFactoryRegistry.java:89)
at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:441)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1737)
at movieDataAccessLayer.BaseDao.getDbSession(BaseDao.java:22)
at movieDataAccessLayer.MovieDao.getMovieDtoList(MovieDao.java:23)
at movieBusinessLogicLayer.TransferMovieList.loadMovies(TransferMovieList.java:64)
at moviePresentationLayer.MovieMenu.movieMenu(MovieMenu.java:23)
at moviePresentationLayer.MovieLibrary.main(MovieLibrary.java:11)
Caused by: 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.getNameParser(InitialContext.java:499)
at org.hibernate.service.jndi.internal.JndiServiceImpl.parseName(JndiServiceImpl.java:86)
... 9 more


Top
 Profile  
 
 Post subject: Re: JndiException: Error parsing JNDI name []
PostPosted: Tue Mar 20, 2012 2:51 am 
Newbie

Joined: Tue Mar 20, 2012 2:48 am
Posts: 1
I also get this error.
if you know solution please write


Top
 Profile  
 
 Post subject: Re: JndiException: Error parsing JNDI name []
PostPosted: Wed Jul 11, 2012 1:10 am 
Newbie

Joined: Wed Jul 11, 2012 12:58 am
Posts: 1
I had the same error, when i was trying to upgrade hibernate 4.1.4, i changed one line in hibernate.cfg.xml:

before (error):
<session-factory name="">

after (fixed):
<session-factory>


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.