
Originally Posted by
sleyzerzon
Hi,
I'm encountering the following issue while deploying the application:
=====================================
Caused by: org.springframework.beans.factory.BeanDefinitionSt oreException: IOException parsing XML document from class path resource [
/CalculatorWorkerContext.xml
]; nested exception is java.io.FileNotFoundException: class path resource [
/CalculatorWorkerContext.xml
] cannot be opened because it does not exist
at
=====================================
The deployment structure of the app is as follows (.war & jar's inside an .ear):
.ear
CalculatorWorker.jar <-- ejb jar
*.war
*.jar <-- regular jar
.etc
I'm attempting to define the CalculatorWorker app context as a bean inside the CalculatorWorkerContext.xml file like so:
<bean id="calcAppContext" class="org.springframework.context.support.ClassPa thXmlApplicationContext">
<constructor-arg>
<list>
<value>
/CalculatorWorkerContext.xml
</value>
</list>
</constructor-arg>
</bean>
to which I then refer in code:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ProcessHandler processHandler = (ProcessHandler)SingletonBeanFactoryLocator.
getInstance().useBeanFactory("calcAppContext").
getFactory().getBean("processHandler");
System.out.println("processHandler: " + processHandler);
processHandler.handleEvent(msg);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Looks like the line doesn't work:
<value>
/CalculatorWorkerContext.xml
</value>
I've tried classpath:CalculatorWorkerContext.xml and classpath*:CalculatorWorkerContext.xml
It's located in the root of the CalculatorWorker.jar
Could someone please point me to what's wrong or missing...