db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert S. Sfeir" <rob...@codepuccino.com>
Subject Re: JUnit Tests fail
Date Tue, 25 Nov 2003 13:07:07 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hum, this seems like the only one that did not pass the test.  I
understand that this should fail if Driver does not support advanced
JDBC operations, and I expect it to pass since I'm using the standard
Hypersonic SQL stuff that comes with the package.  Should I be running
this test against MySQL or something?  I'd rather not since I don't
always have it installed on the machine I am doing tests from.

R

Testsuite: org.apache.ojb.odmg.AllTests
Tests run: 167, Failures: 3, Errors: 0, Time elapsed: 14.16 sec
- ------------- Standard Output ---------------
[BOOT] INFO: PersistencebrokerFactory class instantiated:
org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl@d3db51
[BOOT] INFO: No value for key 'InterceptorClass'
[org.apache.ojb.odmg.ObjectEnvelopeTable] ERROR: Commit on object level
failed for tx org.apache.ojb.odmg.TransactionImpl@1f31652
Object has been modified by someone else
[org.apache.ojb.odmg.TransactionImpl] ERROR: Could not prepare for
commit: Object has been modified by someone else
junit.framework.AssertionFailedError: count not right, found <50> should
have got <15> This failure is expected if your driver doesn't support
advanced JDBC operations.
	at junit.framework.Assert.fail(Assert.java:47)
	at
org.apache.ojb.odmg.ScrollableQueryResultsTest.testGetSomeB(ScrollableQueryResultsTest.java:292)
	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:325)
	at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:536)
Mammal: id = 24
~ name = Jumbo
~ age = 4
~ Number of legs = 4
~ zooId = 0
Mammal: id = 25
~ name = Silvester
~ age = 4
~ Number of legs = 4
~ zooId = 0
Reptile: id = 26
~ name = Kaa
~ age = 4
~ color = green
~ zooId = 0
[org.apache.ojb.broker.accesslayer.JdbcAccessImpl] ERROR: SQLException
during the execution of the insert (for a org.apache.ojb.odmg.Site):
Violation of unique index: SYS_IDX_23 in statement [INSERT INTO SITE
(ID,NAME,SITEYEAR,SEMESTER) VALUES (2,'testDuplicateInsertion',3,2) ]
Violation of unique index: SYS_IDX_23 in statement [INSERT INTO SITE
(ID,NAME,SITEYEAR,SEMESTER) VALUES (2,'testDuplicateInsertion',3,2) ]
[org.apache.ojb.odmg.ObjectEnvelopeTable] ERROR: Commit on object level
failed for tx org.apache.ojb.odmg.TransactionImpl@10e4fd7
java.sql.SQLException: Violation of unique index: SYS_IDX_23 in
statement [INSERT INTO SITE (ID,NAME,SITEYEAR,SEMESTER) VALUES
(2,'testDuplicateInsertion',3,2) ]
[org.apache.ojb.odmg.TransactionImpl] ERROR: Could not prepare for
commit: null
locked for write: org.apache.ojb.odmg.PersonImpl@88d319[
~  id=4
~  firstname=<null>
~  lastname=<null>
~  motherId=0
~  mother=<null>
~  fatherId=0
~  father=<null>
]
retrieved: org.apache.ojb.odmg.PersonImpl@88d319[
~  id=4
~  firstname=<null>
~  lastname=<null>
~  motherId=0
~  mother=<null>
~  fatherId=0
~  father=<null>
]
- ------------- ---------------- ---------------
- ------------- Standard Error -----------------
org.apache.ojb.broker.OptimisticLockException: Object has been modified
by someone else
	at
org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeUpdate(JdbcAccessImpl.java:513)
	at
org.apache.ojb.broker.core.PersistenceBrokerImpl.storeToDb(PersistenceBrokerImpl.java:2064)
	at
org.apache.ojb.broker.core.PersistenceBrokerImpl.store(PersistenceBrokerImpl.java:1964)
	at
org.apache.ojb.broker.core.PersistenceBrokerImpl.store(PersistenceBrokerImpl.java:1928)
	at
org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(DelegatingPersistenceBroker.java:171)
	at
org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(DelegatingPersistenceBroker.java:171)
	at org.apache.ojb.odmg.states.StateOldDirty.commit(StateOldDirty.java:139)
	at
org.apache.ojb.odmg.ObjectEnvelopeTable.commitAllEnvelopes(ObjectEnvelopeTable.java:241)
	at
org.apache.ojb.odmg.ObjectEnvelopeTable.commit(ObjectEnvelopeTable.java:195)
	at
org.apache.ojb.odmg.TransactionImpl.doCommitOnObjects(TransactionImpl.java:334)
	at org.apache.ojb.odmg.TransactionImpl.prepare(TransactionImpl.java:649)
	at org.apache.ojb.odmg.TransactionImpl.commit(TransactionImpl.java:606)
	at
org.apache.ojb.odmg.LockingTest.testOptimisticLockBasics(LockingTest.java:138)
	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:325)
	at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:536)
