-->
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.  [ 7 posts ] 
Author Message
 Post subject: Reverse Engineering: can't read meta data; table name prob?
PostPosted: Thu Aug 11, 2005 11:23 am 
Newbie

Joined: Tue Aug 02, 2005 3:21 pm
Posts: 14
Hi,

I'm trying to reverse engineer a sybase table. In my reveng.xml, I include only the table name, "hts_sec_master". When I run the ant task, I get this output:
----------------------------------------------------------------------------------------
[hibernatetool] 11:16:32,539 DEBUG JDBCBinder:600 - Adding table org.hibernate.mapping.Table(derivatives.dbo.hts_sec_master) of type TABLE
[hibernatetool] 11:16:32,571 DEBUG JDBCBinder:731 - Finding columns for derivatives.dbo.hts_sec_master
[hibernatetool] 11:16:32,665 DEBUG DriverManagerConnectionProvider:129 - returning connection to pool, pool size: 1

BUILD FAILED
----------------------------------------------------------------------------------------
It fails because it can't read the necessary meta data for the table.

Notice the table name the output shows: "derivatives.dbo.hts_sec_master". But in my reveng.xml file, I had to specify "hts_sec_master".

Do I somehow need to configure the hibernate task to use the relative table names rather than the absolute names in order for it to get meta data on the table? BTW, I'm already looking into possible permission issues, too.

Thanks!
-Edgar


Top
 Profile  
 
 Post subject: Found the problem - Jconnect!
PostPosted: Thu Aug 11, 2005 3:20 pm 
Newbie

Joined: Tue Aug 02, 2005 3:21 pm
Posts: 14
The problem is in the way they Sybase JDBC driver (Jconnect) interprets the null passed into JDBC DatabaseMetaData.getColumns() method. The Hibernate tools JDBCBinder class passes null as the last argument to DatabaseMetaData.getColumns(). Jconnect turns that into an empty string before calling the corresponding Sybase stored proc. This causes the call to fail and no columns to be returned.

I don't know what to do about this situation - probably abandon Hibernate reverse engineering for Sybase... :-(


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 11, 2005 3:48 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
This is a clear break of the JDBC API. Complain to Sybase or use another decent driver (jTDS should work I imagine)

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 11, 2005 4:05 pm 
Newbie

Joined: Tue Aug 02, 2005 3:21 pm
Posts: 14
jTDS - what's that? Will that work against a Sybase database? What other driver options do I have against a Sybase database?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 11, 2005 4:09 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Use Google and call Sybase.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 11, 2005 4:39 pm 
Newbie

Joined: Tue Aug 02, 2005 3:21 pm
Posts: 14
I tried jTDS and saw the exact same behavior!


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 13, 2005 5:05 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
then provide a patch to what you think the getColumns call should do instead

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