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 "Kathey Marsden (JIRA)" <ji...@apache.org> on 2007/05/16 21:33:16 UTC

[jira] Updated: (DERBY-2659) CONSTANT_Utf8_info: java.lang.ClassCastException on select with a collated database

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

Kathey Marsden updated DERBY-2659:
----------------------------------

    Attachment: castexception.sql

script to reproduce the issue

> CONSTANT_Utf8_info: java.lang.ClassCastException on select with a collated database
> -----------------------------------------------------------------------------------
>
>                 Key: DERBY-2659
>                 URL: https://issues.apache.org/jira/browse/DERBY-2659
>             Project: Derby
>          Issue Type: Bug
>          Components: Services, SQL
>    Affects Versions: 10.3.0.0
>            Reporter: Kathey Marsden
>         Attachments: castexception.sql
>
>
> Creating a table with Norwegian territory causes a ClassCastException on a select.
> I found this when trying to run lang/SimpleTest.java with a collated database.
>  
> ij> connect 'jdbc:derby:wombat;create=true;collation=TERRITORY_BASED;territory=no';
> ij> create table b (si smallint,i int, bi bigint, r real, f float, d double precision, n5_2 numeric(5,2), dec10_3 decima
> l(10,3), ch20 char(20),vc varchar(20), lvc long varchar, blobCol blob(1000),  clobCol clob(1000));
> 0 rows inserted/updated/deleted
> ij> insert into b values(2,3,4,5.3,5.3,5.3,31.13,123456.123, 'one','one','one',cast(X'01ABCD' as blob(1000)),'one');
> 1 row inserted/updated/deleted
> ij> select * from b;
> ERROR XJ001: Java exception: 'org.apache.derby.iapi.services.classfile.CONSTANT_Utf8_info: java.lang.ClassCastException'
> .
> java.sql.SQLException: Java exception: 'org.apache.derby.iapi.services.classfile.CONSTANT_Utf8_info: java.lang.ClassCast
> Exception'.
>         at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:45)
>         at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java:88)
>         at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java:99)
>         at org.apache.derby.impl.jdbc.Util.javaException(Util.java:234)
>         at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java:386)
>         at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(TransactionResourceImpl.java:345)
>         at org.apache.derby.impl.jdbc.EmbedConnection.handleException(EmbedConnection.java:1549)
>         at org.apache.derby.impl.jdbc.ConnectionChild.handleException(ConnectionChild.java:81)
>         at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:585)
>         at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:528)
>         at org.apache.derby.impl.tools.ij.ij.executeImmediate(ij.java:330)
>         at org.apache.derby.impl.tools.ij.utilMain.doCatch(utilMain.java:531)
>         at org.apache.derby.impl.tools.ij.utilMain.runScriptGuts(utilMain.java:376)
>         at org.apache.derby.impl.tools.ij.utilMain.go(utilMain.java:271)
>         at org.apache.derby.impl.tools.ij.Main.go(Main.java:215)
>         at org.apache.derby.impl.tools.ij.Main.mainCore(Main.java:181)
>         at org.apache.derby.impl.tools.ij.Main14.main(Main14.java:56)
>         at org.apache.derby.tools.ij.main(ij.java:71)
> Caused by: java.lang.ClassCastException: org.apache.derby.iapi.services.classfile.CONSTANT_Utf8_info
>         at org.apache.derby.impl.services.bytecode.CodeChunk.getTypeDescriptor(CodeChunk.java:1011)
>         at org.apache.derby.impl.services.bytecode.CodeChunk.getVariableStackDelta(CodeChunk.java:1059)
>         at org.apache.derby.impl.services.bytecode.CodeChunk.stackWordDelta(CodeChunk.java:992)
>         at org.apache.derby.impl.services.bytecode.CodeChunk.findMaxStack(CodeChunk.java:954)
>         at org.apache.derby.impl.services.bytecode.CodeChunk.complete(CodeChunk.java:810)
>         at org.apache.derby.impl.services.bytecode.BCMethod.complete(BCMethod.java:241)
>         at org.apache.derby.impl.sql.compile.ResultColumnList.generateHolderMethod(ResultColumnList.java:1477)
>         at org.apache.derby.impl.sql.compile.FromBaseTable.getScanArguments(FromBaseTable.java:3399)
>         at org.apache.derby.impl.sql.compile.FromBaseTable.generateResultSet(FromBaseTable.java:3135)
>         at org.apache.derby.impl.sql.compile.FromBaseTable.generate(FromBaseTable.java:3062)
>         at org.apache.derby.impl.sql.compile.ProjectRestrictNode.generateMinion(ProjectRestrictNode.java:1351)
>         at org.apache.derby.impl.sql.compile.ProjectRestrictNode.generate(ProjectRestrictNode.java:1302)
>         at org.apache.derby.impl.sql.compile.ProjectRestrictNode.generateMinion(ProjectRestrictNode.java:1351)
>         at org.apache.derby.impl.sql.compile.ProjectRestrictNode.generate(ProjectRestrictNode.java:1302)
>         at org.apache.derby.impl.sql.compile.ScrollInsensitiveResultSetNode.generate(ScrollInsensitiveResultSetNode.java
> :109)
>         at org.apache.derby.impl.sql.compile.CursorNode.generate(CursorNode.java:564)
>         at org.apache.derby.impl.sql.compile.StatementNode.generate(StatementNode.java:347)
>         at org.apache.derby.impl.sql.GenericStatement.prepMinion(GenericStatement.java:447)
>         at org.apache.derby.impl.sql.GenericStatement.prepare(GenericStatement.java:88)
>         at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(GenericLanguageConne
> ctionContext.java:742)
>         at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:579)
>         ... 9 more
> ij>

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