Apache JDO Project - [jira] Updated: (JDO-308) Remove attribute strategy from elements

This is Interesting: Free IT Magazines  
Home > Archive > Apache JDO Project > March 2006 > [jira] Updated: (JDO-308) Remove attribute strategy from elements





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author [jira] Updated: (JDO-308) Remove attribute strategy from elements
Michael Watzek (JIRA)

2006-02-27, 5:45 pm

[ http://issues.apache.org/jira/browse/JDO-308?page=all ]

Michael Watzek updated JDO-308:
-------------------------------

Attachment: JDO-308.patch

The attached patch fixes this issue. Applying this patch, a TCK run results in 4 failures and 409 errors. Most of the errors are due to the same problem: JPOX generates SQL which inserts a value into an identity column (see below). Eric has an action item
to investigate JPOX's ability to use native identity strategy given an identity column in the schema (see minutes Feb 17 2006).

133) testPositive(org.apache.jdo.tck.query.sql.NewQuery)javax.jdo.JDOUserException: One or more instances could not be made persistent
at org.jpox.AbstractPersistenceManager. makePersistentAll(AbstractPersistenceMan
ager.java:1217)
at org.apache.jdo.tck.query.QueryTest.makePersistentAll(QueryTest.java:225)
at org.apache.jdo.tck.query.QueryTest.loadAndPersistCompanyModel(QueryTest.java:201)
at org.apache.jdo.tck.query.sql.NewQuery.localSetUp(NewQuery.java:87)
at org.apache.jdo.tck.JDO_Test.setUp(JDO_Test.java:187)
at org.apache.jdo.tck.JDO_Test.runBare(JDO_Test.java:203)
at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:120)
at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:95)
NestedThrowablesStackTrace:
javax.jdo.JDODataStoreException: Insert request failed: INSERT INTO datastoreidentity0.COMPANIES (DATASTORE_IDENTITY,ID,FOUNDEDDATE,"NAME",ADDRID,CITY,COUNTRY,"STATE",STREET,ZIPCODE) VALUES (?,?,?,?,?,?,?,?,?,?)
at org.jpox.store.rdbms.request.InsertRequest.execute(InsertRequest.java:338)
at org.jpox.store.rdbms.table.ClassTable.insert(ClassTable.java:2110)
at org.jpox.store.StoreManager.insert(StoreManager.java:735)
at org.jpox.state.StateManagerImpl.internalMakePersistent(StateManagerImpl.java:3310)
at org.jpox.state.StateManagerImpl.makePersistent(StateManagerImpl.java:3283)
at org.jpox.AbstractPersistenceManager. internalMakePersistent(AbstractPersisten
ceManager.java:1112)
at org.jpox.AbstractPersistenceManager. makePersistent(AbstractPersistenceManage
r.java:1167)
at org.jpox.AbstractPersistenceManager. makePersistentAll(AbstractPersistenceMan
ager.java:1207)
at org.apache.jdo.tck.query.QueryTest.makePersistentAll(QueryTest.java:225)
at org.apache.jdo.tck.query.QueryTest.loadAndPersistCompanyModel(QueryTest.java:201)
at org.apache.jdo.tck.query.sql.NewQuery.localSetUp(NewQuery.java:87)
at org.apache.jdo.tck.JDO_Test.setUp(JDO_Test.java:187)
at org.apache.jdo.tck.JDO_Test.runBare(JDO_Test.java:203)
at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:120)
at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:95)
NestedThrowablesStackTrace:
ERROR 42Z23: Attempt to modify an identity column 'DATASTORE_IDENTITY'.
at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
at org.apache.derby.impl.sql.compile.ResultColumnList.checkAutoincrement(Unknown Source)
at org.apache.derby.impl.sql.compile.InsertNode.bind(Unknown Source)
at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknown Source)
at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown Source)
at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement20.<init>(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement30.<init>(Unknown Source)
at org.apache.derby.jdbc.Driver30.newEmbedPreparedStatement(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)
at com.mchange.v2.c3p0.impl.NewProxyConnection.prepareStatement(NewProxyConnection.java:190)
at org.jpox.store.rdbms.RDBMSManager.getStatement(RDBMSManager.java:359)
at org.jpox.store.rdbms.RDBMSManager.getStatement(RDBMSManager.java:316)
at org.jpox.store.rdbms.request.InsertRequest.execute(InsertRequest.java:181)
at org.jpox.store.rdbms.table.ClassTable.insert(ClassTable.java:2110)
at org.jpox.store.StoreManager.insert(StoreManager.java:735)
at org.jpox.state.StateManagerImpl.internalMakePersistent(StateManagerImpl.java:3310)
at org.jpox.state.StateManagerImpl.makePersistent(StateManagerImpl.java:3283)
at org.jpox.AbstractPersistenceManager. internalMakePersistent(AbstractPersisten
ceManager.java:1112)
at org.jpox.AbstractPersistenceManager. makePersistent(AbstractPersistenceManage
r.java:1167)
at org.jpox.AbstractPersistenceManager. makePersistentAll(AbstractPersistenceMan
ager.java:1207)
at org.apache.jdo.tck.query.QueryTest.makePersistentAll(QueryTest.java:225)
at org.apache.jdo.tck.query.QueryTest.loadAndPersistCompanyModel(QueryTest.java:201)
at org.apache.jdo.tck.query.sql.NewQuery.localSetUp(NewQuery.java:87)
at org.apache.jdo.tck.JDO_Test.setUp(JDO_Test.java:187)
at org.apache.jdo.tck.JDO_Test.runBare(JDO_Test.java:203)
at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:120)
at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:95)


> Remove attribute strategy from elements datastore-identity in ORM files
> -----------------------------------------------------------------------
>
> Key: JDO-308
> URL: http://issues.apache.org/jira/browse/JDO-308
> Project: JDO
> Type: Bug
> Components: tck20
> Versions: JDO 2 beta
> Reporter: Michael Watzek
> Assignee: Michael Watzek
> Priority: Minor
> Fix For: JDO 2 final
> Attachments: JDO-308.patch
>
> We decided to remove attribute strategy rom elements datastore-identity in ORM files. Thus, default strategy "native" will apply. The rationale is to also support JDO implementations, which only support datastore identity and which only runs on a RDBMS

that has sequences and no identity columns.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secur...nistrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira


Craig L Russell

2006-02-27, 8:45 pm

Craig L Russell

2006-03-01, 7:45 am

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com