0 Replies Latest reply on Nov 28, 2005 7:14 AM by Sumesh Sadanandan

    Problem while generating mapping in Hibernate from DB2

    Sumesh Sadanandan Newbie

      Hi ,

      I dont know whether this is the right forum to post this but i am taking my chance.Anyway here it is
      i am struggling to generate hibernate mapping files ( reverse engineering from DB2 database 8.1 or 7 tried using both ) i always end up with the following errors.

      I am using JBOSS IDE with eclipse version 3.1.1 and hibernate 3(downloaded with JBOSS server jboss-4.0.3SP1)

      getting the following error

      1) WARN main net.sf.ehcache.config.Configurator - No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: bundleresource://131/ehcache-failsafe.xml

      I doubt whether the package is now valid for hibernate 3
      since i have read that it is org.hibernate
      but since the IDE is looking for this ... i am not sure what to change and where


      2) WARN Worker-3 org.hibernate.connection.DriverManagerConnectionProvider - problem closing pooled connection

      COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver] CLI0116E Invalid transaction state. SQLSTATE=25000
      at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_SQLException(SQLExceptionGenerator.java:183)
      at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.check_return_code(SQLExceptionGenerator.java:440)
      at COM.ibm.db2.jdbc.app.DB2Connection.close2(DB2Connection.java:846)
      at COM.ibm.db2.jdbc.app.DB2Connection.close(DB2Connection.java:812)
      at org.hibernate.connection.DriverManagerConnectionProvider.close(DriverManagerConnectionProvider.java:152)
      at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter$1.execute(Unknown Source)
      at org.hibernate.console.execution.DefaultExecutionContext.execute(Unknown Source)
      at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter.readDatabaseSchema(Unknown Source)
      at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter.getChildren(Unknown Source)
      at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter.getChildren(Unknown Source)
      at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(Unknown Source)
      at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:192)
      at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76)


      here is my config file

      <session-factory >
      COM.ibm.db2.jdbc.app.DB2Driver
      password
      jdbc:db2:SEDB_L
      db2admin
      db2gsadm
      org.hibernate.dialect.DB2Dialect
      true
      <!-- true

      org.hibernate.transaction.JTATransactionFactory

      java:comp/UserTransaction
      -->
      </session-factory>

      Any help in this regard is really appreciated.

      Thanks in Advance
      Sumesh