db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Dudziak <to...@first.fhg.de>
Subject Re: Unit test errors with PostgreSQL
Date Sat, 19 Jun 2004 16:45:20 GMT
Jakob Braeuchi wrote:

> hi thomas,
> 
> could you please post the sql that produced the error ?

Hmm, the spy.log is rather long. I'll try to add a junit target that 
executes specific tests denoted by a property, and then post the spy.log.

Btw, funny thing, now after a rerun the failure is no longer there 
(testWeakIdentityMap), but I get two additional errors, this time in the 
odmg tests:

testLockingOfObject (both errors here)

The system.err file:

org.apache.ojb.broker.OptimisticLockException: Object has been modified 
by someone else
	at 
org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeUpdate(JdbcAccessImpl.java:485)
	at 
org.apache.ojb.broker.core.PersistenceBrokerImpl.storeToDb(PersistenceBrokerImpl.java:1674)
	at 
org.apache.ojb.broker.core.PersistenceBrokerImpl.store(PersistenceBrokerImpl.java:1575)
	at 
org.apache.ojb.broker.core.PersistenceBrokerImpl.store(PersistenceBrokerImpl.java:1530)
	at 
org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(DelegatingPersistenceBroker.java:180)
	at 
org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(DelegatingPersistenceBroker.java:180)
	at org.apache.ojb.odmg.states.StateOldDirty.commit(StateOldDirty.java:100)
	at 
org.apache.ojb.odmg.ObjectEnvelopeTable.commitAllEnvelopes(ObjectEnvelopeTable.java:204)
	at 
org.apache.ojb.odmg.ObjectEnvelopeTable.commit(ObjectEnvelopeTable.java:158)
	at 
org.apache.ojb.odmg.TransactionImpl.doCommitOnObjects(TransactionImpl.java:306)
	at org.apache.ojb.odmg.TransactionImpl.prepare(TransactionImpl.java:628)
	at org.apache.ojb.odmg.TransactionImpl.commit(TransactionImpl.java:585)
	at 
org.apache.ojb.odmg.LockingTest.testOptimisticLockBasics(LockingTest.java:179)
	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:324)
	at junit.framework.TestCase.runTest(TestCase.java:154)
	at junit.framework.TestCase.runBare(TestCase.java:127)
	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 junit.framework.TestSuite.runTest(TestSuite.java:208)
	at junit.framework.TestSuite.run(TestSuite.java:203)
	at junit.framework.TestSuite.runTest(TestSuite.java:208)
	at junit.framework.TestSuite.run(TestSuite.java:203)
	at 
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:326)
	at 
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:560)
org.odmg.TransactionInProgressException: Database cannot be closed, 
associated Tx is still open. Transaction status is 'STATUS_ACTIVE'. Used 
PBKey was org.apache.ojb.broker.PBKey: jcdAlias=default, user=ojb, 
password=*****
	at org.apache.ojb.odmg.DatabaseImpl.close(DatabaseImpl.java:172)
	at 
org.apache.ojb.odmg.ODMGRollbackTest.testDatabaseClose(ODMGRollbackTest.java:45)
	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:324)
	at junit.framework.TestCase.runTest(TestCase.java:154)
	at junit.framework.TestCase.runBare(TestCase.java:127)
	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 junit.framework.TestSuite.runTest(TestSuite.java:208)
	at junit.framework.TestSuite.run(TestSuite.java:203)
	at junit.framework.TestSuite.runTest(TestSuite.java:208)
	at junit.framework.TestSuite.run(TestSuite.java:203)
	at 
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:326)
	at 
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:560)
org.apache.ojb.broker.PersistenceBrokerSQLException: SQL failure while 
insert object data for class org.apache.ojb.odmg.Site, PK of the given 
object is [ id=22], object was org.apache.ojb.odmg.Site@1f07597, 
exception message is [FEHLER: duplizierter Schl?el verletzt 
Unique-Constraint ?ame_unique?Fnbtinsert.c
]
	at 
org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeInsert(JdbcAccessImpl.java:243)
	at 
org.apache.ojb.broker.core.PersistenceBrokerImpl.storeToDb(PersistenceBrokerImpl.java:1658)
	at 
org.apache.ojb.broker.core.PersistenceBrokerImpl.store(PersistenceBrokerImpl.java:1575)
	at 
org.apache.ojb.broker.core.PersistenceBrokerImpl.store(PersistenceBrokerImpl.java:1526)
	at 
org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(DelegatingPersistenceBroker.java:180)
	at 
org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(DelegatingPersistenceBroker.java:180)
	at org.apache.ojb.odmg.states.StateNewDirty.commit(StateNewDirty.java:109)
	at 
org.apache.ojb.odmg.ObjectEnvelopeTable.commitAllEnvelopes(ObjectEnvelopeTable.java:204)
	at 
org.apache.ojb.odmg.ObjectEnvelopeTable.commit(ObjectEnvelopeTable.java:158)
	at 
org.apache.ojb.odmg.TransactionImpl.doCommitOnObjects(TransactionImpl.java:306)
	at org.apache.ojb.odmg.TransactionImpl.prepare(TransactionImpl.java:628)
	at org.apache.ojb.odmg.TransactionImpl.commit(TransactionImpl.java:585)
	at org.apache.ojb.odmg.UserTestCases.newSite(UserTestCases.java:95)
	at 
org.apache.ojb.odmg.UserTestCases.testDuplicateInsertion(UserTestCases.java:54)
	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:324)
	at junit.framework.TestCase.runTest(TestCase.java:154)
	at junit.framework.TestCase.runBare(TestCase.java:127)
	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 junit.framework.TestSuite.runTest(TestSuite.java:208)
	at junit.framework.TestSuite.run(TestSuite.java:203)
	at junit.framework.TestSuite.runTest(TestSuite.java:208)
	at junit.framework.TestSuite.run(TestSuite.java:203)
	at 
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:326)
	at 
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:560)
Caused by: org.postgresql.util.PSQLException: FEHLER: duplizierter 
Schl?el verletzt Unique-Constraint ?ame_unique?Fnbtinsert.c

	at 
org.postgresql.util.PSQLException.parseServerError(PSQLException.java:139)
	at org.postgresql.core.QueryExecutor.executeV3(QueryExecutor.java:154)
	at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:101)
	at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:43)
	at 
org.postgresql.jdbc1.AbstractJdbc1Statement.execute(AbstractJdbc1Statement.java:515)
	at 
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:50)
	at 
org.postgresql.jdbc1.AbstractJdbc1Statement.executeUpdate(AbstractJdbc1Statement.java:271)
	at 
com.p6spy.engine.logging.P6LogPreparedStatement.executeUpdate(P6LogPreparedStatement.java:183)
	at 
org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeInsert(JdbcAccessImpl.java:198)
	... 29 more

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message