Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Gemini » issues reading classpath resources using Spring and Karaf
issues reading classpath resources using Spring and Karaf [message #1322451] Tue, 29 April 2014 21:39 Go to next message
Arbi Sookazian is currently offline Arbi SookazianFriend
Messages: 4
Registered: March 2010
Junior Member
Using Karaf 3.0.0 to port J2EE WAR apps to OSGi. Having issues with finding classpath resources in applicationContext.xml, for example. Please view this thread in karaf forum (not getting much help: 'Does not exist in file system' is the topic). thx.

I have tried to simplify the trouble-shooting of this problem by cloning the Eclipse project and breaking down to bare bones classes, xml, etc.

Now the problem I'm having is that the Spring beans config xml does not seem to be being found and/or parsed b/c I have an invalid bean config in there (for testing purposes) with a reference to a non-existing bean (which should cause an exception during parsing/resolution by Spring). No exception is thrown in the karaf log.

I have the following export-package config in pom.xml:


The Spring config file is in WEB-INF/classes directory in the WAB.

I have also tried exploding the WAR and moving the Spring config xml to WEB-INF (this is how it works in another successfully deployed WAB) and copying exploded directory to deploy dir in karaf. Same behavior, no exception on startup of karaf.

Here is the partial web.xml:

<servlet-name>Spring MVC Dispatcher Servlet</servlet-name>

Finding resources with Spring/karaf seems like such a nightmare....

Please advise. thx.
Re: issues reading classpath resources using Spring and Karaf [message #1322468 is a reply to message #1322451] Tue, 29 April 2014 21:48 Go to previous message
Dmitry Sklyut is currently offline Dmitry SklyutFriend
Messages: 279
Registered: January 2010
Senior Member
Hello Arbi,



Your export package looks incorrect. Those are not packages but locations within an archive that contain resources/classes. Those things should go under header.

What are you using as servlet container? What tool are you using for manifest generation? Why would you be exporting packages from a web application? You might want to take a look at how web application bundles are structures by looking in Virgo ( and Gemini Web ( repos and in here (

Kind Regards,
Previous Topic:Old XSD for compendium in Blueprint 2.0.0.M02
Next Topic:Can't find NamespaceHandler
Goto Forum:

Current Time: Tue May 28 11:51:08 GMT 2024

Powered by FUDForum. Page generated in 0.03391 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top