Hibernate Books

All times are UTC - 5 hours [ DST ]

Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: hibernate.hbm2ddl.auto=validate uses wrong schema
PostPosted: Mon Apr 04, 2011 1:18 pm 

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

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" />

Any idea ?


Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 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.