Dear OpenJPA Dev Team,

I am getting this exception <https://raw.github.com/kwrobel/OpenJPA-IntExceptionTest/master/OpenJPA-IntExceptionTest/DiscountCode-Exception.txt> while reading a simple entity DiscountCode from a Derby database called SAMPLE (ships with Glassfish/NetBeans) called DISCOUNT_CODE that has only two fields:

1. DISCOUNT_CODE  CHAR(1) NOT NULL PRIMARY KEY
2. RATE DECIMAL(4,2) NULL

DISCOUNT_CODE maps to type "Character" and RATE maps to "BigDecimal". I set up a Github <https://github.com/kwrobel/OpenJPA-IntExceptionTest> with a small test project. It's really small and concise. All you need to run this is a running Derby Network server with the SAMPLE database (included on the github), the latest OpenJPA library (I tested so far: 2.2.0 shipping with TomEE 1.5.2, 2.2.2 from the main project page, and 2.3.0-SNAPSHOT), the derby client driver (derby.jar, derbyclient.jar, derbynet.jar from the main Apache Derby distribution) and that's it.

The curious part is that the field DiscountCode, though a char field, contains numeric, integer values. Mark Struberg seems to have a hunch already of what is going on and is able to add some more insight.

Any input on this is greatly appreciated.

Regards,

Kay Wrobel

Reply via email to