-->
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: Auto Code Genaration fails using Hibernate Tools 3.1.0beta2
PostPosted: Fri Mar 24, 2006 9:47 am 
Newbie

Joined: Fri Mar 24, 2006 9:31 am
Posts: 3
Hi friends,

I just downloaded the JBossIDE plugin for Eclipse which includes the
Hibernate Tools version: 3.1.0beta2 and tried to use the code generation functionality to generate DAO java files automatically. I am connecting to SQL Server 2000 with the JDBC Driver Service Pack 3.

I followed the instruction as is given here -- http://www.hibernate.org/hib_docs/tools ... ml_single/

Even though the hibernate console configuration file has been configured with the following jar files (msbase.jar, mssqlserver.jar & msutil.jar) correctly, the below mentioned error is showing with every request for Hibernate Auto code generation.


Full stack trace of any exception that occurs:

java.lang.NoClassDefFoundError: com/microsoft/util/UtilLocalMessages
at com.microsoft.jdbc.base.BaseExceptions.<init>(Unknown Source)
at com.microsoft.jdbc.base.BaseDriver.setupExceptionHandling(Unknown Source)
at com.microsoft.jdbc.base.BaseDriver.connect(Unknown Source)
at org.hibernate.console.FakeDelegatingDriver.connect(FakeDelegatingDriver.java:23)
at java.sql.DriverManager.getConnection(DriverManager.java:525)
at java.sql.DriverManager.getConnection(DriverManager.java:140)
at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:110)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:72)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1855)
at org.hibernate.cfg.JDBCMetaDataConfiguration.readFromJDBC(JDBCMetaDataConfiguration.java:38)
at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate$2.execute(CodeGenerationLaunchDelegate.java:244)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:35)
at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:68)
at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.buildConfiguration(CodeGenerationLaunchDelegate.java:241)
at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.doFinish(CodeGenerationLaunchDelegate.java:125)
at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.launch(CodeGenerationLaunchDelegate.java:66)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:590)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:515)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:733)
at org.eclipse.debug.internal.ui.DebugUIPlugin$6.run(DebugUIPlugin.java:931)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76)


Can anyone help???

Regards

Ratnadeep

_________________
Life's battle continues...


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 24, 2006 12:30 pm 
Beginner
Beginner

Joined: Wed Mar 22, 2006 4:33 am
Posts: 20
Location: Berlin, Germany
First, you shouldn't use Microsoft's driver because it doesn't support backward iteration over a resultset, a feature required by some of Hibernate's functions. Use the jTDS (http://jtds.sf.net/) driver instead.
I think you also need to add the driver jars to your classpath. To do so right click on your project, select properties and go to Java Build Path. There click Add Jars on the Libraries tab.

I hope this helps

Uli


Top
 Profile  
 
 Post subject: Have the class path set already...
PostPosted: Fri Mar 24, 2006 5:23 pm 
Newbie

Joined: Fri Mar 24, 2006 9:31 am
Posts: 3
Thanks for your reply Uli...

Well, I would try the jTDS (http://jtds.sf.net/) driver next.
But for the class path thing, i have already set the class path as mentioned by you.

I would get back to u after i try wid the jTDS driver.

Regards

Ratnadeep

_________________
Life's battle continues...


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 27, 2006 5:04 am 
Newbie

Joined: Fri Mar 24, 2006 9:31 am
Posts: 3
Hello Uli,

Thank you very much. Using jTDS, i could generate the DAO classess without any error.

_________________
Life's battle continues...


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 28, 2006 5:28 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
did you try with MS *latest* beta driver ? (it is a very different beast, and would like to get feedback on their metadata capbilities since the normal driver behavior has improved greatly)

_________________
Max
Don't forget to rate


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.