From: SourceForge.net <no...@so...> - 2008-11-27 22:36:11
|
Bugs item #1628896, was opened at 2007-01-05 16:25 Message generated for change (Comment added) made by gommma You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=449491&aid=1628896&group_id=47439 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: v2.2 >Status: Pending >Resolution: Fixed Priority: 5 Private: No Submitted By: jeromevdl (jeromevdl) Assigned to: Roberto Lo Giacco (rlogiacco) Summary: No metadata Tables found Initial Comment: The trouble occurs in DatabaseDataSet.java with sybase (driver com.sybase.jdbc2.jdbc.SybConnectionPoolDataSource) : ResultSet resultSet = databaseMetaData.getTables( null, schema, "%", tableType); does not contain anything. It works with the following line : ResultSet resultSet = databaseMetaData.getTables(jdbcConnection.getCatalog(),null,"%",null); I'm connecting with : Connection jdbcConnection = DriverManager.getConnection("jdbc:sybase:**************/schema?CHARSET=iso_1", "login", "password"); IDatabaseConnection connection = new DatabaseConnection(jdbcConnection, "schema"); ---------------------------------------------------------------------- >Comment By: gommma (gommma) Date: 2008-11-27 22:36 Message: I committed the printout of an additional log message in case the schema name is not the same as the user name if the DB system is Sybase (SVN rev 893/trunk). To anyone who has a sybase DB running - please test if this helps/works and tell me your opinion and test results. If not I could remove this code again. Thanks and regards, mat ---------------------------------------------------------------------- Comment By: gommma (gommma) Date: 2008-11-21 16:38 Message: I found another interesting link about this issue: http://issues.apache.org/jira/browse/TORQUE-40?page=all It is written there: >>To be more unspecific, the schema name has to be the same as the name of the database user.<< Is this correct? Should dbunit check this and print a warning or throw an exception for sybase if the username is different from the schema name? Regards, mat ---------------------------------------------------------------------- Comment By: gommma (gommma) Date: 2008-08-02 20:51 Message: Logged In: YES user_id=1803108 Originator: NO Hi there, is this still an issue? If yes I suggest you to try specifying the schema name in uppercase since it is case sensitive in DbUnit: IDatabaseConnection connection = new DatabaseConnection(jdbcConnection, "SCHEMA"); If this does not work the next thing you could try is: ResultSet resultSet = databaseMetaData.getTables( null, "SCHEMA", "%", null); Just to ensure that the "tableType" is not the restriction which hinders your table from appearing in the dataset. Since I do not have a sybase installation I would appreciate your feedback very much. Regards, mat ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=449491&aid=1628896&group_id=47439 |