You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ode.apache.org by Andi Abes <aa...@progress.com> on 2009/02/24 16:44:05 UTC

Correlated receive in parallel for-each loop

I'm trying to get a relatively simple process which performs a
correlated receive in parallel for-each loop (attached) - just the sweet
spot for BPEL ;)

I've tried with:
-	Derby/JPA - java.sql.SQLException: A lock could not be obtained
due to a deadlock (full stack in earlier emails)
-	Hibernate/Oracle - the exception is below (hibernate 3.2.5/
oracle 10.2)
-	JPA / Oracle - This didn't produce exceptions, but it produced
the following error, which killed the process instance...
o	ERROR - GeronimoLog.error(104) | The message exchange seems to
be in an unconsistent state, you're probably missing a reply on a
request/response interaction.
INFO - GeronimoLog.info(79) | ActivityRecovery: Registering activity 25,
failure reason: org.apache.ode.bpel.iapi.BpelEngineException: Engine
requested response
 while the message exchange hqejbhcnphr426192c3r3o was in the state
COMPLETED_OK on channel 45

Any thoughts?
The last 2 cases sound to me as a bug...



 <<BPEL_2.zip>> 

Exception with Hibernate/Oracle:


DEBUG - GeronimoLog.debug(66) |
org.apache.ode.daohib.bpel.hobj.HProcess{created=null, active=false,
events=<uninitialized>, processId={urn:bpel:BpelMock}BPELMo
ck-1, deployDate=2009-02-24 10:33:55, id=1, version=1,
messageExchanges=<uninitialized>, deploymentPartnerLinks=[],
typeName=BPELMock, lock=0, correlators=<unin
itialized>, deployer=null, typeNamespace=urn:bpel:BpelMock,
instances=<uninitialized>, guid=hqejbhcnphr42in8iaul6m}
DEBUG - GeronimoLog.debug(66) |
org.apache.ode.daohib.bpel.hobj.HCorrelator{created=2009-02-24 10:33:55,
lock=0, process=org.apache.ode.daohib.bpel.hobj.HProces
s#1, correlatorId=25.ESBResult, messageCorrelations=<uninitialized>,
selectors=<uninitialized>, id=2}
DEBUG - GeronimoLog.debug(66) |
org.apache.ode.daohib.bpel.hobj.HProcessInstance{created=2009-02-24
10:34:25, jacobState=org.apache.ode.daohib.bpel.hobj.HLargeD
ata#168, events=<uninitialized>, previousState=10,
lastActiveTime=2009-02-24 10:34:33, fault=null,
correlationSets=<uninitialized>, sequence=27, id=7, activityF
ailureCount=0, messageExchanges=<uninitialized>, lock=0,
correlatorSelectors=<uninitialized>, activityFailureDateTime=null,
scopes=<uninitialized>, process=org.
apache.ode.daohib.bpel.hobj.HProcess#1,
activityRecoveries=<uninitialized>, state=20,
instantiatingCorrelator=org.apache.ode.daohib.bpel.hobj.HCorrelator#3}
DEBUG - GeronimoLog.debug(66) | about to open PreparedStatement (open
PreparedStatements: 0, globally: 3)
DEBUG - GeronimoLog.debug(66) | opening JDBC connection
DEBUG - GeronimoLog.debug(70) | Cannot open connection [???]
java.sql.SQLException: ORA-01453: SET TRANSACTION must be first
statement of transaction
        at
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:11
2)
        at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
        at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
        at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:745)
        at
oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:207)
        at
oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:957)
        at
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.
java:1170)
        at
oracle.jdbc.driver.OracleStatement.executeInternal(OracleStatement.java:
1696)
        at
oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:1662)
        at
oracle.jdbc.driver.PhysicalConnection.setTransactionIsolation(PhysicalCo
nnection.java:1661)
        at
org.apache.tomcat.dbcp.dbcp.DelegatingConnection.setTransactionIsolation
(DelegatingConnection.java:340)
        at
org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper
.setTransactionIsolation(PoolingDataSource.java:332)
        at
org.apache.ode.daohib.DataSourceConnectionProvider.getConnection(DataSou
rceConnectionProvider.java:45)
        at
org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.ja
va:423)
        at
org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.jav
a:144)
        at
org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher
.java:139)
        at
org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1547)
        at
org.hibernate.loader.hql.QueryLoader.iterate(QueryLoader.java:399)
        at
org.hibernate.hql.ast.QueryTranslatorImpl.iterate(QueryTranslatorImpl.ja
va:380)
        at
org.hibernate.engine.query.HQLQueryPlan.performIterate(HQLQueryPlan.java
:224)
        at
org.hibernate.impl.SessionImpl.iterateFilter(SessionImpl.java:1492)
        at
org.hibernate.impl.CollectionFilterImpl.iterate(CollectionFilterImpl.jav
a:38)
        at
org.apache.ode.daohib.bpel.CorrelatorDaoImpl.dequeueMessage(CorrelatorDa
oImpl.java:89)
:

RE: Correlated receive in parallel for-each loop

Posted by Andi Abes <aa...@progress.com>.
Just don't explicitly set ode.connection.isolation, this way we will
leave it alone and Oracle uses the proper value by default.

Matthieu
 

Not set - but still getting exception.

 

 


Re: Correlated receive in parallel for-each loop

Posted by Alex Boisvert <bo...@intalio.com>.
Yes, I suggest opening a Jira and attach everything you can so that we can
easily reproduce the situation.

Getting to a point where we can reproduce the issue is you best bet for
getting it resolved.

alex


On Wed, Mar 4, 2009 at 10:21 AM, Andi Abes <aa...@progress.com> wrote:

