[jira] [Resolved] (CAMEL-6838) JMX Notification Trace Event Handler has no implementation for traceExchangeIn and traceExchangeOut

2014-02-17 Thread Willem Jiang (JIRA)

 [ 
https://issues.apache.org/jira/browse/CAMEL-6838?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Willem Jiang resolved CAMEL-6838.
-

Resolution: Fixed

Applied the patch into camel master and camel-2.12.x branches.

> JMX Notification Trace Event Handler has no implementation for 
> traceExchangeIn and traceExchangeOut
> ---
>
> Key: CAMEL-6838
> URL: https://issues.apache.org/jira/browse/CAMEL-6838
> Project: Camel
>  Issue Type: Improvement
>Affects Versions: 2.12.1
>Reporter: Raul Kripalani
>Assignee: Willem Jiang
>Priority: Minor
> Fix For: 2.12.4, 2.13.0
>
>
> This leads to absolutely no JMX Notifications being recorded when the 
> Tracer's traceOutExchanges option is enabled.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)


[jira] [Assigned] (CAMEL-6838) JMX Notification Trace Event Handler has no implementation for traceExchangeIn and traceExchangeOut

2014-02-17 Thread Willem Jiang (JIRA)

 [ 
https://issues.apache.org/jira/browse/CAMEL-6838?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Willem Jiang reassigned CAMEL-6838:
---

Assignee: Willem Jiang  (was: Raul Kripalani)

> JMX Notification Trace Event Handler has no implementation for 
> traceExchangeIn and traceExchangeOut
> ---
>
> Key: CAMEL-6838
> URL: https://issues.apache.org/jira/browse/CAMEL-6838
> Project: Camel
>  Issue Type: Improvement
>Affects Versions: 2.12.1
>Reporter: Raul Kripalani
>Assignee: Willem Jiang
>Priority: Minor
> Fix For: 2.12.4, 2.13.0
>
>
> This leads to absolutely no JMX Notifications being recorded when the 
> Tracer's traceOutExchanges option is enabled.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)


[jira] [Commented] (CAMEL-6777) We are building two different source distributions which should not be the case

2014-02-17 Thread Willem Jiang (JIRA)

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

Willem Jiang commented on CAMEL-6777:
-

I think we can address it by define release profile ourself instead of use the 
apache-release on from the apache pom.

> We are building two different source distributions which should not be the 
> case
> ---
>
> Key: CAMEL-6777
> URL: https://issues.apache.org/jira/browse/CAMEL-6777
> Project: Camel
>  Issue Type: Improvement
>  Components: build system
>Affects Versions: 2.11.2, 2.12.1
>Reporter: Christian Müller
>Assignee: Hadrian Zbarcea
> Fix For: 2.12.4, 2.13.0, 2.11.5
>
>
> Because of the 'apache-release' profile in our root 
> [pom.xml|https://git-wip-us.apache.org/repos/asf?p=camel.git;a=blob;f=pom.xml;h=9e99be5684cfe5a3e48693ed62a1a5ba03d4bfc2;hb=HEAD],
>  we are building two different source distributions:
> - http://search.maven.org/#artifactdetails|org.apache.camel|camel|2.12.0|pom
> - 
> http://search.maven.org/#artifactdetails|org.apache.camel|apache-camel|2.12.0|pom
> I propose to remove this profile.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)


[jira] [Updated] (CAMEL-6943) CamelContext should log the settings which could change the configure of Camel runtime

2014-02-17 Thread Willem Jiang (JIRA)

 [ 
https://issues.apache.org/jira/browse/CAMEL-6943?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Willem Jiang updated CAMEL-6943:


Fix Version/s: (was: 2.13.0)
   Future

> CamelContext should log the settings which could change the configure of 
> Camel runtime
> --
>
> Key: CAMEL-6943
> URL: https://issues.apache.org/jira/browse/CAMEL-6943
> Project: Camel
>  Issue Type: New Feature
>  Components: camel-core
>Reporter: Willem Jiang
>Assignee: Willem Jiang
> Fix For: Future
>
>
> Some of camel components uses the System properties to do configuration, it 
> could be useful for the users to know about them if we can log these setting 
> when starting the camel context.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)


[jira] [Assigned] (CAMEL-7053) JPA Skip locked entities

2014-02-17 Thread Willem Jiang (JIRA)

 [ 
https://issues.apache.org/jira/browse/CAMEL-7053?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Willem Jiang reassigned CAMEL-7053:
---

Assignee: Willem Jiang

> JPA Skip locked entities
> 
>
> Key: CAMEL-7053
> URL: https://issues.apache.org/jira/browse/CAMEL-7053
> Project: Camel
>  Issue Type: New Feature
>  Components: camel-jpa
>Affects Versions: 2.12.1
>Reporter: Chris Watts
>Assignee: Willem Jiang
> Fix For: 2.13.0
>
> Attachments: skipLockedJpa.patch
>
>
> The current implementation of the JPA endpoint is created more for using it 
> as a queue for one JVM.
> This change performs the lock with timeout=0, causing a NOWAIT to be used 
> where implementations support it.
> Ideally the lock should be performed using refresh() instead of lock() to 
> prevent dirty read exceptions but Hibernate's implementation throws the wrong 
> exception.
> https://hibernate.atlassian.net/browse/HHH-8786
> Currently OpenJPA throws the wrong exception for both lock and refresh so the 
> test uses hibernate. See this jira:
> https://issues.apache.org/jira/browse/OPENJPA-2461
> The default lock of WRITE=OPTIMISTIC_FORCE_INCREMENT performs the lock too 
> late and their are various jpa implementation problems  (OpenJPA doesn't lock 
> it in memory, hibernate performs the delete before the increment). In nearly 
> every use case PESSIMISTIC_WRITE is more correct.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)


[jira] [Commented] (CAMEL-7214) Upgrade to elasticsearch 1.0

2014-02-17 Thread Willem Jiang (JIRA)

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

Willem Jiang commented on CAMEL-7214:
-

We need to release the elasticsearch bundle here.

> Upgrade to elasticsearch 1.0
> 
>
> Key: CAMEL-7214
> URL: https://issues.apache.org/jira/browse/CAMEL-7214
> Project: Camel
>  Issue Type: Task
>Reporter: Claus Ibsen
>Assignee: Willem Jiang
> Fix For: 2.13.0
>
>
> Its 1.0 now and we should upgrade.
> Not sure if we need an OSGi bundle from the SMX team?



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)


[jira] [Assigned] (CAMEL-7214) Upgrade to elasticsearch 1.0

2014-02-17 Thread Willem Jiang (JIRA)

 [ 
https://issues.apache.org/jira/browse/CAMEL-7214?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Willem Jiang reassigned CAMEL-7214:
---

Assignee: Willem Jiang

> Upgrade to elasticsearch 1.0
> 
>
> Key: CAMEL-7214
> URL: https://issues.apache.org/jira/browse/CAMEL-7214
> Project: Camel
>  Issue Type: Task
>Reporter: Claus Ibsen
>Assignee: Willem Jiang
> Fix For: 2.13.0
>
>
> Its 1.0 now and we should upgrade.
> Not sure if we need an OSGi bundle from the SMX team?



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)


[jira] [Assigned] (CAMEL-7215) Stop and un-schedule jobs on removal of route

2014-02-17 Thread Willem Jiang (JIRA)

 [ 
https://issues.apache.org/jira/browse/CAMEL-7215?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Willem Jiang reassigned CAMEL-7215:
---

Assignee: Willem Jiang

> Stop and un-schedule jobs on removal of route
> -
>
> Key: CAMEL-7215
> URL: https://issues.apache.org/jira/browse/CAMEL-7215
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-quartz, camel-quartz2
>Affects Versions: 2.12.2
> Environment: Using job-store 'org.quartz.simpl.RAMJobStore'
>Reporter: David Keen
>Assignee: Willem Jiang
>
> When using SimpleScheduledRoutePolicy, jobs are not deleted when a route is 
> removed.
> I got the following exception when removing a route and re-adding it to a 
> running context.
> {code}
> Stacktrace
> ---
> org.apache.camel.FailedToCreateRouteException: Failed to create route foo: 
> Route(foo)[[From[quartz... because of 
> org.quartz.ObjectAlreadyExistsException: Unable to store Job : 
> 'jobGroup-foo.job-STOP-foo', because one already exists with this 
> identification.
> at 
> org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:182) 
> ~[camel-core-2.12.2.jar:2.12.2]
> at 
> org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:770)
>  ~[camel-core-2.12.2.jar:2.12.2]
> at 
> org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:1914)
>  ~[camel-core-2.12.2.jar:2.12.2]
> at 
> org.apache.camel.impl.DefaultCamelContext.addRouteDefinitions(DefaultCamelContext.java:707)
>  ~[camel-core-2.12.2.jar:2.12.2]
> at 
> org.apache.camel.builder.RouteBuilder.populateRoutes(RouteBuilder.java:337) 
> ~[camel-core-2.12.2.jar:2.12.2]
> at 
> org.apache.camel.builder.RouteBuilder.addRoutesToCamelContext(RouteBuilder.java:264)
>  ~[camel-core-2.12.2.jar:2.12.2]
> at 
> org.apache.camel.impl.DefaultCamelContext.addRoutes(DefaultCamelContext.java:669)
>  ~[camel-core-2.12.2.jar:2.12.2]
> ...
> Caused by: org.apache.camel.RuntimeCamelException: 
> org.quartz.ObjectAlreadyExistsException: Unable to store Job : 
> 'jobGroup-foo.job-STOP-foo', because one already exists with this 
> identification.
> at 
> org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1352)
>  ~[camel-core-2.12.2.jar:2.12.2]
> at 
> org.apache.camel.routepolicy.quartz2.SimpleScheduledRoutePolicy.onInit(SimpleScheduledRoutePolicy.java:48)
>  ~[camel-quartz2-2.12.2.jar:2.12.2]
> at 
> org.apache.camel.impl.DefaultRouteContext.commit(DefaultRouteContext.java:202)
>  ~[camel-core-2.12.2.jar:2.12.2]
> at 
> org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:916) 
> ~[camel-core-2.12.2.jar:2.12.2]
> ...
> Caused by: org.quartz.ObjectAlreadyExistsException: Unable to store Job : 
> 'jobGroup-foo.job-STOP-foo', because one already exists with this 
> identification.
> at org.quartz.simpl.RAMJobStore.storeJob(RAMJobStore.java:279) 
> ~[quartz-2.2.1.jar:na]
> at 
> org.quartz.simpl.RAMJobStore.storeJobAndTrigger(RAMJobStore.java:251) 
> ~[quartz-2.2.1.jar:na]
> at 
> org.quartz.core.QuartzScheduler.scheduleJob(QuartzScheduler.java:886) 
> ~[quartz-2.2.1.jar:na]
> at org.quartz.impl.StdScheduler.scheduleJob(StdScheduler.java:249) 
> ~[quartz-2.2.1.jar:na]
> at 
> org.apache.camel.routepolicy.quartz2.ScheduledRoutePolicy.scheduleRoute(ScheduledRoutePolicy.java:116)
>  ~[camel-quartz2-2.12.2.jar:2.12.2]
> {code}
> The SimpleScheduledRoutePolicy should remove the scheduled jobs on route 
> removal. This is what CronScheduledRoutePolicy does.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)


