-->
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: Validate fails on Hib Generated Schema for Boolean on MySQL
PostPosted: Fri Aug 02, 2013 6:40 pm 
Newbie

Joined: Tue Feb 07, 2012 12:12 pm
Posts: 7
used create-drop to create schema.
run in Dev with update
then when try to use validate I get:

Code:
   Caused by: org.hibernate.HibernateException: Wrong column type in xxxmanager.xxx for column in_quarantine. Found: bit, expected: boolean
   at org.hibernate.mapping.Table.validateColumns(Table.java:282)


<persistence-unit name="xxxDatasource">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>java:/datasources/xxxDatasource</jta-data-source>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5InnoDBDialect" />
<property name="hibernate.hbm2ddl.auto" value="validate" /> <!-- create-drop update -->
<property name="hibernate.show_sql" value="true" />
<property name="hibernate.format_sql" value="true" />
<!-- These are the default for JBoss EJB3, but not for HEM: -->
<property name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider" />
<property name="hibernate.transaction.manager_lookup_class"
value="org.hibernate.transaction.JBossTransactionManagerLookup" />
<property name="jboss.entity.manager.factory.jndi.name"
value="java:/xxxmanagerEntityManagerFactories" />
</properties>
</persistence-unit>


This is the Entity bit...

Code:
   @XmlAttribute
   @Column(name = "in_quarantine")
   private boolean inQuarantine;



DB is:MySQL 5.6.10 running on localhost

What was created on DB was:
in_quarentine tinyint(1)

Since Validate fails I cannot run up.

I am using JBoss 7.1.1.Final
Code:
10:27:53,116 INFO  [org.hibernate.annotations.common.Version] (MSC service thread 1-4) HCANN000001: Hibernate Commons Annotations {4.0.1.Final}
10:27:53,123 INFO  [org.hibernate.Version] (MSC service thread 1-4) HHH000412: Hibernate Core {4.0.1.Final}
...
10:27:53,841 INFO  [org.hibernate.validator.util.Version] (MSC service thread 1-4) Hibernate Validator 4.2.0.Final


I will stick with Update for now.

Hope this helps.


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.