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