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 "Rick Hillegas (JIRA)" <ji...@apache.org> on 2012/10/16 18:21:02 UTC

[jira] [Updated] (DERBY-5951) Missing method exception raised when using Clobs with territory based collation

     [ https://issues.apache.org/jira/browse/DERBY-5951?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rick Hillegas updated DERBY-5951:
---------------------------------

    Attachment: derby-5951-01-aa-addMissingMethod.diff

Attaching derby-5951-01-aa-addMissingMethod.diff. This patches adds the missing method. I am running regression tests now.


Touches the following files:

--------------

M       java/engine/org/apache/derby/iapi/types/CollatorSQLClob.java
M       java/engine/org/apache/derby/iapi/types/DataValueFactoryImpl.java
M       java/engine/org/apache/derby/iapi/types/DataValueFactory.java

Add the missing method.

--------------

M       java/testing/org/apache/derbyTesting/functionTests/tests/lang/CollationTest.java

Add test case for this bug.

                
> Missing method exception raised when using Clobs with territory based collation
> -------------------------------------------------------------------------------
>
>                 Key: DERBY-5951
>                 URL: https://issues.apache.org/jira/browse/DERBY-5951
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.10.0.0
>            Reporter: Rick Hillegas
>            Assignee: Rick Hillegas
>         Attachments: derby-5951-01-aa-addMissingMethod.diff
>
>
> When using territory-based collation with Clobs, Derby raises an error trying to invoke a missing method. The following script shows this problem:
> connect 'jdbc:derby:memory:db;create=true;collation=TERRITORY_BASED';
> create function makeClob( contents varchar( 32672 ) ) returns clob
> language java parameter style java no sql deterministic
> external name 'org.apache.derbyTesting.functionTests.tests.lang.UserDefinedAggregatesTest.makeClob';
> create table clobTable( a clob );
> -- fails with a java.lang.NoSuchMethodError exception
> insert into clobTable( a ) values ( makeClob( 'a' ) );
> connect 'jdbc:derby:memory:db1;create=true';
> create function makeClob( contents varchar( 32672 ) ) returns clob
> language java parameter style java no sql deterministic
> external name 'org.apache.derbyTesting.functionTests.tests.lang.UserDefinedAggregatesTest.makeClob';
> create table clobTable( a clob );
> -- succeeds
> insert into clobTable( a ) values ( makeClob( 'a' ) );
> Here is the error:
> ERROR 38000: The exception 'java.lang.NoSuchMethodError: org.apache.derby.iapi.types.DataValueFactory.getClobDataValue(Ljava/sql/Clob;Lorg/apache/derby/iapi/types/StringDataValue;I)Lorg/apache/derby/iapi/types/StringDataValue;' was thrown while evaluating an expression.
> ERROR XJ001: Java exception: 'org.apache.derby.iapi.types.DataValueFactory.getClobDataValue(Ljava/sql/Clob;Lorg/apache/derby/iapi/types/StringDataValue;I)Lorg/apache/derby/iapi/types/StringDataValue;: java.lang.NoSuchMethodError'.
> ...and here is the stack trace:
> Tue Oct 16 08:27:23 PDT 2012 Thread[main,5,main] (XID = 172), (SESSIONID = 1), (DATABASE = memory:db), (DRDAID = null), Failed Statement is: -- fails with a java.lang.NoSuchMethodError exception
> insert into clobTable( a ) values ( makeClob( 'a' ) )
> ERROR 38000: The exception 'java.lang.NoSuchMethodError: org.apache.derby.iapi.types.DataValueFactory.getClobDataValue(Ljava/sql/Clob;Lorg/apache/derby/iapi/types/StringDataValue;I)Lorg/apache/derby/iapi/types/StringDataValue;' was thrown while evaluating an expression.
> 	at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
> 	at org.apache.derby.iapi.error.StandardException.unexpectedUserException(Unknown Source)
> 	at org.apache.derby.impl.services.reflect.DirectCall.invoke(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.RowResultSet.getNextRowCore(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.DMLWriteResultSet.getNextRowCore(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.InsertResultSet.open(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(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.EmbedStatement.execute(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.ij.executeImmediate(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.utilMain.doCatch(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.utilMain.runScriptGuts(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.utilMain.go(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.go(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.mainCore(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.main(Unknown Source)
> 	at org.apache.derby.tools.ij.main(Unknown Source)
> Caused by: java.lang.NoSuchMethodError: org.apache.derby.iapi.types.DataValueFactory.getClobDataValue(Ljava/sql/Clob;Lorg/apache/derby/iapi/types/StringDataValue;I)Lorg/apache/derby/iapi/types/StringDataValue;
> 	at org.apache.derby.exe.ace50d80a4x013ax6a2fxb54bx00000467ed600.e0(Unknown Source)
> 	... 17 more

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira