You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ode.apache.org by "Richard Taylor (JIRA)" <ji...@apache.org> on 2007/10/02 18:42:50 UTC

[jira] Created: (ODE-192) Delete instance call on Management API fails

Delete instance call on Management API fails
--------------------------------------------

                 Key: ODE-192
                 URL: https://issues.apache.org/jira/browse/ODE-192
             Project: ODE
          Issue Type: Bug
          Components: BPEL Runtime
         Environment: Axis2 Distro
Jetty 6.1.1
WinXP 64
JDK 1.5.0_10
            Reporter: Richard Taylor


When trying to delete a single instance via the PMAPI it appears that all instances are deleted and Ode is left in an unstable state.  I am using the JPA persistence which I'm assuming is the default.

The problem appears to be in BPELDAOConnectionImpl.java in the instanceQuery() method.  If I debug down to this method, the "criteria" parameter has been properly built with my filter (i.e. iid=54) but it is not properly utilized in the query.  There is a TODO note to "finish the implementation"




-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ODE-192) Delete instance call on Management API fails

Posted by "Richard Taylor (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ODE-192?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Richard Taylor updated ODE-192:
-------------------------------

    Attachment: DeleteInstanceIssue.zip

A Junit and associated process files to illustrate the issue(s).  This JUnit was run from the Axis2 module.

> Delete instance call on Management API fails
> --------------------------------------------
>
>                 Key: ODE-192
>                 URL: https://issues.apache.org/jira/browse/ODE-192
>             Project: ODE
>          Issue Type: Bug
>          Components: BPEL Runtime
>         Environment: Axis2 Distro
> Jetty 6.1.1
> WinXP 64
> JDK 1.5.0_10
>            Reporter: Richard Taylor
>         Attachments: DeleteInstanceIssue.zip
>
>
> When trying to delete a single instance via the PMAPI it appears that all instances are deleted and Ode is left in an unstable state.  I am using the JPA persistence which I'm assuming is the default.
> The problem appears to be in BPELDAOConnectionImpl.java in the instanceQuery() method.  If I debug down to this method, the "criteria" parameter has been properly built with my filter (i.e. iid=54) but it is not properly utilized in the query.  There is a TODO note to "finish the implementation"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ODE-192) Delete instance call on Management API fails

Posted by "Richard Taylor (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ODE-192?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12538868 ] 

Richard Taylor commented on ODE-192:
------------------------------------

Also wanted to add that I tested this under Tomcat 5.5.20 as well, with the same results.  And this is using the current 1.1 branch.

> Delete instance call on Management API fails
> --------------------------------------------
>
>                 Key: ODE-192
>                 URL: https://issues.apache.org/jira/browse/ODE-192
>             Project: ODE
>          Issue Type: Bug
>          Components: BPEL Runtime
>         Environment: Axis2 Distro
> Jetty 6.1.1
> WinXP 64
> JDK 1.5.0_10
>            Reporter: Richard Taylor
>         Attachments: DeleteInstanceIssue.zip, stacktrace.txt
>
>
> When trying to delete a single instance via the PMAPI it appears that all instances are deleted and Ode is left in an unstable state.  I am using the JPA persistence which I'm assuming is the default.
> The problem appears to be in BPELDAOConnectionImpl.java in the instanceQuery() method.  If I debug down to this method, the "criteria" parameter has been properly built with my filter (i.e. iid=54) but it is not properly utilized in the query.  There is a TODO note to "finish the implementation"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ODE-192) Delete instance call on Management API fails

Posted by "Richard Taylor (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ODE-192?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Richard Taylor updated ODE-192:
-------------------------------

    Attachment: stacktrace.txt

Here is a stacktrace from the error I get when trying to execute the process after deleting instances.

Sequence:
- Executed DynPartner service
- Called InstanceManagement.delete()
- Tried to executed DynPartner service again, this is the result 

> Delete instance call on Management API fails
> --------------------------------------------
>
>                 Key: ODE-192
>                 URL: https://issues.apache.org/jira/browse/ODE-192
>             Project: ODE
>          Issue Type: Bug
>          Components: BPEL Runtime
>         Environment: Axis2 Distro
> Jetty 6.1.1
> WinXP 64
> JDK 1.5.0_10
>            Reporter: Richard Taylor
>         Attachments: DeleteInstanceIssue.zip, stacktrace.txt
>
>
> When trying to delete a single instance via the PMAPI it appears that all instances are deleted and Ode is left in an unstable state.  I am using the JPA persistence which I'm assuming is the default.
> The problem appears to be in BPELDAOConnectionImpl.java in the instanceQuery() method.  If I debug down to this method, the "criteria" parameter has been properly built with my filter (i.e. iid=54) but it is not properly utilized in the query.  There is a TODO note to "finish the implementation"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ODE-192) Delete instance call on Management API fails

