db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bob Durie" <bob.du...@thirdbrigade.com>
Subject "Syntax error" on some derby metadata calls
Date Thu, 22 Mar 2007 15:42:11 GMT
Hi,

 

I've searched for this issue on jira with no luck, posting here in hopes
someone has seen it or knows where it might be coming from.

 

What I'm seeing is that "sometimes" during a schema upgrade of our
database, the getImportedKeys or getPrimaryKeys methods of
EmbedDatabaseMetaData fail with syntax errors (see the stack trace
below).  If we rollback the transaction, try again, it is ALWAYS
successful, but may fail later on when we do a similar operation with
another table.  Hence, we have a workaround (try again), but it doesn't
leave me feeling very confident.

 

I do not yet have a working test case as this issue only happens when
our database is in some bizarre and not easily reproducible state, but I
thought I'd toss it here to see if anyone has seen it:

 

ERROR 42X01: Syntax error:
org.apache.derby.catalog.IndexDescriptor.getKeyColumnPosition.
    at
org.apache.derby.iapi.error.StandardException.newException(Unknown
Source)
    at
org.apache.derby.impl.sql.compile.MethodCallNode.resolveMethodCall(Unkno
wn Source)
    at
org.apache.derby.impl.sql.compile.NonStaticMethodCallNode.bindExpression
(Unknown Source)
    at
org.apache.derby.impl.sql.compile.JavaToSQLValueNode.bindExpression(Unkn
own Source)
    at
org.apache.derby.impl.sql.compile.ResultColumn.bindExpression(Unknown
Source)
    at
org.apache.derby.impl.sql.compile.ResultColumnList.bindExpressions(Unkno
wn Source)
    at
org.apache.derby.impl.sql.compile.SelectNode.bindExpressions(Unknown
Source)
    at
org.apache.derby.impl.sql.compile.FromSubquery.bindExpressions(Unknown
Source)
    at
org.apache.derby.impl.sql.compile.FromList.bindExpressions(Unknown
Source)
    at
org.apache.derby.impl.sql.compile.SelectNode.bindExpressions(Unknown
Source)
    at
org.apache.derby.impl.sql.compile.DMLStatementNode.bindExpressions(Unkno
wn Source)
    at org.apache.derby.impl.sql.compile.DMLStatementNode.bind(Unknown
Source)
    at org.apache.derby.impl.sql.compile.CursorNode.bind(Unknown Source)
    at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknown
Source)
    at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown
Source)
    at
org.apache.derby.impl.sql.GenericPreparedStatement.makeValid(Unknown
Source)
    at
org.apache.derby.impl.sql.GenericPreparedStatement.rePrepare(Unknown
Source)
    at
org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown
Source)
    at
org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown
Source)
    at
org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(Unkno
wn Source)
    at
org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeQuery(Unknown
Source)
    at
org.apache.derby.impl.jdbc.EmbedDatabaseMetaData.getImportedKeys(Unknown
Source)

 

One thing to note is that the process in our application calls the
"connection.getMetaData" many many times, makes updates to the schema,
and calls it again many times on the same transaction.  While not
necessarily efficient, I'm reluctant to change it as I want to know the
source of the problem first.

 

Thanks,

Bob


Mime
View raw message