[jira] [Created] (CAMEL-7217) Http component need to setup the message encoding header based on the content-type header

2014-02-17 Thread Willem Jiang (JIRA)
Willem Jiang created CAMEL-7217:
---

 Summary: Http component need to setup the message encoding header 
based on the content-type header
 Key: CAMEL-7217
 URL: https://issues.apache.org/jira/browse/CAMEL-7217
 Project: Camel
  Issue Type: New Feature
  Components: camel-ahc, camel-http, camel-http4, camel-jetty
Reporter: Willem Jiang
Assignee: Willem Jiang
 Fix For: 2.13.1






--
This message was sent by Atlassian JIRA
(v6.1.5#6160)


[jira] [Comment Edited] (CAMEL-7074) Upgrade to spring 4.x

2014-02-17 Thread Willem Jiang (JIRA)

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

Willem Jiang edited comment on CAMEL-7074 at 2/18/14 1:49 AM:
--

It's not an easy job to do the upgrading if there are lots of other projects 
(products) are based on camel, as they are some gap between spring 3.x and 
spring 4.x, it could take some time.

In the camel master branch we have spring4 profile can be used if you want to 
play with camel and spring 4.x yourself.


was (Author: njiang):
It's not an easy job to do the upgrading if there are lots of other projects 
(products) are based on camel.
In the camel master branch we have spring4 profile can be used if you want to 
play with camel and spring 4.x.

> Upgrade to spring 4.x
> -
>
> Key: CAMEL-7074
> URL: https://issues.apache.org/jira/browse/CAMEL-7074
> Project: Camel
>  Issue Type: Task
>  Components: camel-spring
>Reporter: David J. M. Karlsen
>Assignee: Willem Jiang
> Fix For: Future
>
>
> Upgrade to spring4.
> There is a non-backwards compatible change in spring 4.x which will cause:
> {noformat}
> java.lang.IncompatibleClassChangeError: Found interface 
> org.springframework.test.context.TestContext, but class was expected
> at 
> org.apache.camel.test.spring.CamelSpringTestContextLoaderTestExecutionListener.prepareTestInstance(CamelSpringTestContextLoaderTestExecutionListener.java:35)
> at 
> org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:326)
> at 
> org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:212)
> at 
> org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:289)
> at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> at 
> org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:291)
> at 
> org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:232)
> at 
> org.apache.camel.test.junit4.CamelSpringJUnit4ClassRunner.runChild(CamelSpringJUnit4ClassRunner.java:37)
> at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
> at 
> org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
> at 
> org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:71)
> at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
> at 
> org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:175)
> at 
> org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264)
> at 
> org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
> at 
> org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)
> at 
> org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
> at 
> org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
> at 
> org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:
> {noformat}
> due to https://jira.springsource.org/browse/SPR-7692



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)