Posted by "Matthieu Riou (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ODE-192?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12601164#action_12601164 ] 

Matthieu Riou commented on ODE-192:
-----------------------------------

Patch applied. Leaving open because of the second issue.

Good catch, thanks for this new patch!

> Delete instance call on Management API fails
> --------------------------------------------
>
>                 Key: ODE-192
>                 URL: https://issues.apache.org/jira/browse/ODE-192
>             Project: ODE
>          Issue Type: Bug
>          Components: BPEL Runtime
>         Environment: Axis2 Distro
> Jetty 6.1.1
> WinXP 64
> JDK 1.5.0_10
>            Reporter: Richard Taylor
>             Fix For: 1.2
>
>         Attachments: DeleteInstanceIssue.zip, FixDeleteInstances.patch, stacktrace.txt
>
>
> When trying to delete a single instance via the PMAPI it appears that all instances are deleted and Ode is left in an unstable state.  I am using the JPA persistence which I'm assuming is the default.
> The problem appears to be in BPELDAOConnectionImpl.java in the instanceQuery() method.  If I debug down to this method, the "criteria" parameter has been properly built with my filter (i.e. iid=54) but it is not properly utilized in the query.  There is a TODO note to "finish the implementation"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ODE-192) Delete instance call on Management API fails

Posted by "Ciaran Jessup (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ODE-192?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ciaran Jessup updated ODE-192:
------------------------------

    Attachment: FixDeleteInstances.patch

This patch should resolve issues 1 & 3 but issue 2 is related to another bug ODE-288 as far as I can tell?   I'm a little sceptical that this fix is really the fix, because it was so trivial, however it works for me ? 

(OpenJPA Many-To-One relationship between the ProcessInstance + Correlator had a CASCADE_ALL set on it, so when the instance(s) got deleted so did the correlators, my reading of the code is that the correlators should not be deleted, so I've changed the cascade rules to CASCADE_PERSIST, which is *more* correct [without reading the code fully I wasn't sure whether I could remove the cascade rules totally]) 

I've checked the Hibernate ProcessInstanceDAO and the HProcess business object that uses appears not to set a cascade at all so should work ok (but I'm using the OpenJPA on Derby here)

> Delete instance call on Management API fails
> --------------------------------------------
>
>                 Key: ODE-192
>                 URL: https://issues.apache.org/jira/browse/ODE-192
>             Project: ODE
>          Issue Type: Bug
>          Components: BPEL Runtime
>         Environment: Axis2 Distro
> Jetty 6.1.1
> WinXP 64
> JDK 1.5.0_10
>            Reporter: Richard Taylor
>             Fix For: 1.2
>
>         Attachments: DeleteInstanceIssue.zip, FixDeleteInstances.patch, stacktrace.txt
>
>
> When trying to delete a single instance via the PMAPI it appears that all instances are deleted and Ode is left in an unstable state.  I am using the JPA persistence which I'm assuming is the default.
> The problem appears to be in BPELDAOConnectionImpl.java in the instanceQuery() method.  If I debug down to this method, the "criteria" parameter has been properly built with my filter (i.e. iid=54) but it is not properly utilized in the query.  There is a TODO note to "finish the implementation"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ODE-192) Delete instance call on Management API fails

Posted by "Ciaran Jessup (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ODE-192?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ciaran Jessup updated ODE-192:
------------------------------

    Attachment: DeleteByInstanceId.patch

A patch to fix Issue 2 ;)   

As far as I can tell the InstanceFilter code strips out any operators on the 'iid' filters, so it is not currently possible to specify a (un)boundede range of instance ids.  I've checked the HibernateDAO implementation and it will only ever match a single iid, so I've replicated that code in the JPA implementation, the MEMDAO implementation doesn't seem to bear any reality to the other two, so I've left it be ;)

This patch allows the delete method to accept a filter  such as  iid=1234.  It will then as per the comment return '1234'  if it was able to delete it.

As a side note,  if JPA is anything like Hibernate the current approach to deleting all instances won't scale too well as it iterates over every record in the table, deleting each in turn, does JPA support bulk deletes as hibrnate does? 

Also it may be better (imho) to return rows deleted, rather than instance ids, as deleting all instances could return a huge number of ids ;)


> Delete instance call on Management API fails
> --------------------------------------------
>
>                 Key: ODE-192
>                 URL: https://issues.apache.org/jira/browse/ODE-192
>             Project: ODE
>          Issue Type: Bug
>          Components: BPEL Runtime
>         Environment: Axis2 Distro
> Jetty 6.1.1
> WinXP 64
> JDK 1.5.0_10
>            Reporter: Richard Taylor
>             Fix For: 1.2
>
>         Attachments: DeleteByInstanceId.patch, DeleteInstanceIssue.zip, FixDeleteInstances.patch, stacktrace.txt
>
>
> When trying to delete a single instance via the PMAPI it appears that all instances are deleted and Ode is left in an unstable state.  I am using the JPA persistence which I'm assuming is the default.
> The problem appears to be in BPELDAOConnectionImpl.java in the instanceQuery() method.  If I debug down to this method, the "criteria" parameter has been properly built with my filter (i.e. iid=54) but it is not properly utilized in the query.  There is a TODO note to "finish the implementation"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ODE-192) Delete instance call on Management API fails

