WLS 10.3: Character Data type in JPA Entities treated as Integer and throwing Data Type Mismatch Error.
Last updated on NOVEMBER 05, 2016
Applies to:
Oracle Weblogic Server - Version: 10.3Information in this document applies to any platform.
Symptoms
In Open JPA 'Character' is treated as Integer by EJB 3.0 implementation and throws Data Type mismatch error as below:Exception in thread "main" javax.ejb.EJBException: EJB Exception: ; nested exception is:
<openjpa-1.1.1-SNAPSHOT-r422266:891341 fatal user error> org.apache.openjpa.persistence.ArgumentException: "com.tekelec.gps.ias.nsp.sample.ejb3.entity.Person.sex" declares a column that is not compatible with the expected type "integer". Column details:
Full Name: TST_PERSON.SEX
Type: varchar
Size: 1
Default: null
Not Null: false
at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.unwrapRemoteException(RemoteBusinessIntfProxy.java:105)
at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:87)
at $Proxy0.addPerson(Unknown Source)
at com.tekelec.gps.ias.nsp.sample.ejb3.tests.integration.TestPersonService.addPersonwithCharDataType(TestPersonService.java:49)
at com.tekelec.gps.ias.nsp.sample.ejb3.tests.integration.TestPersonService.main(TestPersonService.java:54)
Caused by: <openjpa-1.1.1-SNAPSHOT-r422266:891341 fatal user error> org.apache.openjpa.persistence.ArgumentException:
<openjpa-1.1.1-SNAPSHOT-r422266:891341 fatal user error> org.apache.openjpa.persistence.ArgumentException: "com.tekelec.gps.ias.nsp.sample.ejb3.entity.Person.sex" declares a column that is not compatible with the expected type "integer". Column details:
Full Name: TST_PERSON.SEX
Type: varchar
Size: 1
Default: null
Not Null: false
at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.unwrapRemoteException(RemoteBusinessIntfProxy.java:105)
at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:87)
at $Proxy0.addPerson(Unknown Source)
at com.tekelec.gps.ias.nsp.sample.ejb3.tests.integration.TestPersonService.addPersonwithCharDataType(TestPersonService.java:49)
at com.tekelec.gps.ias.nsp.sample.ejb3.tests.integration.TestPersonService.main(TestPersonService.java:54)
Caused by: <openjpa-1.1.1-SNAPSHOT-r422266:891341 fatal user error> org.apache.openjpa.persistence.ArgumentException:
Changes
N/ACause
Sign In with your My Oracle Support account |
|
Don't have a My Oracle Support account? Click to get started |
My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms