-->
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: Tables not showing up in Hibernate console
PostPosted: Thu Jun 19, 2008 11:39 am 
Newbie

Joined: Wed Jun 27, 2007 5:09 pm
Posts: 7
I'm trying to create hibernate mapping files and java objects using bottom up approach. I'm using eclipse and hibernate plugging tools.

Eclipse: version 3.3.2
Hibernate Tools:HibernateTools-3.2.2.Beta1
Name and version of the database you are using:DB2 on zOS v8.1


My Hibernate config file(hibernate.cfg.xml) is correctly configured to point to a DB2 database. The connection params are verified.

Upon creating Hibernate Console using above hibernate config, I DO NOT see the listing of database tables. For a quick moment the status bar displays "fetching children from Database" but then NO list appears.

I tried org.hibernate.dialect.DB2Dialect dialect and same result.

Can someone help ?

Thanks.

Here is the config file:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
      "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
      "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
    <session-factory name="sessionFactory">
        <property name="hibernate.connection.driver_class">com.ibm.db2.jcc.DB2Driver</property>
        <property name="hibernate.connection.password">XXXXX</property>
        <property name="hibernate.connection.url">jdbc:db2://myserver.com:5027/SIDJDB2L</property>
        <property name="hibernate.connection.username">onlyuser</property>
        <property name="hibernate.default_schema">SIDDB2L</property>
        <property name="hibernate.dialect">org.hibernate.dialect.DB2390Dialect</property>
    </session-factory>
</hibernate-configuration>


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 20, 2008 8:56 am 
Newbie

Joined: Wed Jun 27, 2007 5:09 pm
Posts: 7
Below is the error message. When I googled on this error I found that it was reported in several forums as way back as 2004. However did not find any solutions reported.
This error is from the DB2 driver. It is faulting when trying to retrieve metadata information from Database.

Any clues ?


Code:
  com.ibm.db2.jcc.b.SqlException: [ibm][db2][jcc][10150][10300] Invalid parameter: Unknown column name TABLE_NAME.
  [ibm][db2][jcc][10150][10300] Invalid parameter: Unknown column name TABLE_NAME.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 20, 2008 11:38 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
Best guess: you are using a db2 driver that is ancient and not following the jdbc spec.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 23, 2008 9:07 am 
Newbie

Joined: Wed Jun 27, 2007 5:09 pm
Posts: 7
I am using the latest drivers. I tried several versions of the drivers too with same result.

I found the following post in a previous forum message. It's the exact problem I have:
http://forums.hibernate.org/viewtopic.php?p=2243948

Quote:
it appears to be fairly conclusive that the IBM DB2 universal drivers support metadata fully. however, OS/390 aid z/OS installations of DB2 treat the underlying stored procedures required to support metadata as *options*, not automatically installed. and of course, we are indeed running DB2 on the mainframe.


(1) Please let me know if the above is valid ?
(2) Is the Hiberante code generation plugin for Eclispse tested against DB2 v8 on zOS ?
(3) Any suggestions ?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 03, 2008 12:29 pm 
Newbie

Joined: Wed Jun 27, 2007 5:09 pm
Posts: 7
I want to know, has anyone reverse engineered and created hibernate mapping files(*.hbm.xml), POJO objects from a DB2 running on zOS/mainframe based backend ?

As far as I can see HIBERNATE TOOL work only for DB2 UDB.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 12, 2008 7:29 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
Until now i've only heard reports about zos not being jdbc spec compliant and/or the user does not have the correct permissions to read metadata.

I don't have a zos/mainframe to test on, so the community should provide fixes if there are some issues which can be worked around in hibernate tools.

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