You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@karaf.apache.org by Sai Sankar <sa...@motivitylabs.com> on 2019/01/08 12:28:32 UTC
How to Install Spring 4.3.21 on Karaf 4.2.2
Hi Team
From the page https://karaf.apache.org/news.html , the latest karaf 4.2.2
supports Spring 4.3.21 too along with spring 5.
But when i installed karaf 4.2.2, by default i am able to see only Spring
5.0.10 and 5.1. 3 only but my project needs spring 4.3.21. How can i get the
spring 4.3.21 on karaf 4.2.2 ?
below are spring versions from feature:list output of karaf 4.2.2 (
extracted the spring versions)
spring | 5.0.10.RELEASE_1 | | Uninstalled
| spring-4.2.2 | Spring 5.0.x support
spring-aspects | 5.0.10.RELEASE_1 | | Uninstalled
| spring-4.2.2 | Spring 5.0.x AOP support
spring-instrument | 5.0.10.RELEASE_1 | | Uninstalled
| spring-4.2.2 | Spring 5.0.x Instrument support
spring-jdbc | 5.0.10.RELEASE_1 | | Uninstalled
| spring-4.2.2 | Spring 5.0.x JDBC support
spring-jms | 5.0.10.RELEASE_1 | | Uninstalled
| spring-4.2.2 | Spring 5.0.x JMS support
spring-test | 5.0.10.RELEASE_1 | | Uninstalled
| spring-4.2.2 | Spring 5.0.x Test support
spring-orm | 5.0.10.RELEASE_1 | | Uninstalled
| spring-4.2.2 | Spring 5.0.x ORM support
spring-oxm | 5.0.10.RELEASE_1 | | Uninstalled
| spring-4.2.2 | Spring 5.0.x OXM support
spring-tx | 5.0.10.RELEASE_1 | | Uninstalled
| spring-4.2.2 | Spring 5.0.x Transaction (TX) support
spring-web | 5.0.10.RELEASE_1 | | Uninstalled
| spring-4.2.2 | Spring 5.0.x Web support
spring-websocket | 5.0.10.RELEASE_1 | | Uninstalled
| spring-4.2.2 | Spring 5.0.x WebSocket support
spring | 5.1.3.RELEASE_1 | | Uninstalled
| spring-4.2.2 | Spring 5.1.x support
spring-aspects | 5.1.3.RELEASE_1 | | Uninstalled
| spring-4.2.2 | Spring 5.1.x AOP support
spring-instrument | 5.1.3.RELEASE_1 | | Uninstalled
| spring-4.2.2 | Spring 5.1.x Instrument support
spring-jdbc | 5.1.3.RELEASE_1 | | Uninstalled
| spring-4.2.2 | Spring 5.1.x JDBC support
spring-jms | 5.1.3.RELEASE_1 | | Uninstalled
| spring-4.2.2 | Spring 5.1.x JMS support
spring-test | 5.1.3.RELEASE_1 | | Uninstalled
| spring-4.2.2 | Spring 5.1.x Test support
spring-orm | 5.1.3.RELEASE_1 | | Uninstalled
| spring-4.2.2 | Spring 5.1.x ORM support
spring-oxm | 5.1.3.RELEASE_1 | | Uninstalled
| spring-4.2.2 | Spring 5.1.x OXM support
spring-tx | 5.1.3.RELEASE_1 | | Uninstalled
| spring-4.2.2 | Spring 5.1.x Transaction (TX) support
spring-web | 5.1.3.RELEASE_1 | | Uninstalled
| spring-4.2.2 | Spring 5.1.x Web support
spring-websocket | 5.1.3.RELEASE_1 | | Uninstalled
| spring-4.2.2 | Spring 5.1.x WebSocket support
--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-Dev-f930721.html
Re: How to Install Spring 4.3.21 on Karaf 4.2.2
Posted by Sai Sankar <sa...@motivitylabs.com>.
Hello JB
Thanks for spring-legacy repo. I did as you suggested and used spring-legacy
library and able to install spring-dm and spring-dm.web. it is showing as
started succesfully.
spring-dm | 1.2.1 | x | Started |
spring-legacy-4.2.2 | Spring DM support
spring-dm-web | 1.2.1 | x | Started |
spring-legacy-4.2.2 | Spring DM Web support
spring | 3.2.18.RELEASE_1 | | Started |
spring-legacy-4.2.2 | Spring 3.2.x support
spring-web | 3.2.18.RELEASE_1 | | Started |
spring-legacy-4.2.2 | Spring 3.2.x Web support
My intention of downgrading spring on KARAF 4.2.2 was to use
OsgiBundleXmlWebApplicationContext class (spring-dm) which is supported upto
KARAF 4 only, but while installing my web module, again i got this
exception.
14:39:48,344 | INFO | onfig-2-thread-2 | ContextLoader |
183 - org.apache.servicemix.bundles.spring-web - 3.2.18.RELEASE_1 | Root
WebApplicationContext: initialization started
14:39:48,345 | ERROR | onfig-2-thread-2 | ContextLoader |
183 - org.apache.servicemix.bundles.spring-web - 3.2.18.RELEASE_1 | Context
initialization failed
org.springframework.context.ApplicationContextException: Failed to load
custom context class [
org.springframework.osgi.web.context.support.OsgiBundleXmlWebApplicationContext
]; nested exception is java.lang.ClassNotFoundException:
org.springframework.osgi.web.context.support.OsgiBundleXmlWebApplicationContext
not found by docsconsole [321]
at
org.springframework.web.context.ContextLoader.determineContextClass(ContextLoader.java:476)
~[183:org.apache.servicemix.bundles.spring-web:3.2.18.RELEASE_1]
at
org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:355)
~[183:org.apache.servicemix.bundles.spring-web:3.2.18.RELEASE_1]
Can you provide any help here?
Regards
Sai
--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-Dev-f930721.html
Re: How to Install Spring 4.3.21 on Karaf 4.2.2
Posted by Sai Sankar <sa...@motivitylabs.com>.
Hi JB,
Thanks for spring-legacy repo. I did as you suggested and used spring-legacy
library and able to install spring-dm and spring-dm.web. it is showing as
started succesfully.
spring-dm | 1.2.1 | x | Started |
spring-legacy-4.2.2 | Spring DM support
spring-dm-web | 1.2.1 | x | Started |
spring-legacy-4.2.2 | Spring DM Web support
spring | 3.2.18.RELEASE_1 | | Started |
spring-legacy-4.2.2 | Spring 3.2.x support
spring-web | 3.2.18.RELEASE_1 | | Started |
spring-legacy-4.2.2 | Spring 3.2.x Web support
My intention of downgrading spring on KARAF 4.2.2 was to use
OsgiBundleXmlWebApplicationContext class (spring-dm) which is supported upto
KARAF 4 only ,but while installing my web module, i again got this
exception.
14:39:48,344 | INFO | onfig-2-thread-2 | ContextLoader |
183 - org.apache.servicemix.bundles.spring-web - 3.2.18.RELEASE_1 | Root
WebApplicationContext: initialization started
14:39:48,345 | ERROR | onfig-2-thread-2 | ContextLoader |
183 - org.apache.servicemix.bundles.spring-web - 3.2.18.RELEASE_1 | Context
initialization failed
org.springframework.context.ApplicationContextException: Failed to load
custom context class [
org.springframework.osgi.web.context.support.OsgiBundleXmlWebApplicationContext
]; nested exception is java.lang.ClassNotFoundException:
org.springframework.osgi.web.context.support.OsgiBundleXmlWebApplicationContext
not found by docsconsole [321]
at
org.springframework.web.context.ContextLoader.determineContextClass(ContextLoader.java:476)
~[183:org.apache.servicemix.bundles.spring-web:3.2.18.RELEASE_1]
at
org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:355)
~[183:org.apache.servicemix.bundles.spring-web:3.2.18.RELEASE_1]
Regards
Sai
--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-Dev-f930721.html
Re: How to Install Spring 4.3.21 on Karaf 4.2.2
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi,
you have to register the spring-legacy features repo:
feature:repo-add spring-legacy
spring features repo only provides latest Spring version.
Previous Spring versions are provided by the spring-legacy features repo.
Regards
JB
On 08/01/2019 13:28, Sai Sankar wrote:
> Hi Team
>
> From the page https://karaf.apache.org/news.html , the latest karaf 4.2.2
> supports Spring 4.3.21 too along with spring 5.
>
> But when i installed karaf 4.2.2, by default i am able to see only Spring
> 5.0.10 and 5.1. 3 only but my project needs spring 4.3.21. How can i get the
> spring 4.3.21 on karaf 4.2.2 ?
>
> below are spring versions from feature:list output of karaf 4.2.2 (
> extracted the spring versions)
>
> spring | 5.0.10.RELEASE_1 | | Uninstalled
> | spring-4.2.2 | Spring 5.0.x support
> spring-aspects | 5.0.10.RELEASE_1 | | Uninstalled
> | spring-4.2.2 | Spring 5.0.x AOP support
> spring-instrument | 5.0.10.RELEASE_1 | | Uninstalled
> | spring-4.2.2 | Spring 5.0.x Instrument support
> spring-jdbc | 5.0.10.RELEASE_1 | | Uninstalled
> | spring-4.2.2 | Spring 5.0.x JDBC support
> spring-jms | 5.0.10.RELEASE_1 | | Uninstalled
> | spring-4.2.2 | Spring 5.0.x JMS support
> spring-test | 5.0.10.RELEASE_1 | | Uninstalled
> | spring-4.2.2 | Spring 5.0.x Test support
> spring-orm | 5.0.10.RELEASE_1 | | Uninstalled
> | spring-4.2.2 | Spring 5.0.x ORM support
> spring-oxm | 5.0.10.RELEASE_1 | | Uninstalled
> | spring-4.2.2 | Spring 5.0.x OXM support
> spring-tx | 5.0.10.RELEASE_1 | | Uninstalled
> | spring-4.2.2 | Spring 5.0.x Transaction (TX) support
> spring-web | 5.0.10.RELEASE_1 | | Uninstalled
> | spring-4.2.2 | Spring 5.0.x Web support
> spring-websocket | 5.0.10.RELEASE_1 | | Uninstalled
> | spring-4.2.2 | Spring 5.0.x WebSocket support
> spring | 5.1.3.RELEASE_1 | | Uninstalled
> | spring-4.2.2 | Spring 5.1.x support
> spring-aspects | 5.1.3.RELEASE_1 | | Uninstalled
> | spring-4.2.2 | Spring 5.1.x AOP support
> spring-instrument | 5.1.3.RELEASE_1 | | Uninstalled
> | spring-4.2.2 | Spring 5.1.x Instrument support
> spring-jdbc | 5.1.3.RELEASE_1 | | Uninstalled
> | spring-4.2.2 | Spring 5.1.x JDBC support
> spring-jms | 5.1.3.RELEASE_1 | | Uninstalled
> | spring-4.2.2 | Spring 5.1.x JMS support
> spring-test | 5.1.3.RELEASE_1 | | Uninstalled
> | spring-4.2.2 | Spring 5.1.x Test support
> spring-orm | 5.1.3.RELEASE_1 | | Uninstalled
> | spring-4.2.2 | Spring 5.1.x ORM support
> spring-oxm | 5.1.3.RELEASE_1 | | Uninstalled
> | spring-4.2.2 | Spring 5.1.x OXM support
> spring-tx | 5.1.3.RELEASE_1 | | Uninstalled
> | spring-4.2.2 | Spring 5.1.x Transaction (TX) support
> spring-web | 5.1.3.RELEASE_1 | | Uninstalled
> | spring-4.2.2 | Spring 5.1.x Web support
> spring-websocket | 5.1.3.RELEASE_1 | | Uninstalled
> | spring-4.2.2 | Spring 5.1.x WebSocket support
>
>
>
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-Dev-f930721.html
>
--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com
Re: How to Install Spring 4.3.21 on Karaf 4.2.2
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Do you import the spring-dm package in your bundle ?
Anyway, spring-dm is now deprecated for a while.
I really encourage you to use blueprint (with the spring extension if
needed).
Regards
JB
On 10/01/2019 08:47, Sai Sankar wrote:
> Yeah, my spring version is 3.2.18.RELEASE_1 only. So, with this version it is
> expected to work. But still facing below issue. Any help please ?
>
>
>
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-Dev-f930721.html
>
--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com
Re: How to Install Spring 4.3.21 on Karaf 4.2.2
Posted by Sai Sankar <sa...@motivitylabs.com>.
Yeah, my spring version is 3.2.18.RELEASE_1 only. So, with this version it is
expected to work. But still facing below issue. Any help please ?
--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-Dev-f930721.html
Re: How to Install Spring 4.3.21 on Karaf 4.2.2
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Spring DM only works with Spring 3.x afair.
Instead, I suggest to use blueprint.
Regards
JB
On 09/01/2019 13:20, munishgupta.asr wrote:
> Thanks for the answer JB.
>
> I did as you suggested and used spring-legacy library and able to install
> spring-dm and spring-dm.web. it is showing as started successfully.
>
> spring-dm | 1.2.1 | x | Started |
> spring-legacy-4.2.2 | Spring DM support
> spring-dm-web | 1.2.1 | x | Started |
> spring-legacy-4.2.2 | Spring DM Web support
> spring | 3.2.18.RELEASE_1 | | Started |
> spring-legacy-4.2.2 | Spring 3.2.x support
> spring-web | 3.2.18.RELEASE_1 | | Started |
> spring-legacy-4.2.2 | Spring 3.2.x Web support
>
> My intention of downgrading spring on KARAF 4.2.2 was to use
> OsgiBundleXmlWebApplicationContext class (spring-dm) which is supported upto
> KARAF 4 only. but while installing my web module, i again got this
> ClassNotFoundException exception for OsgiBundleXmlWebApplicationContext
> class.
>
> 14:39:48,344 | INFO | onfig-2-thread-2 | ContextLoader |
> 183 - org.apache.servicemix.bundles.spring-web - 3.2.18.RELEASE_1 | Root
> WebApplicationContext: initialization started
> 14:39:48,345 | ERROR | onfig-2-thread-2 | ContextLoader |
> 183 - org.apache.servicemix.bundles.spring-web - 3.2.18.RELEASE_1 | Context
> initialization failed
> org.springframework.context.ApplicationContextException: Failed to load
> custom context class [
>
> org.springframework.osgi.web.context.support.OsgiBundleXmlWebApplicationContext
> ]; nested exception is java.lang.ClassNotFoundException:
>
> org.springframework.osgi.web.context.support.OsgiBundleXmlWebApplicationContext
> not found by docsconsole [321]
> at
> org.springframework.web.context.ContextLoader.determineContextClass(ContextLoader.java:476)
> ~[183:org.apache.servicemix.bundles.spring-web:3.2.18.RELEASE_1]
> at
> org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:355)
> ~[183:org.apache.servicemix.bundles.spring-web:3.2.18.RELEASE_1]
>
> is not it supposed to work now?
>
> Thanks
>
>
>
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-Dev-f930721.html
>
--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com
Re: How to Install Spring 4.3.21 on Karaf 4.2.2
Posted by "munishgupta.asr" <mu...@gmail.com>.
Thanks for the answer JB.
I did as you suggested and used spring-legacy library and able to install
spring-dm and spring-dm.web. it is showing as started successfully.
spring-dm | 1.2.1 | x | Started |
spring-legacy-4.2.2 | Spring DM support
spring-dm-web | 1.2.1 | x | Started |
spring-legacy-4.2.2 | Spring DM Web support
spring | 3.2.18.RELEASE_1 | | Started |
spring-legacy-4.2.2 | Spring 3.2.x support
spring-web | 3.2.18.RELEASE_1 | | Started |
spring-legacy-4.2.2 | Spring 3.2.x Web support
My intention of downgrading spring on KARAF 4.2.2 was to use
OsgiBundleXmlWebApplicationContext class (spring-dm) which is supported upto
KARAF 4 only. but while installing my web module, i again got this
ClassNotFoundException exception for OsgiBundleXmlWebApplicationContext
class.
14:39:48,344 | INFO | onfig-2-thread-2 | ContextLoader |
183 - org.apache.servicemix.bundles.spring-web - 3.2.18.RELEASE_1 | Root
WebApplicationContext: initialization started
14:39:48,345 | ERROR | onfig-2-thread-2 | ContextLoader |
183 - org.apache.servicemix.bundles.spring-web - 3.2.18.RELEASE_1 | Context
initialization failed
org.springframework.context.ApplicationContextException: Failed to load
custom context class [
org.springframework.osgi.web.context.support.OsgiBundleXmlWebApplicationContext
]; nested exception is java.lang.ClassNotFoundException:
org.springframework.osgi.web.context.support.OsgiBundleXmlWebApplicationContext
not found by docsconsole [321]
at
org.springframework.web.context.ContextLoader.determineContextClass(ContextLoader.java:476)
~[183:org.apache.servicemix.bundles.spring-web:3.2.18.RELEASE_1]
at
org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:355)
~[183:org.apache.servicemix.bundles.spring-web:3.2.18.RELEASE_1]
is not it supposed to work now?
Thanks
--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-Dev-f930721.html
Re: How to Install Spring 4.3.21 on Karaf 4.2.2
Posted by "munishgupta.asr" <mu...@gmail.com>.
did it work?
--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-Dev-f930721.html