Code:
import org.springframework.context.support.ClassPathXmlApplicationContext;
...
ClassPathXmlApplicationContext context = new
ClassPathXmlApplicationContext("workflow-ws-context.xml");
also tried:
ClassPathXmlApplicationContext context = new
ClassPathXmlApplicationContext("WEB-INF/classes/workflow-ws-context.xml");
getting following in karaf.log when starting bundle:
Caused by: java.io.FileNotFoundException: class path resource
[WEB-INF/classes/workflow-ws-context.xml] cannot be opened because it does
not exist
at
org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:157)
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:328)
... 84 more
I have the following in pom.xml:
<Bundle-ClassPath>., WEB-INF/classes
, ...
</Bundle-ClassPath>
and the file exists in the mega bundle WAR (WAB) when I explode it after
'mvn clean install'. It exists as
<root>/WEB-INF/classes/workflow-ws-context.xml.
Please advise how to fix/proceed. thx.
--
View this message in context:
http://karaf.922171.n3.nabble.com/Unable-to-find-resource-using-Spring-ClassPathXmlApplicationContext-tp4032805.html
Sent from the Karaf - User mailing list archive at Nabble.com.