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 "Martin Backhaus (JIRA)" <ji...@apache.org> on 2006/11/03 12:52:18 UTC

[jira] Created: (DERBY-2039) cant get CHAR from Character

cant get CHAR from Character
----------------------------

                 Key: DERBY-2039
                 URL: http://issues.apache.org/jira/browse/DERBY-2039
             Project: Derby
          Issue Type: Bug
          Components: Miscellaneous
    Affects Versions: 10.2.1.6
            Reporter: Martin Backhaus
            Priority: Minor


Derby is unable to convert form Character to CHAR. Im using Hibernate 3.2. The code works fine with MySQL and HSQLDB.

Caused by: java.sql.SQLException: An attempt was made to get a data value of type 'CHAR' from a data value of type 'java.lang.Character'.
	at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
	at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
	at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
	at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedConnection.newSQLException(Unknown Source)
	at org.apache.derby.impl.jdbc.ConnectionChild.newSQLException(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedPreparedStatement.dataTypeConversion(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedPreparedStatement.setObject(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedPreparedStatement.setObject(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedPreparedStatement.setObject(Unknown Source)
	at de.kontorist.db.KontoristEnum.nullSafeSet(KontoristEnum.java:334)
	at org.hibernate.type.CustomType.nullSafeSet(CustomType.java:146)
	at org.hibernate.persister.entity.AbstractEntityPersister.dehydrate(AbstractEntityPersister.java:1932)
	at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2178)
	... 22 more

-- 
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

        

[jira] Updated: (DERBY-2039) cant get CHAR from Character

Posted by "Bernt M. Johnsen (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-2039?page=all ]

Bernt M. Johnsen updated DERBY-2039:
------------------------------------

     Issue Type: Wish  (was: Bug)
    Component/s: JDBC
                     (was: Miscellaneous)

Although it would be nice to do setObject(i, java.lang.Character) and a CHAR column, this is not a bug. Derby behaves according to spec.

> cant get CHAR from Character
> ----------------------------
>
>                 Key: DERBY-2039
>                 URL: http://issues.apache.org/jira/browse/DERBY-2039
>             Project: Derby
>          Issue Type: Wish
>          Components: JDBC
>    Affects Versions: 10.2.1.6
>            Reporter: Martin Backhaus
>            Priority: Minor
>
> Derby is unable to convert form Character to CHAR. Im using Hibernate 3.2. The code works fine with MySQL and HSQLDB.
> Caused by: java.sql.SQLException: An attempt was made to get a data value of type 'CHAR' from a data value of type 'java.lang.Character'.
> 	at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
> 	at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
> 	at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
> 	at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedConnection.newSQLException(Unknown Source)
> 	at org.apache.derby.impl.jdbc.ConnectionChild.newSQLException(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedPreparedStatement.dataTypeConversion(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedPreparedStatement.setObject(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedPreparedStatement.setObject(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedPreparedStatement.setObject(Unknown Source)
> 	at de.kontorist.db.KontoristEnum.nullSafeSet(KontoristEnum.java:334)
> 	at org.hibernate.type.CustomType.nullSafeSet(CustomType.java:146)
> 	at org.hibernate.persister.entity.AbstractEntityPersister.dehydrate(AbstractEntityPersister.java:1932)
> 	at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2178)
> 	... 22 more

-- 
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