-->
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.  [ 6 posts ] 
Author Message
 Post subject: Hibernate + JNDI - problems
PostPosted: Thu Apr 01, 2004 1:52 pm 
Senior
Senior

Joined: Wed Sep 24, 2003 3:01 pm
Posts: 158
Location: Bragan�a Paulista - Brasil
Hi all,

I

_________________
Tads


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 01, 2004 2:02 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Use Hibernate 2.1.*, don't set a "name" for <session-factory> (Hibernate can't bind anything to the readonly JNDI context in Tomcat) and verify that Tomcat binds the datasource you configured in JNDI at startup.

I also think you got some serious confusion with JNDI names and configuration, the exception you have shown says "User Database", this apparently is a failed JNDI object lookup. There is no "User Database" JNDI binding anywhere in your configuration, so I don't know how to help you.

Please check the "Quickstart" chapter again in the Hibernate reference documentation, start with a fresh Tomcat 4.1.* and Hibernate 2.1.* download, and follow it step by step.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 02, 2004 9:12 am 
Senior
Senior

Joined: Wed Sep 24, 2003 3:01 pm
Posts: 158
Location: Bragan�a Paulista - Brasil
I made the changes, I

_________________
Tads


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 02, 2004 3:11 pm 
Senior
Senior

Joined: Wed Sep 24, 2003 3:01 pm
Posts: 158
Location: Bragan�a Paulista - Brasil
Hi,

well, I change docBase of the context to
"C:\Program Files\Apache Group\Tomcat 4.1\webapps\proj.war"
and it

_________________
Tads


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 02, 2004 4:16 pm 
Newbie

Joined: Fri Nov 28, 2003 9:08 am
Posts: 19
Location: Brasil
I also have some doubts about JNDI configuration and hibernate.

In my case, I put this in hibernate.cfg.xml

Code:
    <session-factory>
      
      <property name="connection.datasource">java:comp/env/jdbc/rinoceronte</property>
         


While in myapp.xml I put

Code:
<Context path="/rinoceronte" swallowOutput="true" docBase="rinoceronte.war" debug="0">
    <Logger className="org.apache.catalina.logger.FileLogger"
        prefix="rinoceronte." suffix=".txt" timestamp="true"/>
  <Resource name="jdbc/rinoceronte" auth="Container" type="javax.sql.DataSource"/>
  <ResourceParams name="jdbc/rinoceronte">
      <parameter>
          <name>factory</name>
          <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
      </parameter>



Felipe


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 06, 2004 1:38 pm 
Senior
Senior

Joined: Wed Sep 24, 2003 3:01 pm
Posts: 158
Location: Bragan�a Paulista - Brasil
Hi,

I upgraded the Tomcat to Tomcat 5.0.19 and now it

_________________
Tads


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