camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-10245) Persistence Exception when trying to delete detached entity
Date Tue, 16 Aug 2016 12:15:20 GMT

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

ASF GitHub Bot commented on CAMEL-10245:
----------------------------------------

Github user bgaudaen closed the pull request at:

    https://github.com/apache/camel/pull/1124


> Persistence Exception when trying to delete detached entity
> -----------------------------------------------------------
>
>                 Key: CAMEL-10245
>                 URL: https://issues.apache.org/jira/browse/CAMEL-10245
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-jpa
>    Affects Versions: 2.17.3
>            Reporter: Bob Gaudaen
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.18.0, 2.17.4
>
>
> Following exception is raised when calling jpa producer with remove option and a detached
entity:
> {noformat}
> org.apache.camel.CamelExecutionException: Exception occurred during execution on the
exchange: Exchange[ID-bobbys-mac-media-int-63836-1471269707364-0-4]
> 	at org.apache.camel.util.ObjectHelper.wrapCamelExecutionException(ObjectHelper.java:1706)
> 	at org.apache.camel.util.ExchangeHelper.extractResultBody(ExchangeHelper.java:677)
> 	at org.apache.camel.impl.DefaultProducerTemplate.extractResultBody(DefaultProducerTemplate.java:507)
> 	at org.apache.camel.impl.DefaultProducerTemplate.extractResultBody(DefaultProducerTemplate.java:503)
> 	at org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProducerTemplate.java:150)
> 	at org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProducerTemplate.java:155)
> 	at org.apache.camel.processor.jpa.JpaProducerRemoveTest.testRouteJpa(JpaProducerRemoveTest.java:54)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:483)
> 	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
> 	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> 	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
> 	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
> 	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
> 	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
> 	at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
> 	at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
> 	at org.junit.rules.RunRules.evaluate(RunRules.java:20)
> 	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
> 	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
> 	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
> 	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
> 	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
> 	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
> 	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
> 	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
> 	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
> 	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
> 	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
> 	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:117)
> 	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:42)
> 	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:253)
> 	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:84)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:483)
> 	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
> Caused by: <openjpa-2.4.1-r422266:1730418 nonfatal user error> org.apache.openjpa.persistence.ArgumentException:
You cannot perform operation delete on detached object "org.apache.camel.examples.SendEmail-5801".
This operation only applies to managed objects.
> FailedObject: org.apache.camel.examples.SendEmail-5801
> 	at org.apache.openjpa.kernel.BrokerImpl.newDetachedException(BrokerImpl.java:2835)
> 	at org.apache.openjpa.kernel.BrokerImpl.delete(BrokerImpl.java:2826)
> 	at org.apache.openjpa.kernel.BrokerImpl.delete(BrokerImpl.java:2771)
> 	at org.apache.openjpa.kernel.DelegatingBroker.delete(DelegatingBroker.java:1101)
> 	at org.apache.openjpa.persistence.EntityManagerImpl.remove(EntityManagerImpl.java:731)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:483)
> 	at org.springframework.orm.jpa.ExtendedEntityManagerCreator$ExtendedEntityManagerInvocationHandler.invoke(ExtendedEntityManagerCreator.java:347)
> 	at com.sun.proxy.$Proxy40.remove(Unknown Source)
> 	at org.apache.camel.component.jpa.JpaProducer$1.remove(JpaProducer.java:131)
> 	at org.apache.camel.component.jpa.JpaProducer$1.doInTransaction(JpaProducer.java:92)
> 	at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)
> 	at org.apache.camel.component.jpa.JpaProducer.process(JpaProducer.java:63)
> 	at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
> 	at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:145)
> 	at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:542)
> 	at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:197)
> 	at org.apache.camel.processor.Pipeline.process(Pipeline.java:120)
> 	at org.apache.camel.processor.Pipeline.process(Pipeline.java:83)
> 	at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:197)
> 	at org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:62)
> 	at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:197)
> 	at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:97)
> 	at org.apache.camel.impl.ProducerCache$2.doInProducer(ProducerCache.java:447)
> 	at org.apache.camel.impl.ProducerCache$2.doInProducer(ProducerCache.java:401)
> 	at org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:291)
> 	at org.apache.camel.impl.ProducerCache.sendExchange(ProducerCache.java:401)
> 	at org.apache.camel.impl.ProducerCache.send(ProducerCache.java:224)
> 	at org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:131)
> 	at org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProducerTemplate.java:148)
> 	... 35 more
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message