-->
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.  [ 1 post ] 
Author Message
 Post subject: OK in J2se, Exception The user must supply a JDBC in Tomcat
PostPosted: Wed May 25, 2011 7:56 pm 
Newbie

Joined: Wed May 25, 2011 7:40 pm
Posts: 1
I am using JPA + Hibernate in J2SE my code works.
I can get the EntityManager and execute queries.

My persistence unit is defined as follows:
Code:
   <persistence-unit name="BRMSPersistenceUnit">
      <provider>org.hibernate.ejb.HibernatePersistence</provider>
      <class>gov.frb.brms.EntityType</class>
      <properties>
         <property name="javax.persistence.jdbc.driver"    value="org.apache.derby.jdbc.ClientDriver"/>
         <property name="javax.persistence.jdbc.url"       value="jdbc:derby://localhost:1527/FRB_DB"/>
         <property name="javax.persistence.jdbc.password"  value=""/>
         <property name="javax.persistence.jdbc.user"      value=""/>
      </properties>
   </persistence-unit>


When i try to use the same in a web app deployed inside Tomcat 7, I get the exception "Exception The user must supply a JDBC Connection".

It appears that the persistence.xml file is found by the hibernate code in the web app because i can get the EntityManager.

Note that the webapp uses Spring and some of the parameters are into the persistence.xml and also in a file jdbc.properties.

Would anyone know a fix for that issue?


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

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.