-->
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.  [ 6 posts ] 
Author Message
 Post subject: Hibernate Tools - AS/400 could not get list of tables frm db
PostPosted: Thu Nov 06, 2008 3:10 pm 
Newbie

Joined: Thu Nov 06, 2008 3:00 pm
Posts: 2
eclipse.buildId=M20060921-0945
java.version=1.5.0_11
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Command-line arguments: -os win32 -ws win32 -arch x86

Error
Thu Nov 06 12:25:48 CST 2008
org.hibernate.exception.GenericJDBCException: Could not get list of tables from database. Probably a JDBC driver problem.Configured schema:null
Configured catalog:null
Available schemas:
#JSAUSTIN
ZMODLIB10
ZMODPTF20
ZPLSCBL01
ZPLSCBL02
ZPLSCBL13
ZTIBPSRC
Available catalogs:
ASIA
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
at org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect.getTables(JDBCMetaDataDialect.java:48)
at org.hibernate.cfg.reveng.JDBCReader.processTables(JDBCReader.java:428)
at org.hibernate.cfg.reveng.JDBCReader.readDatabaseSchema(JDBCReader.java:67)
at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter$1.execute(LazyDatabaseSchemaWorkbenchAdapter.java:97)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:56)
at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter.readDatabaseSchema(LazyDatabaseSchemaWorkbenchAdapter.java:88)
at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter.getChildren(LazyDatabaseSchemaWorkbenchAdapter.java:57)
at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:94)
at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:207)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)
Caused by: java.sql.SQLException: [SQL0901] SQL system error.
at com.ibm.as400.access.JDError.throwSQLException(JDError.java:650)
at com.ibm.as400.access.AS400JDBCDatabaseMetaData.getTables(AS400JDBCDatabaseMetaData.java:4552)
at org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect.getTables(JDBCMetaDataDialect.java:24)
... 9 more


********************************************************
********************************************************
I am using the latest jt400.jar

**********************************
Hibernate config

<property name="hibernate.connection.driver_class">com.ibm.as400.access.AS400JDBCDriver</property>
<property name="hibernate.connection.password">qwer12345</property>
<property name="hibernate.connection.url">jdbc:as400://ASIA;translate binary=true;</property>
<property name="hibernate.connection.username">rxchaudh</property>
<property name="hibernate.dialect">org.hibernate.dialect.DB2400Dialect</property>

****************************************************


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 10, 2008 3:52 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
I don't have a AS/400 in my backyard so haven't tested this combination ;)

The exception says something went wrong while calling getTables:

Caused by: java.sql.SQLException: [SQL0901] SQL system error.
at com.ibm.as400.access.JDError.throwSQLException(JDError.java:650)
at com.ibm.as400.access.AS400JDBCDatabaseMetaData.getTables(AS400JDBCDatabaseMetaData.java:4552)

This is a standard JBDC api call so to answer why it fails you need to look on the AS400 side.

Do you have enough permissions to read jdbc metadata ?
Is the right jdbc metadata module installed ? (that is at least sometime the case with IBM/Db2)
Have you tried setting hibernate.default_schema to your specific schema so only that specific schema will be read ?

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: Same problem here
PostPosted: Fri Dec 12, 2008 2:03 pm 
Newbie

Joined: Fri Dec 12, 2008 1:58 pm
Posts: 2
Hi Guys.

I'm having the EXACT same problem on my end with DB2 and Hibernate Tools. Please let me know if you find out anything. I am going to start pestering the IBM JDBC driver folks for some answers.

Driver Used: jt400.jar verson 6.4 (latest and greatest). I've also tried an older jt400.jar. Same problem.
Database: DB2 V5R3M0

