cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prashant <prashant.phar...@tieto.com>
Subject Re: Error loading bean definitions
Date Thu, 05 Jan 2012 05:21:33 GMT
Hi Daniel,

Thanks for your reply. My problem has been resolved. 
Please find attached configuration files.
http://cxf.547215.n5.nabble.com/file/n5121794/applicationConfig.xml
applicationConfig.xml 
http://cxf.547215.n5.nabble.com/file/n5121794/cxf-Aanleverservice.xml
cxf-Aanleverservice.xml 


I was trying to import cxf-Aanleverservice.xml in applicationConfig.xml
using <import resource="classpath*:cxf-Aanleverservice.xml"/> and then I was
facing above problem. I keep both files separated and then issue resolved.
This merging of file I was doing to solve one classpath file reading issue.

The issue was here: 

XmlBeanFactory factory = new XmlBeanFactory( new
ClassPathResource(cxfConfigFile));

and it was unable to find cxf config file though it was on classpath.
The issue solved by using following in my code:

Thread.currentThread().setContextClassLoader(XIBAanleverserviceClient.class.getClassLoader());
XmlBeanFactory factory = new XmlBeanFactory( new
ClassPathResource(cxfConfigFile));


Thanks
Prashant





--
View this message in context: http://cxf.547215.n5.nabble.com/Error-loading-bean-definitions-tp5093853p5121794.html
Sent from the cxf-user mailing list archive at Nabble.com.

Mime
View raw message