You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Catalina Wei (JIRA)" <ji...@apache.org> on 2010/01/15 03:50:54 UTC
[jira] Created: (OPENJPA-1461) Incorrect Oracle CREATE TABLE DDL
for XML column
Incorrect Oracle CREATE TABLE DDL for XML column
------------------------------------------------
Key: OPENJPA-1461
URL: https://issues.apache.org/jira/browse/OPENJPA-1461
Project: OpenJPA
Issue Type: Bug
Components: jdbc
Affects Versions: 2.0.0
Reporter: Catalina Wei
Assignee: Catalina Wei
A regression is found that the DDL for XML type is incorrectly generated for Oracle backend as:
CREATE TABLE abc (id string, .... xmldata XMLType(255))
correct DDL for xmldata should be
CREATE TABLE abc(id string, ... xmldata XMLType)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
Re: [jira] Commented: (OPENJPA-1461) Incorrect Oracle CREATE TABLE
DDL for XML column
Posted by catalina wei <ca...@gmail.com>.
Hi Milosz,
Yes, it was an oversight,
I should not have checked in TestUpdateWithSubSelect change under
OPENJPA-1461;
it has nothing to do with XML column mapping.
This is a failure seen when running mvn test for Oracle.
There are still 3 outstanding failures for Oracle:
*TestDetachNoStateField.testIsDetchedNoStateManagerZeroVersionField
**TestDetachNoStateField.testPersistRelationshipToDetchedEntityZeroVersion
**TestTypesafeCriteria.testCurrentTimeReturnsSQLTypes
(org.apache.openjpa.persistence.criteria) * <openjpa-2.0.0-SNAPSHOT-rexported
fatal store error> org.apache.openjpa.persistence.RollbackException: The
transaction has been rolled back.I will open a new JIRA issue for the above
failures.
Catalina
On Fri, Jan 15, 2010 at 11:50 AM, Milosz Tylenda (JIRA) <ji...@apache.org>wrote:
>
> [
> https://issues.apache.org/jira/browse/OPENJPA-1461?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12800882#action_12800882]
>
> Milosz Tylenda commented on OPENJPA-1461:
> -----------------------------------------
>
> Hi Catalina, I am wondering whether your commit to
> TestUpdateWithSubSelect.java is related to the fix or an oversight?
>
>
> > Incorrect Oracle CREATE TABLE DDL for XML column
> > ------------------------------------------------
> >
> > Key: OPENJPA-1461
> > URL: https://issues.apache.org/jira/browse/OPENJPA-1461
> > Project: OpenJPA
> > Issue Type: Bug
> > Components: jdbc
> > Affects Versions: 2.0.0
> > Reporter: Catalina Wei
> > Assignee: Catalina Wei
> > Fix For: 2.0.0
> >
> >
> > A regression is found that the DDL for XML type is incorrectly generated
> for Oracle backend.
> > <openjpa-2.0.0-SNAPSHOT-rexported nonfatal general error>
> org.apache.openjpa.persistence.PersistenceException: ORA-00907: missing
> right parenthesis
> > {stmnt 562241923 CREATE TABLE TORDER (oid NUMBER NOT NULL, amount
> NUMBER, delivered NUMBER, shipAddress XMLType(255), version NUMBER,
> CUSTOMER_COUNTRYCODE VARCHAR2(255), CUSTOMER_ID NUMBER, PRIMARY KEY (oid))}
> [code=907, state=42000]
> > 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:155)
> > at
> org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.synchronizeMappings(JDBCBrokerFactory.java:159)
> > at
> org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.newBrokerImpl(JDBCBrokerFactory.java:117)
> > at
> org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:207)
> > at
> org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:194)
> > at
> org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:152)
> > at
> org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:200)
> > at
> org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:151)
> > at
> org.apache.openjpa.persistence.xmlmapping.query.TestXMLCustomerOrder.setUp(TestXMLCustomerOrder.java:75)
> > at junit.framework.TestCase.runBare(TestCase.java:125)
> > at
> org.apache.openjpa.persistence.test.AbstractPersistenceTestCase.runBare(AbstractPersistenceTestCase.java:501)
> > at
> org.apache.openjpa.persistence.test.AbstractPersistenceTestCase.runBare(AbstractPersistenceTestCase.java:477)
> > at junit.framework.TestResult$1.protect(TestResult.java:106)
> > at junit.framework.TestResult.runProtected(TestResult.java:124)
> > at junit.framework.TestResult.run(TestResult.java:109)
> > at junit.framework.TestCase.run(TestCase.java:118)
> > at
> org.apache.openjpa.persistence.test.AbstractPersistenceTestCase.run(AbstractPersistenceTestCase.java:177)
> > at junit.framework.TestSuite.runTest(TestSuite.java:208)
> > at junit.framework.TestSuite.run(TestSuite.java:203)
> > at
> org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
> > at
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> > at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> > at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> > at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> > at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> > Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: ORA-00907:
> missing right parenthesis
> > {stmnt 562241923 CREATE TABLE TORDER (oid NUMBER NOT NULL, amount
> NUMBER, delivered NUMBER, shipAddress XMLType(255), version NUMBER,
> CUSTOMER_COUNTRYCODE VARCHAR2(255), CUSTOMER_ID NUMBER, PRIMARY KEY (oid))}
> [code=907, state=42000]
> > Correct DDL should be:
> > CREATE TABLE TORDER (oid NUMBER NOT NULL, amount NUMBER, delivered
> NUMBER, shipAddress XMLType, version NUMBER, CUSTOMER_COUNTRYCODE
> VARCHAR2(255), CUSTOMER_ID NUMBER, PRIMARY KEY (oid))
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>
Re: [jira] Commented: (OPENJPA-1461) Incorrect Oracle CREATE TABLE
DDL for XML column
Posted by catalina wei <ca...@gmail.com>.
Hi Michele,
I have the fix for OPENJPA-1697 checked in under svn trunk revision r954345.
Could you give it a try ?
Thanks.
Catalina
On Sat, Jun 12, 2010 at 8:23 AM, catalina wei <ca...@gmail.com>wrote:
> Hi Michele,
> It looks to me that the @XmlType annotation is causing the XmlType column
> mapping.
> When @XmlType annotation along with
> @Strategy("org.apache.openjpa.jdbc.meta.strats.XMLValueHandler"), then the
> XmlType column mapping is taking effect. Your entity annotation is using
> EnumValueHandler, yet the Xml column is generated in create table DDL.
>
> OPENJPA-1461 was resolving a problem for a Xml column mapping where Xml
> type was suffixed with default length (128) - resulted in SQLException. Your
> problem is a different issue - OPENJPA-1697 is addressing this issue.
>
> Could you attach your enum AuthorityValues source code to the jira issue ?
> So I can reproduce the problem.
> Thanks.
> Catalina
>
>
> On Fri, Jun 11, 2010 at 3:36 AM, Michele Rossi (JIRA) <ji...@apache.org>wrote:
>
>>
>> [
>> https://issues.apache.org/jira/browse/OPENJPA-1461?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12877772#action_12877772]
>>
>> Michele Rossi commented on OPENJPA-1461:
>> ----------------------------------------
>>
>> the result is the same even without the following annotations
>>
>> @Persistent
>> @Strategy("org.apache.openjpa.jdbc.meta.strats.EnumValueHandler")
>>
>>
>> I am still trying to find a way to disable the use of XmlType - I just
>> want it to be a string
>>
>> > Incorrect Oracle CREATE TABLE DDL for XML column
>> > ------------------------------------------------
>> >
>> > Key: OPENJPA-1461
>> > URL: https://issues.apache.org/jira/browse/OPENJPA-1461
>> > Project: OpenJPA
>> > Issue Type: Bug
>> > Components: jdbc
>> > Affects Versions: 2.0.0-M3
>> > Reporter: Catalina Wei
>> > Assignee: Catalina Wei
>> > Fix For: 2.0.0-beta
>> >
>> >
>> > A regression is found that the DDL for XML type is incorrectly generated
>> for Oracle backend.
>> > <openjpa-2.0.0-SNAPSHOT-rexported nonfatal general error>
>> org.apache.openjpa.persistence.PersistenceException: ORA-00907: missing
>> right parenthesis
>> > {stmnt 562241923 CREATE TABLE TORDER (oid NUMBER NOT NULL, amount
>> NUMBER, delivered NUMBER, shipAddress XMLType(255), version NUMBER,
>> CUSTOMER_COUNTRYCODE VARCHAR2(255), CUSTOMER_ID NUMBER, PRIMARY KEY (oid))}
>> [code=907, state=42000]
>> > 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:155)
>> > at
>> org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.synchronizeMappings(JDBCBrokerFactory.java:159)
>> > at
>> org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.newBrokerImpl(JDBCBrokerFactory.java:117)
>> > at
>> org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:207)
>> > at
>> org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:194)
>> > at
>> org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:152)
>> > at
>> org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:200)
>> > at
>> org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:151)
>> > at
>> org.apache.openjpa.persistence.xmlmapping.query.TestXMLCustomerOrder.setUp(TestXMLCustomerOrder.java:75)
>> > at junit.framework.TestCase.runBare(TestCase.java:125)
>> > at
>> org.apache.openjpa.persistence.test.AbstractPersistenceTestCase.runBare(AbstractPersistenceTestCase.java:501)
>> > at
>> org.apache.openjpa.persistence.test.AbstractPersistenceTestCase.runBare(AbstractPersistenceTestCase.java:477)
>> > at junit.framework.TestResult$1.protect(TestResult.java:106)
>> > at junit.framework.TestResult.runProtected(TestResult.java:124)
>> > at junit.framework.TestResult.run(TestResult.java:109)
>> > at junit.framework.TestCase.run(TestCase.java:118)
>> > at
>> org.apache.openjpa.persistence.test.AbstractPersistenceTestCase.run(AbstractPersistenceTestCase.java:177)
>> > at junit.framework.TestSuite.runTest(TestSuite.java:208)
>> > at junit.framework.TestSuite.run(TestSuite.java:203)
>> > at
>> org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
>> > at
>> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
>> > at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
>> > at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
>> > at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
>> > at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
>> > Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: ORA-00907:
>> missing right parenthesis
>> > {stmnt 562241923 CREATE TABLE TORDER (oid NUMBER NOT NULL, amount
>> NUMBER, delivered NUMBER, shipAddress XMLType(255), version NUMBER,
>> CUSTOMER_COUNTRYCODE VARCHAR2(255), CUSTOMER_ID NUMBER, PRIMARY KEY (oid))}
>> [code=907, state=42000]
>> > Correct DDL should be:
>> > CREATE TABLE TORDER (oid NUMBER NOT NULL, amount NUMBER, delivered
>> NUMBER, shipAddress XMLType, version NUMBER, CUSTOMER_COUNTRYCODE
>> VARCHAR2(255), CUSTOMER_ID NUMBER, PRIMARY KEY (oid))
>>
>> --
>> This message is automatically generated by JIRA.
>> -
>> You can reply to this email to add a comment to the issue online.
>>
>>
>
Re: [jira] Commented: (OPENJPA-1461) Incorrect Oracle CREATE TABLE
DDL for XML column
Posted by catalina wei <ca...@gmail.com>.
Hi Michele,
It looks to me that the @XmlType annotation is causing the XmlType column
mapping.
When @XmlType annotation along with
@Strategy("org.apache.openjpa.jdbc.meta.strats.XMLValueHandler"), then the
XmlType column mapping is taking effect. Your entity annotation is using
EnumValueHandler, yet the Xml column is generated in create table DDL.
OPENJPA-1461 was resolving a problem for a Xml column mapping where Xml type
was suffixed with default length (128) - resulted in SQLException. Your
problem is a different issue - OPENJPA-1697 is addressing this issue.
Could you attach your enum AuthorityValues source code to the jira issue ?
So I can reproduce the problem.
Thanks.
Catalina
On Fri, Jun 11, 2010 at 3:36 AM, Michele Rossi (JIRA) <ji...@apache.org>wrote:
>
> [
> https://issues.apache.org/jira/browse/OPENJPA-1461?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12877772#action_12877772]
>
> Michele Rossi commented on OPENJPA-1461:
> ----------------------------------------
>
> the result is the same even without the following annotations
>
> @Persistent
> @Strategy("org.apache.openjpa.jdbc.meta.strats.EnumValueHandler")
>
>
> I am still trying to find a way to disable the use of XmlType - I just want
> it to be a string
>
> > Incorrect Oracle CREATE TABLE DDL for XML column
> > ------------------------------------------------
> >
> > Key: OPENJPA-1461
> > URL: https://issues.apache.org/jira/browse/OPENJPA-1461
> > Project: OpenJPA
> > Issue Type: Bug
> > Components: jdbc
> > Affects Versions: 2.0.0-M3
> > Reporter: Catalina Wei
> > Assignee: Catalina Wei
> > Fix For: 2.0.0-beta
> >
> >
> > A regression is found that the DDL for XML type is incorrectly generated
> for Oracle backend.
> > <openjpa-2.0.0-SNAPSHOT-rexported nonfatal general error>
> org.apache.openjpa.persistence.PersistenceException: ORA-00907: missing
> right parenthesis
> > {stmnt 562241923 CREATE TABLE TORDER (oid NUMBER NOT NULL, amount
> NUMBER, delivered NUMBER, shipAddress XMLType(255), version NUMBER,
> CUSTOMER_COUNTRYCODE VARCHAR2(255), CUSTOMER_ID NUMBER, PRIMARY KEY (oid))}
> [code=907, state=42000]
> > 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:155)
> > at
> org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.synchronizeMappings(JDBCBrokerFactory.java:159)
> > at
> org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.newBrokerImpl(JDBCBrokerFactory.java:117)
> > at
> org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:207)
> > at
> org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:194)
> > at
> org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:152)
> > at
> org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:200)
> > at
> org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:151)
> > at
> org.apache.openjpa.persistence.xmlmapping.query.TestXMLCustomerOrder.setUp(TestXMLCustomerOrder.java:75)
> > at junit.framework.TestCase.runBare(TestCase.java:125)
> > at
> org.apache.openjpa.persistence.test.AbstractPersistenceTestCase.runBare(AbstractPersistenceTestCase.java:501)
> > at
> org.apache.openjpa.persistence.test.AbstractPersistenceTestCase.runBare(AbstractPersistenceTestCase.java:477)
> > at junit.framework.TestResult$1.protect(TestResult.java:106)
> > at junit.framework.TestResult.runProtected(TestResult.java:124)
> > at junit.framework.TestResult.run(TestResult.java:109)
> > at junit.framework.TestCase.run(TestCase.java:118)
> > at
> org.apache.openjpa.persistence.test.AbstractPersistenceTestCase.run(AbstractPersistenceTestCase.java:177)
> > at junit.framework.TestSuite.runTest(TestSuite.java:208)
> > at junit.framework.TestSuite.run(TestSuite.java:203)
> > at
> org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
> > at
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> > at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> > at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> > at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> > at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> > Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: ORA-00907:
> missing right parenthesis
> > {stmnt 562241923 CREATE TABLE TORDER (oid NUMBER NOT NULL, amount
> NUMBER, delivered NUMBER, shipAddress XMLType(255), version NUMBER,
> CUSTOMER_COUNTRYCODE VARCHAR2(255), CUSTOMER_ID NUMBER, PRIMARY KEY (oid))}
> [code=907, state=42000]
> > Correct DDL should be:
> > CREATE TABLE TORDER (oid NUMBER NOT NULL, amount NUMBER, delivered
> NUMBER, shipAddress XMLType, version NUMBER, CUSTOMER_COUNTRYCODE
> VARCHAR2(255), CUSTOMER_ID NUMBER, PRIMARY KEY (oid))
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>
[jira] Updated: (OPENJPA-1461) Incorrect Oracle CREATE TABLE DDL
for XML column
Posted by "Catalina Wei (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1461?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Catalina Wei updated OPENJPA-1461:
----------------------------------
Description:
A regression is found that the DDL for XML type is incorrectly generated for Oracle backend.
<openjpa-2.0.0-SNAPSHOT-rexported nonfatal general error> org.apache.openjpa.persistence.PersistenceException: ORA-00907: missing right parenthesis
{stmnt 562241923 CREATE TABLE TORDER (oid NUMBER NOT NULL, amount NUMBER, delivered NUMBER, shipAddress XMLType(255), version NUMBER, CUSTOMER_COUNTRYCODE VARCHAR2(255), CUSTOMER_ID NUMBER, PRIMARY KEY (oid))} [code=907, state=42000]
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:155)
at org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.synchronizeMappings(JDBCBrokerFactory.java:159)
at org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.newBrokerImpl(JDBCBrokerFactory.java:117)
at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:207)
at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:194)
at org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:152)
at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:200)
at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:151)
at org.apache.openjpa.persistence.xmlmapping.query.TestXMLCustomerOrder.setUp(TestXMLCustomerOrder.java:75)
at junit.framework.TestCase.runBare(TestCase.java:125)
at org.apache.openjpa.persistence.test.AbstractPersistenceTestCase.runBare(AbstractPersistenceTestCase.java:501)
at org.apache.openjpa.persistence.test.AbstractPersistenceTestCase.runBare(AbstractPersistenceTestCase.java:477)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at org.apache.openjpa.persistence.test.AbstractPersistenceTestCase.run(AbstractPersistenceTestCase.java:177)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: ORA-00907: missing right parenthesis
{stmnt 562241923 CREATE TABLE TORDER (oid NUMBER NOT NULL, amount NUMBER, delivered NUMBER, shipAddress XMLType(255), version NUMBER, CUSTOMER_COUNTRYCODE VARCHAR2(255), CUSTOMER_ID NUMBER, PRIMARY KEY (oid))} [code=907, state=42000]
Correct DDL should be:
CREATE TABLE TORDER (oid NUMBER NOT NULL, amount NUMBER, delivered NUMBER, shipAddress XMLType, version NUMBER, CUSTOMER_COUNTRYCODE VARCHAR2(255), CUSTOMER_ID NUMBER, PRIMARY KEY (oid))
was:
A regression is found that the DDL for XML type is incorrectly generated for Oracle backend as:
CREATE TABLE abc (id string, .... xmldata XMLType(255))
correct DDL for xmldata should be
CREATE TABLE abc(id string, ... xmldata XMLType)
> Incorrect Oracle CREATE TABLE DDL for XML column
> ------------------------------------------------
>
> Key: OPENJPA-1461
> URL: https://issues.apache.org/jira/browse/OPENJPA-1461
> Project: OpenJPA
> Issue Type: Bug
> Components: jdbc
> Affects Versions: 2.0.0
> Reporter: Catalina Wei
> Assignee: Catalina Wei
>
> A regression is found that the DDL for XML type is incorrectly generated for Oracle backend.
> <openjpa-2.0.0-SNAPSHOT-rexported nonfatal general error> org.apache.openjpa.persistence.PersistenceException: ORA-00907: missing right parenthesis
> {stmnt 562241923 CREATE TABLE TORDER (oid NUMBER NOT NULL, amount NUMBER, delivered NUMBER, shipAddress XMLType(255), version NUMBER, CUSTOMER_COUNTRYCODE VARCHAR2(255), CUSTOMER_ID NUMBER, PRIMARY KEY (oid))} [code=907, state=42000]
> 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:155)
> at org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.synchronizeMappings(JDBCBrokerFactory.java:159)
> at org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.newBrokerImpl(JDBCBrokerFactory.java:117)
> at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:207)
> at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:194)
> at org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:152)
> at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:200)
> at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:151)
> at org.apache.openjpa.persistence.xmlmapping.query.TestXMLCustomerOrder.setUp(TestXMLCustomerOrder.java:75)
> at junit.framework.TestCase.runBare(TestCase.java:125)
> at org.apache.openjpa.persistence.test.AbstractPersistenceTestCase.runBare(AbstractPersistenceTestCase.java:501)
> at org.apache.openjpa.persistence.test.AbstractPersistenceTestCase.runBare(AbstractPersistenceTestCase.java:477)
> at junit.framework.TestResult$1.protect(TestResult.java:106)
> at junit.framework.TestResult.runProtected(TestResult.java:124)
> at junit.framework.TestResult.run(TestResult.java:109)
> at junit.framework.TestCase.run(TestCase.java:118)
> at org.apache.openjpa.persistence.test.AbstractPersistenceTestCase.run(AbstractPersistenceTestCase.java:177)
> at junit.framework.TestSuite.runTest(TestSuite.java:208)
> at junit.framework.TestSuite.run(TestSuite.java:203)
> at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: ORA-00907: missing right parenthesis
> {stmnt 562241923 CREATE TABLE TORDER (oid NUMBER NOT NULL, amount NUMBER, delivered NUMBER, shipAddress XMLType(255), version NUMBER, CUSTOMER_COUNTRYCODE VARCHAR2(255), CUSTOMER_ID NUMBER, PRIMARY KEY (oid))} [code=907, state=42000]
> Correct DDL should be:
> CREATE TABLE TORDER (oid NUMBER NOT NULL, amount NUMBER, delivered NUMBER, shipAddress XMLType, version NUMBER, CUSTOMER_COUNTRYCODE VARCHAR2(255), CUSTOMER_ID NUMBER, PRIMARY KEY (oid))
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (OPENJPA-1461) Incorrect Oracle CREATE TABLE DDL
for XML column
Posted by "Catalina Wei (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1461?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Catalina Wei resolved OPENJPA-1461.
-----------------------------------
Resolution: Fixed
Fix Version/s: 2.0.0
Fix available at svn r899528
> Incorrect Oracle CREATE TABLE DDL for XML column
> ------------------------------------------------
>
> Key: OPENJPA-1461
> URL: https://issues.apache.org/jira/browse/OPENJPA-1461
> Project: OpenJPA
> Issue Type: Bug
> Components: jdbc
> Affects Versions: 2.0.0
> Reporter: Catalina Wei
> Assignee: Catalina Wei
> Fix For: 2.0.0
>
>
> A regression is found that the DDL for XML type is incorrectly generated for Oracle backend.
> <openjpa-2.0.0-SNAPSHOT-rexported nonfatal general error> org.apache.openjpa.persistence.PersistenceException: ORA-00907: missing right parenthesis
> {stmnt 562241923 CREATE TABLE TORDER (oid NUMBER NOT NULL, amount NUMBER, delivered NUMBER, shipAddress XMLType(255), version NUMBER, CUSTOMER_COUNTRYCODE VARCHAR2(255), CUSTOMER_ID NUMBER, PRIMARY KEY (oid))} [code=907, state=42000]
> 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:155)
> at org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.synchronizeMappings(JDBCBrokerFactory.java:159)
> at org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.newBrokerImpl(JDBCBrokerFactory.java:117)
> at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:207)
> at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:194)
> at org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:152)
> at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:200)
> at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:151)
> at org.apache.openjpa.persistence.xmlmapping.query.TestXMLCustomerOrder.setUp(TestXMLCustomerOrder.java:75)
> at junit.framework.TestCase.runBare(TestCase.java:125)
> at org.apache.openjpa.persistence.test.AbstractPersistenceTestCase.runBare(AbstractPersistenceTestCase.java:501)
> at org.apache.openjpa.persistence.test.AbstractPersistenceTestCase.runBare(AbstractPersistenceTestCase.java:477)
> at junit.framework.TestResult$1.protect(TestResult.java:106)
> at junit.framework.TestResult.runProtected(TestResult.java:124)
> at junit.framework.TestResult.run(TestResult.java:109)
> at junit.framework.TestCase.run(TestCase.java:118)
> at org.apache.openjpa.persistence.test.AbstractPersistenceTestCase.run(AbstractPersistenceTestCase.java:177)
> at junit.framework.TestSuite.runTest(TestSuite.java:208)
> at junit.framework.TestSuite.run(TestSuite.java:203)
> at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: ORA-00907: missing right parenthesis
> {stmnt 562241923 CREATE TABLE TORDER (oid NUMBER NOT NULL, amount NUMBER, delivered NUMBER, shipAddress XMLType(255), version NUMBER, CUSTOMER_COUNTRYCODE VARCHAR2(255), CUSTOMER_ID NUMBER, PRIMARY KEY (oid))} [code=907, state=42000]
> Correct DDL should be:
> CREATE TABLE TORDER (oid NUMBER NOT NULL, amount NUMBER, delivered NUMBER, shipAddress XMLType, version NUMBER, CUSTOMER_COUNTRYCODE VARCHAR2(255), CUSTOMER_ID NUMBER, PRIMARY KEY (oid))
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-1461) Incorrect Oracle CREATE TABLE DDL
for XML column
Posted by "Donald Woods (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1461?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Donald Woods updated OPENJPA-1461:
----------------------------------
Affects Version/s: (was: 2.0.0)
2.0.0-beta
Fix Version/s: (was: 2.0.0)
2.0.0-beta2
> Incorrect Oracle CREATE TABLE DDL for XML column
> ------------------------------------------------
>
> Key: OPENJPA-1461
> URL: https://issues.apache.org/jira/browse/OPENJPA-1461
> Project: OpenJPA
> Issue Type: Bug
> Components: jdbc
> Affects Versions: 2.0.0-beta
> Reporter: Catalina Wei
> Assignee: Catalina Wei
> Fix For: 2.0.0-beta2
>
>
> A regression is found that the DDL for XML type is incorrectly generated for Oracle backend.
> <openjpa-2.0.0-SNAPSHOT-rexported nonfatal general error> org.apache.openjpa.persistence.PersistenceException: ORA-00907: missing right parenthesis
> {stmnt 562241923 CREATE TABLE TORDER (oid NUMBER NOT NULL, amount NUMBER, delivered NUMBER, shipAddress XMLType(255), version NUMBER, CUSTOMER_COUNTRYCODE VARCHAR2(255), CUSTOMER_ID NUMBER, PRIMARY KEY (oid))} [code=907, state=42000]
> 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:155)
> at org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.synchronizeMappings(JDBCBrokerFactory.java:159)
> at org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.newBrokerImpl(JDBCBrokerFactory.java:117)
> at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:207)
> at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:194)
> at org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:152)
> at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:200)
> at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:151)
> at org.apache.openjpa.persistence.xmlmapping.query.TestXMLCustomerOrder.setUp(TestXMLCustomerOrder.java:75)
> at junit.framework.TestCase.runBare(TestCase.java:125)
> at org.apache.openjpa.persistence.test.AbstractPersistenceTestCase.runBare(AbstractPersistenceTestCase.java:501)
> at org.apache.openjpa.persistence.test.AbstractPersistenceTestCase.runBare(AbstractPersistenceTestCase.java:477)
> at junit.framework.TestResult$1.protect(TestResult.java:106)
> at junit.framework.TestResult.runProtected(TestResult.java:124)
> at junit.framework.TestResult.run(TestResult.java:109)
> at junit.framework.TestCase.run(TestCase.java:118)
> at org.apache.openjpa.persistence.test.AbstractPersistenceTestCase.run(AbstractPersistenceTestCase.java:177)
> at junit.framework.TestSuite.runTest(TestSuite.java:208)
> at junit.framework.TestSuite.run(TestSuite.java:203)
> at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: ORA-00907: missing right parenthesis
> {stmnt 562241923 CREATE TABLE TORDER (oid NUMBER NOT NULL, amount NUMBER, delivered NUMBER, shipAddress XMLType(255), version NUMBER, CUSTOMER_COUNTRYCODE VARCHAR2(255), CUSTOMER_ID NUMBER, PRIMARY KEY (oid))} [code=907, state=42000]
> Correct DDL should be:
> CREATE TABLE TORDER (oid NUMBER NOT NULL, amount NUMBER, delivered NUMBER, shipAddress XMLType, version NUMBER, CUSTOMER_COUNTRYCODE VARCHAR2(255), CUSTOMER_ID NUMBER, PRIMARY KEY (oid))
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-1461) Incorrect Oracle CREATE TABLE DDL
for XML column
Posted by "Donald Woods (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1461?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Donald Woods updated OPENJPA-1461:
----------------------------------
Affects Version/s: (was: 2.0.0-beta)
2.0.0-M3
Fix Version/s: (was: 2.0.0-beta2)
2.0.0-beta
> Incorrect Oracle CREATE TABLE DDL for XML column
> ------------------------------------------------
>
> Key: OPENJPA-1461
> URL: https://issues.apache.org/jira/browse/OPENJPA-1461
> Project: OpenJPA
> Issue Type: Bug
> Components: jdbc
> Affects Versions: 2.0.0-M3
> Reporter: Catalina Wei
> Assignee: Catalina Wei
> Fix For: 2.0.0-beta
>
>
> A regression is found that the DDL for XML type is incorrectly generated for Oracle backend.
> <openjpa-2.0.0-SNAPSHOT-rexported nonfatal general error> org.apache.openjpa.persistence.PersistenceException: ORA-00907: missing right parenthesis
> {stmnt 562241923 CREATE TABLE TORDER (oid NUMBER NOT NULL, amount NUMBER, delivered NUMBER, shipAddress XMLType(255), version NUMBER, CUSTOMER_COUNTRYCODE VARCHAR2(255), CUSTOMER_ID NUMBER, PRIMARY KEY (oid))} [code=907, state=42000]
> 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:155)
> at org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.synchronizeMappings(JDBCBrokerFactory.java:159)
> at org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.newBrokerImpl(JDBCBrokerFactory.java:117)
> at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:207)
> at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:194)
> at org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:152)
> at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:200)
> at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:151)
> at org.apache.openjpa.persistence.xmlmapping.query.TestXMLCustomerOrder.setUp(TestXMLCustomerOrder.java:75)
> at junit.framework.TestCase.runBare(TestCase.java:125)
> at org.apache.openjpa.persistence.test.AbstractPersistenceTestCase.runBare(AbstractPersistenceTestCase.java:501)
> at org.apache.openjpa.persistence.test.AbstractPersistenceTestCase.runBare(AbstractPersistenceTestCase.java:477)
> at junit.framework.TestResult$1.protect(TestResult.java:106)
> at junit.framework.TestResult.runProtected(TestResult.java:124)
> at junit.framework.TestResult.run(TestResult.java:109)
> at junit.framework.TestCase.run(TestCase.java:118)
> at org.apache.openjpa.persistence.test.AbstractPersistenceTestCase.run(AbstractPersistenceTestCase.java:177)
> at junit.framework.TestSuite.runTest(TestSuite.java:208)
> at junit.framework.TestSuite.run(TestSuite.java:203)
> at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: ORA-00907: missing right parenthesis
> {stmnt 562241923 CREATE TABLE TORDER (oid NUMBER NOT NULL, amount NUMBER, delivered NUMBER, shipAddress XMLType(255), version NUMBER, CUSTOMER_COUNTRYCODE VARCHAR2(255), CUSTOMER_ID NUMBER, PRIMARY KEY (oid))} [code=907, state=42000]
> Correct DDL should be:
> CREATE TABLE TORDER (oid NUMBER NOT NULL, amount NUMBER, delivered NUMBER, shipAddress XMLType, version NUMBER, CUSTOMER_COUNTRYCODE VARCHAR2(255), CUSTOMER_ID NUMBER, PRIMARY KEY (oid))
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (OPENJPA-1461) Incorrect Oracle CREATE TABLE DDL
for XML column
Posted by "Michele Rossi (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1461?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12877771#action_12877771 ]
Michele Rossi commented on OPENJPA-1461:
----------------------------------------
Hi,
I think this is still broken even in the very latest 2.1.0-SNAPSHOT (I've built it myself from SVN).
Stacktrace:
Caused by: <openjpa-2.1.0-SNAPSHOT-r422266:953182M nonfatal general error> org.apache.openjpa.persistence.PersistenceException: ORA-00907: missing right parenthesis
{stmnt 13803851 CREATE TABLE authority (ID NUMBER NOT NULL, authorityName XMLType(128) NOT NULL, PRIMARY KEY (ID))} [code=907, state=42000]
at org.apache.openjpa.jdbc.meta.MappingTool.record(MappingTool.java:556)
at org.apache.openjpa.jdbc.meta.MappingTool.record(MappingTool.java:456)
at org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.synchronizeMappings(JDBCBrokerFactory.java:155)
at org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.synchronizeMappings(JDBCBrokerFactory.java:159)
at org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.newBrokerImpl(JDBCBrokerFactory.java:117)
at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:199)
at org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:156)
at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:213)
at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:151)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.invokeProxyMethod(AbstractEntityManagerFactoryBean.java:423)
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean$ManagedEntityManagerFactoryInvocationHandler.invoke(AbstractEntityManagerFactoryBean.java:485)
at $Proxy20.createEntityManager(Unknown Source)
at com.iontrading.ionweb.persistence.SchemaCreationHandler.start(SchemaCreationHandler.java:181)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1536)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1409)
... 27 more
Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: ORA-00907: missing right parenthesis
{stmnt 13803851 CREATE TABLE ion_authority (ID NUMBER NOT NULL, authorityName XMLType(128) NOT NULL, PRIMARY KEY (ID))} [code=907, state=42000]
at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:273)
at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:257)
at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.access$700(LoggingConnectionDecorator.java:70)
at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingStatement.executeUpdate(LoggingConnectionDecorator.java:967)
at org.apache.openjpa.lib.jdbc.DelegatingStatement.executeUpdate(DelegatingStatement.java:136)
at org.apache.openjpa.jdbc.schema.SchemaTool.executeSQL(SchemaTool.java:1200)
at org.apache.openjpa.jdbc.schema.SchemaTool.createTable(SchemaTool.java:956)
at org.apache.openjpa.jdbc.schema.SchemaTool.add(SchemaTool.java:533)
at org.apache.openjpa.jdbc.schema.SchemaTool.add(SchemaTool.java:348)
at org.apache.openjpa.jdbc.schema.SchemaTool.run(SchemaTool.java:325)
at org.apache.openjpa.jdbc.meta.MappingTool.record(MappingTool.java:504)
... 50 more
The class I am trying to persist:
*/
@Entity
@Table(name="authority")
@NamedQueries( {
@NamedQuery(name = "AllIonAuthorities", query = "SELECT x FROM IonAuthority x")
})
public class Authority {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = "ID")
private Integer id;
@Enumerated( EnumType.STRING )
@Column(nullable=false, length=128, updatable=true, insertable=true)
@Persistent
@Strategy("org.apache.openjpa.jdbc.meta.strats.EnumValueHandler")
private AuthorityValues authorityName;
-----------
@XmlType(name = "IonAuthorityValues")
@XmlEnum
public enum AuthorityValues {
AUTH1,
AUTH2,
> Incorrect Oracle CREATE TABLE DDL for XML column
> ------------------------------------------------
>
> Key: OPENJPA-1461
> URL: https://issues.apache.org/jira/browse/OPENJPA-1461
> Project: OpenJPA
> Issue Type: Bug
> Components: jdbc
> Affects Versions: 2.0.0-M3
> Reporter: Catalina Wei
> Assignee: Catalina Wei
> Fix For: 2.0.0-beta
>
>
> A regression is found that the DDL for XML type is incorrectly generated for Oracle backend.
> <openjpa-2.0.0-SNAPSHOT-rexported nonfatal general error> org.apache.openjpa.persistence.PersistenceException: ORA-00907: missing right parenthesis
> {stmnt 562241923 CREATE TABLE TORDER (oid NUMBER NOT NULL, amount NUMBER, delivered NUMBER, shipAddress XMLType(255), version NUMBER, CUSTOMER_COUNTRYCODE VARCHAR2(255), CUSTOMER_ID NUMBER, PRIMARY KEY (oid))} [code=907, state=42000]
> 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:155)
> at org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.synchronizeMappings(JDBCBrokerFactory.java:159)
> at org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.newBrokerImpl(JDBCBrokerFactory.java:117)
> at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:207)
> at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:194)
> at org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:152)
> at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:200)
> at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:151)
> at org.apache.openjpa.persistence.xmlmapping.query.TestXMLCustomerOrder.setUp(TestXMLCustomerOrder.java:75)
> at junit.framework.TestCase.runBare(TestCase.java:125)
> at org.apache.openjpa.persistence.test.AbstractPersistenceTestCase.runBare(AbstractPersistenceTestCase.java:501)
> at org.apache.openjpa.persistence.test.AbstractPersistenceTestCase.runBare(AbstractPersistenceTestCase.java:477)
> at junit.framework.TestResult$1.protect(TestResult.java:106)
> at junit.framework.TestResult.runProtected(TestResult.java:124)
> at junit.framework.TestResult.run(TestResult.java:109)
> at junit.framework.TestCase.run(TestCase.java:118)
> at org.apache.openjpa.persistence.test.AbstractPersistenceTestCase.run(AbstractPersistenceTestCase.java:177)
> at junit.framework.TestSuite.runTest(TestSuite.java:208)
> at junit.framework.TestSuite.run(TestSuite.java:203)
> at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: ORA-00907: missing right parenthesis
> {stmnt 562241923 CREATE TABLE TORDER (oid NUMBER NOT NULL, amount NUMBER, delivered NUMBER, shipAddress XMLType(255), version NUMBER, CUSTOMER_COUNTRYCODE VARCHAR2(255), CUSTOMER_ID NUMBER, PRIMARY KEY (oid))} [code=907, state=42000]
> Correct DDL should be:
> CREATE TABLE TORDER (oid NUMBER NOT NULL, amount NUMBER, delivered NUMBER, shipAddress XMLType, version NUMBER, CUSTOMER_COUNTRYCODE VARCHAR2(255), CUSTOMER_ID NUMBER, PRIMARY KEY (oid))
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (OPENJPA-1461) Incorrect Oracle CREATE TABLE DDL
for XML column
Posted by "Michele Rossi (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1461?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12877772#action_12877772 ]
Michele Rossi commented on OPENJPA-1461:
----------------------------------------
the result is the same even without the following annotations
@Persistent
@Strategy("org.apache.openjpa.jdbc.meta.strats.EnumValueHandler")
I am still trying to find a way to disable the use of XmlType - I just want it to be a string
> Incorrect Oracle CREATE TABLE DDL for XML column
> ------------------------------------------------
>
> Key: OPENJPA-1461
> URL: https://issues.apache.org/jira/browse/OPENJPA-1461
> Project: OpenJPA
> Issue Type: Bug
> Components: jdbc
> Affects Versions: 2.0.0-M3
> Reporter: Catalina Wei
> Assignee: Catalina Wei
> Fix For: 2.0.0-beta
>
>
> A regression is found that the DDL for XML type is incorrectly generated for Oracle backend.
> <openjpa-2.0.0-SNAPSHOT-rexported nonfatal general error> org.apache.openjpa.persistence.PersistenceException: ORA-00907: missing right parenthesis
> {stmnt 562241923 CREATE TABLE TORDER (oid NUMBER NOT NULL, amount NUMBER, delivered NUMBER, shipAddress XMLType(255), version NUMBER, CUSTOMER_COUNTRYCODE VARCHAR2(255), CUSTOMER_ID NUMBER, PRIMARY KEY (oid))} [code=907, state=42000]
> 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:155)
> at org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.synchronizeMappings(JDBCBrokerFactory.java:159)
> at org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.newBrokerImpl(JDBCBrokerFactory.java:117)
> at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:207)
> at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:194)
> at org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:152)
> at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:200)
> at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:151)
> at org.apache.openjpa.persistence.xmlmapping.query.TestXMLCustomerOrder.setUp(TestXMLCustomerOrder.java:75)
> at junit.framework.TestCase.runBare(TestCase.java:125)
> at org.apache.openjpa.persistence.test.AbstractPersistenceTestCase.runBare(AbstractPersistenceTestCase.java:501)
> at org.apache.openjpa.persistence.test.AbstractPersistenceTestCase.runBare(AbstractPersistenceTestCase.java:477)
> at junit.framework.TestResult$1.protect(TestResult.java:106)
> at junit.framework.TestResult.runProtected(TestResult.java:124)
> at junit.framework.TestResult.run(TestResult.java:109)
> at junit.framework.TestCase.run(TestCase.java:118)
> at org.apache.openjpa.persistence.test.AbstractPersistenceTestCase.run(AbstractPersistenceTestCase.java:177)
> at junit.framework.TestSuite.runTest(TestSuite.java:208)
> at junit.framework.TestSuite.run(TestSuite.java:203)
> at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: ORA-00907: missing right parenthesis
> {stmnt 562241923 CREATE TABLE TORDER (oid NUMBER NOT NULL, amount NUMBER, delivered NUMBER, shipAddress XMLType(255), version NUMBER, CUSTOMER_COUNTRYCODE VARCHAR2(255), CUSTOMER_ID NUMBER, PRIMARY KEY (oid))} [code=907, state=42000]
> Correct DDL should be:
> CREATE TABLE TORDER (oid NUMBER NOT NULL, amount NUMBER, delivered NUMBER, shipAddress XMLType, version NUMBER, CUSTOMER_COUNTRYCODE VARCHAR2(255), CUSTOMER_ID NUMBER, PRIMARY KEY (oid))
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (OPENJPA-1461) Incorrect Oracle CREATE TABLE DDL
for XML column
Posted by "Milosz Tylenda (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1461?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12800882#action_12800882 ]
Milosz Tylenda commented on OPENJPA-1461:
-----------------------------------------
Hi Catalina, I am wondering whether your commit to TestUpdateWithSubSelect.java is related to the fix or an oversight?
> Incorrect Oracle CREATE TABLE DDL for XML column
> ------------------------------------------------
>
> Key: OPENJPA-1461
> URL: https://issues.apache.org/jira/browse/OPENJPA-1461
> Project: OpenJPA
> Issue Type: Bug
> Components: jdbc
> Affects Versions: 2.0.0
> Reporter: Catalina Wei
> Assignee: Catalina Wei
> Fix For: 2.0.0
>
>
> A regression is found that the DDL for XML type is incorrectly generated for Oracle backend.
> <openjpa-2.0.0-SNAPSHOT-rexported nonfatal general error> org.apache.openjpa.persistence.PersistenceException: ORA-00907: missing right parenthesis
> {stmnt 562241923 CREATE TABLE TORDER (oid NUMBER NOT NULL, amount NUMBER, delivered NUMBER, shipAddress XMLType(255), version NUMBER, CUSTOMER_COUNTRYCODE VARCHAR2(255), CUSTOMER_ID NUMBER, PRIMARY KEY (oid))} [code=907, state=42000]
> 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:155)
> at org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.synchronizeMappings(JDBCBrokerFactory.java:159)
> at org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.newBrokerImpl(JDBCBrokerFactory.java:117)
> at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:207)
> at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:194)
> at org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:152)
> at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:200)
> at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:151)
> at org.apache.openjpa.persistence.xmlmapping.query.TestXMLCustomerOrder.setUp(TestXMLCustomerOrder.java:75)
> at junit.framework.TestCase.runBare(TestCase.java:125)
> at org.apache.openjpa.persistence.test.AbstractPersistenceTestCase.runBare(AbstractPersistenceTestCase.java:501)
> at org.apache.openjpa.persistence.test.AbstractPersistenceTestCase.runBare(AbstractPersistenceTestCase.java:477)
> at junit.framework.TestResult$1.protect(TestResult.java:106)
> at junit.framework.TestResult.runProtected(TestResult.java:124)
> at junit.framework.TestResult.run(TestResult.java:109)
> at junit.framework.TestCase.run(TestCase.java:118)
> at org.apache.openjpa.persistence.test.AbstractPersistenceTestCase.run(AbstractPersistenceTestCase.java:177)
> at junit.framework.TestSuite.runTest(TestSuite.java:208)
> at junit.framework.TestSuite.run(TestSuite.java:203)
> at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: ORA-00907: missing right parenthesis
> {stmnt 562241923 CREATE TABLE TORDER (oid NUMBER NOT NULL, amount NUMBER, delivered NUMBER, shipAddress XMLType(255), version NUMBER, CUSTOMER_COUNTRYCODE VARCHAR2(255), CUSTOMER_ID NUMBER, PRIMARY KEY (oid))} [code=907, state=42000]
> Correct DDL should be:
> CREATE TABLE TORDER (oid NUMBER NOT NULL, amount NUMBER, delivered NUMBER, shipAddress XMLType, version NUMBER, CUSTOMER_COUNTRYCODE VARCHAR2(255), CUSTOMER_ID NUMBER, PRIMARY KEY (oid))
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.