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 21:00:23 GMT

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

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

And with the openjpa profile, I got some other exceptions:
{code}
2012-06-02 22:55:55,532 [main           ] DEBUG JpaTransactionManager          - Initiating
transaction rollback after commit exception
org.springframework.orm.jpa.JpaSystemException: The transaction has been rolled back.  See
the nested exceptions for details on the errors that occurred.; nested exception is <openjpa-2.2.0-r422266:1244990
fatal general error> org.apache.openjpa.persistence.PersistenceException: The transaction
has been rolled back.  See the nested exceptions for details on the errors that occurred.
FailedObject: org.apache.camel.bam.model.ProcessDefinition@5106def2
	at org.springframework.orm.jpa.EntityManagerFactoryUtils.convertJpaAccessExceptionIfPossible(EntityManagerFactoryUtils.java:321)
	at org.springframework.orm.jpa.DefaultJpaDialect.translateExceptionIfPossible(DefaultJpaDialect.java:120)
	at org.springframework.orm.jpa.JpaTransactionManager.doCommit(JpaTransactionManager.java:471)
	at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:754)
	at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:723)
	at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:147)
	at org.apache.camel.bam.ProcessBuilder.createActivityProcessor(ProcessBuilder.java:96)
	at org.apache.camel.bam.ActivityBuilder.createProcessor(ActivityBuilder.java:50)
	at org.apache.camel.bam.ActivityBuilder.getProcessor(ActivityBuilder.java:58)
	at org.apache.camel.bam.ProcessBuilder.populateRoutes(ProcessBuilder.java:170)
	at org.apache.camel.builder.RouteBuilder.addRoutesToCamelContext(RouteBuilder.java:264)
	at org.apache.camel.impl.DefaultCamelContext.addRoutes(DefaultCamelContext.java:616)
	at org.apache.camel.test.junit4.CamelTestSupport.doSetUp(CamelTestSupport.java:285)
	at org.apache.camel.test.junit4.CamelTestSupport.setUp(CamelTestSupport.java:216)
	at org.apache.camel.bam.BamRouteTest.setUp(BamRouteTest.java:62)
	at org.apache.camel.bam.MultipleActivitiesConcurrentlyTest.setUp(MultipleActivitiesConcurrentlyTest.java:66)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30)
	at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:47)
	at org.junit.rules.RunRules.evaluate(RunRules.java:18)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
	at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:119)
	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:101)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103)
	at $Proxy0.invoke(Unknown Source)
	at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:150)
	at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:74)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)
Caused by: <openjpa-2.2.0-r422266:1244990 fatal general error> org.apache.openjpa.persistence.PersistenceException:
The transaction has been rolled back.  See the nested exceptions for details on the errors
that occurred.
FailedObject: org.apache.camel.bam.model.ProcessDefinition@5106def2
	at org.apache.openjpa.kernel.BrokerImpl.newFlushException(BrokerImpl.java:2337)
	at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:2174)
	at org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:2072)
	at org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1990)
	at org.apache.openjpa.kernel.LocalManagedRuntime.commit(LocalManagedRuntime.java:81)
	at org.apache.openjpa.kernel.BrokerImpl.commit(BrokerImpl.java:1514)
	at org.apache.openjpa.kernel.DelegatingBroker.commit(DelegatingBroker.java:933)
	at org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:570)
	at org.springframework.orm.jpa.JpaTransactionManager.doCommit(JpaTransactionManager.java:467)
	... 46 more
Caused by: <openjpa-2.2.0-r422266:1244990 fatal general error> org.apache.openjpa.persistence.PersistenceException:
Column 'NAME'  cannot accept a NULL value. {prepstmnt 1033140423 INSERT INTO CAMEL_PROCESSDEFINITION
(id, name) VALUES (?, ?) [params=?, ?]} [code=20000, state=23502]
FailedObject: org.apache.camel.bam.model.ProcessDefinition@5106def2
	at org.apache.openjpa.jdbc.sql.DBDictionary.narrow(DBDictionary.java:4912)
	at org.apache.openjpa.jdbc.sql.DBDictionary.newStoreException(DBDictionary.java:4878)
	at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:136)
	at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:78)
	at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flushAndUpdate(PreparedStatementManagerImpl.java:143)
	at org.apache.openjpa.jdbc.kernel.BatchingPreparedStatementManagerImpl.flushAndUpdate(BatchingPreparedStatementManagerImpl.java:79)
	at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flushInternal(PreparedStatementManagerImpl.java:99)
	at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flush(PreparedStatementManagerImpl.java:87)
	at org.apache.openjpa.jdbc.kernel.ConstraintUpdateManager.flush(ConstraintUpdateManager.java:550)
	at org.apache.openjpa.jdbc.kernel.ConstraintUpdateManager.flush(ConstraintUpdateManager.java:106)
	at org.apache.openjpa.jdbc.kernel.BatchingConstraintUpdateManager.flush(BatchingConstraintUpdateManager.java:59)
	at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:103)
	at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:76)
	at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.flush(JDBCStoreManager.java:713)
	at org.apache.openjpa.kernel.DelegatingStoreManager.flush(DelegatingStoreManager.java:131)
	... 54 more
Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: Column 'NAME'  cannot accept
a NULL value. {prepstmnt 1033140423 INSERT INTO CAMEL_PROCESSDEFINITION (id, name) VALUES
(?, ?) [params=?, ?]} [code=20000, state=23502]
	at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:247)
	at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:223)
	at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.access$1000(LoggingConnectionDecorator.java:72)
	at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingPreparedStatement.executeUpdate(LoggingConnectionDecorator.java:1162)
	at org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:272)
	at org.apache.openjpa.jdbc.kernel.JDBCStoreManager$CancelPreparedStatement.executeUpdate(JDBCStoreManager.java:1741)
	at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.executeUpdate(PreparedStatementManagerImpl.java:267)
	at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flushAndUpdate(PreparedStatementManagerImpl.java:118)
	... 64 more
{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