camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Müller (JIRA) <j...@apache.org>
Subject [jira] [Commented] (CAMEL-5060) camel-bam is not thread safe and throws ConcurrentModificationException
Date Sat, 02 Jun 2012 20:58:22 GMT

    [ https://issues.apache.org/jira/browse/CAMEL-5060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13288024#comment-13288024
] 

Christian Müller commented on CAMEL-5060:
-----------------------------------------

This issue is solved. I will close this issue.

Now I get another exception (which I will track with another issue, if I cannot resolve it
by myself in the next days):
{code}
2012-06-02 22:49:15,385 [d #0 - seda://a] ERROR BamProcessorSupport            - Caught: org.springframework.orm.jpa.JpaSystemException:
Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLIntegrityConstraintViolationException: The statement was aborted
because it would have caused a duplicate key value in a unique or primary key constraint or
unique index identified by 'SQL120602224913110' defined on 'CAMEL_ACTIVITYSTATE'.
Error Code: 20000
Call: INSERT INTO CAMEL_ACTIVITYSTATE (ID, ESCALATIONLEVEL, RECEIVEDMESSAGECOUNT, TIMEEXPECTED,
TIMEOVERDUE, ACTIVITYDEFINITION_ID, PROCESSINSTANCE_CORRELATIONKEY) VALUES (?, ?, ?, ?, ?,
?, ?)
	bind => [2, 0, 0, null, null, null, 123]
Query: InsertObjectQuery(ActivityState[2 on ProcessInstance[123] null]); nested exception
is javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence
Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLIntegrityConstraintViolationException: The statement was aborted
because it would have caused a duplicate key value in a unique or primary key constraint or
unique index identified by 'SQL120602224913110' defined on 'CAMEL_ACTIVITYSTATE'.
Error Code: 20000
Call: INSERT INTO CAMEL_ACTIVITYSTATE (ID, ESCALATIONLEVEL, RECEIVEDMESSAGECOUNT, TIMEEXPECTED,
TIMEOVERDUE, ACTIVITYDEFINITION_ID, PROCESSINSTANCE_CORRELATIONKEY) VALUES (?, ?, ?, ?, ?,
?, ?)
	bind => [2, 0, 0, null, null, null, 123]
Query: InsertObjectQuery(ActivityState[2 on ProcessInstance[123] null])
org.springframework.orm.jpa.JpaSystemException: Exception [EclipseLink-4002] (Eclipse Persistence
Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLIntegrityConstraintViolationException: The statement was aborted
because it would have caused a duplicate key value in a unique or primary key constraint or
unique index identified by 'SQL120602224913110' defined on 'CAMEL_ACTIVITYSTATE'.
Error Code: 20000
Call: INSERT INTO CAMEL_ACTIVITYSTATE (ID, ESCALATIONLEVEL, RECEIVEDMESSAGECOUNT, TIMEEXPECTED,
TIMEOVERDUE, ACTIVITYDEFINITION_ID, PROCESSINSTANCE_CORRELATIONKEY) VALUES (?, ?, ?, ?, ?,
?, ?)
	bind => [2, 0, 0, null, null, null, 123]
Query: InsertObjectQuery(ActivityState[2 on ProcessInstance[123] null]); nested exception
is javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence
Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLIntegrityConstraintViolationException: The statement was aborted
because it would have caused a duplicate key value in a unique or primary key constraint or
unique index identified by 'SQL120602224913110' defined on 'CAMEL_ACTIVITYSTATE'.
Error Code: 20000
Call: INSERT INTO CAMEL_ACTIVITYSTATE (ID, ESCALATIONLEVEL, RECEIVEDMESSAGECOUNT, TIMEEXPECTED,
TIMEOVERDUE, ACTIVITYDEFINITION_ID, PROCESSINSTANCE_CORRELATIONKEY) VALUES (?, ?, ?, ?, ?,
?, ?)
	bind => [2, 0, 0, null, null, null, 123]
Query: InsertObjectQuery(ActivityState[2 on ProcessInstance[123] null])
	at org.springframework.orm.jpa.EntityManagerFactoryUtils.convertJpaAccessExceptionIfPossible(EntityManagerFactoryUtils.java:321)
	at org.springframework.orm.jpa.DefaultJpaDialect.translateExceptionIfPossible(DefaultJpaDialect.java:120)
	at org.springframework.dao.support.DataAccessUtils.translateIfNecessary(DataAccessUtils.java:213)
	at org.springframework.orm.jpa.JpaAccessor.translateIfNecessary(JpaAccessor.java:152)
	at org.springframework.orm.jpa.JpaTemplate.execute(JpaTemplate.java:188)
	at org.springframework.orm.jpa.JpaTemplate.execute(JpaTemplate.java:146)
	at org.springframework.orm.jpa.JpaTemplate.findByNamedParams(JpaTemplate.java:321)
	at org.apache.camel.bam.ProcessBuilder.findOrCreateActivityDefinition(ProcessBuilder.java:185)
	at org.apache.camel.bam.rules.ActivityRules.getActivityDefinition(ActivityRules.java:72)
	at org.apache.camel.bam.model.ActivityState.isActivity(ActivityState.java:82)
	at org.apache.camel.bam.model.ProcessInstance.getActivityState(ProcessInstance.java:124)
	at org.apache.camel.bam.TimeExpression.evaluate(TimeExpression.java:55)
	at org.apache.camel.bam.rules.TemporalRule.processExchange(TemporalRule.java:100)
	at org.apache.camel.bam.rules.ActivityRules.processExchange(ActivityRules.java:63)
	at org.apache.camel.bam.rules.ProcessRules.processExchange(ProcessRules.java:44)
	at org.apache.camel.bam.processor.JpaBamProcessor.processEntity(JpaBamProcessor.java:58)
	at org.apache.camel.bam.processor.JpaBamProcessor.processEntity(JpaBamProcessor.java:37)
	at org.apache.camel.bam.processor.BamProcessorSupport$1.doInTransaction(BamProcessorSupport.java:97)
	at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)
	at org.apache.camel.bam.processor.BamProcessorSupport.process(BamProcessorSupport.java:89)
	at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
	at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
	at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
	at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
	at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
	at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
	at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
	at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:91)
	at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
	at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:333)
	at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:223)
	at org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)
	at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
	at org.apache.camel.processor.interceptor.DefaultChannel.process(DefaultChannel.java:303)
	at org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)
	at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
	at org.apache.camel.processor.UnitOfWorkProcessor.processAsync(UnitOfWorkProcessor.java:150)
	at org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:117)
	at org.apache.camel.processor.RouteInflightRepositoryProcessor.processNext(RouteInflightRepositoryProcessor.java:48)
	at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
	at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
	at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
	at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
	at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:71)
	at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
	at org.apache.camel.component.seda.SedaConsumer.sendToConsumers(SedaConsumer.java:273)
	at org.apache.camel.component.seda.SedaConsumer.doRun(SedaConsumer.java:181)
	at org.apache.camel.component.seda.SedaConsumer.run(SedaConsumer.java:137)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:680)
