ParameterMetaDataJdbc30Test fails with "'PMDD' is not recognized as a function 
or procedure"
--------------------------------------------------------------------------------------------

                 Key: DERBY-5159
                 URL: https://issues.apache.org/jira/browse/DERBY-5159
             Project: Derby
          Issue Type: Bug
          Components: Test
    Affects Versions: 10.8.0.0
            Reporter: Knut Anders Hatlen


Seen in nightly testing on Java 7:

http://dbtg.foundry.sun.com/derby/test/Daily/jvm1.7/testing/testlog/sol32/1085472-suitesAll_diff.txt

1) 
testParameterMetadataWithLITERALParameters(org.apache.derbyTesting.functionTests.tests.jdbcapi.ParameterMetaDataJdbc30Test)java.sql.SQLSyntaxErrorException:
 'PMDD' is not recognized as a function or procedure.
        at 
org.apache.derby.impl.jdbc.SQLExceptionFactory40.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.TransactionResourceImpl.handleException(Unknown 
Source)
        at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown 
Source)
        at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown 
Source)
        at org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(Unknown 
Source)
        at org.apache.derby.impl.jdbc.EmbedCallableStatement.<init>(Unknown 
Source)
        at org.apache.derby.impl.jdbc.EmbedCallableStatement20.<init>(Unknown 
Source)
        at org.apache.derby.impl.jdbc.EmbedCallableStatement30.<init>(Unknown 
Source)
        at org.apache.derby.impl.jdbc.EmbedCallableStatement40.<init>(Unknown 
Source)
        at org.apache.derby.jdbc.Driver40.newEmbedCallableStatement(Unknown 
Source)
        at org.apache.derby.impl.jdbc.EmbedConnection.prepareCall(Unknown 
Source)
        at org.apache.derby.impl.jdbc.EmbedConnection.prepareCall(Unknown 
Source)
        at 
org.apache.derbyTesting.junit.BaseJDBCTestCase.prepareCall(BaseJDBCTestCase.java:317)
        at 
org.apache.derbyTesting.functionTests.tests.jdbcapi.ParameterMetaDataJdbc30Test.testParameterMetadataWithLITERALParameters(ParameterMetaDataJdbc30Test.java:743)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at 
org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:112)
        at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
        at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
        at junit.extensions.TestSetup.run(TestSetup.java:25)
        at 
org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
Caused by: java.sql.SQLException: 'PMDD' is not recognized as a function or 
procedure.
        at 
org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
        at 
org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown
 Source)
        ... 47 more
Caused by: ERROR 42Y03: 'PMDD' is not recognized as a function or procedure.
        at org.apache.derby.iapi.error.StandardException.newException(Unknown 
Source)
        at 
org.apache.derby.impl.sql.compile.StaticMethodCallNode.bindExpression(Unknown 
Source)
        at 
org.apache.derby.impl.sql.compile.JavaToSQLValueNode.bindExpression(Unknown 
Source)
        at 
org.apache.derby.impl.sql.compile.CallStatementNode.bindStatement(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.conn.GenericLanguageConnectionContext.prepareInternalStatement(Unknown
 Source)
        ... 41 more

Looks like a problem with the ordering of the test cases. 
testParameterMetadataWithDECIMALParameters() creates the procedure PMDD, and 
testParameterMetadataWithLITERALParameters() calls it and drops it. If the test 
cases run in the opposite order, testParameterMetadataWithLITERALParameters() 
cannot find the procedure and fails.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to