java.sql.SQLException: Violation of unique index: SYS_IDX_23 in
statement [INSERT INTO SITE (ID,NAME,SITEYEAR,SEMESTER) VALUES
(2,'testDuplicateInsertion',3,2) ]
	at org.hsqldb.Trace.getError(Unknown Source)
	at org.hsqldb.jdbcResultSet.<init>(Unknown Source)
	at org.hsqldb.jdbcConnection.executeStandalone(Unknown Source)
	at org.hsqldb.jdbcConnection.execute(Unknown Source)
	at org.hsqldb.jdbcStatement.fetchResult(Unknown Source)
	at org.hsqldb.jdbcStatement.executeUpdate(Unknown Source)
	at org.hsqldb.jdbcPreparedStatement.executeUpdate(Unknown Source)
	at
org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeInsert(JdbcAccessImpl.java:235)
	at
org.apache.ojb.broker.core.PersistenceBrokerImpl.storeToDb(PersistenceBrokerImpl.java:2047)
	at
org.apache.ojb.broker.core.PersistenceBrokerImpl.store(PersistenceBrokerImpl.java:1964)
	at
org.apache.ojb.broker.core.PersistenceBrokerImpl.store(PersistenceBrokerImpl.java:1924)
	at
org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(DelegatingPersistenceBroker.java:171)
	at
org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(DelegatingPersistenceBroker.java:171)
	at org.apache.ojb.odmg.states.StateNewDirty.commit(StateNewDirty.java:148)
	at
org.apache.ojb.odmg.ObjectEnvelopeTable.commitAllEnvelopes(ObjectEnvelopeTable.java:241)
	at
org.apache.ojb.odmg.ObjectEnvelopeTable.commit(ObjectEnvelopeTable.java:195)
	at
org.apache.ojb.odmg.TransactionImpl.doCommitOnObjects(TransactionImpl.java:334)
	at org.apache.ojb.odmg.TransactionImpl.prepare(TransactionImpl.java:649)
	at org.apache.ojb.odmg.TransactionImpl.commit(TransactionImpl.java:606)
	at org.apache.ojb.odmg.UserTestCases.newSite(UserTestCases.java:93)
	at
org.apache.ojb.odmg.UserTestCases.testDuplicateInsertion(UserTestCases.java:52)
	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:325)
	at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:536)
org.apache.ojb.broker.KeyConstraintViolatedException:
java.sql.SQLException: Violation of unique index: SYS_IDX_23 in
statement [INSERT INTO SITE (ID,NAME,SITEYEAR,SEMESTER) VALUES
(2,'testDuplicateInsertion',3,2) ]
	at
org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeInsert(JdbcAccessImpl.java:260)
	at
org.apache.ojb.broker.core.PersistenceBrokerImpl.storeToDb(PersistenceBrokerImpl.java:2047)
	at
org.apache.ojb.broker.core.PersistenceBrokerImpl.store(PersistenceBrokerImpl.java:1964)
	at
org.apache.ojb.broker.core.PersistenceBrokerImpl.store(PersistenceBrokerImpl.java:1924)
	at
org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(DelegatingPersistenceBroker.java:171)
	at
org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(DelegatingPersistenceBroker.java:171)
	at org.apache.ojb.odmg.states.StateNewDirty.commit(StateNewDirty.java:148)
	at
org.apache.ojb.odmg.ObjectEnvelopeTable.commitAllEnvelopes(ObjectEnvelopeTable.java:241)
	at
org.apache.ojb.odmg.ObjectEnvelopeTable.commit(ObjectEnvelopeTable.java:195)
	at
org.apache.ojb.odmg.TransactionImpl.doCommitOnObjects(TransactionImpl.java:334)
	at org.apache.ojb.odmg.TransactionImpl.prepare(TransactionImpl.java:649)
	at org.apache.ojb.odmg.TransactionImpl.commit(TransactionImpl.java:606)
	at org.apache.ojb.odmg.UserTestCases.newSite(UserTestCases.java:93)
	at
org.apache.ojb.odmg.UserTestCases.testDuplicateInsertion(UserTestCases.java:52)
	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:325)
	at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:536)
Caused by: java.sql.SQLException: Violation of unique index: SYS_IDX_23
in statement [INSERT INTO SITE (ID,NAME,SITEYEAR,SEMESTER) VALUES
(2,'testDuplicateInsertion',3,2) ]
	at org.hsqldb.Trace.getError(Unknown Source)
	at org.hsqldb.jdbcResultSet.<init>(Unknown Source)
	at org.hsqldb.jdbcConnection.executeStandalone(Unknown Source)
	at org.hsqldb.jdbcConnection.execute(Unknown Source)
	at org.hsqldb.jdbcStatement.fetchResult(Unknown Source)
	at org.hsqldb.jdbcStatement.executeUpdate(Unknown Source)
	at org.hsqldb.jdbcPreparedStatement.executeUpdate(Unknown Source)
	at
org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeInsert(JdbcAccessImpl.java:235)
	... 29 more
- ------------- ---------------- ---------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE/w1P7+cV9vuB27SARAuzzAJ99vRqLdA1l3XtQo3fumTceBA33nACeJRFD
ajpkFGByucWQIL0iZbqE1/E=
=4sm2
-----END PGP SIGNATURE-----


---------------------------------------------------------------------
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