-->
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.  [ 4 posts ] 
Author Message
 Post subject: Reverse tool and DB2 - encoding not supported!!
PostPosted: Thu Oct 20, 2005 7:44 am 
Newbie

Joined: Wed Oct 19, 2005 5:27 am
Posts: 3
I'm using the Hibernate Eclipse plugin the reverse engineer a DB2 schema. I have generated the hibernate.cfg.xml file:

<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.driver_class">com.ibm.db2.jcc.DB2Driver</property>
<property name="hibernate.connection.password">somepassword</property>
<property name="hibernate.connection.url">jdbc:db2://someUrl</property>
<property name="hibernate.connection.username">someuser</property>
<property name="hibernate.default_schema">SCHEMA</property>
<property name="hibernate.dialect">org.hibernate.dialect.DB2Dialect</property>
</session-factory>
</hibernate-configuration>

But when I switch to the Hibernate Perspective i Eclipse, I cannot retrieve any database infomation.

In the log I get this stacktrace:
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
org.hibernate.exception.GenericJDBCException: Could not get list of tables from database. Probably a JDBC driver problem.
Configured schema:SCHEMA
Configured catalog:null
<SQLException while getting schemas>
<SQLException while getting catalogs>

at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:82)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:70)
at org.hibernate.cfg.reveng.JDBCReader.processTables(JDBCReader.java:365)
at org.hibernate.cfg.reveng.JDBCReader.readDatabaseSchema(JDBCReader.java:47)
at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter$1.execute(LazyDatabaseSchemaWorkbenchAdapter.java:55)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:35)
at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter.getChildren(LazyDatabaseSchemaWorkbenchAdapter.java:44)
at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter.fetchDeferredChildren(LazyDatabaseSchemaWorkbenchAdapter.java:30)
at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:192)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76)
Caused by: com.ibm.db2.jcc.b.DisconnectException: encoding not supported!!
at com.ibm.db2.jcc.a.ab.a(ab.java:748)
at com.ibm.db2.jcc.a.db.Yc(db.java:3127)
at com.ibm.db2.jcc.a.db.b(db.java:3056)
at com.ibm.db2.jcc.a.db.a(db.java:2682)
at com.ibm.db2.jcc.a.db.b(db.java:2609)
at com.ibm.db2.jcc.a.db.a(db.java:2476)
at com.ibm.db2.jcc.a.db.m(db.java:447)
at com.ibm.db2.jcc.a.db.l(db.java:345)
at com.ibm.db2.jcc.a.db.e(db.java:102)
at com.ibm.db2.jcc.a.r.e(r.java:72)
at com.ibm.db2.jcc.a.sb.i(sb.java:194)
at com.ibm.db2.jcc.b.zc.q(zc.java:1319)
at com.ibm.db2.jcc.b.ad.d(ad.java:2281)
at com.ibm.db2.jcc.b.bd.U(bd.java:188)
at com.ibm.db2.jcc.b.s.a(s.java:7833)
at com.ibm.db2.jcc.b.s.a(s.java:6337)
at com.ibm.db2.jcc.b.s.getTables(s.java:6247)
at org.hibernate.cfg.reveng.JDBCReader.processTables(JDBCReader.java:329)
... 7 more
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


I'm running on a Windows PC and the DB2 is version 7.2 (I think) running on AIX.

Please advise,

Thanks,

Christian Sonne Jensen


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 20, 2005 7:53 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
looks like a driver issue to me.

searching via google reveals that users has this error when using wrong combinations of JDK , drivers and databases.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 20, 2005 8:12 am 
Newbie

Joined: Wed Oct 19, 2005 5:27 am
Posts: 3
Ahh, well, it may be so, but actually I'm using the exact same settings as I do when I - succesfully - connect to the database in Squirrel. This means the same JDBC driver (version 8.1.7 type 4 driver), the same URL, the same schema/user/password, and even the same JDK.

Any hints?

Regards Christian Sonne Jensen


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 20, 2005 11:26 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
nope - i dont do anything special with the connection

_________________
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.  [ 4 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.