|issues reading classpath resources using Spring and Karaf [message #1322451]
||Tue, 29 April 2014 21:39
| Arbi Sookazian
Registered: March 2010
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.
Powered by FUDForum
. Page generated in 0.02692 seconds