facebook

Hibernate Code Generation

  1. MyEclipse Archived
  2.  > 
  3. Database Tools (DB Explorer, Hibernate, etc.)
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #249493 Reply

    jadeite100
    Member

    To 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.ch05

    I 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.Driver

    Where in “Hibernate Code Generation” can I tell it where the “jtds” driver is for Sql 2000.

    Yours,

    Desperate.

    #249508 Reply

    Haris Peco
    Member

    Desperate,

    jtds is free jdbc driver for sybase and mssql.You can dowload it from http://jtds.sf.net

    best regards

    #249512 Reply

    Brian Fernandes
    Moderator

    I 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.

    #249943 Reply

    macinsmith
    Member

    I 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

    #249947 Reply

    Haris Peco
    Member

    Desperate,

    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 all

    Best

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: Hibernate Code Generation

You must be logged in to post in the forum log in