db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Myrna van Lunteren (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-3057) with weme 6.1 testTableFunctions(org.apache.derbyTesting.functionTests.tests.lang.TableFunctionTest) failed: java.lang.NoSuchMethodError: java/lang/String.matches(Ljava/lang/String;)Z
Date Thu, 06 Sep 2007 23:05:28 GMT

    [ https://issues.apache.org/jira/browse/DERBY-3057?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12525550
] 

Myrna van Lunteren commented on DERBY-3057:
-------------------------------------------

I prodded this a little, and modified the method 'equals()' in JDBC$GeneratedID to look like
this:

-------------
        public boolean equals(Object o) {
        // unless JSR169, use String.matches...
        	if (JDBC.vmSupportsJDBC3()) 
        	{
        		return o instanceof String &&
        		((String) o).matches("SQL[0-9]{15}");
        	}
        	else
        	{
        		String tmpstr = (String)o;
        		boolean b = true;
        		if (!(o instanceof String))
        			b = false;
        		if (!(tmpstr.startsWith("SQL")))
        			b = false;
        		if (tmpstr.length() != 18)
        			b = false;
        		for (int i=3 ; i<18 ; i++)
        		{
        			if (Character.isDigit(tmpstr.charAt(i)))
        				continue;
        			else
        			{
        				b = false;
        				break;
        			}
        		}
        		return b;
        	}
        }
-------------------------------------

And that does get around the problem that matches() is not available with JSR169.

However, I then get the following stack trace upon running the test:

-------------------------------------
.java.sql.SQLException: Feature not implemented: {0}.
	at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:45)
	at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Util.java:202)
	at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java:391)
	at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(TransactionResourceImpl.java:346)
	at org.apache.derby.impl.jdbc.EmbedConnection.handleException(EmbedConnection.java:1572)
	at org.apache.derby.impl.jdbc.ConnectionChild.handleException(ConnectionChild.java:81)
	at org.apache.derby.impl.jdbc.EmbedResultSet.closeOnTransactionError(EmbedResultSet.java:4320)
	at org.apache.derby.impl.jdbc.EmbedResultSet.movePosition(EmbedResultSet.java:464)
	at org.apache.derby.impl.jdbc.EmbedResultSet.next(EmbedResultSet.java:368)
	at org.apache.derbyTesting.functionTests.tests.lang.TableFunctionTest.assertResults(TableFunctionTest.java:1245)
	at org.apache.derbyTesting.functionTests.tests.lang.TableFunctionTest.assertResults(TableFunctionTest.java:1070)
	at org.apache.derbyTesting.functionTests.tests.lang.TableFunctionTest.allLegalDatatypesVTIResults(TableFunctionTest.java:986)
	at org.apache.derbyTesting.functionTests.tests.lang.TableFunctionTest.testTableFunctions(TableFunctionTest.java:786)
	at java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:205)
	at java.lang.reflect.Method.invoke(Method.java:253)
	at junit.framework.TestCase.runTest(TestCase.java:154)
	at junit.framework.TestCase.runBare(TestCase.java:127)
	at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:95)
	at junit.framework.TestResult$1.protect(TestResult.java:106)
	at junit.framework.TestResult.runProtected(TestResult.java:124)
	at junit.framework.TestResult.run(TestResult.java:109)
	at junit.framework.TestCase.run(TestCase.java:118)
	at junit.framework.TestSuite.runTest(TestSuite.java:208)
	at junit.framework.TestSuite.run(TestSuite.java:203)
	at junit.textui.TestRunner.doRun(TestRunner.java:116)
	at junit.textui.TestRunner.start(TestRunner.java:172)
	at junit.textui.TestRunner.main(TestRunner.java:138)
