-->
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: hibernate.hbm2ddl.auto=validate uses wrong schema
PostPosted: Mon Apr 04, 2011 1:18 pm 
Newbie

Joined: Mon Apr 04, 2011 1:03 pm
Posts: 2
Hi,

The application I am working on is based on Spring 3 and Hibernate (JPA).

If I set "hibernate.hbm2ddl.auto" to "create" the tables are properly created. However, when I switch to "validate" Hibernate crashes saying "org.hibernate.HibernateException: Missing column: id in ESERVICES.BANK". This is understandable since "ESERVICES" is not the user that is configured in my datasource and does not exist. When I use "create" hibernate does use the user that is specified in this datasource. I have no idea where Hibernate gets "ESERVICES" from. "ESERVICES" is another project that I used to work on. It still appears in the project but in no significant places (e.g. package name).

For info my datasource is set in the following way :

<bean id="dataSourceOracle" class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName" value="oracle.jdbc.driver.OracleDriver" />
<property name="url" value="jdbc:oracle:thin:@MDNDSK2001215.datahome.com:1521:orcl" />
<property name="username" value="Appli1" />
<property name="password" value="Appli1" />
<property name="initialSize" value="2" />
<property name="maxIdle" value="5" />
<property name="maxActive" value="10" />
<property name="maxWait" value="10000" />
<property name="validationQuery" value="SELECT 1 FROM DUAL" />
<property name="testWhileIdle" value="true" />
<property name="testOnBorrow" value="true" />
</bean>

Any idea ?

Sylvain


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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.