-->
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.  [ 4 posts ] 
Author Message
 Post subject: Caused by: org.hibernate.engine.jndi.JndiException:
PostPosted: Tue Oct 03, 2017 12:28 am 
Beginner
Beginner

Joined: Tue Aug 08, 2017 12:14 am
Posts: 44
Hi expert,

For weeks, I have been trying to get the jndi working in tomcat for hibernate to work but without avail.

Here's the error message :

Caused by: org.hibernate.engine.jndi.JndiException: Unable to lookup JNDI name [java:comp/env/jdbc/hi5"/>]
at org.hibernate.engine.jndi.internal.JndiServiceImpl.locate(JndiServiceImpl.java:100)
at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.configure(DatasourceConnectionProviderImpl.java:98)
at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:94)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:242)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:210)
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.buildJdbcConnectionAccess(JdbcEnvironmentInitiator.java:145)
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:66)
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:35)
at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:88)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:259)
... 26 more
Caused by: javax.naming.NameNotFoundException: Name [hi5"/>] is not bound in this Context. Unable to find [hi5"].
at org.apache.naming.NamingContext.lookup(NamingContext.java:818)
at org.apache.naming.NamingContext.lookup(NamingContext.java:152)
at org.apache.naming.NamingContext.lookup(NamingContext.java:829)
at org.apache.naming.NamingContext.lookup(NamingContext.java:152)
at org.apache.naming.NamingContext.lookup(NamingContext.java:829)
at org.apache.naming.NamingContext.lookup(NamingContext.java:152)
at org.apache.naming.NamingContext.lookup(NamingContext.java:829)
at org.apache.naming.NamingContext.lookup(NamingContext.java:152)
at org.apache.naming.SelectorContext.lookup(SelectorContext.java:134)
at javax.naming.InitialContext.lookup(Unknown Source)
at org.hibernate.engine.jndi.internal.JndiServiceImpl.locate(JndiServiceImpl.java:97)
... 35 more


I'd like to know if there is a problem using tomcat with hibernate.

The latest find is I got this information from :
https://hibernate.atlassian.net/browse/HHH-8818

and it says :

It would appear that, starting somewhere in 4.3.0.Beta5, 4.3.0.CR1, or 4.3.0.CR2, Hibernate stopped being able to resolve JNDI DataSource resources in Tomcat. This makes Hibernate 4.3.0.Final completely unusable, meaning this is a blocking issue. Until this is fixed, I will have to downgrade to 4.3.0.Beta4.

So, please let me know if I can't use tomcat at all cos it's been too long I have been working on this problem.

Tks.


Top
 Profile  
 
 Post subject: Re: Caused by: org.hibernate.engine.jndi.JndiException:
PostPosted: Tue Oct 03, 2017 1:39 pm 
Hibernate Team
Hibernate Team

Joined: Thu Sep 11, 2014 2:50 am
Posts: 1628
Location: Romania
Hibernate 4 is no longer supported. If you can replicate it with Hibernate 5.2 and provide a replicating test case, then we could try to provide a fix for the new version.


Top
 Profile  
 
 Post subject: Re: Caused by: org.hibernate.engine.jndi.JndiException:
PostPosted: Tue Oct 17, 2017 5:34 am 
Beginner
Beginner

Joined: Tue Aug 08, 2017 12:14 am
Posts: 44
vlad wrote:
Hibernate 4 is no longer supported. If you can replicate it with Hibernate 5.2 and provide a replicating test case, then we could try to provide a fix for the new version.


Unfortunately, I do not know how to replicte a test case. The fact is that I can't even get the connection going so left alone the test case, even if I know how to right.

Anyway, I'd like to know if I need to install JBoss Tools inside IDE for JPA to work in hibernate ?


Top
 Profile  
 
 Post subject: Re: Caused by: org.hibernate.engine.jndi.JndiException:
PostPosted: Tue Oct 17, 2017 9:03 am 
Hibernate Team
Hibernate Team

Joined: Thu Sep 11, 2014 2:50 am
Posts: 1628
Location: Romania
Quote:
Anyway, I'd like to know if I need to install JBoss Tools inside IDE for JPA to work in hibernate ?


No. Just use Maven to set up the project and it will work on any IDE.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.