[jira] [Commented] (CAMEL-7074) Upgrade to spring 4.x

2014-02-17 Thread Willem Jiang (JIRA)

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

Willem Jiang commented on CAMEL-7074:
-

It's not an easy job to do the upgrading if there are lots of other projects 
(products) are based on camel.
In the camel master branch we have spring4 profile can be used if you want to 
play with camel and spring 4.x.

> Upgrade to spring 4.x
> -
>
> Key: CAMEL-7074
> URL: https://issues.apache.org/jira/browse/CAMEL-7074
> Project: Camel
>  Issue Type: Task
>  Components: camel-spring
>Reporter: David J. M. Karlsen
>Assignee: Willem Jiang
> Fix For: Future
>
>
> Upgrade to spring4.
> There is a non-backwards compatible change in spring 4.x which will cause:
> {noformat}
> java.lang.IncompatibleClassChangeError: Found interface 
> org.springframework.test.context.TestContext, but class was expected
> at 
> org.apache.camel.test.spring.CamelSpringTestContextLoaderTestExecutionListener.prepareTestInstance(CamelSpringTestContextLoaderTestExecutionListener.java:35)
> at 
> org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:326)
> at 
> org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:212)
> at 
> org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:289)
> at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> at 
> org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:291)
> at 
> org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:232)
> at 
> org.apache.camel.test.junit4.CamelSpringJUnit4ClassRunner.runChild(CamelSpringJUnit4ClassRunner.java:37)
> at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
> at 
> org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
> at 
> org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:71)
> at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
> at 
> org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:175)
> at 
> org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264)
> at 
> org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
> at 
> org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)
> at 
> org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
> at 
> org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
> at 
> org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:
> {noformat}
> due to https://jira.springsource.org/browse/SPR-7692



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)


[jira] [Commented] (CAMEL-7216) Upgrade to xstream 1.4.7

2014-02-17 Thread Jonathan Anstey (JIRA)

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

Jonathan Anstey commented on CAMEL-7216:


Waiting on current SMX bundles vote to close before pushing.

> Upgrade to xstream 1.4.7
> 
>
> Key: CAMEL-7216
> URL: https://issues.apache.org/jira/browse/CAMEL-7216
> Project: Camel
>  Issue Type: Task
>Reporter: Jonathan Anstey
>Assignee: Jonathan Anstey
> Fix For: 2.12.4, 2.13.0
>
>
> Fix for CVE-2013-7285



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)


[jira] [Updated] (CAMEL-7216) Upgrade to xstream 1.4.7

2014-02-17 Thread Jonathan Anstey (JIRA)

 [ 
https://issues.apache.org/jira/browse/CAMEL-7216?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jonathan Anstey updated CAMEL-7216:
---

Fix Version/s: 2.12.4

> Upgrade to xstream 1.4.7
> 
>
> Key: CAMEL-7216
> URL: https://issues.apache.org/jira/browse/CAMEL-7216
> Project: Camel
>  Issue Type: Task
>Reporter: Jonathan Anstey
>Assignee: Jonathan Anstey
> Fix For: 2.12.4, 2.13.0
>
>
> Fix for CVE-2013-7285



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)


[jira] [Created] (CAMEL-7216) Upgrade to xstream 1.4.7

2014-02-17 Thread Jonathan Anstey (JIRA)
Jonathan Anstey created CAMEL-7216:
--

 Summary: Upgrade to xstream 1.4.7
 Key: CAMEL-7216
 URL: https://issues.apache.org/jira/browse/CAMEL-7216
 Project: Camel
  Issue Type: Task
Reporter: Jonathan Anstey
Assignee: Jonathan Anstey
 Fix For: 2.13.0


Fix for CVE-2013-7285



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)


[jira] [Updated] (CAMEL-7215) Stop and un-schedule jobs on removal of route