> I'm not sure what the proper etiquette here is -
>
> I have a reproducible case where I get the exceptions listed below. I've
> tried various JPA/Oracle and Hibernate/Oracle (as well as JPA/Derby)
> configurations.
>
>
>
> I'm not really familiar with the unit test framework used by ODE, so my
> testcase is built around a simple Java test client that both invokes and
> response to the BPEL process.
>
>
>
> Should I open a JIRA with the artifacts mentioned?
>
> Is there another approach to getting this resolved?
>
>
>
>
>
> TIA,
>
> a.
>
>
>
> ________________________________
>
> From: Matthieu Riou [mailto:matthieu.riou@gmail.com]
> Sent: Thursday, February 26, 2009 9:38 PM
> To: Andi Abes
> Cc: user@ode.apache.org
> Subject: Re: Correlated receive in parallel for-each loop
>
>
>
> On Wed, Feb 25, 2009 at 12:09 PM, Andi Abes <aa...@progress.com> wrote:
>
>        Matthieu,
>         Was the log useful?
>         Show I open a JIRA? I do have some code to drive the BPEL
> process that
>        can easily reproduce this behavior (it does rely on CXF runtime)
>
>
> Sorry I haven't had any time to look at it today, I'll check tomorrow.
>
>
>
>         I couldn't find a way to avoid the SET TRANSACTION exception...
> is
>        there a way of avoiding it that you can recommend?
>
>
> Just don't explicitly set ode.connection.isolation, this way we will
> leave it alone and Oracle uses the proper value by default.
>
> Matthieu
>
>
>
>
>
>        a.
>
>
>        > -----Original Message-----
>        > From: Matthieu Riou [mailto:matthieu.riou@gmail.com]
>
>        > Sent: Tuesday, February 24, 2009 11:17 AM
>        > To: user@ode.apache.org
>
>        > Subject: Re: Correlated receive in parallel for-each loop
>        >
>        > On Tue, Feb 24, 2009 at 7:44 AM, Andi Abes
> <aa...@progress.com> wrote:
>        >
>        > >  I'm trying to get a relatively simple process which
> performs a
>        > correlated
>        > > receive in parallel for-each loop (attached) - just the
> sweet spot
>        for
>        > > BPEL ;)
>        > >
>        > > I've tried with:
>        > >
>        > > -       Derby/JPA - java.sql.SQLException: A lock could not
> be
>        obtained
>        > > due to a deadlock (full stack in earlier emails)
>        > >
>        > > -       Hibernate/Oracle - the exception is below (hibernate
> 3.2.5/
>        > oracle
>        > > 10.2)
>        > >
>        > > -       JPA / Oracle - This didn't produce exceptions, but
> it
>        produced
>        > the
>        > > following error, which killed the process instance...
>        > >
>        > > o       ERROR - GeronimoLog.error(104) | The message
> exchange seems
>        to
>        > be
>        > > in an unconsistent state, you're probably missing a reply on
> a
>        > > request/response interaction.
>        > > INFO - GeronimoLog.info(79) | ActivityRecovery: Registering
> activity
>        25,
>        > > failure reason:
> org.apache.ode.bpel.iapi.BpelEngineException: Engine
>        > > requested response
>        > >  while the message exchange hqejbhcnphr426192c3r3o was in
> the state
>        > > COMPLElTED_OK on channel 45
>        > >
>        > > Any thoughts?
>        > >
>        > The above looks like a bug yes, could you provide a full debug
> log to
>        see
>        > what's happening exactly?
>        >
>        > Your second problem is due to the Oracle JDBC driver that
> refuses to
>        alter
>        > the transaction isolation level after the transaction has been
>        started,
>        > even
>        > if it's the first statement in the transaction. So basically
> we can't
>        set
>        > it, it has to be set at the driver level.
>        >
>        > The good news though is that READ_COMMITTED is the default on
> Oracle
>        so
>        > you
>        > don't need to force the isolation level, removing the
> environment
>        variable
>        > should solve it.
>        >
>        > Cheers,
>        > Matthieu
>        >
>        >
>        > > The last 2 cases sound to me as a bug...
>        > >
>        > >  <<BPEL_2.zip>>
>        > >
>        > > Exception with Hibernate/Oracle:
>        > >
>        > > DEBUG - GeronimoLog.debug(66) |
>        > > org.apache.ode.daohib.bpel.hobj.HProcess{created=null,
> active=false,
>        > > events=<uninitialized>, processId={urn:bpel:BpelMock}BPELMo
>        > >
>        > > ck-1, deployDate=2009-02-24 10:33:55, id=1, version=1,
>        > > messageExchanges=<uninitialized>, deploymentPartnerLinks=[],
>        > > typeName=BPELMock, lock=0, correlators=<unin
>        > >
>        > > itialized>, deployer=null, typeNamespace=urn:bpel:BpelMock,
>        > > instances=<uninitialized>, guid=hqejbhcnphr42in8iaul6m}
>        > >
>        > > DEBUG - GeronimoLog.debug(66) |
>        > >
> org.apache.ode.daohib.bpel.hobj.HCorrelator{created=2009-02-24
>        10:33:55,
>        > > lock=0, process=org.apache.ode.daohib.bpel.hobj.HProces
>        > >
>        > > s#1, correlatorId=25.ESBResult,
> messageCorrelations=<uninitialized>,
>        > > selectors=<uninitialized>, id=2}
>        > >
>        > > DEBUG - GeronimoLog.debug(66) |
>        > >
> org.apache.ode.daohib.bpel.hobj.HProcessInstance{created=2009-02-24
>        > > 10:34:25, jacobState=org.apache.ode.daohib.bpel.hobj.HLargeD
>        > >
>        > > ata#168, events=<uninitialized>, previousState=10,
>        > > lastActiveTime=2009-02-24 10:34:33, fault=null,
>        > > correlationSets=<uninitialized>, sequence=27, id=7,
> activityF
>        > >
>        > > ailureCount=0, messageExchanges=<uninitialized>, lock=0,
>        > > correlatorSelectors=<uninitialized>,
> activityFailureDateTime=null,
>        > > scopes=<uninitialized>, process=org.
>        > >
>        > > apache.ode.daohib.bpel.hobj.HProcess#1,
>        > activityRecoveries=<uninitialized>,
>        > > state=20,
>        > >
>
> instantiatingCorrelator=org.apache.ode.daohib.bpel.hobj.HCorrelator#3}
>        > >
>        > > DEBUG - GeronimoLog.debug(66) | about to open
> PreparedStatement
>        (open
>        > > PreparedStatements: 0, globally: 3)
>        > >
>        > > DEBUG - GeronimoLog.debug(66) | opening JDBC connection
>        > >
>        > > DEBUG - GeronimoLog.debug(70) | Cannot open connection [???]
>        > >
>        > > java.sql.SQLException: ORA-01453: SET TRANSACTION must be
> first
>        > statement
>        > > of transaction
>        > >
>        > >         at
>        > >
>        >
>
> oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:11
>        2)
>        > >
>        > >         at
>        oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
>        > >
>        > >         at
>        oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
>        > >
>        > >         at
> oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:745)
>        > >
>        > >         at
>        > oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:207)
>        > >
>        > >         at
>        > >
>
> oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:957)
>        > >
>        > >         at
>        > >
>        >
>
> oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.
>        ja
>        > va:1170)
>        > >
>        > >         at
>        > >
>        >
>
> oracle.jdbc.driver.OracleStatement.executeInternal(OracleStatement.java:
>        16
>        > 96)
>        > >
>        > >         at
>        > >
>
> oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:1662)
>        > >
>        > >         at
>        > >
>        >
>
> oracle.jdbc.driver.PhysicalConnection.setTransactionIsolation(PhysicalCo
>        nn
>        > ection.java:1661)
>        > >
>        > >         at
>        > >
>        >
>
> org.apache.tomcat.dbcp.dbcp.DelegatingConnection.setTransactionIsolation
>        (D
>        > elegatingConnection.java:340)
>        > >
>        > >         at
>        > >
>        >
>
> org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper
>        .s
>        > etTransactionIsolation(PoolingDataSource.java:332)
>        > >
>        > >         at
>        > >
>        >
>
> org.apache.ode.daohib.DataSourceConnectionProvider.getConnection(DataSou
>        rc
>        > eConnectionProvider.java:45)
>        > >
>        > >         at
>        > >
>        >
>
> org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.ja
>        va
>        > :423)
>        > >
>        > >         at
>        > >
>        >
>
> org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.jav
>        a:
>        > 144)
>        > >
>        > >         at
>        > >
>        >
>
> org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher
>        .j
>        > ava:139)
>        > >
>        > >         at
>        > >
> org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1547)
>        > >
>        > >         at
>        > >
> org.hibernate.loader.hql.QueryLoader.iterate(QueryLoader.java:399)
>        > >
>        > >         at
>        > >
>        >
>
> org.hibernate.hql.ast.QueryTranslatorImpl.iterate(QueryTranslatorImpl.ja
>        va
>        > :380)
>        > >
>        > >         at
>        > >
>        >
>
> org.hibernate.engine.query.HQLQueryPlan.performIterate(HQLQueryPlan.java
>        :2
>        > 24)
>        > >
>        > >         at
>        > >
> org.hibernate.impl.SessionImpl.iterateFilter(SessionImpl.java:1492)
>        > >
>        > >         at
>        > >
>        >
>
> org.hibernate.impl.CollectionFilterImpl.iterate(CollectionFilterImpl.jav
>        a:
>        > 38)
>        > >
>        > >         at
>        > >
>        >
>
>
> org.apache.ode.daohib.bpel.CorrelatorDaoImpl.dequeueMessage(CorrelatorDa
>        oI
>        > mpl.java:89)
>        > >
>        > > :
>        > >
>
>
>
>

RE: Correlated receive in parallel for-each loop

Posted by Andi Abes <aa...@progress.com>.
I'm not sure what the proper etiquette here is - 

I have a reproducible case where I get the exceptions listed below. I've
tried various JPA/Oracle and Hibernate/Oracle (as well as JPA/Derby)
configurations.

 

I'm not really familiar with the unit test framework used by ODE, so my
testcase is built around a simple Java test client that both invokes and
response to the BPEL process.

 

Should I open a JIRA with the artifacts mentioned?

Is there another approach to getting this resolved?

 

 

TIA,

a.

 

________________________________

From: Matthieu Riou [mailto:matthieu.riou@gmail.com] 
Sent: Thursday, February 26, 2009 9:38 PM
To: Andi Abes
Cc: user@ode.apache.org
Subject: Re: Correlated receive in parallel for-each loop

 

On Wed, Feb 25, 2009 at 12:09 PM, Andi Abes <aa...@progress.com> wrote:

	Matthieu,
	 Was the log useful?
	 Show I open a JIRA? I do have some code to drive the BPEL
process that
	can easily reproduce this behavior (it does rely on CXF runtime)


Sorry I haven't had any time to look at it today, I'll check tomorrow.
 

	
	 I couldn't find a way to avoid the SET TRANSACTION exception...
is
	there a way of avoiding it that you can recommend?


Just don't explicitly set ode.connection.isolation, this way we will
leave it alone and Oracle uses the proper value by default.

Matthieu
 

	 

	
	a.
	
	
	> -----Original Message-----
	> From: Matthieu Riou [mailto:matthieu.riou@gmail.com]

	> Sent: Tuesday, February 24, 2009 11:17 AM
	> To: user@ode.apache.org

	> Subject: Re: Correlated receive in parallel for-each loop
	>
	> On Tue, Feb 24, 2009 at 7:44 AM, Andi Abes
<aa...@progress.com> wrote:
	>
	> >  I'm trying to get a relatively simple process which
performs a
	> correlated
	> > receive in parallel for-each loop (attached) - just the
sweet spot
	for
	> > BPEL ;)
	> >
	> > I've tried with:
	> >
	> > -       Derby/JPA - java.sql.SQLException: A lock could not
be
	obtained
	> > due to a deadlock (full stack in earlier emails)
	> >
	> > -       Hibernate/Oracle - the exception is below (hibernate
3.2.5/
	> oracle
	> > 10.2)
	> >
	> > -       JPA / Oracle - This didn't produce exceptions, but
it
	produced
	> the
	> > following error, which killed the process instance...
	> >
	> > o       ERROR - GeronimoLog.error(104) | The message
exchange seems
	to
	> be
	> > in an unconsistent state, you're probably missing a reply on
a
	> > request/response interaction.
	> > INFO - GeronimoLog.info(79) | ActivityRecovery: Registering
activity
	25,
	> > failure reason:
org.apache.ode.bpel.iapi.BpelEngineException: Engine
	> > requested response
	> >  while the message exchange hqejbhcnphr426192c3r3o was in
the state
	> > COMPLElTED_OK on channel 45
	> >
	> > Any thoughts?
	> >
	> The above looks like a bug yes, could you provide a full debug
log to
	see
	> what's happening exactly?
	>
	> Your second problem is due to the Oracle JDBC driver that
refuses to
	alter
	> the transaction isolation level after the transaction has been
	started,
	> even
	> if it's the first statement in the transaction. So basically
we can't
	set
	> it, it has to be set at the driver level.
	>
	> The good news though is that READ_COMMITTED is the default on
Oracle
	so
	> you
	> don't need to force the isolation level, removing the
environment
	variable
	> should solve it.
	>
	> Cheers,
	> Matthieu
	>
	>
	> > The last 2 cases sound to me as a bug...
	> >
	> >  <<BPEL_2.zip>>
	> >
	> > Exception with Hibernate/Oracle:
	> >
	> > DEBUG - GeronimoLog.debug(66) |
	> > org.apache.ode.daohib.bpel.hobj.HProcess{created=null,
active=false,
	> > events=<uninitialized>, processId={urn:bpel:BpelMock}BPELMo
	> >
	> > ck-1, deployDate=2009-02-24 10:33:55, id=1, version=1,
	> > messageExchanges=<uninitialized>, deploymentPartnerLinks=[],
	> > typeName=BPELMock, lock=0, correlators=<unin
	> >
	> > itialized>, deployer=null, typeNamespace=urn:bpel:BpelMock,
	> > instances=<uninitialized>, guid=hqejbhcnphr42in8iaul6m}
	> >
	> > DEBUG - GeronimoLog.debug(66) |
	> >
org.apache.ode.daohib.bpel.hobj.HCorrelator{created=2009-02-24
	10:33:55,
	> > lock=0, process=org.apache.ode.daohib.bpel.hobj.HProces
	> >
	> > s#1, correlatorId=25.ESBResult,
messageCorrelations=<uninitialized>,
	> > selectors=<uninitialized>, id=2}
	> >
	> > DEBUG - GeronimoLog.debug(66) |
	> >
