facebook

DB2 & Hibernate mapping

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

    Ed ross
    Member

    I can use the db explorer, look at the DB/2 tables, do selects, and other sql, however – when
    I try and generate hibernate mappings get an “internal error occurred during: “Generation of artifacts”

    Looking at the logs

    Caused by: com.ibm.db2.jcc.a.SqlException: Failure in loading T2 native library db2jcct2
    at com.ibm.db2.jcc.t2.a.a(a.java:31)
    at com.ibm.db2.jcc.t2.T2Configuration.<clinit>(T2Configuration.java:74)

    I’ve read someplace the sql/bin directory needs to be on the classpath for some weird reason (The location of the DLL Libraries).

    When I edit the driver for DB/2, how dow I add a directory to the class path?

    thx

    MyEclipse version 4.1.0 GA
    Eclipse 3.1.2

    #247961 Reply

    Haris Peco
    Member

    edross ,

    Please try with MyEclipse 4.1.1.We fixed a lot bugs.

    Thanks

    #247963 Reply

    Haris Peco
    Member

    I’ve read someplace the sql/bin directory needs to be on the classpath for some weird reason (The location of the DLL Libraries).

    When I edit the driver for DB/2, how dow I add a directory to the class path?

    This is need for type 2 drivers (your driver).It is set fine when you install DB2 – you have to call eclipse/myeclipse with user which install db2 or find setting db2 environment
    ‘weird reason’ is loading native libraries in Java JDK – there are rules and constraints
    Type 2 driver use native libraries, but type4 no

    It is much easier if you can use type 4 driver(for last universal ibm driver different is url)

    url for type 4 is jdbc:db2://HOST_NAME:PORT_NUMBER/DATABASE
    url for type 2 is jdbc:db2:DATABASE

    For more help you have to send details about your environment (OS,db2 version,driver version,connection profile details, driver details)

    Best

    #248006 Reply

    Ed ross
    Member

    changing to type 4 driver did the trick, also – I’m downloading MyEclipse 4.1.1 now

    thanks for the help

    #248013 Reply

    Haris Peco
    Member

    Great.
    Type2 drivers work in 4.1.1 but it have constraints (you can redefine drivers in one session – you have to remove driver definition, restart eclipse and make new definition – reason is jdk native libraries loading)
    We suggest type 4 drivers if it’s possible, but you can work with type2 too

    Best

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: DB2 & Hibernate mapping

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