This tableExists implementation is too naive. A JDBC driver need not support catalogs. Before doing the getCatalog() the code should query the DatabaseMetaData interface whether catalogs are supported. With ORACLE 8.1.7 JDBC Thin Client Driver one gets:
supportsCatalogsInDataManipulation false supportsCatalogsInProcedureCalls false supportsCatalogsInTableDefinitions false supportsCatalogsInIndexDefinitions false supportsCatalogsInPrivilegeDefinitions false but supportsSchemasInDataManipulation true supportsSchemasInProcedureCalls true supportsSchemasInTableDefinitions true supportsSchemasInIndexDefinitions true supportsSchemasInPrivilegeDefinitions true so one could use getSchema() instead of getCatalog() (and don't forget to use getSchemaTerm() :-)). My 0.02$ Georg -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Jason Dillon Sent: Saturday, April 06, 2002 04:27 To: [EMAIL PROTECTED] Subject: Re: [JBoss-dev] Problem in JDBCStartCommand.java If there isn't sufficent support for schemas in JDBC, then we could probably add a mapping which handles the specifics on a db to db level... but I will leave that impl to the CMP expert(s). --jason Stephen Coy wrote: >The function [i]tableExists[/i] in this class makes the following jdbc call: > >rs = dmd.getTables(con.getCatalog(), null, tableName, null); > >This call seems to return a result if tableName exists in [i]any[/i] schema in the database. > >This is causing us some problems because we have each of our developers using the same Oracle8 database, but their own schema/userid. This was all working fine, until the relevation earlier this week that we should specify table names in uppercase. Now that we are doing this, noone can create new CMP tables anymore, because JBoss thinks it already exists (albeit in someone else's schema). > >Unfortunately, my knowledge of JDBC's idea of catalogs and schemas is weak at the moment, so I'm reluctant to record this as a bug just now. It may even be an Oracle permissions thing. Any advice either way would be appreciated. > >This is in the JBoss 3.0 CVS HEAD as of 24 hours ago or so. > >_________________________________________________________ >View thread online: http://main.jboss.org/thread.jsp?forum=66&thread=12265 > >_______________________________________________ >Jboss-development mailing list >[EMAIL PROTECTED] >https://lists.sourceforge.net/lists/listinfo/jboss-development > _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development