org.apache.ode.daohib.bpel.hobj.HProcessInstance{created=2009-02-24
	> > 10:34:25, jacobState=org.apache.ode.daohib.bpel.hobj.HLargeD
	> >
	> > ata#168, events=<uninitialized>, previousState=10,
	> > lastActiveTime=2009-02-24 10:34:33, fault=null,
	> > correlationSets=<uninitialized>, sequence=27, id=7,
activityF
	> >
	> > ailureCount=0, messageExchanges=<uninitialized>, lock=0,
	> > correlatorSelectors=<uninitialized>,
activityFailureDateTime=null,
	> > scopes=<uninitialized>, process=org.
	> >
	> > apache.ode.daohib.bpel.hobj.HProcess#1,
	> activityRecoveries=<uninitialized>,
	> > state=20,
	> >
	
instantiatingCorrelator=org.apache.ode.daohib.bpel.hobj.HCorrelator#3}
	> >
	> > DEBUG - GeronimoLog.debug(66) | about to open
PreparedStatement
	(open
	> > PreparedStatements: 0, globally: 3)
	> >
	> > DEBUG - GeronimoLog.debug(66) | opening JDBC connection
	> >
	> > DEBUG - GeronimoLog.debug(70) | Cannot open connection [???]
	> >
	> > java.sql.SQLException: ORA-01453: SET TRANSACTION must be
first
	> statement
	> > of transaction
	> >
	> >         at
	> >
	>
	
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:11
	2)
	> >
	> >         at
	oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
	> >
	> >         at
	oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
	> >
	> >         at
oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:745)
	> >
	> >         at
	> oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:207)
	> >
	> >         at
	> >
	
oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:957)
	> >
	> >         at
	> >
	>
	
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.
	ja
	> va:1170)
	> >
	> >         at
	> >
	>
	
oracle.jdbc.driver.OracleStatement.executeInternal(OracleStatement.java:
	16
	> 96)
	> >
	> >         at
	> >
	
oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:1662)
	> >
	> >         at
	> >
	>
	
oracle.jdbc.driver.PhysicalConnection.setTransactionIsolation(PhysicalCo
	nn
	> ection.java:1661)
	> >
	> >         at
	> >
	>
	
org.apache.tomcat.dbcp.dbcp.DelegatingConnection.setTransactionIsolation
	(D
	> elegatingConnection.java:340)
	> >
	> >         at
	> >
	>
	
org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper
	.s
	> etTransactionIsolation(PoolingDataSource.java:332)
	> >
	> >         at
	> >
	>
	
org.apache.ode.daohib.DataSourceConnectionProvider.getConnection(DataSou
	rc
	> eConnectionProvider.java:45)
	> >
	> >         at
	> >
	>
	
org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.ja
	va
	> :423)
	> >
	> >         at
	> >
	>
	
org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.jav
	a:
	> 144)
	> >
	> >         at
	> >
	>
	
org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher
	.j
	> ava:139)
	> >
	> >         at
	> >
org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1547)
	> >
	> >         at
	> >
org.hibernate.loader.hql.QueryLoader.iterate(QueryLoader.java:399)
	> >
	> >         at
	> >
	>
	
org.hibernate.hql.ast.QueryTranslatorImpl.iterate(QueryTranslatorImpl.ja
	va
	> :380)
	> >
	> >         at
	> >
	>
	
org.hibernate.engine.query.HQLQueryPlan.performIterate(HQLQueryPlan.java
	:2
	> 24)
	> >
	> >         at
	> >
org.hibernate.impl.SessionImpl.iterateFilter(SessionImpl.java:1492)
	> >
	> >         at
	> >
	>
	
org.hibernate.impl.CollectionFilterImpl.iterate(CollectionFilterImpl.jav
	a:
	> 38)
	> >
	> >         at
	> >
	>

	
org.apache.ode.daohib.bpel.CorrelatorDaoImpl.dequeueMessage(CorrelatorDa
	oI
	> mpl.java:89)
	> >
	> > :
	> >

 


Re: Correlated receive in parallel for-each loop

Posted by Matthieu Riou <ma...@gmail.com>.
On Wed, Feb 25, 2009 at 12:09 PM, Andi Abes <aa...@progress.com> wrote:

> Matthieu,
>  Was the log useful?
>  Show I open a JIRA? I do have some code to drive the BPEL process that
> can easily reproduce this behavior (it does rely on CXF runtime)
>

Sorry I haven't had any time to look at it today, I'll check tomorrow.


>
>  I couldn't find a way to avoid the SET TRANSACTION exception... is
> there a way of avoiding it that you can recommend?


Just don't explicitly set ode.connection.isolation, this way we will leave
it alone and Oracle uses the proper value by default.

Matthieu


>
>
> a.
>
>
> > -----Original Message-----
> > From: Matthieu Riou [mailto:matthieu.riou@gmail.com]
> > Sent: Tuesday, February 24, 2009 11:17 AM
> > To: user@ode.apache.org
> > Subject: Re: Correlated receive in parallel for-each loop
> >
> > On Tue, Feb 24, 2009 at 7:44 AM, Andi Abes <aa...@progress.com> wrote:
> >
> > >  I'm trying to get a relatively simple process which performs a
> > correlated
> > > receive in parallel for-each loop (attached) - just the sweet spot
> for
> > > BPEL ;)
> > >
> > > I've tried with:
> > >
> > > -       Derby/JPA - java.sql.SQLException: A lock could not be
> obtained
> > > due to a deadlock (full stack in earlier emails)
> > >
> > > -       Hibernate/Oracle - the exception is below (hibernate 3.2.5/
> > oracle
> > > 10.2)
> > >
> > > -       JPA / Oracle - This didn't produce exceptions, but it
> produced
> > the
> > > following error, which killed the process instance...
> > >
> > > o       ERROR - GeronimoLog.error(104) | The message exchange seems
> to
> > be
> > > in an unconsistent state, you're probably missing a reply on a
> > > request/response interaction.
> > > INFO - GeronimoLog.info(79) | ActivityRecovery: Registering activity
> 25,
> > > failure reason: org.apache.ode.bpel.iapi.BpelEngineException: Engine
> > > requested response
> > >  while the message exchange hqejbhcnphr426192c3r3o was in the state
> > > COMPLElTED_OK on channel 45
> > >
> > > Any thoughts?
> > >
> > The above looks like a bug yes, could you provide a full debug log to
> see
> > what's happening exactly?
> >
> > Your second problem is due to the Oracle JDBC driver that refuses to
> alter
> > the transaction isolation level after the transaction has been
> started,
> > even
> > if it's the first statement in the transaction. So basically we can't
> set
> > it, it has to be set at the driver level.
> >
> > The good news though is that READ_COMMITTED is the default on Oracle
> so
> > you
> > don't need to force the isolation level, removing the environment
> variable
> > should solve it.
> >
> > Cheers,
> > Matthieu
> >
> >
> > > The last 2 cases sound to me as a bug...
> > >
> > >  <<BPEL_2.zip>>
> > >
> > > Exception with Hibernate/Oracle:
> > >
> > > DEBUG - GeronimoLog.debug(66) |
> > > org.apache.ode.daohib.bpel.hobj.HProcess{created=null, active=false,
> > > events=<uninitialized>, processId={urn:bpel:BpelMock}BPELMo
> > >
> > > ck-1, deployDate=2009-02-24 10:33:55, id=1, version=1,
> > > messageExchanges=<uninitialized>, deploymentPartnerLinks=[],
> > > typeName=BPELMock, lock=0, correlators=<unin
> > >
> > > itialized>, deployer=null, typeNamespace=urn:bpel:BpelMock,
> > > instances=<uninitialized>, guid=hqejbhcnphr42in8iaul6m}
> > >
> > > DEBUG - GeronimoLog.debug(66) |
> > > org.apache.ode.daohib.bpel.hobj.HCorrelator{created=2009-02-24
> 10:33:55,
> > > lock=0, process=org.apache.ode.daohib.bpel.hobj.HProces
> > >
> > > s#1, correlatorId=25.ESBResult, messageCorrelations=<uninitialized>,
> > > selectors=<uninitialized>, id=2}
> > >
> > > DEBUG - GeronimoLog.debug(66) |
> > > org.apache.ode.daohib.bpel.hobj.HProcessInstance{created=2009-02-24
> > > 10:34:25, jacobState=org.apache.ode.daohib.bpel.hobj.HLargeD
> > >
> > > ata#168, events=<uninitialized>, previousState=10,
> > > lastActiveTime=2009-02-24 10:34:33, fault=null,
> > > correlationSets=<uninitialized>, sequence=27, id=7, activityF
> > >
> > > ailureCount=0, messageExchanges=<uninitialized>, lock=0,
> > > correlatorSelectors=<uninitialized>, activityFailureDateTime=null,
> > > scopes=<uninitialized>, process=org.
> > >
> > > apache.ode.daohib.bpel.hobj.HProcess#1,
> > activityRecoveries=<uninitialized>,
> > > state=20,
> > >
> instantiatingCorrelator=org.apache.ode.daohib.bpel.hobj.HCorrelator#3}
> > >
> > > DEBUG - GeronimoLog.debug(66) | about to open PreparedStatement
> (open
> > > PreparedStatements: 0, globally: 3)
> > >
> > > DEBUG - GeronimoLog.debug(66) | opening JDBC connection
> > >
> > > DEBUG - GeronimoLog.debug(70) | Cannot open connection [???]
> > >
> > > java.sql.SQLException: ORA-01453: SET TRANSACTION must be first
> > statement
> > > of transaction
> > >
> > >         at
> > >
> >
> oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:11
> 2)
> > >
> > >         at
> oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
> > >
> > >         at
> oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
> > >
> > >         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:745)
> > >
> > >         at
> > oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:207)
> > >
> > >         at
> > >
> oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:957)
> > >
> > >         at
> > >
> >
> oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.
> ja
> > va:1170)
> > >
> > >         at
> > >
> >
> oracle.jdbc.driver.OracleStatement.executeInternal(OracleStatement.java:
> 16
> > 96)
> > >
> > >         at
> > >
> oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:1662)
> > >
> > >         at
> > >
> >
> oracle.jdbc.driver.PhysicalConnection.setTransactionIsolation(PhysicalCo
> nn
> > ection.java:1661)
> > >
> > >         at
> > >
> >
> org.apache.tomcat.dbcp.dbcp.DelegatingConnection.setTransactionIsolation
> (D
> > elegatingConnection.java:340)
> > >
> > >         at
> > >
> >
> org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper
> .s
> > etTransactionIsolation(PoolingDataSource.java:332)
> > >
> > >         at
> > >
> >
> org.apache.ode.daohib.DataSourceConnectionProvider.getConnection(DataSou
> rc
> > eConnectionProvider.java:45)
> > >
> > >         at
> > >
> >
> org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.ja
> va
> > :423)
> > >
> > >         at
> > >
> >
> org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.jav
> a:
> > 144)
> > >
> > >         at
> > >
> >
> org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher
> .j
> > ava:139)
> > >
> > >         at
> > > org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1547)
> > >
> > >         at
> > > org.hibernate.loader.hql.QueryLoader.iterate(QueryLoader.java:399)
> > >
> > >         at
> > >
> >
> org.hibernate.hql.ast.QueryTranslatorImpl.iterate(QueryTranslatorImpl.ja
> va
> > :380)
> > >
> > >         at
> > >
> >
> org.hibernate.engine.query.HQLQueryPlan.performIterate(HQLQueryPlan.java
> :2
> > 24)
> > >
> > >         at
> > > org.hibernate.impl.SessionImpl.iterateFilter(SessionImpl.java:1492)
> > >
> > >         at
> > >
> >
> org.hibernate.impl.CollectionFilterImpl.iterate(CollectionFilterImpl.jav
> a:
> > 38)
> > >
> > >         at
> > >
> >
> org.apache.ode.daohib.bpel.CorrelatorDaoImpl.dequeueMessage(CorrelatorDa
> oI
> > mpl.java:89)
> > >
> > > :
> > >
>

