You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jdo-dev@db.apache.org by "Martin Zaun (JIRA)" <ji...@apache.org> on 2006/03/23 09:24:00 UTC

[jira] Created: (JDO-347) JPOX fails some lifecycle tests

JPOX fails some lifecycle tests
-------------------------------

         Key: JDO-347
         URL: http://issues.apache.org/jira/browse/JDO-347
     Project: JDO
        Type: Bug
  Components: tck20  
    Reporter: Martin Zaun


The integration of fixes for JDO-273 and JDO-258 has added (and fixed) a number of lifecycle test cases that are
failed by JPOX.  See attached error messages.


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


[jira] Commented: (JDO-347) JPOX fails some lifecycle tests

Posted by "Craig Russell (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JDO-347?page=comments#action_12371870 ] 

Craig Russell commented on JDO-347:
-----------------------------------

The transient clean state is not persistent. It has no object id. When it's serialized, it should have no detached state. When jdoPreSerialize is executed, the StateManager should not create a detached state. When the instance is deserialized, it should still have no detached state. Unlike detachCopy, which makes the object graph persistent, serialize doesn't make transient instances persistent.


> JPOX fails some lifecycle tests
> -------------------------------
>
>          Key: JDO-347
>          URL: http://issues.apache.org/jira/browse/JDO-347
>      Project: JDO
>         Type: Bug
>   Components: tck20
>     Reporter: Martin Zaun
>  Attachments: errors_state_transition_argument_instances.txt, errors_state_transition_returned_instances.txt
>
> The integration of fixes for JDO-273 and JDO-258 has added (and fixed) a number of lifecycle test cases that are
> failed by JPOX.  See attached error messages.

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


[jira] Commented: (JDO-347) JPOX fails some lifecycle tests

Posted by "Andy Jefferson (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JDO-347?page=comments#action_12371852 ] 

Andy Jefferson commented on JDO-347:
------------------------------------

Test "StateTransitions" now passes with JPOX CVS

> JPOX fails some lifecycle tests
> -------------------------------
>
>          Key: JDO-347
>          URL: http://issues.apache.org/jira/browse/JDO-347
>      Project: JDO
>         Type: Bug
>   Components: tck20
>     Reporter: Martin Zaun
>  Attachments: errors_state_transition_argument_instances.txt, errors_state_transition_returned_instances.txt
>
> The integration of fixes for JDO-273 and JDO-258 has added (and fixed) a number of lifecycle test cases that are
> failed by JPOX.  See attached error messages.

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


[jira] Commented: (JDO-347) JPOX fails some lifecycle tests

Posted by "Andy Jefferson (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JDO-347?page=comments#action_12372223 ] 

Andy Jefferson commented on JDO-347:
------------------------------------

No problem Martin. It should all be built into the current JPOX nightly build and passes for me with latest SVN TCK

> JPOX fails some lifecycle tests
> -------------------------------
>
>          Key: JDO-347
>          URL: http://issues.apache.org/jira/browse/JDO-347
>      Project: JDO
>         Type: Bug
>   Components: tck20
>     Versions: JDO 2 rc1
>     Reporter: Martin Zaun
>     Assignee: Andy Jefferson
>      Fix For: JDO 2 final
>  Attachments: errors_state_transition_argument_instances.txt, errors_state_transition_returned_instances.txt
>
> The integration of fixes for JDO-273 and JDO-258 has added (and fixed) a number of lifecycle test cases that are
> failed by JPOX.  See attached error messages.

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


[jira] Updated: (JDO-347) JPOX fails some lifecycle tests

Posted by "Martin Zaun (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/JDO-347?page=all ]

Martin Zaun updated JDO-347:
----------------------------

    Attachment: errors_state_transition_returned_instances.txt

Attached error messages for failing test lifecycle.StateTransitionsReturnedObjects (= states of returned instances).

> JPOX fails some lifecycle tests
> -------------------------------
>
>          Key: JDO-347
>          URL: http://issues.apache.org/jira/browse/JDO-347
>      Project: JDO
>         Type: Bug
>   Components: tck20
>     Reporter: Martin Zaun
>  Attachments: errors_state_transition_argument_instances.txt, errors_state_transition_returned_instances.txt
>
> The integration of fixes for JDO-273 and JDO-258 has added (and fixed) a number of lifecycle test cases that are
> failed by JPOX.  See attached error messages.

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


[jira] Commented: (JDO-347) JPOX fails some lifecycle tests

Posted by "Martin Zaun (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JDO-347?page=comments#action_12372221 ] 

Martin Zaun commented on JDO-347:
---------------------------------

Sorry if that case has caused additional work. JDO-273 had a comment that this case
(serialize with active tx) needs review, but we wanted to get the new tests commited
last week.