2014-02-17 Thread David Keen (JIRA)

 [ 
https://issues.apache.org/jira/browse/CAMEL-7215?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

David Keen updated CAMEL-7215:
--

Environment: Using job-store 'org.quartz.simpl.RAMJobStore'

> Stop and un-schedule jobs on removal of route
> -
>
> Key: CAMEL-7215
> URL: https://issues.apache.org/jira/browse/CAMEL-7215
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-quartz, camel-quartz2
>Affects Versions: 2.12.2
> Environment: Using job-store 'org.quartz.simpl.RAMJobStore'
>Reporter: David Keen
>
> When using SimpleScheduledRoutePolicy, jobs are not deleted when a route is 
> removed.
> I got the following exception when removing a route and re-adding it to a 
> running context.
> {code}
> Stacktrace
> ---
> org.apache.camel.FailedToCreateRouteException: Failed to create route foo: 
> Route(foo)[[From[quartz... because of 
> org.quartz.ObjectAlreadyExistsException: Unable to store Job : 
> 'jobGroup-foo.job-STOP-foo', because one already exists with this 
> identification.
> at 
> org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:182) 
> ~[camel-core-2.12.2.jar:2.12.2]
> at 
> org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:770)
>  ~[camel-core-2.12.2.jar:2.12.2]
> at 
> org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:1914)
>  ~[camel-core-2.12.2.jar:2.12.2]
> at 
> org.apache.camel.impl.DefaultCamelContext.addRouteDefinitions(DefaultCamelContext.java:707)
>  ~[camel-core-2.12.2.jar:2.12.2]
> at 
> org.apache.camel.builder.RouteBuilder.populateRoutes(RouteBuilder.java:337) 
> ~[camel-core-2.12.2.jar:2.12.2]
> at 
> org.apache.camel.builder.RouteBuilder.addRoutesToCamelContext(RouteBuilder.java:264)
>  ~[camel-core-2.12.2.jar:2.12.2]
> at 
> org.apache.camel.impl.DefaultCamelContext.addRoutes(DefaultCamelContext.java:669)
>  ~[camel-core-2.12.2.jar:2.12.2]
> ...
> Caused by: org.apache.camel.RuntimeCamelException: 
> org.quartz.ObjectAlreadyExistsException: Unable to store Job : 
> 'jobGroup-foo.job-STOP-foo', because one already exists with this 
> identification.
> at 
> org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1352)
>  ~[camel-core-2.12.2.jar:2.12.2]
> at 
> org.apache.camel.routepolicy.quartz2.SimpleScheduledRoutePolicy.onInit(SimpleScheduledRoutePolicy.java:48)
>  ~[camel-quartz2-2.12.2.jar:2.12.2]
> at 
> org.apache.camel.impl.DefaultRouteContext.commit(DefaultRouteContext.java:202)
>  ~[camel-core-2.12.2.jar:2.12.2]
> at 
> org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:916) 
> ~[camel-core-2.12.2.jar:2.12.2]
> ...
> Caused by: org.quartz.ObjectAlreadyExistsException: Unable to store Job : 
> 'jobGroup-foo.job-STOP-foo', because one already exists with this 
> identification.
> at org.quartz.simpl.RAMJobStore.storeJob(RAMJobStore.java:279) 
> ~[quartz-2.2.1.jar:na]
> at 
> org.quartz.simpl.RAMJobStore.storeJobAndTrigger(RAMJobStore.java:251) 
> ~[quartz-2.2.1.jar:na]
> at 
> org.quartz.core.QuartzScheduler.scheduleJob(QuartzScheduler.java:886) 
> ~[quartz-2.2.1.jar:na]
> at org.quartz.impl.StdScheduler.scheduleJob(StdScheduler.java:249) 
> ~[quartz-2.2.1.jar:na]
> at 
> org.apache.camel.routepolicy.quartz2.ScheduledRoutePolicy.scheduleRoute(ScheduledRoutePolicy.java:116)
>  ~[camel-quartz2-2.12.2.jar:2.12.2]
> {code}
> The SimpleScheduledRoutePolicy should remove the scheduled jobs on route 
> removal. This is what CronScheduledRoutePolicy does.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)


[jira] [Commented] (CAMEL-7215) Stop and un-schedule jobs on removal of route

2014-02-17 Thread David Keen (JIRA)

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

David Keen commented on CAMEL-7215:
---

Pull request to unschedule jobs: https://github.com/apache/camel/pull/98

> Stop and un-schedule jobs on removal of route
> -
>
> Key: CAMEL-7215
> URL: https://issues.apache.org/jira/browse/CAMEL-7215
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-quartz, camel-quartz2
>Affects Versions: 2.12.2
> Environment: Using job-store 'org.quartz.simpl.RAMJobStore'
>Reporter: David Keen
>
> When using SimpleScheduledRoutePolicy, jobs are not deleted when a route is 
> removed.
> I got the following exception when removing a route and re-adding it to a 
> running context.
> {code}
> Stacktrace
> ---
> org.apache.camel.FailedToCreateRouteException: Failed to create route foo: 
> Route(foo)[[From[quartz... because of 
> org.quartz.ObjectAlreadyExistsException: Unable to store Job : 
> 'jobGroup-foo.job-STOP-foo', because one already exists with this 
> identification.
> at 
> org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:182) 
> ~[camel-core-2.12.2.jar:2.12.2]
> at 
> org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:770)
>  ~[camel-core-2.12.2.jar:2.12.2]
> at 
> org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:1914)
>  ~[camel-core-2.12.2.jar:2.12.2]
> at 
> org.apache.camel.impl.DefaultCamelContext.addRouteDefinitions(DefaultCamelContext.java:707)
>  ~[camel-core-2.12.2.jar:2.12.2]
> at 
> org.apache.camel.builder.RouteBuilder.populateRoutes(RouteBuilder.java:337) 
> ~[camel-core-2.12.2.jar:2.12.2]
> at 
> org.apache.camel.builder.RouteBuilder.addRoutesToCamelContext(RouteBuilder.java:264)
>  ~[camel-core-2.12.2.jar:2.12.2]
> at 
> org.apache.camel.impl.DefaultCamelContext.addRoutes(DefaultCamelContext.java:669)
>  ~[camel-core-2.12.2.jar:2.12.2]
> ...
> Caused by: org.apache.camel.RuntimeCamelException: 
> org.quartz.ObjectAlreadyExistsException: Unable to store Job : 
> 'jobGroup-foo.job-STOP-foo', because one already exists with this 
> identification.
> at 
> org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1352)
>  ~[camel-core-2.12.2.jar:2.12.2]
> at 
> org.apache.camel.routepolicy.quartz2.SimpleScheduledRoutePolicy.onInit(SimpleScheduledRoutePolicy.java:48)
>  ~[camel-quartz2-2.12.2.jar:2.12.2]
> at 
> org.apache.camel.impl.DefaultRouteContext.commit(DefaultRouteContext.java:202)
>  ~[camel-core-2.12.2.jar:2.12.2]
> at 
> org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:916) 
> ~[camel-core-2.12.2.jar:2.12.2]
> ...
> Caused by: org.quartz.ObjectAlreadyExistsException: Unable to store Job : 
> 'jobGroup-foo.job-STOP-foo', because one already exists with this 
> identification.
> at org.quartz.simpl.RAMJobStore.storeJob(RAMJobStore.java:279) 
> ~[quartz-2.2.1.jar:na]
> at 
> org.quartz.simpl.RAMJobStore.storeJobAndTrigger(RAMJobStore.java:251) 
> ~[quartz-2.2.1.jar:na]
> at 
> org.quartz.core.QuartzScheduler.scheduleJob(QuartzScheduler.java:886) 
> ~[quartz-2.2.1.jar:na]
> at org.quartz.impl.StdScheduler.scheduleJob(StdScheduler.java:249) 
> ~[quartz-2.2.1.jar:na]
> at 
> org.apache.camel.routepolicy.quartz2.ScheduledRoutePolicy.scheduleRoute(ScheduledRoutePolicy.java:116)
>  ~[camel-quartz2-2.12.2.jar:2.12.2]
> {code}
> The SimpleScheduledRoutePolicy should remove the scheduled jobs on route 
> removal. This is what CronScheduledRoutePolicy does.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)


