This seems to work (this is a public static synchronized method in class
MyClass):
ClassLoader cl = Thread.currentThread().getContextClassLoader();
//Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());
Thread.currentThread().setContextClassLoader(MyClass.class.getClassLoader());
ClassPathXmlApplicationContext context;
try {
context = new
ClassPathXmlApplicationContext("workflow-ws-context.xml");
}
finally {
Thread.currentThread().setContextClassLoader(cl);
}
--
View this message in context:
http://karaf.922171.n3.nabble.com/Unable-to-find-resource-using-Spring-ClassPathXmlApplicationContext-tp4032805p4032893.html
Sent from the Karaf - User mailing list archive at Nabble.com.