Hello,
I have an application that has a main and the application context is loaded with the ClassPathXmlApplicationContext.
It can be packged in a war and deployed to Tomcat for example, in which case everything works perfectly, however when running the jar stand alone I run into this issue. I have all the dependencies for the application in the manifest, including Spring of course.
I have taken the spring.handlers, spring.schemas and spring.tooling and added them to my META-INF with all the handler definitions and then all is well, but this is a really dirty hack!
My best guess is that the boot classloader is looking for XML libraries, like Xerces, but it is the parent classloader and doesn't see Spring further down the hierarchy. Or it could be a security thing, I do have the Spring security on the path as well, although I don't need it.
My directory structure is:
The command line would be: java -jar target/ikube-core-1.0.jarCode:ikube-core-1.0.jar lib/ spring-core.....jar ...
All code is available on Google Code - http://code.google.com/p/ikube/.
Thanks in advance!
Cheers,
Michael


Reply With Quote