Posted by "Richard Taylor (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ODE-192?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12538864 ] 

Richard Taylor commented on ODE-192:
------------------------------------

I've looked into this a bit more and from what I can tell there are three issues involved.  I am working hitting the InstanceManagement web service, and have also get the same results talking directly to the interface.

I will attach a JUnit that exercises these three problems.  It is based on the original InstanceManagment junit..

Someone please comment if they are able to either 1. delete a particular instance or 2. delete all instances and successfully execute the same process after delete instances.   

Problem 1:
InstanceManagement.delete() always returns an empty list. This can be seen in ProcessAndInstanceManagementImpl.delete().  

Problem 2:
All instances are deleted despite specifying a filter with a particular instance ID.   You can specify iid=54, piid=54, iid = 54, etc.  The instance id is properly processed by the instance filter but it is not read / handled in BPELDAOConnectionImpl.instanceQuery().  The result is that all instances are returned and hence deleted.

Problem 3:  Severe
After trying to delete a single instance (or all instances), I can no longer execute a process that worked fine just before deleting instances.   I will attach a stack trace of this aspect of the problem.






> Delete instance call on Management API fails
> --------------------------------------------
>
>                 Key: ODE-192
>                 URL: https://issues.apache.org/jira/browse/ODE-192
>             Project: ODE
>          Issue Type: Bug
>          Components: BPEL Runtime
>         Environment: Axis2 Distro
> Jetty 6.1.1
> WinXP 64
> JDK 1.5.0_10
>            Reporter: Richard Taylor
>
> When trying to delete a single instance via the PMAPI it appears that all instances are deleted and Ode is left in an unstable state.  I am using the JPA persistence which I'm assuming is the default.
> The problem appears to be in BPELDAOConnectionImpl.java in the instanceQuery() method.  If I debug down to this method, the "criteria" parameter has been properly built with my filter (i.e. iid=54) but it is not properly utilized in the query.  There is a TODO note to "finish the implementation"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ODE-192) Delete instance call on Management API fails

Posted by "Matthieu Riou (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ODE-192?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matthieu Riou updated ODE-192:
------------------------------

    Fix Version/s: 1.3

> Delete instance call on Management API fails
> --------------------------------------------
>
>                 Key: ODE-192
>                 URL: https://issues.apache.org/jira/browse/ODE-192
>             Project: ODE
>          Issue Type: Bug
>          Components: BPEL Runtime
>         Environment: Axis2 Distro
> Jetty 6.1.1
> WinXP 64
> JDK 1.5.0_10
>            Reporter: Richard Taylor
>             Fix For: 1.3
>
>         Attachments: DeleteInstanceIssue.zip, stacktrace.txt
>
>
> When trying to delete a single instance via the PMAPI it appears that all instances are deleted and Ode is left in an unstable state.  I am using the JPA persistence which I'm assuming is the default.
> The problem appears to be in BPELDAOConnectionImpl.java in the instanceQuery() method.  If I debug down to this method, the "criteria" parameter has been properly built with my filter (i.e. iid=54) but it is not properly utilized in the query.  There is a TODO note to "finish the implementation"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (ODE-192) Delete instance call on Management API fails

Posted by "Matthieu Riou (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ODE-192?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matthieu Riou resolved ODE-192.
-------------------------------

    Resolution: Fixed
      Assignee: Matthieu Riou

Last patch applied. Thanks!

> Delete instance call on Management API fails
> --------------------------------------------
>
>                 Key: ODE-192
>                 URL: https://issues.apache.org/jira/browse/ODE-192
>             Project: ODE
>          Issue Type: Bug
>          Components: BPEL Runtime
>         Environment: Axis2 Distro
> Jetty 6.1.1
> WinXP 64
> JDK 1.5.0_10
>            Reporter: Richard Taylor
>            Assignee: Matthieu Riou
>             Fix For: 1.2
>
>         Attachments: DeleteByInstanceId.patch, DeleteInstanceIssue.zip, FixDeleteInstances.patch, stacktrace.txt
>
>
> When trying to delete a single instance via the PMAPI it appears that all instances are deleted and Ode is left in an unstable state.  I am using the JPA persistence which I'm assuming is the default.
> The problem appears to be in BPELDAOConnectionImpl.java in the instanceQuery() method.  If I debug down to this method, the "criteria" parameter has been properly built with my filter (i.e. iid=54) but it is not properly utilized in the query.  There is a TODO note to "finish the implementation"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.