-->
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.  [ 4 posts ] 
Author Message
 Post subject: DB Connection Required to Use Hibernate Tools?
PostPosted: Mon Apr 25, 2011 11:09 am 
Regular
Regular

Joined: Tue Oct 10, 2006 2:21 pm
Posts: 58
I am trying to use Hibernate Tools in Eclipse simply to read some hbm.xml files and then generate the pojos from them. I can't get it to work. When I go to rebuild configuration I get <SessionFactory error: Unable to instantiate devualt tuplizer [org.hibernate.tuple.component.PojoComponentTuplizer] and the Database fails with <Reading schema error: Getting deatabase metadata>.

Is all this necessary? Logically, simply reading the config files ought to be able to generate the java. Yet I can't get it to do that. Perhaps because of the above problem or perhaps for some other reason, I do not see the "start the Hibernate Code Generation which is available in the toolbar via the Hibernate icon or via the Run > Hibernate Code Generation menu item." as indicated in the web documentation.

What am I doing wrong and is database connectivity required to use this tool?


Top
 Profile  
 
 Post subject: Re: DB Connection Required to Use Hibernate Tools?
PostPosted: Mon Apr 25, 2011 12:49 pm 
Regular
Regular

Joined: Tue Oct 10, 2006 2:21 pm
Posts: 58
Well, duh, I had to be in the Hibernate perspective to get these specail Run options to run the code generation.

However, still no joy.

org.hibernate.console.HibernateConsoleRuntimeException: Received a NoClassDefFoundError, probably the console configuration classpath is incomplete or contains conflicting versions of the same class
at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.launch(CodeGenerationLaunchDelegate.java:271)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:853)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:702)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:924)
at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1128)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.hibernate.tool.Version
at org.hibernate.tool.hbm2x.TemplateHelper.setupContext(TemplateHelper.java:215)
at org.hibernate.tool.hbm2x.AbstractExporter.setupContext(AbstractExporter.java:147)
at org.hibernate.tool.hbm2x.POJOExporter.setupContext(POJOExporter.java:44)
at org.hibernate.tool.hbm2x.AbstractExporter.start(AbstractExporter.java:94)
at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate$1.execute(CodeGenerationLaunchDelegate.java:352)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:63)
at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:72)
at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.runExporters(CodeGenerationLaunchDelegate.java:327)
at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.launch(CodeGenerationLaunchDelegate.java:254)
... 5 more

OK, which is it? incomplete or conflicting versions. Unfortunately, there isn't an option to see the actual classpath I'm running with. I've tried the default configuration (which includes Maven dependencies), the default plus hibernate-tools.jar from my Eclipse folder, and one I've built up myself. Can't get around this. This should be simpler. What am I missing.


Top
 Profile  
 
 Post subject: Re: DB Connection Required to Use Hibernate Tools?
PostPosted: Mon Aug 22, 2011 3:22 pm 
Newbie

Joined: Thu Aug 18, 2011 4:25 pm
Posts: 2
Did you solve this problem?


Top
 Profile  
 
 Post subject: Re: DB Connection Required to Use Hibernate Tools?
PostPosted: Mon Aug 29, 2011 8:49 am 
Regular
Regular

Joined: Tue Oct 10, 2006 2:21 pm
Posts: 58
This was four months ago. I remember that I eventually solved it, but I do not remember how. I don't use this tool on an everyday basis.


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