Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] java.lang.ClassCastException: java.lang.Boolean cannot be cast to java.lang.Short

Our DDL Generation uses SMALLINT DEFAULT 0. That worked up until the most recent version. I believe this bug should be initially persued with Derby because this is a regression on their part.

Michael Norman wrote:
According to the Derby docs, the proper DDL artifact for java.lang.Boolean is "CHAR(1) FOR BIT DATA".

Tom - do we handle that in our DDL generation?
---
Mike Norman

On 22/09/2011 10:23 AM, Tom Ware wrote:
Hi Warren,

  I think this is a Derby bug.  I ran this code (JDBC only):

String statementString = "INSERT INTO BOOK (ID, ILLUSTRATIONS) VALUES (?, ?)"; PreparedStatement statement = connection.prepareStatement(statementString);
          statement.setInt(1, 1);
          statement.setBoolean(2, false);
          statement.executeUpdate();

And I get the same error.

-Tom


Warren Tang wrote:
Both the server and the embedded mode throw the same error. Seems to be a regression.

Regards,
Warren Tang <http://blog.tangcs.com>


On Thursday, September 22, 2011 3:07:22 AM, Tom Ware wrote:
Are you running the embedded version of derby or the client-server version? If you're running the client-server version, are you sure the jdbc jar and the
server version are a match?

-Tom

Warren Tang wrote:
Finally found the cause. It's related to the version of Derby. Once I change the version from the latest 10.8.1.2 back to 10.4.2.0, the error goes away.

Regards,
Warren Tang <http://blog.tangcs.com>


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

_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users

_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users


Back to the top