RE: Correlated receive in parallel for-each loop

Posted by Andi Abes <aa...@progress.com>.
Matthieu,
  Was the log useful?
  Show I open a JIRA? I do have some code to drive the BPEL process that
can easily reproduce this behavior (it does rely on CXF runtime)

  I couldn't find a way to avoid the SET TRANSACTION exception... is
there a way of avoiding it that you can recommend?

a.
    

> -----Original Message-----
> From: Matthieu Riou [mailto:matthieu.riou@gmail.com]
> Sent: Tuesday, February 24, 2009 11:17 AM
> To: user@ode.apache.org
> Subject: Re: Correlated receive in parallel for-each loop
> 
> On Tue, Feb 24, 2009 at 7:44 AM, Andi Abes <aa...@progress.com> wrote:
> 
> >  I'm trying to get a relatively simple process which performs a
> correlated
> > receive in parallel for-each loop (attached) - just the sweet spot
for
> > BPEL ;)
> >
> > I've tried with:
> >
> > -       Derby/JPA - java.sql.SQLException: A lock could not be
obtained
> > due to a deadlock (full stack in earlier emails)
> >
> > -       Hibernate/Oracle - the exception is below (hibernate 3.2.5/
> oracle
> > 10.2)
> >
> > -       JPA / Oracle - This didn't produce exceptions, but it
produced
> the
> > following error, which killed the process instance...
> >
> > o       ERROR - GeronimoLog.error(104) | The message exchange seems
to
> be
> > in an unconsistent state, you're probably missing a reply on a
> > request/response interaction.
> > INFO - GeronimoLog.info(79) | ActivityRecovery: Registering activity
25,
> > failure reason: org.apache.ode.bpel.iapi.BpelEngineException: Engine
> > requested response
> >  while the message exchange hqejbhcnphr426192c3r3o was in the state
> > COMPLElTED_OK on channel 45
> >
> > Any thoughts?
> >
> The above looks like a bug yes, could you provide a full debug log to
see
> what's happening exactly?
> 
> Your second problem is due to the Oracle JDBC driver that refuses to
alter
> the transaction isolation level after the transaction has been
started,
> even
> if it's the first statement in the transaction. So basically we can't
set
> it, it has to be set at the driver level.
> 
> The good news though is that READ_COMMITTED is the default on Oracle
so
> you
> don't need to force the isolation level, removing the environment
variable
> should solve it.
> 
> Cheers,
> Matthieu
> 
> 
> > The last 2 cases sound to me as a bug...
> >
> >  <<BPEL_2.zip>>
> >
> > Exception with Hibernate/Oracle:
> >
> > DEBUG - GeronimoLog.debug(66) |
> > org.apache.ode.daohib.bpel.hobj.HProcess{created=null, active=false,
> > events=<uninitialized>, processId={urn:bpel:BpelMock}BPELMo
> >
> > ck-1, deployDate=2009-02-24 10:33:55, id=1, version=1,
> > messageExchanges=<uninitialized>, deploymentPartnerLinks=[],
> > typeName=BPELMock, lock=0, correlators=<unin
> >
> > itialized>, deployer=null, typeNamespace=urn:bpel:BpelMock,
> > instances=<uninitialized>, guid=hqejbhcnphr42in8iaul6m}
> >
> > DEBUG - GeronimoLog.debug(66) |
> > org.apache.ode.daohib.bpel.hobj.HCorrelator{created=2009-02-24
10:33:55,
> > lock=0, process=org.apache.ode.daohib.bpel.hobj.HProces
> >
> > s#1, correlatorId=25.ESBResult, messageCorrelations=<uninitialized>,
> > selectors=<uninitialized>, id=2}
> >
> > DEBUG - GeronimoLog.debug(66) |
> > org.apache.ode.daohib.bpel.hobj.HProcessInstance{created=2009-02-24
> > 10:34:25, jacobState=org.apache.ode.daohib.bpel.hobj.HLargeD
> >
> > ata#168, events=<uninitialized>, previousState=10,
> > lastActiveTime=2009-02-24 10:34:33, fault=null,
> > correlationSets=<uninitialized>, sequence=27, id=7, activityF
> >
> > ailureCount=0, messageExchanges=<uninitialized>, lock=0,
> > correlatorSelectors=<uninitialized>, activityFailureDateTime=null,
> > scopes=<uninitialized>, process=org.
> >
> > apache.ode.daohib.bpel.hobj.HProcess#1,
> activityRecoveries=<uninitialized>,
> > state=20,
> >
instantiatingCorrelator=org.apache.ode.daohib.bpel.hobj.HCorrelator#3}
> >
> > DEBUG - GeronimoLog.debug(66) | about to open PreparedStatement
(open
> > PreparedStatements: 0, globally: 3)
> >
> > DEBUG - GeronimoLog.debug(66) | opening JDBC connection
> >
> > DEBUG - GeronimoLog.debug(70) | Cannot open connection [???]
> >
> > java.sql.SQLException: ORA-01453: SET TRANSACTION must be first
> statement
> > of transaction
> >
> >         at
> >
>
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:11
2)
> >
> >         at
oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
> >
> >         at
oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
> >
> >         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:745)
> >
> >         at
> oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:207)
> >
> >         at
> >
oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:957)
> >
> >         at
> >
>
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.
ja
> va:1170)
> >
> >         at
> >
>
oracle.jdbc.driver.OracleStatement.executeInternal(OracleStatement.java:
16
> 96)
> >
> >         at
> >
oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:1662)
> >
> >         at
> >
>
oracle.jdbc.driver.PhysicalConnection.setTransactionIsolation(PhysicalCo
nn
> ection.java:1661)
> >
> >         at
> >
>
org.apache.tomcat.dbcp.dbcp.DelegatingConnection.setTransactionIsolation
(D
> elegatingConnection.java:340)
> >
> >         at
> >
>
org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper
.s
> etTransactionIsolation(PoolingDataSource.java:332)
> >
> >         at
> >
>
org.apache.ode.daohib.DataSourceConnectionProvider.getConnection(DataSou
rc
> eConnectionProvider.java:45)
> >
> >         at
> >
>
org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.ja
va
> :423)
> >
> >         at
> >
>
org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.jav
a:
> 144)
> >
> >         at
> >
>
org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher
.j
> ava:139)
> >
> >         at
> > org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1547)
> >
> >         at
> > org.hibernate.loader.hql.QueryLoader.iterate(QueryLoader.java:399)
> >
> >         at
> >
>
org.hibernate.hql.ast.QueryTranslatorImpl.iterate(QueryTranslatorImpl.ja
va
> :380)
> >
> >         at
> >
>
org.hibernate.engine.query.HQLQueryPlan.performIterate(HQLQueryPlan.java
:2
> 24)
> >
> >         at
> > org.hibernate.impl.SessionImpl.iterateFilter(SessionImpl.java:1492)
> >
> >         at
> >
>
org.hibernate.impl.CollectionFilterImpl.iterate(CollectionFilterImpl.jav
a:
> 38)
> >
> >         at
> >
>
org.apache.ode.daohib.bpel.CorrelatorDaoImpl.dequeueMessage(CorrelatorDa
oI
> mpl.java:89)
> >
> > :
> >

RE: Correlated receive in parallel for-each loop

Posted by Andi Abes <aa...@progress.com>.
Attached is the full log for when invoking the process with the
following request:

<?xml version="1.0" encoding="UTF-8"?>
<request>
	<priority>1</priority>
	<command>2</command>
	<requestId>REQUEST_ID_1</requestId>
	<command-data><data>some random stuff</data></command-data>	
</request>


When ODE is configured with Hibernate / oracle.


The good news though is that READ_COMMITTED is the default on Oracle so
> you
> don't need to force the isolation level, removing the environment
variable
> should solve it.


I'm not sure what env variable did you mean... I didn't really setup
anything for it.

I do have the following line:
openjpa.jdbc.TransactionIsolation=read-committed

But I wouldn't have expected it to affect Hibernate...and commenting it
out didn't really change much.

A.






