I've version of servicemix: 4.3.1-fuse-03.01 with Camel 2.6.0-fuse-03-01. I would like to upgrade Camel to version 2.8.0. Is it any easy and SAFE way to do this without upgrading whole Servicemix?
I upgraded the camel in serviceMix 7.0.0.M2 as follows. Related to your ServiceMix version, commands may be vary.
feature:feature:repo-list
you will get list of available repo-urls as an example
standard-4.0.5 |
mvn:org.apache.karaf.features/standard/4.0.5/xml/features
jclouds-1.9.1 |
mvn:org.apache.jclouds.karaf/jclouds-karaf/1.9.1/xml/features
camel-2.16.3 |
mvn:org.apache.camel.karaf/apache-camel/2.16.3/xml/features
feature:repo-add [upgraded_camel_repo_url]
As an example
feature:repo-add mvn:org.apache.camel.karaf/apache-camel/3.16.3/xml/features
feature:feature:repo-list
Should display newly added repo url
feature:list
Should display the upgraded camel version
feature:install [upgraded_camel_name with version]
As an example feature:install camel/2.16.3
Refer http://www.andrejkoelewijn.com/blog/2010/06/15/upgrade-apache-camel-in-servicemix-to-version-2-3-0/ for older servicemix versions
Related
I am trying to upgrade camel from 2 to 3. I had previously had camel-quartz2 from camel 2 included in my pom.xml, but because quartz2 is apparently called quartz now, I have added this to my pom.xml:
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-quartz</artifactId>
<version>3.17.0</version>
</dependency>
I removed quartz2.
The problem is that I now receive this error.
Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'startDelayedSeconds' of bean class [org.apache.camel.component.quartz.QuartzComponent]: Bean property 'startDelayedSeconds' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
I looked and saw that the the StartDelayedSeconds method is not part of quartz as it was with quartz2. Does this mean that they are really not the same? If this is the case, then why is the newest version of quartz2 so far behind the newest version of quartz. Is there some sort of workaround that I could do, or some part of quartz that I should use?
From the Came 3 migration guide:
The quartz2 component has been renamed to quartz, and it’s corresponding component package from org.apache.camel.component.quartz2 to org.apache.camel.component.quartz. The supported scheme is now quartz.
Source: https://camel.apache.org/manual/camel-3-migration-guide.html
When I run command mvn dependency:tree with project that contains camel-quartz dependency I get the following:
[INFO] +- org.apache.camel:camel-quartz:jar:3.4.4:compile
[INFO] | +- org.quartz-scheduler:quartz:jar:2.3.2:compile
[INFO] | | +- com.mchange:mchange-commons-java:jar:0.2.15:compile
[INFO] | | \- com.zaxxer:HikariCP-java7:jar:2.4.13:compile
[INFO] | \- com.mchange:c3p0:jar:0.9.5.5:compile
Based on that I would say its safe to assume that camel-quartz in camel 3.x uses quartz scheduler version 2.x. The option StartDelayedSeconds has likely been moved or changed during one of the major or minor version changes.
A lot of components have gone through some changes to use more up to date libraries and to make them easier to use or just consistent with other components.
[Edit] Regarding the StartDelayedSeconds option found this from one of the many Apache Camel upgrade guides.
UPGRADING CAMEL 3.14 TO 3.15
Removed the option startDelaySeconds as this does not work correctly and causes problems if in use.
Source: Upgrading camel 3.14 TO 3.15
Expected behaviour with camel version 2.15.2/2.24.1
Below url has feature as "camel-catalog"
https://repo1.maven.org/maven2/org/apache/camel/karaf/apache-camel/2.15.2/apache-camel-2.15.2-features.xml
<feature name="camel-catalog" version="2.15.2" resolver="(obr)" start-level="50">
<feature version="2.15.2">camel-core
mvn:org.apache.camel.karaf/camel-karaf-commands-catalog/2.15.2
Exception while deploying feature ="camel-catalog" on Karaf Container with camel 3.x-
karaf#root()> feature:install camel-catalog
Error executing command: No matching features for camel-catalog/0
Query -
Upgraded camel version 3.4.0 now feature ="camel-catalog" is not there and but it require to install in Karaf container So what we can do to resolve this.
https://repo1.maven.org/maven2/org/apache/camel/karaf/apache-camel/3.4.0/apache-camel-3.4.0-features.xml
Any help/suggestion is most welcome.
The camel-catalog feature is not available as a feature in Camel 3, you dont need to install it, you get catalog installed via installing camel - features:install camel.
See the migration 2.x to 3.x guides: https://camel.apache.org/manual/latest/camel-3x-upgrade-guide.html
I'm trying to deploy a drools component to a vanilla JBoss Fuse 6.2 server.
I first install the drools features url
JBossFuse:karaf#root> features:addurl mvn:org.drools/drools-karaf-features/6.1.0.Final/xml/features
before installing the drools module and kie-spring features
JBossFuse:karaf#root> features:install drools-module/6.1.0.Final
JBossFuse:karaf#root> features:install kie-spring/6.1.0.Final
However, when I attempt to install kie-camel I get the following error
JBossFuse:karaf#root> features:install kie-camel/6.1.0.Final
...
Found installed bundle: org.apache.servicemix.specs.jsr311-api-1.1.1 [267]
Found installed bundle: stax2-api [268]
Found installed bundle: org.apache.cxf.cxf-api [400]
Found installed bundle: org.apache.cxf.cxf-rt-management [402]
Installing bundle mvn:org.apache.cxf/cxf-rt-features-clustering/2.6.6
Error executing command: Can not resolve feature:
Unsatisfied requirement(s):
---------------------------
bundle:(&(symbolicname=org.springframework.beans))
Apache CXF Compatibility Bundle J
Any ideas how to resolve this issue? I suspect that I might need to add another feature url but my research into that hasn't produced any results yet.
Thanks in advance
Lewis Watson
I've been in contact with Red Hat support and they have provided me with a way to install version 1.4.0.redhat-63001 of kie-camel
JBossFuse:karaf#root> config:propappend --pid org.ops4j.pax.url.mvn org.ops4j.pax.url.mvn.repositories ',https://maven.repository.redhat.com/techpreview/all/'
JBossFuse:karaf#root> features:addurl mvn:org.drools/drools-karaf-features/6.4.0.Final-redhat-3/xml/features
JBossFuse:karaf#root> features:addurl mvn:org.drools/drools-karaf-features/6.4.0.Final-redhat-3/xml/features
JBossFuse:karaf#root> features:list | grep kie
[uninstalled] [1.4.0.redhat-630011 ] kie-camel
JBossFuse:karaf#root> features:install kie-camel
Things to note about this answer:
It seems to rely on a tech preview maven repository.
I haven't yet been able to develop an OSGI bundle to test the feature.
As a workaround I was able to get something similar working with drool 5.5.0-Final by following what's on https://github.com/FuseByExample/camel-drools-example
Can you try 6.4.0?
features:addUrl mvn:org.drools/drools-karaf-features/6.4.0.Final/xml/features
I tried to installed camel-osgi using below command. It given an error.
karaf#root()>feature:install camel-osgi
Error:
Error executing command: No matching features for camel-osgi/0.0.0
You first have to install the feature repository of camel before using any camel feature.
feature:repo-add camel 2.16.2
feature:install camel-core
Karaf can also show you the available features using feature:list.
I am using Apache Camel with websphere. We have had some classloader issues.
I understand that Camel provides a websphere classloader but I cannot find an example in how to use it.
tried putting this in the apllicationContext.xml file
<bean id="WebsphereResolver" class="org.apache.camel.impl.WebSpherePackageScanClassResolver" />
but I got the error
Caused by: java.lang.NoSuchMethodException: org.apache.camel.impl.WebSpherePackageScanClassResolver.<init>()
What is correct format?
It turns out the problem was we were using an old version of fasterxml as defined in our pom.xml. Once we updated the pom.xml to use a new version of fasterxml, the problem went away. The apachexml bean uses fasterxml if it is available, but it assumes you are using a recent version.