db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tomohito Nakayama (JIRA)" <derby-...@db.apache.org>
Subject [jira] Updated: (DERBY-1610) Resolve difference of type compatibility between Embedded and NetworkServer/NetworkDriver
Date Mon, 18 Sep 2006 07:00:24 GMT
     [ http://issues.apache.org/jira/browse/DERBY-1610?page=all ]

Tomohito Nakayama updated DERBY-1610:
-------------------------------------

    Attachment: TestTypeCompatibility.java

Through examing the patch.
I found a problem that Engine throw exception of XCL12 when String typed value is passed to
BLOB typed variable though the patch throw exception of 22005 .

Exceptions found in my environment using TestTypeCompatiblity.java are as next.

naka@rufelza:~/derby/wok/20060918$ javac TestTypeCompatibility.java
naka@rufelza:~/derby/wok/20060918$ java TestTypeCompatibility embedded
streamAsNull:
ERROR XCL12: An attempt was made to put a data value of type 'java.lang.String' into a data
value of type 'BLOB'.
	at org.apache.derby.iapi.error.StandardException.newException(StandardException.java:316)
	at org.apache.derby.iapi.types.DataType.throwLangSetMismatch(DataType.java:601)
	at org.apache.derby.iapi.types.DataType.setValue(DataType.java:343)
	at org.apache.derby.impl.jdbc.EmbedPreparedStatement.setString(EmbedPreparedStatement.java:492)
	at TestTypeCompatibility.update(TestTypeCompatibility.java:71)
	at TestTypeCompatibility.main(TestTypeCompatibility.java:45)
java.sql.SQLException: Invalid cursor state - no current row.
	at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:45)
	at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java:89)
	at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java:105)
	at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Util.java:169)
	at org.apache.derby.impl.jdbc.EmbedConnection.newSQLException(EmbedConnection.java:1982)
	at org.apache.derby.impl.jdbc.ConnectionChild.newSQLException(ConnectionChild.java:148)
	at org.apache.derby.impl.jdbc.EmbedResultSet.checkOnRow(EmbedResultSet.java:326)
	at org.apache.derby.impl.jdbc.EmbedResultSet.getColumn(EmbedResultSet.java:4408)
	at org.apache.derby.impl.jdbc.EmbedResultSet.getString(EmbedResultSet.java:681)
	at TestTypeCompatibility.update(TestTypeCompatibility.java:92)
	at TestTypeCompatibility.main(TestTypeCompatibility.java:45)
naka@rufelza:~/derby/wok/20060918$ 

I'm thinking revive PreparedStatement.throwLangDataTypeSetException method which is commented
out in the patch, and use it to throw exception of XCL12 in this case.

> Resolve difference of type compatibility between Embedded and NetworkServer/NetworkDriver
> -----------------------------------------------------------------------------------------
>
>                 Key: DERBY-1610
>                 URL: http://issues.apache.org/jira/browse/DERBY-1610
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Server, Network Client
>            Reporter: Tomohito Nakayama
>         Assigned To: Tomohito Nakayama
>         Attachments: DERBY-1610.diff, DERBY-1610_2.diff, DERBY-1610_3.diff, DERBY-1610_4.diff,
DERBY-1610_5.diff, parameterMapping.diff, parameterMapping.diff, parameterMapping.diff.betweenEmbedded_and_NetworkServerNetworkClient,
parameterMapping_3.diff, TestNullChar.java, TestTypeCompatibility.java, XCL12.diff
>
>
> There exists difference of type compatibility between  Embedded and NetworkServer/NetworkClient.
> This issue tries to resolve it.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message