> JPOX fails some lifecycle tests
> -------------------------------
>
>          Key: JDO-347
>          URL: http://issues.apache.org/jira/browse/JDO-347
>      Project: JDO
>         Type: Bug
>   Components: tck20
>     Versions: JDO 2 rc1
>     Reporter: Martin Zaun
>     Assignee: Andy Jefferson
>      Fix For: JDO 2 final
>  Attachments: errors_state_transition_argument_instances.txt, errors_state_transition_returned_instances.txt
>
> The integration of fixes for JDO-273 and JDO-258 has added (and fixed) a number of lifecycle test cases that are
> failed by JPOX.  See attached error messages.

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


[jira] Commented: (JDO-347) JPOX fails some lifecycle tests

Posted by "Martin Zaun (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JDO-347?page=comments#action_12372023 ] 

Martin Zaun commented on JDO-347:
---------------------------------

With the latest integration of a fix for JDO-273, there's one lifecycle test failing: serialize with
optimistic tx should leave the state unchanged (in contrast to a datastore tx, where serialize
transitions hollow/persistent-nontransactional to persistent-clean).

UNCHANGED should be the state transition for
1) test(org.apache.jdo.tck.lifecycle.StateTransitions)junit.framework.AssertionFailedError: 
Assertions A5.9-1 through A5.9-190 (StateTransitions) failed: 
StateTransitions: optimistic transaction; current state hollow
serialize with active optimistic tx transitioned instance to invalid state persistent-clean; expected state hollow
Assertions A5.9-1 through A5.9-190 (StateTransitions) failed: 
StateTransitions: optimistic transaction; current state persistent-nontransactional
serialize with active optimistic tx transitioned instance to invalid state persistent-clean; expected state persistent-nontransactional

> JPOX fails some lifecycle tests
> -------------------------------
>
>          Key: JDO-347
>          URL: http://issues.apache.org/jira/browse/JDO-347
>      Project: JDO
>         Type: Bug
>   Components: tck20
>     Versions: JDO 2 rc1
>     Reporter: Martin Zaun
>     Assignee: Andy Jefferson
>      Fix For: JDO 2 final
>  Attachments: errors_state_transition_argument_instances.txt, errors_state_transition_returned_instances.txt
>
> The integration of fixes for JDO-273 and JDO-258 has added (and fixed) a number of lifecycle test cases that are
> failed by JPOX.  See attached error messages.

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


[jira] Commented: (JDO-347) JPOX fails some lifecycle tests

Posted by "Andy Jefferson (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JDO-347?page=comments#action_12371779 ] 

Andy Jefferson commented on JDO-347:
------------------------------------

I would like to know what the StateTransitionsReturnedObjects tests are performing. They state errors like
    [java] Assertions A5.9-1 through A5.5.8 (serialization, detachment, attachment) failed:
    [java] StateTransitionsReturnedObjects: datastore transaction; current state transient-clean
    [java] serialize with active tx returned instance in invalid state detached-clean; expected state transient

What is the "serialization, detachment, attachment" part of the message ?
Is it that a "transient-clean" has been serialised, then detached, then attached and it ends up with "detached-clean" instead of expected "transient" ?
Dumping all tests into one JUnit means that it is time consuming to debug such things, particularly in terms of locating the relevant part in the JPOX log.

> JPOX fails some lifecycle tests
> -------------------------------
>
>          Key: JDO-347
>          URL: http://issues.apache.org/jira/browse/JDO-347
>      Project: JDO
>         Type: Bug
>   Components: tck20
>     Reporter: Martin Zaun
>  Attachments: errors_state_transition_argument_instances.txt, errors_state_transition_returned_instances.txt
>
> The integration of fixes for JDO-273 and JDO-258 has added (and fixed) a number of lifecycle test cases that are
> failed by JPOX.  See attached error messages.

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


[jira] Commented: (JDO-347) JPOX fails some lifecycle tests

Posted by "Andy Jefferson (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JDO-347?page=comments#action_12371594 ] 

Andy Jefferson commented on JDO-347:
------------------------------------

org.apache.jdo.tck.lifecycle.StateTransitionsReturnedObjects :-
This test seems to think that calling detachCopy on a detached instance will return a DETACH_CLEAN.
I personally would defer to 12.6.8 "Explicit Detachment" of the JDO2 spec
<spec>If the parameter instance (to detachCopy) is detached, then JDOUserException is thrown.</spec>

> JPOX fails some lifecycle tests
> -------------------------------
>
>          Key: JDO-347
>          URL: http://issues.apache.org/jira/browse/JDO-347
>      Project: JDO
>         Type: Bug
>   Components: tck20
>     Reporter: Martin Zaun
>  Attachments: errors_state_transition_argument_instances.txt, errors_state_transition_returned_instances.txt
>
> The integration of fixes for JDO-273 and JDO-258 has added (and fixed) a number of lifecycle test cases that are
> failed by JPOX.  See attached error messages.

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


