-->
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.  [ 5 posts ] 
Author Message
 Post subject: 3.3.0 GA with MySQL 5.0 throws table validation exception
PostPosted: Tue Aug 19, 2008 2:59 am 
Pro
Pro

Joined: Tue Jun 12, 2007 4:13 am
Posts: 209
Location: Berlin, Germany
I just downloaded Hibernate 3.3.0 GA, installed it as library within my JBoss application and tried.

Sadly, it immediately throws an exception at application startup, when it does the schema validation.
Code:
org.hibernate.HibernateException: Wrong column type in dpjw.assessment for column NOTES. Found: text, expected: longtext


Comparing the sources I can see that someone set two java statements into comment. The 3.2 version of MySQLDialect.java looks like this:
Code:
   protected void registerVarcharTypes() {
      registerColumnType( Types.VARCHAR, "longtext" );
      registerColumnType( Types.VARCHAR, 16777215, "mediumtext" );
      registerColumnType( Types.VARCHAR, 65535, "text" );
      registerColumnType( Types.VARCHAR, 255, "varchar($l)" );
   }


while the new 3.3.0 version is this:
Code:
   protected void registerVarcharTypes() {
      registerColumnType( Types.VARCHAR, "longtext" );
//      registerColumnType( Types.VARCHAR, 16777215, "mediumtext" );
//      registerColumnType( Types.VARCHAR, 65535, "text" );
      registerColumnType( Types.VARCHAR, 255, "varchar($l)" );
   }


Can anyone of the committers explain why this was done? I effectively have some attributes in my tables where I want to save some text strings. I annotated the attributes with a maximum string length of 512 bytes and the former schema exporter correctly declared this attribute as
Code:
NOTES text,


So, what of this?

_________________
Carlo
-----------------------------------------------------------
please don't forget to rate if this post helped you


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 20, 2008 7:50 am 
Pro
Pro

Joined: Tue Jun 12, 2007 4:13 am
Posts: 209
Location: Berlin, Germany
I made an entry into JIRA:

http://opensource.atlassian.com/project ... e/HHH-3440

_________________
Carlo
-----------------------------------------------------------
please don't forget to rate if this post helped you


Top
 Profile  
 
 Post subject: Re: 3.3.0 GA with MySQL 5.0 throws table validation exception
PostPosted: Thu Mar 25, 2010 11:21 am 
Newbie

Joined: Tue Mar 23, 2010 10:00 am
Posts: 6
3.3.1 GA also does this, as stated already somewhere...

This matter was not addressed yet? I downloaded hibernate from jboss maven 2 repository today and have this problem.

Somebody was complaining somewhere that those lines were not supposed to be commented out. Is it a bug then?

Does anybody know a solution to this?


Top
 Profile  
 
 Post subject: Re: 3.3.0 GA with MySQL 5.0 throws table validation exception
PostPosted: Fri Oct 07, 2011 10:08 am 
Newbie

Joined: Fri Oct 07, 2011 10:06 am
Posts: 3
This issue still exists in 3.6.6.

Please can someone explain the reasons as to why those lines were commented out?


Top
 Profile  
 
 Post subject: Re: 3.3.0 GA with MySQL 5.0 throws table validation exception
PostPosted: Fri Mar 09, 2012 11:51 pm 
Newbie

Joined: Fri May 01, 2009 3:15 pm
Posts: 3
I came across this topic from:

http://stackoverflow.com/questions/6587 ... text-field

Because I'm seeing this problem with Grails 2.0.1 which I think uses Hibernate 3.6.7.Final.

I'd also like to know why this is still an issue.


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