[jira] [Commented] (CAMEL-7215) Stop and un-schedule jobs on removal of route

2014-02-17 Thread ASF GitHub Bot (JIRA)

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

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

GitHub user davidkeen opened a pull request:

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

CAMEL-7215 Stop and un-schedule jobs on route removal.

Call doStop() in onRemove (as in CronScheduledRoutePolicy) so jobs are 
un-scheduled.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/apache/camel camel-7215

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/camel/pull/98.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #98


commit 2457f7a51a67c3cdeea816362380141ac792d6b9
Author: David Keen 
Date:   2014-02-17T17:14:28Z

CAMEL-7215 Stop and un-schedule jobs on route removal. (see 
CronScheduledRoutePolicy).




> Stop and un-schedule jobs on removal of route
> -
>
> Key: CAMEL-7215
> URL: https://issues.apache.org/jira/browse/CAMEL-7215
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-quartz, camel-quartz2
>Affects Versions: 2.12.2
> Environment: Using job-store 'org.quartz.simpl.RAMJobStore'
>Reporter: David Keen
>
> When using SimpleScheduledRoutePolicy, jobs are not deleted when a route is 
> removed.
> I got the following exception when removing a route and re-adding it to a 
> running context.
> {code}
> Stacktrace
> ---
> org.apache.camel.FailedToCreateRouteException: Failed to create route foo: 
> Route(foo)[[From[quartz... because of 
> org.quartz.ObjectAlreadyExistsException: Unable to store Job : 
> 'jobGroup-foo.job-STOP-foo', because one already exists with this 
> identification.
> at 
> org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:182) 
> ~[camel-core-2.12.2.jar:2.12.2]
> at 
> org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:770)
>  ~[camel-core-2.12.2.jar:2.12.2]
> at 
> org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:1914)
>  ~[camel-core-2.12.2.jar:2.12.2]
> at 
> org.apache.camel.impl.DefaultCamelContext.addRouteDefinitions(DefaultCamelContext.java:707)
>  ~[camel-core-2.12.2.jar:2.12.2]
> at 
> org.apache.camel.builder.RouteBuilder.populateRoutes(RouteBuilder.java:337) 
> ~[camel-core-2.12.2.jar:2.12.2]
> at 
> org.apache.camel.builder.RouteBuilder.addRoutesToCamelContext(RouteBuilder.java:264)
>  ~[camel-core-2.12.2.jar:2.12.2]
> at 
> org.apache.camel.impl.DefaultCamelContext.addRoutes(DefaultCamelContext.java:669)
>  ~[camel-core-2.12.2.jar:2.12.2]
> ...
> Caused by: org.apache.camel.RuntimeCamelException: 
> org.quartz.ObjectAlreadyExistsException: Unable to store Job : 
> 'jobGroup-foo.job-STOP-foo', because one already exists with this 
> identification.
> at 
> org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1352)
>  ~[camel-core-2.12.2.jar:2.12.2]
> at 
> org.apache.camel.routepolicy.quartz2.SimpleScheduledRoutePolicy.onInit(SimpleScheduledRoutePolicy.java:48)
>  ~[camel-quartz2-2.12.2.jar:2.12.2]
> at 
> org.apache.camel.impl.DefaultRouteContext.commit(DefaultRouteContext.java:202)
>  ~[camel-core-2.12.2.jar:2.12.2]
> at 
> org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:916) 
> ~[camel-core-2.12.2.jar:2.12.2]
> ...
> Caused by: org.quartz.ObjectAlreadyExistsException: Unable to store Job : 
> 'jobGroup-foo.job-STOP-foo', because one already exists with this 
> identification.
> at org.quartz.simpl.RAMJobStore.storeJob(RAMJobStore.java:279) 
> ~[quartz-2.2.1.jar:na]
> at 
> org.quartz.simpl.RAMJobStore.storeJobAndTrigger(RAMJobStore.java:251) 
> ~[quartz-2.2.1.jar:na]
> at 
> org.quartz.core.QuartzScheduler.scheduleJob(QuartzScheduler.java:886) 
> ~[quartz-2.2.1.jar:na]
> at org.quartz.impl.StdScheduler.scheduleJob(StdScheduler.java:249) 
> ~[quartz-2.2.1.jar:na]
> at 
> org.apache.camel.routepolicy.quartz2.ScheduledRoutePolicy.scheduleRoute(ScheduledRoutePolicy.java:116)
>  ~[camel-quartz2-2.12.2.jar:2.12.2]
> {code}
> The SimpleScheduledRoutePolicy should remove the scheduled jobs on route 
> removal. This is what CronScheduledRoutePolicy does.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)


[jira] [Updated] (CAMEL-7215) Stop and un-schedule jobs on removal of route

2014-02-17 Thread David Keen (JIRA)

 [ 
https://issues.apache.org/jira/browse/CAMEL-7215?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

David Keen updated CAMEL-7215:
--

Description: 
When using SimpleScheduledRoutePolicy, jobs are not deleted when a route is 
removed.

I got the following exception when removing a route and re-adding it to a 
running context.

{code}
Stacktrace
---
org.apache.camel.FailedToCreateRouteException: Failed to create route foo: 
Route(foo)[[From[quartz... because of org.quartz.ObjectAlreadyExistsException: 
Unable to store Job : 'jobGroup-foo.job-STOP-foo', because one already exists 
with this identification.
at 
org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:182) 
~[camel-core-2.12.2.jar:2.12.2]
at 
org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:770)
 ~[camel-core-2.12.2.jar:2.12.2]
at 
org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:1914)
 ~[camel-core-2.12.2.jar:2.12.2]
at 
org.apache.camel.impl.DefaultCamelContext.addRouteDefinitions(DefaultCamelContext.java:707)
 ~[camel-core-2.12.2.jar:2.12.2]
at 
org.apache.camel.builder.RouteBuilder.populateRoutes(RouteBuilder.java:337) 
~[camel-core-2.12.2.jar:2.12.2]
at 
org.apache.camel.builder.RouteBuilder.addRoutesToCamelContext(RouteBuilder.java:264)
 ~[camel-core-2.12.2.jar:2.12.2]
at 
org.apache.camel.impl.DefaultCamelContext.addRoutes(DefaultCamelContext.java:669)
 ~[camel-core-2.12.2.jar:2.12.2]

...

Caused by: org.apache.camel.RuntimeCamelException: 
org.quartz.ObjectAlreadyExistsException: Unable to store Job : 
'jobGroup-foo.job-STOP-foo', because one already exists with this 
identification.
at 
org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1352)
 ~[camel-core-2.12.2.jar:2.12.2]