[jira] Commented: (JDO-347) JPOX fails some lifecycle tests

Posted by "Craig Russell (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JDO-347?page=comments#action_12371599 ] 

Craig Russell commented on JDO-347:
-----------------------------------

This is an inconsistency in the spec. The spec also says that the reachability algorithm is run on the graph of instances and this will cause detached instances to be attached. Then the cached instance is returned.

I've made a note about this in the errata for the spec at http://wiki.apache.org/jdo/ChangeLog. 

> JPOX fails some lifecycle tests
> -------------------------------
>
>          Key: JDO-347
>          URL: http://issues.apache.org/jira/browse/JDO-347
>      Project: JDO
>         Type: Bug
>   Components: tck20
>     Reporter: Martin Zaun
>  Attachments: errors_state_transition_argument_instances.txt, errors_state_transition_returned_instances.txt
>
> The integration of fixes for JDO-273 and JDO-258 has added (and fixed) a number of lifecycle test cases that are
> failed by JPOX.  See attached error messages.

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


[jira] Resolved: (JDO-347) JPOX fails some lifecycle tests

Posted by "Andy Jefferson (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/JDO-347?page=all ]
     
Andy Jefferson resolved JDO-347:
--------------------------------

    Resolution: Fixed

Fixed in JPOX CVS

> JPOX fails some lifecycle tests
> -------------------------------
>
>          Key: JDO-347
>          URL: http://issues.apache.org/jira/browse/JDO-347
>      Project: JDO
>         Type: Bug
>   Components: tck20
>     Versions: JDO 2 rc1
>     Reporter: Martin Zaun
>     Assignee: Andy Jefferson
>      Fix For: JDO 2 final
>  Attachments: errors_state_transition_argument_instances.txt, errors_state_transition_returned_instances.txt
>
> The integration of fixes for JDO-273 and JDO-258 has added (and fixed) a number of lifecycle test cases that are
> failed by JPOX.  See attached error messages.

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


[jira] Updated: (JDO-347) JPOX fails some lifecycle tests

Posted by "Craig Russell (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/JDO-347?page=all ]

Craig Russell updated JDO-347:
------------------------------

    Fix Version: JDO 2 final
        Version: JDO 2 rc1
      Assign To: Andy Jefferson

> JPOX fails some lifecycle tests
> -------------------------------
>
>          Key: JDO-347
>          URL: http://issues.apache.org/jira/browse/JDO-347
>      Project: JDO
>         Type: Bug
>   Components: tck20
>     Versions: JDO 2 rc1
>     Reporter: Martin Zaun
>     Assignee: Andy Jefferson
>      Fix For: JDO 2 final
>  Attachments: errors_state_transition_argument_instances.txt, errors_state_transition_returned_instances.txt
>
> The integration of fixes for JDO-273 and JDO-258 has added (and fixed) a number of lifecycle test cases that are
> failed by JPOX.  See attached error messages.

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


[jira] Updated: (JDO-347) JPOX fails some lifecycle tests

Posted by "Martin Zaun (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/JDO-347?page=all ]

Martin Zaun updated JDO-347:
----------------------------

    Attachment: errors_state_transition_argument_instances.txt

Attached error messages for failing tests lifecycle.StateTransitions (= state transitions of argument instances).

> JPOX fails some lifecycle tests
> -------------------------------
>
>          Key: JDO-347
>          URL: http://issues.apache.org/jira/browse/JDO-347
>      Project: JDO
>         Type: Bug
>   Components: tck20
>     Reporter: Martin Zaun
>  Attachments: errors_state_transition_argument_instances.txt
>
> The integration of fixes for JDO-273 and JDO-258 has added (and fixed) a number of lifecycle test cases that are
> failed by JPOX.  See attached error messages.

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


[jira] Commented: (JDO-347) JPOX fails some lifecycle tests

Posted by "Andy Jefferson (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JDO-347?page=comments#action_12371865 ] 

Andy Jefferson commented on JDO-347:
------------------------------------

I would like some input into StateTransitionsReturnedObjects. Let's take this message :-

    [java] Assertions A5.9-1 through A5.5.8 (serialization, detachment, attachment) failed:
    [java] StateTransitionsReturnedObjects: datastore transaction; current state transient-clean
    [java] serialize with active tx returned instance in invalid state detached-clean; expected state transient

Looking at the test it takes a transient-clean instance (in a txn) and serialises it and then deserialises the serialised object. The end result object will have the detached state present and no StateManager. Consequently it will be detached. Why is the expectation "transient" ? What am I missing ? ;-)

