Update Spring version in RedHat Fuse (Karaf) - spring

I'm running JbossFuse/Karaf version 2.3.0.redhat-60024 and it comes with spring 3.1.3.RELEASE.
How to update the spring version to 3.2.4.RELEASE?
Thanks

Spring 3.1.3 is included in the features XML shipped with that Fuse ESB release, i.e. system/org/apache/karaf/assemblies/features/standard/2.3.0.redhat-60024/standard-2.3.0.redhat-60024-features.xml
A newer version of that features XML (not redhat specific) contains the features definitions for Spring 3.2.4, see standard-2.3.3-features.xml.
The easiest way to install Spring 3.2.4 libraries then would be:
features:addurl mvn:org.apache.karaf.assemblies.features/standard/2.3.3/xml/features
features:install spring/3.2.4.RELEASE
Another option is to simply copy & paste the items you want from that file and add them to a new features XML, or append to one of the ones already included with Fuse ESB under the system directory. See here for more information about creating your own features XML file.

Related

Correspondent Starters Versions for Spring Boot 2.4.5?

I downloaded Spring Boot 2.4.5 intending to get a copy of the libs I need daily. But then I've noticed that I don't have any information about the compatible starters versions to download for it. Can I find those somewhere?

Spring Integration Kafka xml configration

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 a version of postmark java client library which uses jersey 1.x instead of 2.x?

I have a RESTful web service application in java deployed on google app-engine which uses jersey 1.18.6.
I want to use postmark java client to send transactional emails from it.
When I integrated it, i was seeing the following exception:
javax.ws.rs.core.Response$Status$Family.familyOf(I)Ljavax/ws/rs/core/Response$Status$Family
From what I could find, I think this error was because of there were two different (and probably incompatible) version of jersey being used ,1.18.6 for jersey-server, jersey-guice and jersey-bundle and 2.25.1 for jersey-client (by postmark).
Then I tried to make the jersey version 1.18,6 throughout, so in the my main project pom, while including the dependency for postmark, I excluded the jersey-client (by added exclusions header) and separately added jersey-client dependency in my main project .
But then I got the following error:
java.lang.NoClassDefFoundError: javax/ws/rs/core/MultivaluedHashMap
This is I think the class MultivaluedHashMap is present only in jax-rs 2.x versions (which is compatible with jersey 2.x versions)
So my questions are:
Is there a version of postmark java client library which uses jersey 1.x instead of jersey 2.x?
If no then what options do I have other than migrating my main project from jersey 1.x to jersey 2.x. I don't want to do that since we will have to migrate not just the jersey dependencies but I think some other things like guice, shiro etc. which would be time consuming. Also it doesn't really seem optimal to modify multiple existing dependencies just to include one additional module.
There isn't. The very first commit of the project's pom.xml already used Jersey 2.25.1
as Mureinik mentioned above, when we worked on the library, our plan at Postmark was to use newer library versions, since they are better options in long run.
On our Github page Rupert made good suggestions, from which I find separate ClassLoader a good choice. I will play a bit with the library code in next couple of days on compatibility, however we are always in favour of using newer libraries for our codebase.
please check out my latest comment on Github issues page for possible solution for using older Jersey version https://github.com/wildbit/postmark-java/issues/11
It should be pretty easy to port the library to Jersey 1.x by porting only the HttpClient class on your side.

Is there any Spring 5.0.6.RELEASE osgified version patch available?

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).

How to get version 4.0 spring jar on maven?

I searched spring on maven, and I find it at this page :http://mvnrepository.com/artifact/org.springframework/spring. The problem is I want to download 4.0 version but there is no 4.0 version in the chart.
Newer version of Spring can be found under group id org.springframework - Spring 4+
There is no reason to include all features of Spring Framework in one .jar. Spring is huge and you will probably won't use every feature of Spring. Including everything will cause unnecessary overhead. Pick what components you need add them to pom.xml and Maven will download them. If you found out later you need additional dependency just add it on the fly...
As an alternative you can use Spring Boot which will generate project for you with default set up. You can generate such a project using Spring Initializr Spring Boot Initializr. At the bottom click Switch to the full version. Pick what you need and hit generate project.

Resources