- This topic has 4 replies, 4 voices, and was last updated 19 years, 1 month ago by
Haris Peco.
-
AuthorPosts
-
jadeite100MemberTo Whom It May Concern:
I am hoping you have used this “Hibernate code Generation” before.
In myEclipse, I went to “Hibernate Code Generation”–>”Hibernate Code Generation..”.I said the following for the Main tab:
Console Configuration:hibernatetools-demo
Output directory:\ch05\src
Package:com.manning.hq.ch05I am trying to use JTDS driver for this ch05 project.
When I clicked “run” button, I get the following error:Exception while generating code
Reason:
org.hibernate.console.HibernateConsoleRuntimeException:Problems while loading database driverclass(net.sourceforge.jtds.jdbc.Driver”.
java.lang.ClassNotFoundException:net.sourceforge.jtds.jdbc.DriverWhere in “Hibernate Code Generation” can I tell it where the “jtds” driver is for Sql 2000.
Yours,
Desperate.
Haris PecoMemberDesperate,
jtds is free jdbc driver for sybase and mssql.You can dowload it from http://jtds.sf.net
best regards
Brian FernandesModeratorI noted from a previous post that you have installed both Hibernate Tools and MyEclipse in your eclipse installation.
The action you are talking about “Hibernate Code Generation >” is not developed or contributed by MyEclipse – but by Hibernate Tools from JBoss. Please see our included help for reverse engineering support included with MyEclipse.If you have issues with Hibernate Tools features, please ask the Hibernate tools developers at http://www.hibernate.org
If you have any problems using our tools, feel free to ask.Best,
Brian.
macinsmithMemberI may be wrong, but it appears that MyEclipse does not yet support code generation starting from a mapping file as described in the Hibernate 3.1.0.beta4 tools manual.
For what it’s worth, I had a similar problem with MySQL and found that I had to put the jar containing the driver in the Eclipse folder so that the IDE could find it. For some reason, it doesn’t add the directory referred to in the project to the classpath, so when I put it there I got beyond the error you are encountering.
Hope this helps
Haris PecoMemberDesperate,
You can try MyEclipse 4.1.1 – we add ‘generate POJOs’ from mapping file in this version (right click on mapping file)
I don’t understand second part – you have to add jdbc driver in connection profile (db explorer) – then you make
hibernate configuration based on connection profile and it is allBest
-
AuthorPosts