> JPOX fails some lifecycle tests
> -------------------------------
>
>          Key: JDO-347
>          URL: http://issues.apache.org/jira/browse/JDO-347
>      Project: JDO
>         Type: Bug
>   Components: tck20
>     Reporter: Martin Zaun
>  Attachments: errors_state_transition_argument_instances.txt, errors_state_transition_returned_instances.txt
>
> The integration of fixes for JDO-273 and JDO-258 has added (and fixed) a number of lifecycle test cases that are
> failed by JPOX.  See attached error messages.

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


[jira] Commented: (JDO-347) JPOX fails some lifecycle tests

Posted by "Andy Jefferson (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JDO-347?page=comments#action_12372060 ] 

Andy Jefferson commented on JDO-347:
------------------------------------

>  With the latest integration of a fix for JDO-273, there's one lifecycle test failing: serialize with
> optimistic tx should leave the state unchanged (in contrast to a datastore tx, where serialize
> transitions hollow/persistent-nontransactional to persistent-clean). 

Great. That's what it used to do until 3 days ago when I changed it to match the test! Will change it back again

> JPOX fails some lifecycle tests
> -------------------------------
>
>          Key: JDO-347
>          URL: http://issues.apache.org/jira/browse/JDO-347
>      Project: JDO
>         Type: Bug
>   Components: tck20
>     Versions: JDO 2 rc1
>     Reporter: Martin Zaun
>     Assignee: Andy Jefferson
>      Fix For: JDO 2 final
>  Attachments: errors_state_transition_argument_instances.txt, errors_state_transition_returned_instances.txt
>
> The integration of fixes for JDO-273 and JDO-258 has added (and fixed) a number of lifecycle test cases that are
> failed by JPOX.  See attached error messages.

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


[jira] Commented: (JDO-347) JPOX fails some lifecycle tests

Posted by "Andy Jefferson (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JDO-347?page=comments#action_12371574 ] 

Andy Jefferson commented on JDO-347:
------------------------------------

For information : JPOX CVS cuts the long list of failing transitions attached to this issue down to

    [java] Assertions A5.9-1 through A5.9-190 (StateTransitions) failed:
    [java] StateTransitions: optimistic transaction; current state hollow
    [java] makeTransient; unexpected exception caught: java.lang.ClassCastException

    [java] Assertions A5.9-1 through A5.9-190 (StateTransitions) failed:
    [java] StateTransitions: optimistic transaction; current state hollow
    [java] serialize with active tx transitioned instance to invalid state hollow; expected state persistent-clean

    [java] Assertions A5.9-1 through A5.9-190 (StateTransitions) failed:
    [java] StateTransitions: optimistic transaction; current state persistent-nontransactional
    [java] serialize with active tx transitioned instance to invalid state hollow; expected state persistent-clean


> JPOX fails some lifecycle tests
> -------------------------------
>
>          Key: JDO-347
>          URL: http://issues.apache.org/jira/browse/JDO-347
>      Project: JDO
>         Type: Bug
>   Components: tck20
>     Reporter: Martin Zaun
>  Attachments: errors_state_transition_argument_instances.txt, errors_state_transition_returned_instances.txt
>
> The integration of fixes for JDO-273 and JDO-258 has added (and fixed) a number of lifecycle test cases that are
> failed by JPOX.  See attached error messages.

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


[jira] Commented: (JDO-347) JPOX fails some lifecycle tests

Posted by "Craig Russell (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JDO-347?page=comments#action_12371626 ] 

Craig Russell commented on JDO-347:
-----------------------------------

It might be useful here to review the process of detachCopy.

First, the instances in the parameter list are made persistent as if makePersistent had been called. This will recursively make detached and transient instances persistent (detached instances are replaced in this process by corresponding persistent instances).

Second, the FetchPlan is used to instantiate the object graph.

Third, the detached instance graph is created from the persistent object graph, using the FetchPlan to determine which fields are to be marked as loaded in the detached instance graph. 

The detached instances corresponding to persistent instances by position in the original parameter list are returned to the user.

So the test case that calls detachCopy on a detached instance expects that the instance returned is a newly created detached instance with the same object id as the persistent instance in the cache and the parameter instance.

> JPOX fails some lifecycle tests
> -------------------------------
>
>          Key: JDO-347
>          URL: http://issues.apache.org/jira/browse/JDO-347
>      Project: JDO
>         Type: Bug
>   Components: tck20
>     Reporter: Martin Zaun
>  Attachments: errors_state_transition_argument_instances.txt, errors_state_transition_returned_instances.txt
>
> The integration of fixes for JDO-273 and JDO-258 has added (and fixed) a number of lifecycle test cases that are
> failed by JPOX.  See attached error messages.

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