Caused by: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence
Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLIntegrityConstraintViolationException: The statement was aborted
because it would have caused a duplicate key value in a unique or primary key constraint or
unique index identified by 'SQL120602224913110' defined on 'CAMEL_ACTIVITYSTATE'.
Error Code: 20000
Call: INSERT INTO CAMEL_ACTIVITYSTATE (ID, ESCALATIONLEVEL, RECEIVEDMESSAGECOUNT, TIMEEXPECTED,
TIMEOVERDUE, ACTIVITYDEFINITION_ID, PROCESSINSTANCE_CORRELATIONKEY) VALUES (?, ?, ?, ?, ?,
?, ?)
	bind => [2, 0, 0, null, null, null, 123]
Query: InsertObjectQuery(ActivityState[2 on ProcessInstance[123] null])
	at org.eclipse.persistence.internal.jpa.EntityManagerImpl.flush(EntityManagerImpl.java:786)
	at org.eclipse.persistence.internal.jpa.EJBQueryImpl.performPreQueryFlush(EJBQueryImpl.java:1298)
	at org.eclipse.persistence.internal.jpa.EJBQueryImpl.executeReadQuery(EJBQueryImpl.java:434)
	at org.eclipse.persistence.internal.jpa.EJBQueryImpl.getResultList(EJBQueryImpl.java:742)
	at org.springframework.orm.jpa.JpaTemplate$10.doInJpa(JpaTemplate.java:330)
	at org.springframework.orm.jpa.JpaTemplate$10.doInJpa(JpaTemplate.java:1)
	at org.springframework.orm.jpa.JpaTemplate.execute(JpaTemplate.java:183)
	... 46 more
Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.3.2.v20111125-r10461):
org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLIntegrityConstraintViolationException: The statement was aborted
because it would have caused a duplicate key value in a unique or primary key constraint or
unique index identified by 'SQL120602224913110' defined on 'CAMEL_ACTIVITYSTATE'.
Error Code: 20000
Call: INSERT INTO CAMEL_ACTIVITYSTATE (ID, ESCALATIONLEVEL, RECEIVEDMESSAGECOUNT, TIMEEXPECTED,
TIMEOVERDUE, ACTIVITYDEFINITION_ID, PROCESSINSTANCE_CORRELATIONKEY) VALUES (?, ?, ?, ?, ?,
?, ?)
	bind => [2, 0, 0, null, null, null, 123]
{code}
                
