I have a Spring boot 2.25.1 application which is using Camel 2.25.1 with camel-kafka everything is working fine..
In my Kafka consumer, I have a need to add the feature to pause consumption on demand so I upgraded to camel 3.18.1 so I can use the pausable feature.
After upgrading to 3.18.1 I am getting error FileNotFound with class file TimeoutAwareAggregationStategy.class.
when I opened camel-core 3.18.1 jar this class does not exist which was available in came 2.25.1 version.
Please suggest.
I was expecting smoother upgrade from camel 2.25.1 to camel 3.18.1.
According to the Camel upgrade guide for Camel 2.x to 3, the camel-core was modularized and broken up into multiple jar files. In that upgrade guide, they mention a lot of changes to Aggregation Strategies. While I couldn't find a direct implementation of the AggregationStrategy interface called TimeoutAwareAggregationStategy, I can see that class exists in camel-core in version 2.25.4 and the AggregationStrategy interface is moved to camel-api in version 3.0.
I was expecting smoother upgrade from camel 2.25.1 to camel 3.18.1
Normally, when upgrading a major version to a newer major version, there will be major changes that you have to account for. These changes are almost always covered in the change list or upgrade guide.
Related
Doing migration spring-integration-Kafka 1.1.2 to 3.3.1. In the project, we are using an XML-based Kafka configuration. After changing to the 3.3.1 version. Getting So many errors in the XML file. like <int-kafka:producer-context id="kafkaProducerContext"> not getting tag. Is there any way to solve this problem?. Or is I need to use java based configuration?
It has had a complete rewrite based on the spring-kafka project since 2.0.
Version 3.3.1 was still a stand-alone extension: https://github.com/spring-projects/spring-integration-kafka
The documentation (including XML configuration, which is now simpler) is a chapter in the Spring for Apache Kafka Documentation; it uses version 2.5.7 by default; the latest 2.5.x is currently 2.5.12.
https://docs.spring.io/spring-kafka/docs/2.5.12.RELEASE/reference/html/#spring-integration
spring-integration-kafka is now part of the Spring Integration project (since 5.4) and is no longer an extension project.
https://docs.spring.io/spring-integration/docs/current/reference/html/kafka.html#kafka
Is there any Spring 5.0.6.RELEASE osgified version patch available? We have to to do quick release so need to upgrade older spring but currently our framework uses OSGI based container, though spring has officially stopped supported OSGI. Is it possible to have patched version of latest Spring framework?
Though I know it's better to convert to Spring based container but since time doesn't allow I'm in search of any osgified version of Spring jars.
Apache Servicemix produces osgified versions of a lot of well known libraries, Spring included: https://github.com/apache/servicemix-bundles
Currently the latest osgfied version of Spring is "5.0.5.RELEASE", with "5.0.6.RELEASE" probably due to come in the near future. Otherwise, getting servicemix pom.xml for 5.0.5.RELEASE and manually changing Spring version should work (from 5.0.5 to 5.0.6 there should be just internal implementation changes).
Wondering is it possible to integrate Camel with a very old version of Sonic MQ (5.02). The queues in one of the legacy application we have, were built in 2003! When we try to post using Camel (with the sonic client jar on the classpath) we get class not found exceptions from Camel...
java.lang.AbstractMethodError:
javax.jms.ConnectionFactory.createConnection()Ljavax/jms/Connection;
This relates to the old version of JMS api (1.02b) shipped with Sonic.
Even if we put the correct version of JMS API on class path.. we get further... but then various sonic exceptions .....
Wondering if it is even supported?? Has anyone tried this..
or have info the could share?
Much Appreciated
What version of Camel do you use?
Camel does not support JMS 1.0 api for a very long time. You would need to use an old version of Camel. In fact that happend form Camel 2.5 onwards, see its release notes: http://camel.apache.org/camel-250-release.html
According to you what are the risks of using Spring 4 with the jersey-spring3 integration module?
I have tried to use Spring 4.0 with the jersey spring example and the example still works but i'm unable to identify risks linked to this usage.
I have started using Jersey 2.7 and Spring 4.0.x recently in a project. I have setup a context hierarchy to inject beans, so far, I have discovered only one limitiation but that does not seem relate to Spring 4 but rather to the module itself or the HK2 Spring Bridge.
To give more insight about my use. I have a XJC/JAXB-backed which is consumed by a common service, repository and exposed through JAX-WS, and now hopefully through JAX-RS.
The multi-context stuff works now with #Autowiredwith 2.8-SNAPSHOT. I have applied my changes and the 2.8-SNAPSHOT to 2.7. Here is the diff.
Edit (Michael-O; 2014-10-17): Here is a modified Spring module based off 2.11 with multi-context support.
Not an answer to original question, just related information
This may be a little premature, but the new Major 3.0 version of Jersey will be using Spring 4, in the new jersey-spring4 module. The new Major version will be built with Java 8. Though a new Major version will be released, the 2.x line will still be actively developed to keep support for Java 7
I'll update this post once 3.0 has been release.
For anyone interested, you can see this mailing list to see what the Jersey team has to say about the new 3.x line.
Not sure if you came across any issues but I currently face one. It is described in other thread.
Simply, using jersey-spring3 2.12 and spring 4.1.0.RELEASE in one maven project leads to following class incompatibility:
2014-09-14 01:15:44.175:WARN:oejuc.AbstractLifeCycle:main: FAILED org.eclipse.jetty.server.handler.HandlerCollection#696
db620[org.eclipse.jetty.server.handler.ContextHandlerCollection#27abb6ca[o.e.j.m.p.JettyWebAppContext#737d100a{/,file:/C
:/Users/Josef/Workspace/TransitCenter/src/main/webapp/,STARTING}{file:/C:/Users/Josef/Workspace/TransitCenter/src/main/w
ebapp/}], org.eclipse.jetty.server.handler.DefaultHandler#6968c1d6, org.eclipse.jetty.server.handler.RequestLogHandler#7
d986d83]: java.lang.NoSuchMethodError: org.springframework.beans.factory.support.DefaultListableBeanFactory.getDependenc
yComparator()Ljava/util/Comparator;
java.lang.NoSuchMethodError: org.springframework.beans.factory.support.DefaultListableBeanFactory.getDependencyComparato
r()Ljava/util/Comparator;
at org.springframework.context.annotation.AnnotationConfigUtils.registerAnnotationConfigProcessors(AnnotationCon
figUtils.java:136)
We have an application that is currently running spring 2.5.6 and mule 2.2.1. We have decided to go ahead and upgrade the app to use spring 3.2 we also upgraded spring security to 3.1. I understand that Mule 2.2.1 uses spring 2.5.6 for configuration and so forth. We were to re-factor our code and build the entire project. However after deploying the application and starting the server, my server started in about 6 seconds instead of the normal 30 seconds and then I noticed that none of my services were not loaded. Unfortunately after days of investigating I cannot find where everything fails, as there are no errors in any of the logs including spring and mule logs. My question is it possible to get these to play together or should I just forget about getting this to work.
I read this post http://lifeinide.blogspot.com/2012/07/spring-3-and-mule-2-initialized-by.html and followed these instruction and still was not able to get it work. Mule says it started up just fine without any errors but I can hit any of my services. Any help? Thanks
Thanks #genjosanzo for the pointer. It helped met dig into this issue better and eventually make it work.
#mtanzania,
We had a similar need like yours - need to make Mule 2.2.1 work with Spring 3.2.x releases. Upgrade to Mule 3 involved rewrite of Mule extensions such as exception handling strategies, a RabbitMQ Mule transport etc. Upgrade to Mule 3 was therefore ruled out.
In order to make this work, you need to rewrite/update 3 java files from your module:
groupId:org.mule.modules
artifactId:mule-module-spring-config
version:2.2.1
with implementations from :
groupId:org.mule.modules
artifactId:mule-module-spring-config
version:3.4.0
To be more specific, you need these classes to be updated/upgraded: MuleBeanDefinitionDocumentReader.java, MuleApplicationContext.java and SpringXmlConfigurationBuilder.java
With these updated versions, you can continue to create the MuleContext like:
SpringXmlConfigurationBuilder springConfigBuilder = new SpringXmlConfigurationBuilder(muleConfigPaths);
MuleContext context = new DefaultMuleContextFactory().createMuleContext(springConfigBuilder)
The modified implementations are here : Mule in Trooper and sample class that uses this is here : Trooper Mule container
Mule uses some internal spring API to parse the mule configuration and creates the correspondent beans.
For this reason the upgrade might work with spring 3.0.x but I'm pretty sure that something got broken with spring 3.1.x (i.e. this code has been introduced to maintain backward compatibility).
How about upgrading mule as well? Most of the 2.2.x syntax is still supported and many new feature has been introduced in newer mule versions.
FWIW, the above answer from #regunathb is right on. Patching in those three classes works. However, it is important to note that the 3.4 version of those classes from mule-module-spring-config will not work as-is. You must get the modified versions of the classes that #regunathb posted on GitHub, otherwise you'll end up with various incompatibilities between 3.4 and 2.2.1.