You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by Tim Dudgeon <td...@informaticsmatters.com> on 2007/07/25 12:23:57 UTC

DatabaseMetaData.getTables() problems for 10.3.1.3 with a 10.3.1.2 database

I'm seeing an exception for the DatabaseMetaData.getTables() method when 
using 10.3.1.3 with a database that has been upgraded to 10.3.1.2.
10.2 databases that have not been upgraded seem to be OK.

Tim

Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
Connection con = 
DriverManager.getConnection("jdbc:derby:/path/to/somedb;upgrade=true", 
null, null);
DatabaseMetaData meta = con.getMetaData();
ResultSet rs = meta.getTables(null, "APP", null, null);



Exception in thread "main" java.sql.SQLException: The parameter position 
'4' is out of range.  The number of parameters for this prepared 
statement is '3'.
         at 
org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown 
Source)
         at 
org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
         at 
org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown 
Source)
         at 
org.apache.derby.impl.jdbc.EmbedResultSet.noStateChangeException(Unknown 
Source)
         at 
org.apache.derby.impl.jdbc.EmbedPreparedStatement.setString(Unknown Source)
         at 
org.apache.derby.impl.jdbc.EmbedDatabaseMetaData.getTables(Unknown Source)
         at derbytest.Main.main(Main.java:49)
Caused by: ERROR XCL13: The parameter position '4' is out of range.  The 
number of parameters for this prepared  statement is '3'.
         at 
org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
         at 
org.apache.derby.impl.sql.GenericParameterValueSet.checkPosition(Unknown 
Source)
         at 
org.apache.derby.impl.sql.GenericParameterValueSet.getParameterForSet(Unknown 
Source)
         ... 3 more


Re: DatabaseMetaData.getTables() problems for 10.3.1.3 with a 10.3.1.2 database

Posted by Tim Dudgeon <td...@informaticsmatters.com>.
Myrna van Lunteren wrote:
> If you upgrade that same 10.2 database directly to 10.3.1.3, which has
> DERBY-2896 fixed, do you see this problem?
No, as stated earlier 10.2 databases are no problem. Just the ones that 
have updated to 10.3.1.2 (I have not tested 10.3.1.1).

> 
> 10.3.1.1 and 10.3.1.2 are not official releases, and apart from the
> testing (I assume that's what you're doing, thanks!) should not be
> used.
Yes, I'm testing. Just eager for final 10.3 release before I can release!

> Note, that for 10.3.1.3 we also have a blocker issue, so that one's
> not the last of the 10.3 candidates...

:-(


> 
> Myrna
> 


Re: DatabaseMetaData.getTables() problems for 10.3.1.3 with a 10.3.1.2 database

Posted by Myrna van Lunteren <m....@gmail.com>.
If you upgrade that same 10.2 database directly to 10.3.1.3, which has
DERBY-2896 fixed, do you see this problem?

10.3.1.1 and 10.3.1.2 are not official releases, and apart from the
testing (I assume that's what you're doing, thanks!) should not be
used.
Note, that for 10.3.1.3 we also have a blocker issue, so that one's
not the last of the 10.3 candidates...

Myrna

Re: DatabaseMetaData.getTables() problems for 10.3.1.3 with a 10.3.1.2 database

Posted by Jørgen Løland <Jo...@Sun.COM>.
I see this as well. I created DERBY-2976 for it.

Tim Dudgeon wrote:
> I'm seeing an exception for the DatabaseMetaData.getTables() method when 
> using 10.3.1.3 with a database that has been upgraded to 10.3.1.2.
> 10.2 databases that have not been upgraded seem to be OK.
> 
> Tim
> 
> Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
> Connection con = 
> DriverManager.getConnection("jdbc:derby:/path/to/somedb;upgrade=true", 
> null, null);
> DatabaseMetaData meta = con.getMetaData();
> ResultSet rs = meta.getTables(null, "APP", null, null);
> 
> 
> 
> Exception in thread "main" java.sql.SQLException: The parameter position 
> '4' is out of range.  The number of parameters for this prepared 
> statement is '3'.
>         at 
> org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown 
> Source)
>         at 
> org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
>         at 
> org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown 
> Source)
>         at 
> org.apache.derby.impl.jdbc.EmbedResultSet.noStateChangeException(Unknown 
> Source)
>         at 
> org.apache.derby.impl.jdbc.EmbedPreparedStatement.setString(Unknown Source)
>         at 
> org.apache.derby.impl.jdbc.EmbedDatabaseMetaData.getTables(Unknown Source)
>         at derbytest.Main.main(Main.java:49)
> Caused by: ERROR XCL13: The parameter position '4' is out of range.  The 
> number of parameters for this prepared  statement is '3'.
>         at 
> org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
>         at 
> org.apache.derby.impl.sql.GenericParameterValueSet.checkPosition(Unknown 
> Source)
>         at 
> org.apache.derby.impl.sql.GenericParameterValueSet.getParameterForSet(Unknown 
> Source)
>         ... 3 more
> 
> 


-- 
Jørgen Løland