> camel-bam is not thread safe and throws ConcurrentModificationException
> -----------------------------------------------------------------------
>
>                 Key: CAMEL-5060
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5060
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-bam
>    Affects Versions: 2.9.0
>            Reporter: Christian Müller
>            Assignee: Christian Müller
>             Fix For: 2.9.3, 2.10.0
>
>
> camel-bam is not thread safe and throws ConcurrentModificationException:
> {noformat}
> 2012-03-04 14:36:39,528 [d #0 - seda://a] ERROR BamProcessorSupport            - Caught:
java.util.ConcurrentModificationException
> java.util.ConcurrentModificationException
> 	at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)
> 	at java.util.HashMap$KeyIterator.next(HashMap.java:828)
> 	at org.apache.camel.bam.model.ProcessInstance.getActivityState(ProcessInstance.java:123)
> 	at org.apache.camel.bam.TimeExpression.evaluate(TimeExpression.java:55)
> 	at org.apache.camel.bam.rules.TemporalRule.processExchange(TemporalRule.java:100)
> 	at org.apache.camel.bam.rules.ActivityRules.processExchange(ActivityRules.java:63)
> 	at org.apache.camel.bam.rules.ProcessRules.processExchange(ProcessRules.java:44)
> 	at org.apache.camel.bam.processor.JpaBamProcessor.processEntity(JpaBamProcessor.java:58)
> 	at org.apache.camel.bam.processor.JpaBamProcessor.processEntity(JpaBamProcessor.java:37)
> 	at org.apache.camel.bam.processor.BamProcessorSupport$1.doInTransaction(BamProcessorSupport.java:97)
> 	at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)
> 	at org.apache.camel.bam.processor.BamProcessorSupport.process(BamProcessorSupport.java:89)
> 	at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
> 	at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
> 	at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
> 	at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
> 	at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
> 	at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
> 	at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
> 	at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:91)
> 	at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
> 	at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:333)
> 	at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:223)
> 	at org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)
> 	at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
> 	at org.apache.camel.processor.interceptor.DefaultChannel.process(DefaultChannel.java:303)
> 	at org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)
> 	at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
> 	at org.apache.camel.processor.UnitOfWorkProcessor.processAsync(UnitOfWorkProcessor.java:150)
> 	at org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:117)
> 	at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
> 	at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
> 	at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
> 	at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:71)
> 	at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
> 	at org.apache.camel.component.seda.SedaConsumer.sendToConsumers(SedaConsumer.java:261)
> 	at org.apache.camel.component.seda.SedaConsumer.doRun(SedaConsumer.java:173)
> 	at org.apache.camel.component.seda.SedaConsumer.run(SedaConsumer.java:132)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> 	at java.lang.Thread.run(Thread.java:680)
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

Mime
View raw message