Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0.0
-
None
-
None
Description
OpenJPA is not mapping reserved words correctly in some cases. Particularly, the use of the reserved word/data type "NUMBER" is causing issues when the jUnit suite on Oracle. The problem is more prevalent when using JDK 5. Here is an exception and partial stack from one of the failures:
TestMappedById.testMappedById1 View test details (org.apache.openjpa.persistence.enhance.identity)
<openjpa-2.0.0-SNAPSHOT-runknown nonfatal general error> org.apache.openjpa.persistence.PersistenceException: Column, parameter, or variable #4: Cannot find data type OTHER.
at org.apache.openjpa.jdbc.meta.MappingTool.record(MappingTool.java:553)
at org.apache.openjpa.jdbc.meta.MappingTool.record(MappingTool.java:453)
Please wait... Show stacktrace »
« Hide stacktrace
<openjpa-2.0.0-SNAPSHOT-runknown nonfatal general error> org.apache.openjpa.persistence.PersistenceException: Column, parameter, or variable #4: Cannot find data type OTHER. {stmnt 10310962 CREATE TABLE EMP_MBI (empId INT NOT NULL, empType SMALLINT NOT NULL, PHONENUMBER_PHNUMBER INT, PHONENUMBER_NUMBER OTHER, PRIMARY KEY (empId, empType))}
[code=2715, state=S0007]
at org.apache.openjpa.jdbc.meta.MappingTool.record(MappingTool.java:553)
at org.apache.openjpa.jdbc.meta.MappingTool.record(MappingTool.java:453)
at org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.synchronizeMappings(JDBCBrokerFactory.java:158)
at org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.synchronizeMappings(JDBCBrokerFactory.java:162)
at org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.newBrokerImpl(JDBCBrokerFactory.java:118)
at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:201)
at org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:152)
at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:199)
at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:150)
at org.apache.openjpa.persistence.enhance.identity.TestMappedById.createObj1(TestMappedById.java:191)
at org.apache.openjpa.persistence.enhance.identity.TestMappedById.testMappedById1(TestMappedById.java:97)
Attachments
Issue Links
- duplicates
-
OPENJPA-2182 DB dictionaries do not properly process reserved words for column names
- Closed