at 
org.apache.camel.routepolicy.quartz2.SimpleScheduledRoutePolicy.onInit(SimpleScheduledRoutePolicy.java:48)
 ~[camel-quartz2-2.12.2.jar:2.12.2]
at 
org.apache.camel.impl.DefaultRouteContext.commit(DefaultRouteContext.java:202) 
~[camel-core-2.12.2.jar:2.12.2]
at 
org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:916) 
~[camel-core-2.12.2.jar:2.12.2]

...

Caused by: org.quartz.ObjectAlreadyExistsException: Unable to store Job : 
'jobGroup-foo.job-STOP-foo', because one already exists with this 
identification.
at org.quartz.simpl.RAMJobStore.storeJob(RAMJobStore.java:279) 
~[quartz-2.2.1.jar:na]
at 
org.quartz.simpl.RAMJobStore.storeJobAndTrigger(RAMJobStore.java:251) 
~[quartz-2.2.1.jar:na]
at 
org.quartz.core.QuartzScheduler.scheduleJob(QuartzScheduler.java:886) 
~[quartz-2.2.1.jar:na]
at org.quartz.impl.StdScheduler.scheduleJob(StdScheduler.java:249) 
~[quartz-2.2.1.jar:na]
at 
org.apache.camel.routepolicy.quartz2.ScheduledRoutePolicy.scheduleRoute(ScheduledRoutePolicy.java:116)
 ~[camel-quartz2-2.12.2.jar:2.12.2]
{code}

The SimpleScheduledRoutePolicy should remove the scheduled jobs on route 
removal. This is what CronScheduledRoutePolicy does.

  was:
When using SimpleScheduledRoutePolicy, jobs are not deleted when a route is 
removed.

I got the following exception when removing a route and re-adding it to a 
running context.

{code}
Stacktrace
---
org.apache.camel.FailedToCreateRouteException: Failed to create route foo: 
Route(foo)[[From[quartz... because of org.quartz.ObjectAlreadyExistsException: 
Unable to store Job : 'jobGroup-foo.job-STOP-foo', because one already exists 
with this identification.
at 
org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:182) 
~[camel-core-2.12.2.jar:2.12.2]
at 
org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:770)
 ~[camel-core-2.12.2.jar:2.12.2]
at 
org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:1914)
 ~[camel-core-2.12.2.jar:2.12.2]
at 
org.apache.camel.impl.DefaultCamelContext.addRouteDefinitions(DefaultCamelContext.java:707)
 ~[camel-core-2.12.2.jar:2.12.2]
at 
org.apache.camel.builder.RouteBuilder.populateRoutes(RouteBuilder.java:337) 
~[camel-core-2.12.2.jar:2.12.2]
at 
org.apache.camel.builder.RouteBuilder.addRoutesToCamelContext(RouteBuilder.java:264)
 ~[camel-core-2.12.2.jar:2.12.2]
at 
org.apache.camel.impl.DefaultCamelContext.addRoutes(DefaultCamelContext.java:669)
 ~[camel-core-2.12.2.jar:2.12.2]

...

Caused by: org.apache.camel.RuntimeCamelException: 
org.quartz.ObjectAlreadyExistsException: Unable to store Job : 
'jobGroup-foo.job-STOP-foo', because one already exists with this 
identif

[jira] [Updated] (CAMEL-7215) Stop and un-schedule jobs on removal of route

2014-02-17 Thread David Keen (JIRA)

 [ 
https://issues.apache.org/jira/browse/CAMEL-7215?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

David Keen updated CAMEL-7215:
--

Description: 
When using SimpleScheduledRoutePolicy, jobs are not deleted when a route is 
removed.

I got the following exception when removing a route and re-adding it to a 
running context.

{code}
Stacktrace
---
org.apache.camel.FailedToCreateRouteException: Failed to create route foo: 
Route(foo)[[From[quartz... because of org.quartz.ObjectAlreadyExistsException: 
Unable to store Job : 'jobGroup-foo.job-STOP-foo', because one already exists 
with this identification.
at 
org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:182) 
~[camel-core-2.12.2.jar:2.12.2]
at 
org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:770)
 ~[camel-core-2.12.2.jar:2.12.2]
at 
org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:1914)
 ~[camel-core-2.12.2.jar:2.12.2]
at 
org.apache.camel.impl.DefaultCamelContext.addRouteDefinitions(DefaultCamelContext.java:707)
 ~[camel-core-2.12.2.jar:2.12.2]
at 
org.apache.camel.builder.RouteBuilder.populateRoutes(RouteBuilder.java:337) 
~[camel-core-2.12.2.jar:2.12.2]
at 
org.apache.camel.builder.RouteBuilder.addRoutesToCamelContext(RouteBuilder.java:264)
 ~[camel-core-2.12.2.jar:2.12.2]
at 
org.apache.camel.impl.DefaultCamelContext.addRoutes(DefaultCamelContext.java:669)
 ~[camel-core-2.12.2.jar:2.12.2]

...

Caused by: org.apache.camel.RuntimeCamelException: 
org.quartz.ObjectAlreadyExistsException: Unable to store Job : 
'jobGroup-foo.job-STOP-foo', because one already exists with this 
identification.
at 
org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1352)
 ~[camel-core-2.12.2.jar:2.12.2]
at 
org.apache.camel.routepolicy.quartz2.SimpleScheduledRoutePolicy.onInit(SimpleScheduledRoutePolicy.java:48)
 ~[camel-quartz2-2.12.2.jar:2.12.2]
at 
org.apache.camel.impl.DefaultRouteContext.commit(DefaultRouteContext.java:202) 
~[camel-core-2.12.2.jar:2.12.2]
at 
org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:916) 
~[camel-core-2.12.2.jar:2.12.2]

...

