-->
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.  [ 2 posts ] 
Author Message
 Post subject: Hibernate 3.0.5 -> 3.2.3 migration problems (mappings etc
PostPosted: Thu May 24, 2007 9:03 am 
Newbie

Joined: Thu May 24, 2007 7:24 am
Posts: 2
Hello, im trying to migrate my project from Hibernate 3.0.5 to 3.2.4 SP1.
The first problem is that Hibernate seems to loop over my mappings several times, instead of mapping everthing once.

My SessionFactory is configured via Spring XML config and mapping property is described like this:
Code:
<property name="mappingLocations">
    <value>classpath*:app/**/*.hbm.xml</value>
</property>


With Hibernate 3.0.5 this works perfectly.
Another problem is that when i leave Hibernate looping thru these mappings for like 7-10 minutes, it finally halts with an Exception.


Code:
org.hibernate.HibernateException: Wrong column type: phone_approved, expected: bit
   at org.hibernate.mapping.Table.validateColumns(Table.java:261)
   at org.hibernate.cfg.Configuration.validateSchema(Configuration.java:1083)
   at org.hibernate.tool.hbm2ddl.SchemaValidator.validate(SchemaValidator.java:116)
   at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:317)
   at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294)
   at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:805)
   at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:745)
   at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:134)


That phone_approved field is defined in my XML mapping like this:
Code:
<property name="phoneApproved" type="java.lang.Boolean" not-null="true" length="1"/>


And in the database (using MySQL 5.0) as a tinyint(1) with default value 0.

I cant quite figure out what is needed to be changed or what could be wrong.... Would appreciate some help.


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 25, 2007 7:29 am 
Newbie

Joined: Thu May 24, 2007 7:24 am
Posts: 2
Still struggling with this problem, doesnt anyone have any ideas or pointers to give? :(


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