7 Replies Latest reply on Jul 22, 2010 8:49 AM by unwired unwired

    Latest snapshot of camel-quartz-2.4

    unwired unwired Newbie

      Hi,

       

      Where can I find the latest code source for camel-quartz-2.4? I have looked in various maven repositories and checked http://www.apache.org/dyn/closer.cgi/activemq/apache-camel/2.4.0/apache-camel-2.4.0.tar.gz but all links either return 404 or the version doesn't exist.

       

      I am having troubles with quartz components that use a multicast in their route in one of our environments (others seem ok for some reason). I am running the snapshot version of 2.4 I picked up from here: https://issues.apache.org/activemq/browse/CAMEL-2784.

       

      However, in one environment I am consistently getting this exception:

       

      Exception in thread "SpringOsgiExtenderThread-88" org.apache.camel.RuntimeCamelException: org.quartz.SchedulerException: The Scheduler has been shutdown.
           at org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1055)
           at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:103)
           at org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:593)
           at org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:78)
           at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
           at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:76)
           at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:274)
           at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:736)
           at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.finishRefresh(AbstractDelegatedExecutionApplicationContext.java:380)
           at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:346)
           at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
           at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:308)
           at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:138)
           at java.lang.Thread.run(Unknown Source)
      Caused by: org.quartz.SchedulerException: The Scheduler has been shutdown.
           at org.quartz.core.QuartzScheduler.validateState(QuartzScheduler.java:637)
           at org.quartz.core.QuartzScheduler.scheduleJob(QuartzScheduler.java:688)
           at org.quartz.impl.StdScheduler.scheduleJob(StdScheduler.java:265)
           at org.apache.camel.component.quartz.QuartzComponent.addJob(QuartzComponent.java:149)
           at org.apache.camel.component.quartz.QuartzEndpoint.addTrigger(QuartzEndpoint.java:77)
           at org.apache.camel.component.quartz.QuartzEndpoint.consumerStarted(QuartzEndpoint.java:190)
           at org.apache.camel.component.quartz.QuartzConsumer.doStart(QuartzConsumer.java:39)
           at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:53)
           at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:49)
           at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:989)
           at org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:197)
           at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:101)
      

       

      I found this potential resolution which seems to have been worked on AFTER camel-2784, but I can not find the source or binary anywhere.

       

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

       

      If I add in the option startDelayedSeconds on the quartz version I am running it says it's not a valid parameter.

       

      thanks in advance.

        • 1. Re: Latest snapshot of camel-quartz-2.4
          Claus Ibsen Master

          This Apache wiki page shows links to SNAPSHOT downloads

          http://camel.apache.org/download.html

           

          And the fusesource repo's with SNAPSHOTs is here

          http://repo.fusesource.com/

          • 2. Re: Latest snapshot of camel-quartz-2.4
            Willem Jiang Master

            Apache-Camel 2.4.0 release candidate is in the voting states, you can download it from here

            Please try it with your test case and verify the fix.

            • 3. Re: Latest snapshot of camel-quartz-2.4
              unwired unwired Newbie

              Thanks very much for the replies; i can see those links are valid.

               

              I have a prod release in the am but will download those tomorrow arvo and test and let you know.  I've had to move those bundles over to timer for now as the issue started to occur in our other SIT environment (looks like it's intermittent) so it'd be great to be able to move them back to quartz if the latest snapshot resolves this.

               

              thanks for the help!

              • 4. Re: Latest snapshot of camel-quartz-2.4
                unwired unwired Newbie

                Hi,

                 

                Finally got around to trying to upgrade to quartz 2.4, but realized that it had a dependency on camel-core (earlier i had just changed the manifest on quartz2.4 to use camel-core 2.2).

                 

                So... then I decided to do a "full" upgrade to 2.4 but have hit some issues and I wonder if you can provide some advice.

                 

                To begin with, I saw from the release notes there were changes to quite few components. I've read some other posts it's most ideal to use features to install (and this makes sense), but there doesn't' seem to be a feature for 2.4.0?  I added this url:

                 

                addUrl mvn:org.apache.camel.karaf/features/2.4.0/xml/features
                

                 

                but in reality it's not vaiid and i get the expected :

                 

                java.lang.RuntimeException: URL [mvn:org.apache.camel.karaf/features/2.4.0/xml/features] could not be resolved.
                

                 

                So.. then I decided to install the camel components manually:

                 

                install mvn:org.apache.camel/camel-core/2.4.0
                install mvn:org.apache.camel/camel-spring/2.4.0
                install mvn:org.apache.camel/camel-ftp/2.4.0
                install mvn:org.apache.camel/camel-quartz/2.4.0
                install mvn:org.apache.camel/camel-http/2.4.0
                install mvn:org.apache.camel/camel-csv/2.4.0
                install mvn:org.apache.camel/camel-jdbc/2.4.0
                install mvn:org.apache.camel/camel-jms/2.4.0
                

                 

                All went into 'resolved' state except camel-ftp.  Note that i left out camel-osgi that we had previously installed as the notes said it was not longer required.  Ftp failed because it req'd >= 0.1.40 & < 0.1.50.   We're still on fuse-esb-4.1.0.2, which only comes bundled with 0.1.31.  NB: We did try to upgrade to 4.2 a few weeks back and had a plethora of issues (won't delve into details here); hence we're still on 4.1.

                 

                So.. I wrapped the 0.1.42 i pulled down from maven repository, and still got the error that camel-ftp dependency for jsch fail. hmm... ok so i manually tried to fix up the manifest on jsch so it looks like this:

                 

                Bundle 258
                ----------
                Manifest-Version = 1.0
                Bnd-LastModified = 1279599221937
                Tool = Bnd-unknown version
                Originally-Created-By = 1.4.0 (Sun Microsystems Inc.)
                Import-Package = com.jcraft.jsch;resolution:=optional,com.jcraft.jsch.jce;resolution:=optional,com.jcraft.jsch.jcraft;resolution:=optional,com.jcraft.jsch.jgss;resolution:=optional,com.jcraft.jzlib;resolution:=optional,javax.crypto;resolution:=optional,javax.crypto.interfaces;resolution:=optional,javax.crypto.spec;resolution:=optional,org.ietf.jgss;resolution:=optional
                Bundle-SymbolicName = wrap_file____opt_progress_fuse-esb-4.1.0.2_lib_jsch-0.1.42.jar
                Implementation-Version = 0.1.42
                Export-Package = com.jcraft.jsch.jgss;uses:="com.jcraft.jsch,org.ietf.jgss",com.jcraft.jsch.jcraft;uses:="com.jcraft.jsch,com.jcraft.jzlib";version="0.1.42",com.jcraft.jsch;version="0.1.42",com.jcraft.jsch.jce;uses:="javax.crypto.interfaces,javax.crypto.spec,com.jcraft.jsch,javax.crypto";version="0.1.42"
                Generated-By-Ops4j-Pax-From = wrap:file:///opt/progress/fuse-esb-4.1.0.2/lib/jsch-0.1.42.jar
                Bundle-Version = 0.1.42 
                Created-By = 1.6.0_10 (Sun Microsystems Inc.)
                Bundle-ManifestVersion = 2
                

                 

                Still.. i got the error that camel-ftp can't resolve the dependency. ok fine.. i modified the camel-ftp headers to NOT specify the version for jsch.  Not the best but a workaround for now.  The troubles that follow are not likely related to this but just giving the whole picture. NB: In hindsight, i may have just needed to bounce the server.. can't be certain that i did and don't have time to test now.  We see this a lot where there's an error that's resolved on a restart of fuse.. don't think it's related to the subsequent issues anyway

                 

                i then stopped all old camel components to get them out of the picture on our sit server:

                 

                list|grep -i camel-|grep -v 2.4
                [ 180] [Resolved   ] [       ] [   60] camel-core (2.0.0.M3)
                [ 181] [Resolved   ] [       ] [   60] camel-spring (2.0.0.M3)
                [ 182] [Resolved   ] [       ] [   60] camel-osgi (2.0.0.M3)
                [ 183] [Resolved   ] [       ] [   60] camel-ftp (2.0.0.M3)
                [ 184] [Resolved   ] [       ] [   60] camel-http (2.0.0.M3)
                [ 185] [Resolved   ] [       ] [   60] camel-quartz (2.0.0.M3)
                [ 186] [Resolved   ] [       ] [   60] camel-csv (2.0.0.M3)
                [ 187] [Resolved   ] [       ] [   60] camel-jdbc (2.0.0.M3)
                [ 188] [Resolved   ] [       ] [   60] camel-jms (2.0.0.M3)
                [ 189] [Resolved   ] [       ] [   60] camel-core (2.2.0)
                [ 190] [Resolved   ] [       ] [   60] camel-spring (2.2.0)
                [ 191] [Resolved   ] [       ] [   60] camel-osgi (2.2.0)
                [ 192] [Resolved   ] [       ] [   60] camel-ftp (2.2.0)
                [ 193] [Resolved   ] [       ] [   60] camel-http (2.2.0)
                [ 194] [Resolved   ] [       ] [   60] camel-quartz (2.2.0)
                [ 195] [Resolved   ] [       ] [   60] camel-csv (2.2.0)
                [ 196] [Resolved   ] [       ] [   60] camel-jdbc (2.2.0)
                [ 197] [Resolved   ] [       ] [   60] camel-jms (2.2.0)
                

                 

                bounced the server, and these errors came.. for EVERY route..

                 

                Caused by: org.apache.camel.CamelException: Cannot find any routes with this RouteBuilder reference: RouteBuilderRef[collectorRouteBsConfigVw]
                        at org.apache.camel.spring.CamelContextFactoryBean.installRoutes(CamelContextFactoryBean.java:887)
                        at org.apache.camel.spring.CamelContextFactoryBean.afterPropertiesSet(CamelContextFactoryBean.java:359)
                        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369)
                        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)
                        ... 18 more
                2010-07-20 05:05:54,837 | ERROR | xtenderThread-82 | OsgiBundleXmlApplicationContext  | gatedExecutionApplicationContext  366 | Post refresh error
                org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'camelContext': Invocation of init method failed; nested exception is org.apache.camel.CamelException: Cannot find any routes with this RouteBuilde
                r reference: RouteBuilderRef[guardianAngelRoute]
                        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338)
                        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
                        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
                        at java.security.AccessController.doPrivileged(Native Method)
                        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
                        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
                        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
                        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
                        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
                        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
                        at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:308)
                        at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:947)
                        at org.springframework.context.support.AbstractApplicationContext.registerListeners(AbstractApplicationContext.java:701)
                        at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1500(AbstractDelegatedExecutionApplicationContext.java:68)
                        at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:339)
                        at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
                        at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:308)
                        at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:138)
                        at java.lang.Thread.run(Unknown Source)
                Caused by: org.apache.camel.CamelException: Cannot find any routes with this RouteBuilder reference: RouteBuilderRef[guardianAngelRoute]
                        at org.apache.camel.spring.CamelContextFactoryBean.installRoutes(CamelContextFactoryBean.java:887)
                        at org.apache.camel.spring.CamelContextFactoryBean.afterPropertiesSet(CamelContextFactoryBean.java:359)
                        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369)
                        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)
                
                
                
                

                 

                Here's the DSL for this particular route (doesn't get much simpler than that ):

                 

                from(quartzUri).to("bean:guardianAngelService");
                

                 

                The relevant spring config:

                 

                bundle-context.xml:

                <camelContext xmlns="http://camel.apache.org/schema/spring">
                      <routeBuilder ref="guardianAngelRoute"></routeBuilder>
                   </camelContext>
                
                <bean id="guardianAngelRoute"
                      class="com.ubowireless.collector.guardianangel.GuardianAngelRoute"
                      init-method="start" destroy-method="stop">
                      
                ... leaving out composition of route
                   </bean>
                

                I see this message in the log which may be a little worriesome:

                 

                2010-07-20 06:48:53,001 | INFO  | xtenderThread-50 | OsgiBundleXmlApplicationContext  | ractOsgiBundleApplicationContext  345 | Not publishing application context OSGi service for bundle ServiceMix :: Quartz (servicemix-quartz)
                

                 

                I wonder if this is related to my lack of "full" upgrade.. bc now i don't have a camel-osgi.. but thought camel-spring would sort this.?.. which IS installed:

                 

                list|grep -i camel-|grep 2.4
                [ 249] [Active     ] [       ] [   60] camel-core (2.4.0)
                [ 250] [Active     ] [       ] [   60] camel-spring (2.4.0)
                [ 252] [Active     ] [       ] [   60] camel-quartz (2.4.0)
                [ 253] [Active     ] [       ] [   60] camel-http (2.4.0)
                [ 254] [Active     ] [       ] [   60] camel-csv (2.4.0)
                [ 255] [Active     ] [       ] [   60] camel-jdbc (2.4.0)
                [ 256] [Active     ] [       ] [   60] camel-jms (2.4.0)
                [ 261] [Active     ] [       ] [   60] camel-ftp (2.4.0)
                

                 

                 

                So - at this point i'm not sure what all i need. I wonder if i need to install and use spring3 after re-reading release notes.. but think it says i shouldn't need to?  What all bundles are "required" for upgrading to camel-2.4?  And how do you recommend we upgrade?

                 

                Thanks heaps for any input.

                 

                cheers

                 

                Edited by: unwired on Jul 20, 2010 7:18 AM

                • 5. Re: Latest snapshot of camel-quartz-2.4
                  unwired unwired Newbie

                  Hi,

                   

                  FYI I have still not been able to get 2.4 up and running.  I guess what I am after is a recommended procedure for the upgrade. I have read the release notes but do not see how to upgrade (e.g. features - but i don't see a valid url for this) nor what is required.

                   

                  I have rebuilt our bundles against 2.4 and even tried upgrading to spring 3, but still no go. I pulled down the latest servicemix as well, but it looks like spring 3 doesn't come bundled with it.  We had many issues the last time we tried to upgrade to servicemix 4.2 anyway - so we bailed out of it; not sure if it's stable now.?.

                   

                  I ended up trying to install the list below, but once i got to camel-spring, things would start to go wrong. the console would  freeze up. If i bounced the server, it would get errors about missing spring classes (hence the installation of axm and expression).  i blew the cache dir for the recently installed bundles multiple times and had another go.

                   

                  thanks!

                  Attempted "full" upgrade:

                  ===================

                  install file:///opt/progress/fuse-esb-4.1.0.2/lib/activation-1.1.jar

                  install file:///opt/progress/fuse-esb-4.1.0.2/lib/stax-api-1.0-2.jar

                  install file:///opt/progress/fuse-esb-4.1.0.2/lib/jaxb-api-2.1.jar

                  install file:///opt/progress/fuse-esb-4.1.0.2/lib/jaxb-impl-2.1.12.jar

                  install file:///opt/progress/fuse-esb-4.1.0.2/lib/commons-logging-1.1.1.jar

                  install wrap:file:///opt/progress/fuse-esb-4.1.0.2/lib/jsch-0.1.42.jar

                   

                   

                   

                  install mvn:org.fusesource.commonman/commons-management/1.0

                  install mvn:org.springframework/spring-core/3.0.3.RELEASE

                  install mvn:org.springframework/spring-asm/3.0.3.RELEASE

                  install mvn:org.springframework/spring-expression/3.0.3.RELEASE

                   

                  install mvn:org.springframework/spring-context/3.0.3.RELEASE

                  install mvn:org.springframework/spring-beans/3.0.3.RELEASE

                  install mvn:org.springframework/spring-test/3.0.3.RELEASE

                  install mvn:org.springframework/spring-aop/3.0.3.RELEASE

                  install mvn:org.springframework/spring-jdbc/3.0.3.RELEASE

                  install mvn:org.springframework/spring-tx/3.0.3.RELEASE

                   

                  install mvn:org.apache.camel/camel-core/2.4.0

                  install mvn:org.apache.camel/camel-spring/2.4.0

                  install mvn:org.apache.camel/camel-quartz/2.4.0

                  install mvn:org.apache.camel/camel-http/2.4.0

                  install mvn:org.apache.camel/camel-csv/2.4.0

                  install mvn:org.apache.camel/camel-jdbc/2.4.0

                  install mvn:org.apache.camel/camel-jms/2.4.0

                   

                  camel-ftp as well...

                   

                  Edited by: unwired on Jul 22, 2010 7:53 AM

                  • 6. Re: Latest snapshot of camel-quartz-2.4
                    Claus Ibsen Master

                    ServiceMix 4.3 / FUSE ESB 4.3 comes bundles with Camel 2.4.

                    And it uses Spring 3.0.3 by default as well.

                     

                    I suggest to patch the camel-quartz component in Camel 2.2 that is shipped with the ESB version you use.

                     

                    Then upgrade in the future to FUSE ESB 4.3 or later.

                    • 7. Re: Latest snapshot of camel-quartz-2.4
                      unwired unwired Newbie

                      Thanks for the feedback. 

                       

                      I actually tried starting with the patch but it complained of missing classes which i investigated and found were in camel-core 2.4 but not 2.2.  I'll have a go at patching tomorrow by pulling in camel-core and quartz only and modifying the manifest's, but if that doesn't work I'll wait until servicemix 4.3 as you suggest.

                       

                      thanks!