-->
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.  [ 3 posts ] 
Author Message
 Post subject: BasicTypeRegistry exception on database script generation
PostPosted: Mon Jan 31, 2011 1:38 pm 
Newbie

Joined: Thu Feb 02, 2006 10:09 pm
Posts: 9
Hi,

I recently migrated my application from Hibernate 3.3.1 to Hibernate 3.6.0.
I had a couple of user type classes so I had to change them since there were some API changes in this area in 3.6.0.

Now I'm trying to generate the database creation script from my hbm's, using JBoss Tools 3.2 development update site.
But the following exception is being raised:

Code:
java.lang.VerifyError: (class: org/hibernate/type/BasicTypeRegistry, method: <init> signature: ()V) Incompatible argument to function
   at org.hibernate.type.TypeResolver.<init>(TypeResolver.java:46)
   at br.com.investtools.hibernate.EnumLetterUserType.setParameterValues(EnumLetterUserType.java:106)
   at org.hibernate.type.TypeFactory.injectParameters(TypeFactory.java:362)
   at org.hibernate.type.CustomType.<init>(CustomType.java:90)
   at org.hibernate.type.TypeFactory.heuristicType(TypeFactory.java:268)
   at org.hibernate.mapping.SimpleValue.getType(SimpleValue.java:283)
   at org.hibernate.tuple.PropertyFactory.buildStandardProperty(PropertyFactory.java:143)
   at org.hibernate.tuple.component.ComponentMetamodel.<init>(ComponentMetamodel.java:68)
   at org.hibernate.mapping.Component.buildType(Component.java:175)
   at org.hibernate.mapping.Component.getType(Component.java:168)
   at org.hibernate.mapping.SimpleValue.createIdentifierGenerator(SimpleValue.java:175)
   at org.hibernate.cfg.Configuration.iterateGenerators(Configuration.java:743)
   at org.hibernate.cfg.Configuration.generateDropSchemaScript(Configuration.java:854)
   at org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:128)
   at org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:91)
   at org.codehaus.mojo.hibernate3.exporter.Hbm2DDLExporterMojo.doExecute(Hbm2DDLExporterMojo.java:96)
   at org.codehaus.mojo.hibernate3.HibernateExporterMojo.execute(HibernateExporterMojo.java:152)
   at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
   at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
   at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
   at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
   at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
   at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
   at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
   at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
   at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
   at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
   at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
   at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
   at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
   at org.codehaus.classworlds.Launcher.main(Launcher.java:375)


I guess that's because hibernate tools does not use hibernate 3.6.0 yet.
Is that correct?
Is there anything I can do?

Thanks,
Danilo


Top
 Profile  
 
 Post subject: Re: BasicTypeRegistry exception on database script generation
PostPosted: Mon Jan 31, 2011 2:04 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
Yes, Hibernate Tools unfortunately cant work with both versions at the same time because of a couple binary incompatible changes from 3.5 to 3.6.

Workaround is to not put hibernate 3.6 on the classpath when using Hibernate tools. the result will work with 3.6 fine.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: Re: BasicTypeRegistry exception on database script generation
PostPosted: Mon Mar 07, 2011 4:19 pm 
Beginner
Beginner

Joined: Mon Sep 26, 2005 8:22 am
Posts: 24
how do you acheive this magic using hybernate3-maven-plugin?

thanks for your help!


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