Caused by: ERROR 0A000: Feature not implemented: {0}.
	at org.apache.derby.iapi.error.StandardException.newException(StandardException.java:280)
	at org.apache.derby.iapi.types.BinaryDecimal.setValueFromResultSet(BinaryDecimal.java:690)
	at org.apache.derby.impl.sql.execute.VTIResultSet.populateFromResultSet(VTIResultSet.java:559)
	at org.apache.derby.impl.sql.execute.VTIResultSet.getNextRowCore(VTIResultSet.java:335)
	at org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.getNextRow(BasicNoPutResultSetImpl.java:463)
	at org.apache.derby.impl.jdbc.EmbedResultSet.movePosition(EmbedResultSet.java:424)
	... 19 more
And:
F
Time: 2.75
There was 1 failure:
1) testTableFunctions(org.apache.derbyTesting.functionTests.tests.lang.TableFunctionTest)junit.framework.AssertionFailedError:
Unexpected exception: java.sql.SQLException: Feature not implemented: {0}.
	at org.apache.derbyTesting.functionTests.tests.lang.TableFunctionTest.unexpectedThrowable(TableFunctionTest.java:1446)
	at org.apache.derbyTesting.functionTests.tests.lang.TableFunctionTest.assertResults(TableFunctionTest.java:1077)
	at org.apache.derbyTesting.functionTests.tests.lang.TableFunctionTest.allLegalDatatypesVTIResults(TableFunctionTest.java:986)
	at org.apache.derbyTesting.functionTests.tests.lang.TableFunctionTest.testTableFunctions(TableFunctionTest.java:786)
	at java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:205)
	at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:95)

Are the VTI's even supposed to work with JSR169? 


> with weme 6.1 testTableFunctions(org.apache.derbyTesting.functionTests.tests.lang.TableFunctionTest)
failed: java.lang.NoSuchMethodError: java/lang/String.matches(Ljava/lang/String;)Z
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-3057
>                 URL: https://issues.apache.org/jira/browse/DERBY-3057
>             Project: Derby
>          Issue Type: Bug
>          Components: Regression Test Failure
>    Affects Versions: 10.4.0.0
>            Reporter: Kathey Marsden
>
> testTableFunctions(org.apache.derbyTesting.functionTests.tests.lang.TableFunctionTest)
failed:
> java.lang.NoSuchMethodError: java/lang/String.matches(Ljava/lang/String;)Z
> 	at org.apache.derbyTesting.junit.JDBC$GeneratedId.equals(JDBC.java:49)
> 	at org.apache.derbyTesting.junit.JDBC.assertRowInResultSet(JDBC.java:871)
> 	at org.apache.derbyTesting.junit.JDBC.assertFullResultSet(JDBC.java:779)
> 	at org.apache.derbyTesting.junit.JDBC.assertFullResultSet(JDBC.java:717)
> 	at org.apache.derbyTesting.functionTests.tests.lang.TableFunctionTest.assertFunctionDBMD(TableFunctionTest.java:1154)
> 	at org.apache.derbyTesting.functionTests.tests.lang.TableFunctionTest.simpleDDL(TableFunctionTest.java:888)
> 	at org.apache.derbyTesting.functionTests.tests.lang.TableFunctionTest.testTableFunctions(TableFunctionTest.java:782)
> 	at java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:205)
> 	at java.lang.reflect.Method.invoke(Method.java:253)
> 	at junit.framework.TestCase.runTest(TestCase.java:154)
> 	at junit.framework.TestCase.runBare(TestCase.java:127)
> 	at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:95)
> 	at junit.framework.TestResult$1.protect(TestResult.java:106)
> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
> 	at junit.framework.TestResult.run(TestResult.java:109)
> 	at junit.framework.TestCase.run(TestCase.java:118)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:208)
> 	at junit.framework.TestSuite.run(TestSuite.java:203)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:208)
> 	at junit.framework.TestSuite.run(TestSuite.java:203)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:208)
> 	at junit.framework.TestSuite.run(TestSuite.java:203)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:208)
> 	at junit.framework.TestSuite.run(TestSuite.java:203)
> 	at TimeRunner.main(TimeRunner.java:31)
> 47	testTableFunctions(org.apache.derbyTesting.functionTests.tests.lang.TableFunctionTest)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message