Spring module can't access resource file from custom module
I created a custom spring module with spring jars and module.xml:
and another custom module: org.custom, with a custom jar, and a folder config containing config/config.xml
I declared both modules as global modules in standalone.xml and also as dependancies for my ear application in jboss-deployment-structure.xml:
At startup my application use custom module, that use spring to load config.xml. But spring can't access custom.xml file:
Caused by: java.io.FileNotFoundException: class path resource [config.xml] cannot be opened because it does not exist at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:142) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:336) ... 31 more
I tried to access config.xml directly from my application using classloader, and it's ok.
I can't modify custom.jar it's a tier dependancy, it calls spring load with param 'config.xml', I can't force a path.
Why Spring can't access it?
Using Jboss EAP 6.3.0, and spring 2.5.5
An help?
Thanks.
Responses