> -----Original Message-----
> From: Matthieu Riou [mailto:matthieu.riou@gmail.com]
> Sent: Tuesday, February 24, 2009 11:17 AM
> To: user@ode.apache.org
> Subject: Re: Correlated receive in parallel for-each loop
> 
> On Tue, Feb 24, 2009 at 7:44 AM, Andi Abes <aa...@progress.com> wrote:
> 
> >  I'm trying to get a relatively simple process which performs a
> correlated
> > receive in parallel for-each loop (attached) - just the sweet spot
for
> > BPEL ;)
> >
> > I've tried with:
> >
> > -       Derby/JPA - java.sql.SQLException: A lock could not be
obtained
> > due to a deadlock (full stack in earlier emails)
> >
> > -       Hibernate/Oracle - the exception is below (hibernate 3.2.5/
> oracle
> > 10.2)
> >
> > -       JPA / Oracle - This didn't produce exceptions, but it
produced
> the
> > following error, which killed the process instance...
> >
> > o       ERROR - GeronimoLog.error(104) | The message exchange seems
to
> be
> > in an unconsistent state, you're probably missing a reply on a
> > request/response interaction.
> > INFO - GeronimoLog.info(79) | ActivityRecovery: Registering activity
25,
> > failure reason: org.apache.ode.bpel.iapi.BpelEngineException: Engine
> > requested response
> >  while the message exchange hqejbhcnphr426192c3r3o was in the state
> > COMPLElTED_OK on channel 45
> >
> > Any thoughts?
> >
> The above looks like a bug yes, could you provide a full debug log to
see
> what's happening exactly?
> 
> Your second problem is due to the Oracle JDBC driver that refuses to
alter
> the transaction isolation level after the transaction has been
started,
> even
> if it's the first statement in the transaction. So basically we can't
set
> it, it has to be set at the driver level.
> 
> The good news though is that READ_COMMITTED is the default on Oracle
so
> you
> don't need to force the isolation level, removing the environment
variable
> should solve it.
> 
> Cheers,
> Matthieu
> 
> 
> > The last 2 cases sound to me as a bug...
> >
> >  <<BPEL_2.zip>>
> >
> > Exception with Hibernate/Oracle:
> >
> > DEBUG - GeronimoLog.debug(66) |
> > org.apache.ode.daohib.bpel.hobj.HProcess{created=null, active=false,
> > events=<uninitialized>, processId={urn:bpel:BpelMock}BPELMo
> >
> > ck-1, deployDate=2009-02-24 10:33:55, id=1, version=1,
> > messageExchanges=<uninitialized>, deploymentPartnerLinks=[],
> > typeName=BPELMock, lock=0, correlators=<unin
> >
> > itialized>, deployer=null, typeNamespace=urn:bpel:BpelMock,
> > instances=<uninitialized>, guid=hqejbhcnphr42in8iaul6m}
> >
> > DEBUG - GeronimoLog.debug(66) |
> > org.apache.ode.daohib.bpel.hobj.HCorrelator{created=2009-02-24
10:33:55,
> > lock=0, process=org.apache.ode.daohib.bpel.hobj.HProces
> >
> > s#1, correlatorId=25.ESBResult, messageCorrelations=<uninitialized>,
> > selectors=<uninitialized>, id=2}
> >
> > DEBUG - GeronimoLog.debug(66) |
> > org.apache.ode.daohib.bpel.hobj.HProcessInstance{created=2009-02-24
> > 10:34:25, jacobState=org.apache.ode.daohib.bpel.hobj.HLargeD
> >
> > ata#168, events=<uninitialized>, previousState=10,
> > lastActiveTime=2009-02-24 10:34:33, fault=null,
> > correlationSets=<uninitialized>, sequence=27, id=7, activityF
> >
> > ailureCount=0, messageExchanges=<uninitialized>, lock=0,
> > correlatorSelectors=<uninitialized>, activityFailureDateTime=null,
> > scopes=<uninitialized>, process=org.
> >
> > apache.ode.daohib.bpel.hobj.HProcess#1,
> activityRecoveries=<uninitialized>,
> > state=20,
> >
instantiatingCorrelator=org.apache.ode.daohib.bpel.hobj.HCorrelator#3}
> >
> > DEBUG - GeronimoLog.debug(66) | about to open PreparedStatement
(open
> > PreparedStatements: 0, globally: 3)
> >
> > DEBUG - GeronimoLog.debug(66) | opening JDBC connection
> >
> > DEBUG - GeronimoLog.debug(70) | Cannot open connection [???]
> >
> > java.sql.SQLException: ORA-01453: SET TRANSACTION must be first
> statement
> > of transaction
> >
> >         at
> >
>
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:11
2)
> >
> >         at
oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
> >
> >         at
oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
> >
> >         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:745)
> >
> >         at
> oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:207)
> >
> >         at
> >
oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:957)
> >
> >         at
> >
>
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.
ja
> va:1170)
> >
> >         at
> >
>
oracle.jdbc.driver.OracleStatement.executeInternal(OracleStatement.java:
16
> 96)
> >
> >         at
> >
oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:1662)
> >
> >         at
> >
>
oracle.jdbc.driver.PhysicalConnection.setTransactionIsolation(PhysicalCo
nn
> ection.java:1661)
> >
> >         at
> >
>
org.apache.tomcat.dbcp.dbcp.DelegatingConnection.setTransactionIsolation
(D
> elegatingConnection.java:340)
> >
> >         at
> >
>
org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper
.s
> etTransactionIsolation(PoolingDataSource.java:332)
> >
> >         at
> >
>
org.apache.ode.daohib.DataSourceConnectionProvider.getConnection(DataSou
rc
> eConnectionProvider.java:45)
> >
> >         at
> >
>
org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.ja
va
> :423)
> >
> >         at
> >
>
org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.jav
a:
> 144)
> >
> >         at
> >
>
org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher
.j
> ava:139)
> >
> >         at
> > org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1547)
> >
> >         at
> > org.hibernate.loader.hql.QueryLoader.iterate(QueryLoader.java:399)
> >
> >         at
> >
>
org.hibernate.hql.ast.QueryTranslatorImpl.iterate(QueryTranslatorImpl.ja
va
> :380)
> >
> >         at
> >
>
org.hibernate.engine.query.HQLQueryPlan.performIterate(HQLQueryPlan.java
:2
> 24)
> >
> >         at
> > org.hibernate.impl.SessionImpl.iterateFilter(SessionImpl.java:1492)
> >
> >         at
> >
>
org.hibernate.impl.CollectionFilterImpl.iterate(CollectionFilterImpl.jav
a:
> 38)
> >
> >         at
> >
>
org.apache.ode.daohib.bpel.CorrelatorDaoImpl.dequeueMessage(CorrelatorDa
oI
> mpl.java:89)
> >
> > :
> >

Re: Correlated receive in parallel for-each loop

Posted by Matthieu Riou <ma...@gmail.com>.
On Tue, Feb 24, 2009 at 7:44 AM, Andi Abes <aa...@progress.com> wrote:

>  I’m trying to get a relatively simple process which performs a correlated
> receive in parallel for-each loop (attached) – just the sweet spot for
> BPEL ;)
>
> I’ve tried with:
>
> -       Derby/JPA – java.sql.SQLException: A lock could not be obtained
> due to a deadlock (full stack in earlier emails)
>
> -       Hibernate/Oracle – the exception is below (hibernate 3.2.5/ oracle
> 10.2)
>
> -       JPA / Oracle – This didn’t produce exceptions, but it produced the
> following error, which killed the process instance…
>
> o       ERROR - GeronimoLog.error(104) | The message exchange seems to be
> in an unconsistent state, you're probably missing a reply on a
> request/response interaction.
> INFO - GeronimoLog.info(79) | ActivityRecovery: Registering activity 25,
> failure reason: org.apache.ode.bpel.iapi.BpelEngineException: Engine
> requested response
>  while the message exchange hqejbhcnphr426192c3r3o was in the state
> COMPLElTED_OK on channel 45
>
> Any thoughts?
>
The above looks like a bug yes, could you provide a full debug log to see
what's happening exactly?

Your second problem is due to the Oracle JDBC driver that refuses to alter
the transaction isolation level after the transaction has been started, even
if it's the first statement in the transaction. So basically we can't set
it, it has to be set at the driver level.

The good news though is that READ_COMMITTED is the default on Oracle so you
don't need to force the isolation level, removing the environment variable
should solve it.

Cheers,
Matthieu


> The last 2 cases sound to me as a bug…
>
>  <<BPEL_2.zip>>
>
> Exception with Hibernate/Oracle:
>
> DEBUG - GeronimoLog.debug(66) |
> org.apache.ode.daohib.bpel.hobj.HProcess{created=null, active=false,
> events=<uninitialized>, processId={urn:bpel:BpelMock}BPELMo
>
> ck-1, deployDate=2009-02-24 10:33:55, id=1, version=1,
> messageExchanges=<uninitialized>, deploymentPartnerLinks=[],
> typeName=BPELMock, lock=0, correlators=<unin
>
> itialized>, deployer=null, typeNamespace=urn:bpel:BpelMock,
> instances=<uninitialized>, guid=hqejbhcnphr42in8iaul6m}
>
> DEBUG - GeronimoLog.debug(66) |
> org.apache.ode.daohib.bpel.hobj.HCorrelator{created=2009-02-24 10:33:55,
> lock=0, process=org.apache.ode.daohib.bpel.hobj.HProces
>
> s#1, correlatorId=25.ESBResult, messageCorrelations=<uninitialized>,
> selectors=<uninitialized>, id=2}
>
> DEBUG - GeronimoLog.debug(66) |
> org.apache.ode.daohib.bpel.hobj.HProcessInstance{created=2009-02-24
> 10:34:25, jacobState=org.apache.ode.daohib.bpel.hobj.HLargeD
>
> ata#168, events=<uninitialized>, previousState=10,
> lastActiveTime=2009-02-24 10:34:33, fault=null,
> correlationSets=<uninitialized>, sequence=27, id=7, activityF
>
> ailureCount=0, messageExchanges=<uninitialized>, lock=0,
> correlatorSelectors=<uninitialized>, activityFailureDateTime=null,
> scopes=<uninitialized>, process=org.
>
> apache.ode.daohib.bpel.hobj.HProcess#1, activityRecoveries=<uninitialized>,
> state=20,
> instantiatingCorrelator=org.apache.ode.daohib.bpel.hobj.HCorrelator#3}
>
> DEBUG - GeronimoLog.debug(66) | about to open PreparedStatement (open
> PreparedStatements: 0, globally: 3)
>
> DEBUG - GeronimoLog.debug(66) | opening JDBC connection
>
> DEBUG - GeronimoLog.debug(70) | Cannot open connection [???]
>
> java.sql.SQLException: ORA-01453: SET TRANSACTION must be first statement
> of transaction
>
>         at
> oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
>
>         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
>
>         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
>
>         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:745)
>
>         at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:207)
>
>         at
> oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:957)
>
>         at
> oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1170)
>
>         at
> oracle.jdbc.driver.OracleStatement.executeInternal(OracleStatement.java:1696)
>
>         at
> oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:1662)
>
>         at
> oracle.jdbc.driver.PhysicalConnection.setTransactionIsolation(PhysicalConnection.java:1661)
>
>         at
> org.apache.tomcat.dbcp.dbcp.DelegatingConnection.setTransactionIsolation(DelegatingConnection.java:340)
>
>         at
> org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.setTransactionIsolation(PoolingDataSource.java:332)
>
>         at
> org.apache.ode.daohib.DataSourceConnectionProvider.getConnection(DataSourceConnectionProvider.java:45)
>
>         at
> org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:423)
>
>         at
> org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
>
>         at
> org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:139)
>
>         at
> org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1547)
>
>         at
> org.hibernate.loader.hql.QueryLoader.iterate(QueryLoader.java:399)
>
>         at
> org.hibernate.hql.ast.QueryTranslatorImpl.iterate(QueryTranslatorImpl.java:380)
>
>         at
> org.hibernate.engine.query.HQLQueryPlan.performIterate(HQLQueryPlan.java:224)
>
>         at
> org.hibernate.impl.SessionImpl.iterateFilter(SessionImpl.java:1492)
>
>         at
> org.hibernate.impl.CollectionFilterImpl.iterate(CollectionFilterImpl.java:38)
>
>         at
> org.apache.ode.daohib.bpel.CorrelatorDaoImpl.dequeueMessage(CorrelatorDaoImpl.java:89)
>
> :
>

