Rick Hillegas created DERBY-5951:
------------------------------------
Summary: 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
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