[ http://issues.apache.org/jira/browse/OJB-52?page=all ]
Michael Kröz updated OJB-52:
----------------------------
Attachment: TestArguments.java
This slightly modified version.
The output from I get from this is:
.** testThree **
*created Someclass*
**Someclass ** Id: null text:some attribute Otherclass: is object
** Otherclass ** Id: null Text:other text
F.** testFour **
F
Time: 4,562
There were 2 failures:
1) testThree(TestArguments)junit.framework.AssertionFailedError: SQL failure
while insert object data for class Someclass, PK of the given object is [
Id=21], object was **Someclass ** Id: 21 text:some attribute, exception message
is [Integrity constraint violation: SOMECLASS_FK_1 table: OTHERCLASS in
statement [INSERT INTO Someclass (Id,otherclassID,text) VALUES (21,22,'some
attribute') ]], SQL code [23000]
at TestArguments.testThree(TestArguments.java:48)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at TestArguments.main(TestArguments.java:25)
2) testFour(TestArguments)junit.framework.AssertionFailedError: No objects
found.
at TestArguments.testFour(TestArguments.java:71)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at TestArguments.main(TestArguments.java:25)
FAILURES!!!
Tests run: 2, Failures: 2, Errors: 0
> KeyConstraintViolatedException during store
> -------------------------------------------
>
> Key: OJB-52
> URL: http://issues.apache.org/jira/browse/OJB-52
> Project: OJB
> Type: Bug
> Versions: 1.0.3
> Environment: ojb 1.0.3, hsqldb from ojb-blank, enriched with junit, ojb-junit
> java 1.4.2_04
> Reporter: Michael Kröz
> Priority: Minor
> Attachments: TestArguments.java, TestArguments.java
>
> Hi,
> I am getting a KeyConstraintViolatedException during store of an object
> structure.
> I supplied a test that shows this. Can someone verify that this is really a
> bug?
> The actual exception message was this:
> testThree(TestArguments)org.apache.ojb.broker.KeyConstraintViolatedException:
> SQL failure while insert object data for class Someclass, PK of the given
> object is [ Id=1], object was **Someclass ** Id: 1 text:some attribute,
> exception message is [Integrity constraint violation: SOMECLASS_FK_1 table:
> OTHERCLASS in statement [INSERT INTO Someclass (Id,otherclassID,text) VALUES
> (1,2,'some attribute') ]], SQL code [23000]
> at
> org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeInsert(JdbcAccessImpl.java:266)
> at
> org.apache.ojb.broker.core.PersistenceBrokerImpl.storeToDb(PersistenceBrokerImpl.java:1754)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]