Caused by: org.quartz.ObjectAlreadyExistsException: Unable to store Job : 
'jobGroup-foo.job-STOP-foo', because one already exists with this 
identification.
at org.quartz.simpl.RAMJobStore.storeJob(RAMJobStore.java:279) 
~[quartz-2.2.1.jar:na]
at 
org.quartz.simpl.RAMJobStore.storeJobAndTrigger(RAMJobStore.java:251) 
~[quartz-2.2.1.jar:na]
at 
org.quartz.core.QuartzScheduler.scheduleJob(QuartzScheduler.java:886) 
~[quartz-2.2.1.jar:na]
at org.quartz.impl.StdScheduler.scheduleJob(StdScheduler.java:249) 
~[quartz-2.2.1.jar:na]
at 
org.apache.camel.routepolicy.quartz2.ScheduledRoutePolicy.scheduleRoute(ScheduledRoutePolicy.java:116)
 ~[camel-quartz2-2.12.2.jar:2.12.2]
{code}

The SimpleScheduledRoutePolicy should remove the scheduled jobs on route 
removal.

  was:
When using SimpleScheduledRoutePolicy, jobs are not deleted when a route is 
removed.

I got the following exception when removing a route and re-adding it to a 
running context.

{code}
Stacktrace
---
org.apache.camel.FailedToCreateRouteException: Failed to create route foo: 
Route(foo)[[From[quartz... because of org.quartz.ObjectAlreadyExistsException: 
Unable to store Job : 'jobGroup-foo.job-STOP-foo', because one already exists 
with this identification.
at 
org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:182) 
~[camel-core-2.12.2.jar:2.12.2]
at 
org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:770)
 ~[camel-core-2.12.2.jar:2.12.2]
at 
org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:1914)
 ~[camel-core-2.12.2.jar:2.12.2]
at 
org.apache.camel.impl.DefaultCamelContext.addRouteDefinitions(DefaultCamelContext.java:707)
 ~[camel-core-2.12.2.jar:2.12.2]
at 
org.apache.camel.builder.RouteBuilder.populateRoutes(RouteBuilder.java:337) 
~[camel-core-2.12.2.jar:2.12.2]
at 
org.apache.camel.builder.RouteBuilder.addRoutesToCamelContext(RouteBuilder.java:264)
 ~[camel-core-2.12.2.jar:2.12.2]
at 
org.apache.camel.impl.DefaultCamelContext.addRoutes(DefaultCamelContext.java:669)
 ~[camel-core-2.12.2.jar:2.12.2]

...

Caused by: org.apache.camel.RuntimeCamelException: 
org.quartz.ObjectAlreadyExistsException: Unable to store Job : 
'jobGroup-foo.job-STOP-foo', because one already exists with this 
identification.
at 
org.apache.camel.util.O

[jira] [Created] (CAMEL-7215) Stop and un-schedule jobs on removal of route

2014-02-17 Thread David Keen (JIRA)
David Keen created CAMEL-7215:
-

 Summary: Stop and un-schedule jobs on removal of route
 Key: CAMEL-7215
 URL: https://issues.apache.org/jira/browse/CAMEL-7215
 Project: Camel
  Issue Type: Improvement
  Components: camel-quartz, camel-quartz2
Affects Versions: 2.12.2
Reporter: David Keen


When using SimpleScheduledRoutePolicy, jobs are not deleted when a route is 
removed.

I got the following exception when removing a route and re-adding it to a 
running context.

{code}
Stacktrace
---
org.apache.camel.FailedToCreateRouteException: Failed to create route foo: 
Route(foo)[[From[quartz... because of org.quartz.ObjectAlreadyExistsException: 
Unable to store Job : 'jobGroup-foo.job-STOP-foo', because one already exists 
with this identification.
at 
org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:182) 
~[camel-core-2.12.2.jar:2.12.2]
at 
org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:770)
 ~[camel-core-2.12.2.jar:2.12.2]
at 
org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:1914)
 ~[camel-core-2.12.2.jar:2.12.2]
at 
org.apache.camel.impl.DefaultCamelContext.addRouteDefinitions(DefaultCamelContext.java:707)
 ~[camel-core-2.12.2.jar:2.12.2]
at 
org.apache.camel.builder.RouteBuilder.populateRoutes(RouteBuilder.java:337) 
~[camel-core-2.12.2.jar:2.12.2]
at 
org.apache.camel.builder.RouteBuilder.addRoutesToCamelContext(RouteBuilder.java:264)
 ~[camel-core-2.12.2.jar:2.12.2]
at 
org.apache.camel.impl.DefaultCamelContext.addRoutes(DefaultCamelContext.java:669)
 ~[camel-core-2.12.2.jar:2.12.2]

...

Caused by: org.apache.camel.RuntimeCamelException: 
org.quartz.ObjectAlreadyExistsException: Unable to store Job : 
'jobGroup-foo.job-STOP-foo', because one already exists with this 
identification.
at 
org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1352)
 ~[camel-core-2.12.2.jar:2.12.2]
at 
org.apache.camel.routepolicy.quartz2.SimpleScheduledRoutePolicy.onInit(SimpleScheduledRoutePolicy.java:48)
 ~[camel-quartz2-2.12.2.jar:2.12.2]
at 
org.apache.camel.impl.DefaultRouteContext.commit(DefaultRouteContext.java:202) 
~[camel-core-2.12.2.jar:2.12.2]
at 
org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:916) 
~[camel-core-2.12.2.jar:2.12.2]

...

Caused by: org.quartz.ObjectAlreadyExistsException: Unable to store Job : 
'jobGroup-foo.job-STOP-foo', because one already exists with this 
identification.
at org.quartz.simpl.RAMJobStore.storeJob(RAMJobStore.java:279) 
~[quartz-2.2.1.jar:na]
at 
org.quartz.simpl.RAMJobStore.storeJobAndTrigger(RAMJobStore.java:251) 
~[quartz-2.2.1.jar:na]
at 
org.quartz.core.QuartzScheduler.scheduleJob(QuartzScheduler.java:886) 
~[quartz-2.2.1.jar:na]
at org.quartz.impl.StdScheduler.scheduleJob(StdScheduler.java:249) 
~[quartz-2.2.1.jar:na]
at 
org.apache.camel.routepolicy.quartz2.ScheduledRoutePolicy.scheduleRoute(ScheduledRoutePolicy.java:116)
 ~[camel-quartz2-2.12.2.jar:2.12.2]
{code}



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)


[jira] [Commented] (CAMEL-7074) Upgrade to spring 4.x

2014-02-17 Thread Henrik (JIRA)

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

Henrik commented on CAMEL-7074:
---

Is there any ETA on this issue?