RE: Correlated receive in parallel for-each loop

Posted by Rafal Rusin <ra...@gmail.com>.
OK, you are right. I didn't spot this initialization. 

Regards,
Rafal Rusin
http://www.mimuw.edu.pl/~rrusin/


Andi Abes wrote:
> 
> Your note is a bit inaccurate:
> 
> 
> a)Note that the correlation is defined inside the scope of the for-each
> - so they're actually different correlation-sets.
> 
> <forEach counterName="commandCounter" parallel="no"	xml:ID="8">
> <correlationSets>
> <correlationSet name="esbRequest" properties="tns:esb-id" />
> </correlationSets>
> .... receive
> 
> 
> Also note -
> b) ODE does not produce the error you described.
> c) page 91 of wsbpel-v2.0-OS:
> 
> If a business process instance simultaneously enables two or more IMAs
> for the same partnerLink, portType, operation but different
> correlationSet(s), and the correlations of multiple of these activities
> match an incoming request message, then the bpel:ambiguousReceive
> standard fault MUST be thrown by all IMAs whose correlation set(s) match
> the incoming message.
> 
> 
> For the above condition to occur, the use case I'm testing must be valid
> 
> And lastly:
> d)
> I've used the exact same process on other BPEL engines, with success....
> This seems to be an ODE bug.
> 
> 
> 
> 
> 
> 
>> -----Original Message-----
>> From: Rafal Rusin [mailto:rafal.rusin@gmail.com]
>> Sent: Wednesday, February 25, 2009 10:25 AM
>> To: user@ode.apache.org
>> Subject: Re: Correlated receive in parallel for-each loop
>> 
>> 
>> Your bpel contains following:
>> 
>> <forEach counterName="commandCounter" parallel="yes">
>>                                 <receive createInstance="no"
>>                                     name="ESBResult"
> operation="ESBResult"
>> partnerLink="ESBResult"
>>                                     portType="tns:ESBResult"
>> variable="ESBMessage" xml:ID="19">
>> 
>>                                     <correlations>
>>                                         <correlation initiate="no"
>>                                             set="esbRequest" />
>>                                     </correlations>
>>                                 </receive>
>> </forEach>
>> 
>> 
>> According to bpel specification, this will cause conflictingReceive
> error
>> when forEach has >1 items.
>> 
>> Regards,
>> Rafal Rusin
>> 
>> http://www.mimuw.edu.pl/~rrusin/
>> 
>> 
>> Andi Abes wrote:
>> >
>> > I'm trying to get a relatively simple process which performs a
>> > correlated receive in parallel for-each loop (attached) - just the
> sweet
>> > spot for BPEL ;)
>> >
>> > I've tried with:
>> > -	Derby/JPA - java.sql.SQLException: A lock could not be obtained
>> > due to a deadlock (full stack in earlier emails)
>> > -	Hibernate/Oracle - the exception is below (hibernate 3.2.5/
>> > oracle 10.2)
>> > -	JPA / Oracle - This didn't produce exceptions, but it produced
>> > the following error, which killed the process instance...
>> > o	ERROR - GeronimoLog.error(104) | The message exchange seems to
>> > be in an unconsistent state, you're probably missing a reply on a
>> > request/response interaction.
>> > INFO - GeronimoLog.info(79) | ActivityRecovery: Registering activity
> 25,
>> > failure reason: org.apache.ode.bpel.iapi.BpelEngineException: Engine
>> > requested response
>> >  while the message exchange hqejbhcnphr426192c3r3o was in the state
>> > COMPLETED_OK on channel 45
>> >
>> > Any thoughts?
>> > The last 2 cases sound to me as a bug...
>> >
>> >
>> >
>> >  <<BPEL_2.zip>>
>> >
>> > Exception with Hibernate/Oracle:
>> >
>> >
>> > DEBUG - GeronimoLog.debug(66) |
>> > org.apache.ode.daohib.bpel.hobj.HProcess{created=null, active=false,
>> > events=<uninitialized>, processId={urn:bpel:BpelMock}BPELMo
>> > ck-1, deployDate=2009-02-24 10:33:55, id=1, version=1,
>> > messageExchanges=<uninitialized>, deploymentPartnerLinks=[],
>> > typeName=BPELMock, lock=0, correlators=<unin
>> > itialized>, deployer=null, typeNamespace=urn:bpel:BpelMock,
>> > instances=<uninitialized>, guid=hqejbhcnphr42in8iaul6m}
>> > DEBUG - GeronimoLog.debug(66) |
>> > org.apache.ode.daohib.bpel.hobj.HCorrelator{created=2009-02-24
> 10:33:55,
>> > lock=0, process=org.apache.ode.daohib.bpel.hobj.HProces
>> > s#1, correlatorId=25.ESBResult, messageCorrelations=<uninitialized>,
>> > selectors=<uninitialized>, id=2}
>> > DEBUG - GeronimoLog.debug(66) |
>> > org.apache.ode.daohib.bpel.hobj.HProcessInstance{created=2009-02-24
>> > 10:34:25, jacobState=org.apache.ode.daohib.bpel.hobj.HLargeD
>> > ata#168, events=<uninitialized>, previousState=10,
>> > lastActiveTime=2009-02-24 10:34:33, fault=null,
>> > correlationSets=<uninitialized>, sequence=27, id=7, activityF
>> > ailureCount=0, messageExchanges=<uninitialized>, lock=0,
>> > correlatorSelectors=<uninitialized>, activityFailureDateTime=null,
>> > scopes=<uninitialized>, process=org.
>> > apache.ode.daohib.bpel.hobj.HProcess#1,
>> > activityRecoveries=<uninitialized>, state=20,
>> >
> instantiatingCorrelator=org.apache.ode.daohib.bpel.hobj.HCorrelator#3}
>> > DEBUG - GeronimoLog.debug(66) | about to open PreparedStatement
> (open
>> > PreparedStatements: 0, globally: 3)
>> > DEBUG - GeronimoLog.debug(66) | opening JDBC connection
>> > DEBUG - GeronimoLog.debug(70) | Cannot open connection [???]
>> > java.sql.SQLException: ORA-01453: SET TRANSACTION must be first
>> > statement of transaction
>> >         at
>> >
> oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:11
>> > 2)
>> >         at
> oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
>> >         at
> oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
>> >         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:745)
>> >         at
>> > oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:207)
>> >         at
>> >
> oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:957)
>> >         at
>> >
> oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.
>> > java:1170)
>> >         at
>> >
> oracle.jdbc.driver.OracleStatement.executeInternal(OracleStatement.java:
>> > 1696)
>> >         at
>> >
> oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:1662)
>> >         at
>> >
> oracle.jdbc.driver.PhysicalConnection.setTransactionIsolation(PhysicalCo
>> > nnection.java:1661)
>> >         at
>> >
> org.apache.tomcat.dbcp.dbcp.DelegatingConnection.setTransactionIsolation
>> > (DelegatingConnection.java:340)
>> >         at
>> >
> org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper
>> > .setTransactionIsolation(PoolingDataSource.java:332)
>> >         at
>> >
> org.apache.ode.daohib.DataSourceConnectionProvider.getConnection(DataSou
>> > rceConnectionProvider.java:45)
>> >         at
>> >
> org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.ja
>> > va:423)
>> >         at
>> >
> org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.jav
>> > a:144)
>> >         at
>> >
> org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher
>> > .java:139)
>> >         at
>> > org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1547)
>> >         at
>> > org.hibernate.loader.hql.QueryLoader.iterate(QueryLoader.java:399)
>> >         at
>> >
> org.hibernate.hql.ast.QueryTranslatorImpl.iterate(QueryTranslatorImpl.ja
>> > va:380)
>> >         at
>> >
> org.hibernate.engine.query.HQLQueryPlan.performIterate(HQLQueryPlan.java
>> > :224)
>> >         at
>> > org.hibernate.impl.SessionImpl.iterateFilter(SessionImpl.java:1492)
>> >         at
>> >
> org.hibernate.impl.CollectionFilterImpl.iterate(CollectionFilterImpl.jav
>> > a:38)
>> >         at
>> >
> org.apache.ode.daohib.bpel.CorrelatorDaoImpl.dequeueMessage(CorrelatorDa
>> > oImpl.java:89)
>> > :
>> >
>> >
>> >
>> 
>> --
>> View this message in context:
> http://www.nabble.com/Correlated-receive-in-
>> parallel-for-each-loop-tp22184207p22204983.html
>> Sent from the Apache Ode User mailing list archive at Nabble.com.
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Correlated-receive-in-parallel-for-each-loop-tp22184207p22206002.html
Sent from the Apache Ode User mailing list archive at Nabble.com.