org.hibernate.exception.GenericJDBCException: Could not get list of tables from database. Probably a JDBC driver problem.
Configured schema:null
Configured catalog:null
Available schemas:
#CGULIB
#COBLIB
#DFULIB
#DSULIB
#LIBRARY
#RPGLIB
#SEULIB
ACPTTEST
ARCHIVESRC
ASLIB
BILDATAP
CDINFILE
COBILLING
COCTAX30D
COCTAX30O
COCTAX30S
COCTAX30T
COP6BILHST
COP6COPY
COP6DCC0
COP6DMD0
COP6SMD0
COP6SRT0
COP6SSW0
COP6SSW0#
COQUERY
COQUERY1
COTRANSFER
COU6BILHST
COU6CCC0
COU6CTF0
COU6DBPMS0
COU6DBP010
COU6DBP020
COU6DBP030
COU6DBP050
COU6DBP060
COU6DBP070
COU6DBP080
COU6DBP090
COU6DBP100
COU6DBP110
COU6DBP120
COU6DBP150
COU6DBP160
COU6DBP170
COU6DBP180
COU6DBP200
COU6DBP220
COU6DBP230
COU6DBP600
COU6DBP610
COU6DBP620
COU6DBP630
COU6DBP640
COU6DBP700
COU6DBP710
COU6DBP720
COU6DBP730
COU6DBP740
COU6DBP770
COU6DBP800
COU6DBP880
COU6DBP890
COU6DBP900
COU6DBP910
COU6DBP920
COU6DBP930
COU6DBP940
COU6DCC0
COU6DRT0
COU6D010
COU6D020
COU6D070
COU6D080
COU6D120
COU6D150
COU6D170
COU6D200
COU6D220
COU6ICC0
COU6ICC1
COU6ICC3
COU6ICC4
COU6ICC5
COU6ICC6
COU6ICC7
COU6ICC8
COU6OCC0
COU6OCC1
COU6OCC3
COU6OCC4
COU6OCC5
COU6OCC6
COU6OCC7
COU6OCC8
COU6SRT0
COU6SSW0
COU6SSW0#
COU6TMSTR0
COU6825915
CTAXCYCALL
CXGTUINLIB
CXGUCTCCIN
CXGUCTCCOT
CXQRYOUT
CXUATLIB
CXUATOUT
CXUSRLIB
DBU
DEVTEST
DKJUNK
GUI400LIC
MG_CNV
MG_CTC
MSLIB
PPRESTIA
PRODTEST
QAFP
QAFPLIB1
QAFPLIB2
QAFPLIB3
QBRM
QCAEXP
QCAP3
QCA400W
QCBL
QCBLLE
QCBLLEP
QCCA
QCE3
QCLUSTER
QCPPLE
QDBEX
QDBXM
QDB2TX
QDB2XML
QDEVTOOLS
QDNS
QDOC
QDP4
QDSNX
QFNTCPL
QFNTWT
QFPNTWE
QGDDM
QGPL
QGPLBUD
QGY
QHLPSYS
QHTTPSVR
QIBS
QICSS
QICU
QIJS
QIMO
QINMEDIA
QINPRIOR
QINSYS
QIPS
QIWA2
QIWR
QIWS
QJAVA
QJRNL
QJT400
QLBL
QMGTC
QMGTC2
QMSE
QNTAP
QPASE
QPDA
QPFR
QPFRDATA
QQALIB
QQFTEMP
QQRYLIB
QRCL
QRECOVERY
QRJE
QRPG
QRPGLE
QRPGLEP
QRPG38
QSC6063870
QSHELL
QSQL
QSR
QSRV
QSSP
QSYS
QSYSCGI
QSYSDIR
QSYSINC
QSYSLOCALE
QSYSNLS
QSYSV5R1M0
QSYSV5R2M0
QSYS2
QSYS38
QS36F
QTCM
QTCP
QTEMP
QTMELCF
QUPGRADE
QUSRBRM
QUSRIJS
QUSRINFSKR
QUSRSYS
QUSRSYSBUD
QUSRTOOL
Q1ABRMSF
Q1ABRMSF01
Q1ABRMSF02
SEACOL
SEALMS
SOFTTURN
SOFTTURND
SOFTTURNE
SOFTTURNU
STEVEJC
SYSIBM
TAATOOL
TAPELIB
TAPELIBBK
T2008543D
T2008545D
T2008546D
T2008551D
T2008552D
T2008585D
T2008586D
T2008590D
T2008597D
T53INST
USERSAVE
VERTEX3SAV
VSTAX35.D
VSTAX35.O
YOUNAN
Available catalogs:
OTBILCBP
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
at org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect.getTables(JDBCMetaDataDialect.java:52)
at org.hibernate.cfg.reveng.JDBCReader.processTables(JDBCReader.java:476)
at org.hibernate.cfg.reveng.JDBCReader.readDatabaseSchema(JDBCReader.java:74)
at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter$2.execute(LazyDatabaseSchemaWorkbenchAdapter.java:105)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:65)
at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter.readDatabaseSchema(LazyDatabaseSchemaWorkbenchAdapter.java:96)
at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter.getChildren(LazyDatabaseSchemaWorkbenchAdapter.java:58)
at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:103)
at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:196)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: java.sql.SQLException: [SQL0901] SQL system error.
at com.ibm.as400.access.JDError.createSQLExceptionSubClass(JDError.java:807)
at com.ibm.as400.access.JDError.throwSQLException(JDError.java:665)
at com.ibm.as400.access.AS400JDBCDatabaseMetaData.getTables(AS400JDBCDatabaseMetaData.java:4637)
at org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect.getTables(JDBCMetaDataDialect.java:28)
... 9 more


Top
 Profile  
 
 Post subject:
PostPosted: Sun Dec 14, 2008 5:31 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
http://publib.boulder.ibm.com/infocente ... ql0901.htm

says this:

"For iSeries Access ODBC: Server machine (function) check error

Probable cause:

Another, previously reported error has prevented the processing of a SQL statement. The previous error is logged only in the i5/OS™ job log and is not returned to the ODBC application. You must locate and retrieve the job log to identify and resolve the problem.

To find the job log, open a PC5250 emulation session and issue a WRKSPLF where user is the iSeries user profile used on the ODBC connection. However, in some cases the joblog is found using WRKSPLF QUSER. For example, it is necessary to use WRKSPLF QUSER to find the associated joblog when the prestart jobs fail to start."

So let us know what that log says...

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: Problem Fixed
PostPosted: Tue Dec 16, 2008 11:23 am 
Newbie

Joined: Fri Dec 12, 2008 1:58 pm
Posts: 2
I worked with our DBA. Turns out new DB2 instance created from copy of production had a corrupted SQL package. He found this looking through log files of my server side session. He deleted package and it gets auto refreshed somehow. Problem is now fixed. Just thought I might leave this for others out there with the same problem.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 20, 2008 5:47 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
thanks - then the exception matched reality! :)

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