> Upgrade to spring 4.x
> -
>
> Key: CAMEL-7074
> URL: https://issues.apache.org/jira/browse/CAMEL-7074
> Project: Camel
>  Issue Type: Task
>  Components: camel-spring
>Reporter: David J. M. Karlsen
>Assignee: Willem Jiang
> Fix For: Future
>
>
> Upgrade to spring4.
> There is a non-backwards compatible change in spring 4.x which will cause:
> {noformat}
> java.lang.IncompatibleClassChangeError: Found interface 
> org.springframework.test.context.TestContext, but class was expected
> at 
> org.apache.camel.test.spring.CamelSpringTestContextLoaderTestExecutionListener.prepareTestInstance(CamelSpringTestContextLoaderTestExecutionListener.java:35)
> at 
> org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:326)
> at 
> org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:212)
> at 
> org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:289)
> at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> at 
> org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:291)
> at 
> org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:232)
> at 
> org.apache.camel.test.junit4.CamelSpringJUnit4ClassRunner.runChild(CamelSpringJUnit4ClassRunner.java:37)
> at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
> at 
> org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
> at 
> org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:71)
> at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
> at 
> org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:175)
> at 
> org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264)
> at 
> org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
> at 
> org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)
> at 
> org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
> at 
> org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
> at 
> org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:
> {noformat}
> due to https://jira.springsource.org/browse/SPR-7692



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)


[jira] [Commented] (CAMEL-7194) [cxfrs] Bus features aren't initialized

2014-02-17 Thread Sergey Beryozkin (JIRA)

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

Sergey Beryozkin commented on CAMEL-7194:
-

Hi Willem, sure, I've added a patch to
https://issues.apache.org/jira/browse/CAMEL-7207, to complement your changes to 
get interceptors & properties also supported at CxfRsEndpoint level.

Now, I don't understand how to test that the properties enabled in Spring 
contexts are visible to CxfRsEndpoint; see the attached patch to CAMEL-7207, I 
updated two different tests with no luck; can you please help with getting the 
tests passing or give a hint on what needs to be done ? I can add tests 
validating the interceptors and features setup from the context are also visible

Thanks, Sergey 

> [cxfrs] Bus features aren't initialized
> ---
>
> Key: CAMEL-7194
> URL: https://issues.apache.org/jira/browse/CAMEL-7194
> Project: Camel
>  Issue Type: Bug
>  Components: camel-cxf
>Affects Versions: 2.12.2
>Reporter: Alexey Markevich
>Assignee: Willem Jiang
> Attachments: CxfRsProducerTest.java
>
>
> - CxfRsEndpoint doesn't support custom feture support like
> org.apache.camel.component.cxf.CxfEndpoint.setFeatures(List)
> - 
> org.apache.camel.component.cxf.jaxrs.CxfRsEndpoint.createJAXRSClientFactoryBean()
>  can't be used for additional configuration because 
> org.apache.camel.component.cxf.jaxrs.CxfRsProducer.ClientFactoryBeanCache used
> - in case bus was initialized with required features they aren't initialized 
> for WebClient



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)


[jira] [Updated] (CAMEL-7207) CxfRsEndpoint should accept in/out interceptors and properties

2014-02-17 Thread Sergey Beryozkin (JIRA)

 [ 
https://issues.apache.org/jira/browse/CAMEL-7207?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sergey Beryozkin updated CAMEL-7207:


Attachment: camel7207.txt

CxfRsEndpoint updated to have a shared code for setting the common server & 
client properties (providers, features, interceptors and properties)
- two tests added so far to validate the custom properties get injected; the 
test is failing and the help on getting them fixed will be appreciated; more 
tests will be added afterwards

> CxfRsEndpoint should accept in/out interceptors and properties
> --
>
> Key: CAMEL-7207
> URL: https://issues.apache.org/jira/browse/CAMEL-7207
> Project: Camel
>  Issue Type: Bug
>Reporter: Sergey Beryozkin
>Priority: Minor
> Fix For: 2.12.4, 2.13.1
>
> Attachments: camel7207.txt
>
>
> CXF interceptors can be reused quite well with CXFRS, they can also be shared 
> between RS & WS endpoints; contextual properties can be very useful too 



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)


[jira] [Resolved] (CAMEL-6978) War examples should not include lib/servlet JARs

2014-02-17 Thread Willem Jiang (JIRA)

 [ 
https://issues.apache.org/jira/browse/CAMEL-6978?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Willem Jiang resolved CAMEL-6978.
-

Resolution: Fixed

Applied the patch into camel master branch.

> War examples should not include lib/servlet JARs
> 
>
> Key: CAMEL-6978
> URL: https://issues.apache.org/jira/browse/CAMEL-6978
> Project: Camel
>  Issue Type: Task
>  Components: examples
>Affects Versions: 2.13.0
>Reporter: Claus Ibsen
>Assignee: Willem Jiang
>Priority: Minor
> Fix For: 2.13.0
>
>
> Related to the servlet 2.5 to 3.0 upgrade on master.
> Now the servlet JAR is included in the generated WARs - we should not include 
> them.
> INFO: 
> validateJarFile(/opt/apache-tomcat-7.0.42/webapps/tomcat/WEB-INF/lib/geronimo-servlet_3.0_spec-1.0.jar)
>  - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: 
> javax/servlet/Servlet.class



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)


[jira] [Resolved] (CAMEL-7155) Incorrect implementation of the method StringHelper.hasStartToken()

2014-02-17 Thread Willem Jiang (JIRA)

 [ 
https://issues.apache.org/jira/browse/CAMEL-7155?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Willem Jiang resolved CAMEL-7155.
-

   Resolution: Fixed
Fix Version/s: 2.12.4

Applied the patch into camel-2.12.x and master branches.

> Incorrect implementation of the method StringHelper.hasStartToken()
> ---
>
> Key: CAMEL-7155
> URL: https://issues.apache.org/jira/browse/CAMEL-7155
> Project: Camel
>  Issue Type: Bug
>  Components: camel-core
>Affects Versions: 2.12.2
>Reporter: Tomas Rohovsky
>Assignee: Willem Jiang
>Priority: Minor
> Fix For: 2.12.4, 2.13.0
>
>
> From the semantic point of view the method hasStartToken() should return 
> false in case of an expression without language specified, i.e. starting with 
> "${". 
> However, it is correct to return true in current usage of hasStartToken() in 
> camel-core, i.e. checking if an expression is in simple language, since if 
> the expression does not contain the language token, then it is a simple 
> expression.
> The method calls for checking of simple language should be replaced with a 
> newly created method isSimpleLanguage(String expression) that would check if 
> the language is a simple expression, i.e. hasStartToken(expression, "simple") 
> || expression.indexOf("${") >= 0.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)