RE: Correlated receive in parallel for-each loop

Posted by Andi Abes <aa...@progress.com>.
Your note is a bit inaccurate:


a)Note that the correlation is defined inside the scope of the for-each
- so they're actually different correlation-sets.

<forEach counterName="commandCounter" parallel="no"	xml:ID="8">
<correlationSets>
<correlationSet name="esbRequest" properties="tns:esb-id" />
</correlationSets>
.... receive


Also note -
b) ODE does not produce the error you described.
c) page 91 of wsbpel-v2.0-OS:

If a business process instance simultaneously enables two or more IMAs
for the same partnerLink, portType, operation but different
correlationSet(s), and the correlations of multiple of these activities
match an incoming request message, then the bpel:ambiguousReceive
standard fault MUST be thrown by all IMAs whose correlation set(s) match
the incoming message.


For the above condition to occur, the use case I'm testing must be valid

And lastly:
d)
I've used the exact same process on other BPEL engines, with success....
This seems to be an ODE bug.






> -----Original Message-----
> From: Rafal Rusin [mailto:rafal.rusin@gmail.com]
> Sent: Wednesday, February 25, 2009 10:25 AM
> To: user@ode.apache.org
> Subject: Re: Correlated receive in parallel for-each loop
> 
> 
> Your bpel contains following:
> 
> <forEach counterName="commandCounter" parallel="yes">
>                                 <receive createInstance="no"
>                                     name="ESBResult"
operation="ESBResult"
> partnerLink="ESBResult"
>                                     portType="tns:ESBResult"
> variable="ESBMessage" xml:ID="19">
> 
>                                     <correlations>
>                                         <correlation initiate="no"
>                                             set="esbRequest" />
>                                     </correlations>
>                                 </receive>
> </forEach>
> 
> 
> According to bpel specification, this will cause conflictingReceive
error
> when forEach has >1 items.
> 
> Regards,
> Rafal Rusin
> 
> http://www.mimuw.edu.pl/~rrusin/
> 
> 
> Andi Abes wrote:
> >
> > I'm trying to get a relatively simple process which performs a
> > correlated receive in parallel for-each loop (attached) - just the
sweet
> > spot for BPEL ;)
> >
> > I've tried with:
> > -	Derby/JPA - java.sql.SQLException: A lock could not be obtained
> > due to a deadlock (full stack in earlier emails)
> > -	Hibernate/Oracle - the exception is below (hibernate 3.2.5/
> > oracle 10.2)
> > -	JPA / Oracle - This didn't produce exceptions, but it produced
> > the following error, which killed the process instance...
> > o	ERROR - GeronimoLog.error(104) | The message exchange seems to
> > be in an unconsistent state, you're probably missing a reply on a
> > request/response interaction.
> > INFO - GeronimoLog.info(79) | ActivityRecovery: Registering activity
25,
> > failure reason: org.apache.ode.bpel.iapi.BpelEngineException: Engine
> > requested response
> >  while the message exchange hqejbhcnphr426192c3r3o was in the state
> > COMPLETED_OK on channel 45
> >
> > Any thoughts?
> > The last 2 cases sound to me as a bug...
> >
> >
> >
> >  <<BPEL_2.zip>>
> >
> > Exception with Hibernate/Oracle:
> >
> >
> > DEBUG - GeronimoLog.debug(66) |
> > org.apache.ode.daohib.bpel.hobj.HProcess{created=null, active=false,
> > events=<uninitialized>, processId={urn:bpel:BpelMock}BPELMo
> > ck-1, deployDate=2009-02-24 10:33:55, id=1, version=1,
> > messageExchanges=<uninitialized>, deploymentPartnerLinks=[],
> > typeName=BPELMock, lock=0, correlators=<unin
> > itialized>, deployer=null, typeNamespace=urn:bpel:BpelMock,
> > instances=<uninitialized>, guid=hqejbhcnphr42in8iaul6m}
> > DEBUG - GeronimoLog.debug(66) |
> > org.apache.ode.daohib.bpel.hobj.HCorrelator{created=2009-02-24
10:33:55,
> > lock=0, process=org.apache.ode.daohib.bpel.hobj.HProces
> > s#1, correlatorId=25.ESBResult, messageCorrelations=<uninitialized>,
> > selectors=<uninitialized>, id=2}
> > DEBUG - GeronimoLog.debug(66) |
> > org.apache.ode.daohib.bpel.hobj.HProcessInstance{created=2009-02-24
> > 10:34:25, jacobState=org.apache.ode.daohib.bpel.hobj.HLargeD
> > ata#168, events=<uninitialized>, previousState=10,
> > lastActiveTime=2009-02-24 10:34:33, fault=null,
> > correlationSets=<uninitialized>, sequence=27, id=7, activityF
> > ailureCount=0, messageExchanges=<uninitialized>, lock=0,
> > correlatorSelectors=<uninitialized>, activityFailureDateTime=null,
> > scopes=<uninitialized>, process=org.
> > apache.ode.daohib.bpel.hobj.HProcess#1,
> > activityRecoveries=<uninitialized>, state=20,
> >
instantiatingCorrelator=org.apache.ode.daohib.bpel.hobj.HCorrelator#3}
> > DEBUG - GeronimoLog.debug(66) | about to open PreparedStatement
(open
> > PreparedStatements: 0, globally: 3)
> > DEBUG - GeronimoLog.debug(66) | opening JDBC connection
> > DEBUG - GeronimoLog.debug(70) | Cannot open connection [???]
> > java.sql.SQLException: ORA-01453: SET TRANSACTION must be first
> > statement of transaction
> >         at
> >
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:11
> > 2)
> >         at
oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
> >         at
oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
> >         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:745)
> >         at
> > oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:207)
> >         at
> >
oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:957)
> >         at
> >
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.
> > java:1170)
> >         at
> >
oracle.jdbc.driver.OracleStatement.executeInternal(OracleStatement.java:
> > 1696)
> >         at
> >
oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:1662)
> >         at
> >
oracle.jdbc.driver.PhysicalConnection.setTransactionIsolation(PhysicalCo
> > nnection.java:1661)
> >         at
> >
org.apache.tomcat.dbcp.dbcp.DelegatingConnection.setTransactionIsolation
> > (DelegatingConnection.java:340)
> >         at
> >
org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper
> > .setTransactionIsolation(PoolingDataSource.java:332)
> >         at
> >
org.apache.ode.daohib.DataSourceConnectionProvider.getConnection(DataSou
> > rceConnectionProvider.java:45)
> >         at
> >
org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.ja
> > va:423)
> >         at
> >
org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.jav
> > a:144)
> >         at
> >
org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher
> > .java:139)
> >         at
> > org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1547)
> >         at
> > org.hibernate.loader.hql.QueryLoader.iterate(QueryLoader.java:399)
> >         at
> >
org.hibernate.hql.ast.QueryTranslatorImpl.iterate(QueryTranslatorImpl.ja
> > va:380)
> >         at
> >
org.hibernate.engine.query.HQLQueryPlan.performIterate(HQLQueryPlan.java
> > :224)
> >         at
> > org.hibernate.impl.SessionImpl.iterateFilter(SessionImpl.java:1492)
> >         at
> >
org.hibernate.impl.CollectionFilterImpl.iterate(CollectionFilterImpl.jav
> > a:38)
> >         at
> >
org.apache.ode.daohib.bpel.CorrelatorDaoImpl.dequeueMessage(CorrelatorDa
> > oImpl.java:89)
> > :
> >
> >
> >
> 
> --
> View this message in context:
http://www.nabble.com/Correlated-receive-in-
> parallel-for-each-loop-tp22184207p22204983.html
> Sent from the Apache Ode User mailing list archive at Nabble.com.


Re: Correlated receive in parallel for-each loop

Posted by "Ford, Mark" <ma...@ll.mit.edu>.
The snippet you provided wasn't complete. I looked at the original attachment and it looks like this:

ForEach (parallel=yes)
    Scope
        CS esbRequest
        Sequence
            Invoke (CS=esbRequest, pattern=request)
            Receive (CS=esbRequest)

This pattern is valid since the correlation set referenced is defined within the parallel scope. As such, each scope instance should have its own correlation set. If the invoke and receive referenced a correlation set outside of the enclosing scope then you'd definitely have problems but the way it's defined in the example provided is valid and in fact a very common pattern.



On 2/25/09 10:24 AM, "Rafal Rusin" <ra...@gmail.com> wrote:



Your bpel contains following:

<forEach counterName="commandCounter" parallel="yes">
                                <receive createInstance="no"
                                    name="ESBResult" operation="ESBResult"
partnerLink="ESBResult"
                                    portType="tns:ESBResult"
variable="ESBMessage" xml:ID="19">

                                    <correlations>
                                        <correlation initiate="no"
                                            set="esbRequest" />
                                    </correlations>
                                </receive>
</forEach>


According to bpel specification, this will cause conflictingReceive error
when forEach has >1 items.

Regards,
Rafal Rusin

http://www.mimuw.edu.pl/~rrusin/


Andi Abes wrote:
>
> I'm trying to get a relatively simple process which performs a
> correlated receive in parallel for-each loop (attached) - just the sweet
> spot for BPEL ;)
>
> I've tried with:
> -     Derby/JPA - java.sql.SQLException: A lock could not be obtained
> due to a deadlock (full stack in earlier emails)
> -     Hibernate/Oracle - the exception is below (hibernate 3.2.5/
> oracle 10.2)
> -     JPA / Oracle - This didn't produce exceptions, but it produced
> the following error, which killed the process instance...
> o     ERROR - GeronimoLog.error(104) | The message exchange seems to
> be in an unconsistent state, you're probably missing a reply on a
> request/response interaction.
> INFO - GeronimoLog.info(79) | ActivityRecovery: Registering activity 25,
> failure reason: org.apache.ode.bpel.iapi.BpelEngineException: Engine
> requested response
>  while the message exchange hqejbhcnphr426192c3r3o was in the state
> COMPLETED_OK on channel 45
>
> Any thoughts?
> The last 2 cases sound to me as a bug...
>
>
>
>  <<BPEL_2.zip>>
>
> Exception with Hibernate/Oracle:
>
>
> DEBUG - GeronimoLog.debug(66) |
> org.apache.ode.daohib.bpel.hobj.HProcess{created=null, active=false,
> events=<uninitialized>, processId={urn:bpel:BpelMock}BPELMo
> ck-1, deployDate=2009-02-24 10:33:55, id=1, version=1,
> messageExchanges=<uninitialized>, deploymentPartnerLinks=[],
> typeName=BPELMock, lock=0, correlators=<unin
> itialized>, deployer=null, typeNamespace=urn:bpel:BpelMock,
> instances=<uninitialized>, guid=hqejbhcnphr42in8iaul6m}
> DEBUG - GeronimoLog.debug(66) |
> org.apache.ode.daohib.bpel.hobj.HCorrelator{created=2009-02-24 10:33:55,
> lock=0, process=org.apache.ode.daohib.bpel.hobj.HProces
> s#1, correlatorId=25.ESBResult, messageCorrelations=<uninitialized>,
> selectors=<uninitialized>, id=2}
> DEBUG - GeronimoLog.debug(66) |
> org.apache.ode.daohib.bpel.hobj.HProcessInstance{created=2009-02-24
> 10:34:25, jacobState=org.apache.ode.daohib.bpel.hobj.HLargeD
> ata#168, events=<uninitialized>, previousState=10,
> lastActiveTime=2009-02-24 10:34:33, fault=null,
> correlationSets=<uninitialized>, sequence=27, id=7, activityF
> ailureCount=0, messageExchanges=<uninitialized>, lock=0,
> correlatorSelectors=<uninitialized>, activityFailureDateTime=null,
> scopes=<uninitialized>, process=org.
> apache.ode.daohib.bpel.hobj.HProcess#1,
> activityRecoveries=<uninitialized>, state=20,
> instantiatingCorrelator=org.apache.ode.daohib.bpel.hobj.HCorrelator#3}
> DEBUG - GeronimoLog.debug(66) | about to open PreparedStatement (open
> PreparedStatements: 0, globally: 3)
> DEBUG - GeronimoLog.debug(66) | opening JDBC connection
> DEBUG - GeronimoLog.debug(70) | Cannot open connection [???]
> java.sql.SQLException: ORA-01453: SET TRANSACTION must be first
> statement of transaction
>         at
> oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:11
> 2)
>         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
>         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
>         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:745)
>         at
> oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:207)
>         at
> oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:957)
>         at
> oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.
> java:1170)
>         at
> oracle.jdbc.driver.OracleStatement.executeInternal(OracleStatement.java:
> 1696)
>         at
> oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:1662)
>         at
> oracle.jdbc.driver.PhysicalConnection.setTransactionIsolation(PhysicalCo
> nnection.java:1661)
>         at
> org.apache.tomcat.dbcp.dbcp.DelegatingConnection.setTransactionIsolation
> (DelegatingConnection.java:340)
>         at
> org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper
> .setTransactionIsolation(PoolingDataSource.java:332)
>         at
> org.apache.ode.daohib.DataSourceConnectionProvider.getConnection(DataSou
> rceConnectionProvider.java:45)
>         at
> org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.ja
> va:423)
>         at
> org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.jav
> a:144)
>         at
> org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher
> .java:139)
>         at
> org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1547)
>         at
> org.hibernate.loader.hql.QueryLoader.iterate(QueryLoader.java:399)
>         at
> org.hibernate.hql.ast.QueryTranslatorImpl.iterate(QueryTranslatorImpl.ja
> va:380)
>         at
> org.hibernate.engine.query.HQLQueryPlan.performIterate(HQLQueryPlan.java
> :224)
>         at
> org.hibernate.impl.SessionImpl.iterateFilter(SessionImpl.java:1492)
>         at
> org.hibernate.impl.CollectionFilterImpl.iterate(CollectionFilterImpl.jav
> a:38)
>         at
> org.apache.ode.daohib.bpel.CorrelatorDaoImpl.dequeueMessage(CorrelatorDa
> oImpl.java:89)
> :
>
>
>

--
View this message in context: http://www.nabble.com/Correlated-receive-in-parallel-for-each-loop-tp22184207p22204983.html
Sent from the Apache Ode User mailing list archive at Nabble.com.





--
Mark Ford
MIT Lincoln Laboratory
244 Wood Street
Lexington MA 02420
(781) 981-1843

Re: Correlated receive in parallel for-each loop

Posted by Rafal Rusin <ra...@gmail.com>.
Your bpel contains following:

<forEach counterName="commandCounter" parallel="yes">
                                <receive createInstance="no"
                                    name="ESBResult" operation="ESBResult"
partnerLink="ESBResult"
                                    portType="tns:ESBResult"
variable="ESBMessage" xml:ID="19">

                                    <correlations>
                                        <correlation initiate="no"
                                            set="esbRequest" />
                                    </correlations>
                                </receive>
</forEach>


According to bpel specification, this will cause conflictingReceive error
when forEach has >1 items. 

Regards,
Rafal Rusin

http://www.mimuw.edu.pl/~rrusin/


Andi Abes wrote:
> 
> I'm trying to get a relatively simple process which performs a
> correlated receive in parallel for-each loop (attached) - just the sweet
> spot for BPEL ;)
> 
> I've tried with:
> -	Derby/JPA - java.sql.SQLException: A lock could not be obtained
> due to a deadlock (full stack in earlier emails)
> -	Hibernate/Oracle - the exception is below (hibernate 3.2.5/
> oracle 10.2)
> -	JPA / Oracle - This didn't produce exceptions, but it produced
> the following error, which killed the process instance...
> o	ERROR - GeronimoLog.error(104) | The message exchange seems to
> be in an unconsistent state, you're probably missing a reply on a
> request/response interaction.
> INFO - GeronimoLog.info(79) | ActivityRecovery: Registering activity 25,
> failure reason: org.apache.ode.bpel.iapi.BpelEngineException: Engine
> requested response
>  while the message exchange hqejbhcnphr426192c3r3o was in the state
> COMPLETED_OK on channel 45
> 
> Any thoughts?
> The last 2 cases sound to me as a bug...
> 
> 
> 
>  <<BPEL_2.zip>> 
> 
> Exception with Hibernate/Oracle:
> 
> 
> DEBUG - GeronimoLog.debug(66) |
> org.apache.ode.daohib.bpel.hobj.HProcess{created=null, active=false,
> events=<uninitialized>, processId={urn:bpel:BpelMock}BPELMo
> ck-1, deployDate=2009-02-24 10:33:55, id=1, version=1,
> messageExchanges=<uninitialized>, deploymentPartnerLinks=[],
> typeName=BPELMock, lock=0, correlators=<unin
> itialized>, deployer=null, typeNamespace=urn:bpel:BpelMock,
> instances=<uninitialized>, guid=hqejbhcnphr42in8iaul6m}
> DEBUG - GeronimoLog.debug(66) |
> org.apache.ode.daohib.bpel.hobj.HCorrelator{created=2009-02-24 10:33:55,
> lock=0, process=org.apache.ode.daohib.bpel.hobj.HProces
> s#1, correlatorId=25.ESBResult, messageCorrelations=<uninitialized>,
> selectors=<uninitialized>, id=2}
> DEBUG - GeronimoLog.debug(66) |
> org.apache.ode.daohib.bpel.hobj.HProcessInstance{created=2009-02-24
> 10:34:25, jacobState=org.apache.ode.daohib.bpel.hobj.HLargeD
> ata#168, events=<uninitialized>, previousState=10,
> lastActiveTime=2009-02-24 10:34:33, fault=null,
> correlationSets=<uninitialized>, sequence=27, id=7, activityF
> ailureCount=0, messageExchanges=<uninitialized>, lock=0,
> correlatorSelectors=<uninitialized>, activityFailureDateTime=null,
> scopes=<uninitialized>, process=org.
> apache.ode.daohib.bpel.hobj.HProcess#1,
> activityRecoveries=<uninitialized>, state=20,
> instantiatingCorrelator=org.apache.ode.daohib.bpel.hobj.HCorrelator#3}
> DEBUG - GeronimoLog.debug(66) | about to open PreparedStatement (open
> PreparedStatements: 0, globally: 3)
> DEBUG - GeronimoLog.debug(66) | opening JDBC connection
> DEBUG - GeronimoLog.debug(70) | Cannot open connection [???]
> java.sql.SQLException: ORA-01453: SET TRANSACTION must be first
> statement of transaction
>         at
> oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:11
> 2)
>         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
>         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
>         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:745)
>         at
> oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:207)
>         at
> oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:957)
>         at
> oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.
> java:1170)
>         at
> oracle.jdbc.driver.OracleStatement.executeInternal(OracleStatement.java:
> 1696)
>         at
> oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:1662)
>         at
> oracle.jdbc.driver.PhysicalConnection.setTransactionIsolation(PhysicalCo
> nnection.java:1661)
>         at
> org.apache.tomcat.dbcp.dbcp.DelegatingConnection.setTransactionIsolation
> (DelegatingConnection.java:340)
>         at
> org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper
> .setTransactionIsolation(PoolingDataSource.java:332)
>         at
> org.apache.ode.daohib.DataSourceConnectionProvider.getConnection(DataSou
> rceConnectionProvider.java:45)
>         at
> org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.ja
> va:423)
>         at
> org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.jav
> a:144)
>         at
> org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher
> .java:139)
>         at
> org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1547)
>         at
> org.hibernate.loader.hql.QueryLoader.iterate(QueryLoader.java:399)
>         at
> org.hibernate.hql.ast.QueryTranslatorImpl.iterate(QueryTranslatorImpl.ja
> va:380)
>         at
> org.hibernate.engine.query.HQLQueryPlan.performIterate(HQLQueryPlan.java
> :224)
>         at
> org.hibernate.impl.SessionImpl.iterateFilter(SessionImpl.java:1492)
>         at
> org.hibernate.impl.CollectionFilterImpl.iterate(CollectionFilterImpl.jav
> a:38)
>         at
> org.apache.ode.daohib.bpel.CorrelatorDaoImpl.dequeueMessage(CorrelatorDa
> oImpl.java:89)
> :
> 
>  
> 

-- 
View this message in context: http://www.nabble.com/Correlated-receive-in-parallel-for-each-loop-tp22184207p22204983.html
Sent from the Apache Ode User mailing list archive at Nabble.com.