[jboss-user] [Tomcat, HTTPD, Servlets & JSP] - FileNotFound Exception ClassLoader fail read spring xml file

eagelinhills do-not-reply at jboss.com
Sat Sep 2 19:44:39 EDT 2006


I have a weird problem with the classloader. I am trying to load a Spring bean applicationReports_Context.xml file located in WEB-INF/classes folder through a classloader. This file is different from the main applicationContext.xml. 

The URL Generate at run time is fine. But the ClassLoader throws the Exception unable to load the XML File. Any ideas
See the Logs 


	2006-09-02 18:51:54,136 INFO  [com.evergreen.brokervoting.util.ReportServiceReloader] The file to be loaded is applicationContext_Reports.xml
	2006-09-02 18:51:54,139 INFO  [STDOUT] About to launch Spring with file with refresh: 
	/export/home/weblogic/jboss-4.0.4.CR2-reference/server/reference/tmp/deploy/tmp54012brokervoting-v3_0-exp.war/WEB-INF/classes/applicationContext_Reports.xml
	2006-09-02 18:51:54,140 DEBUG [org.jboss.web.tomcat.filters.ReplyHeaderFilter] Adding header name: X-Powered-By='Servlet 2.4; JBoss-4.0.4.CR2 (build: CVSTag=JBoss_4_0_4_CR2 date=200603311500)/Tomcat-5.5'
	2006-09-02 18:51:54,150 INFO  [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] Loading XML bean definitions from file [/export/home/weblogic/jboss-4.0.4.CR2-reference/bin/export/home/weblogic/jboss-4.0.4.CR2-reference/server/reference/tmp/deploy/tmp54012brokervoting-v3_0-exp.war/WEB-INF/classes/applicationContext_Reports.xml]
	2006-09-02 18:51:54,153 INFO  [STDOUT] org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from file [/export/home/weblogic/jboss-4.0.4.CR2-reference/bin/export/home/weblogic/jboss-4.0.4.CR2-reference/server/reference/tmp/deploy/tmp54012brokervoting-v3_0-exp.war/WEB-INF/classes/applicationContext_Reports.xml]; nested exception is java.io.FileNotFoundException: export/home/weblogic/jboss-4.0.4.CR2-reference/server/reference/tmp/deploy/tmp54012brokervoting-v3_0-exp.war/WEB-INF/classes/applicationContext_Reports.xml (No such file or directory)
	2006-09-02 18:51:54,153 ERROR [com.evergreen.brokervoting.util.ReportServiceReloader] org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from file [/export/home/weblogic/jboss-4.0.4.CR2-reference/bin/export/home/weblogic/jboss-4.0.4.CR2-reference/server/reference/tmp/deploy/tmp54012brokervoting-v3_0-exp.war/WEB-INF/classes/applicationContext_Reports.xml]; nested exception is java.io.FileNotFoundException: export/home/weblogic/jboss-4.0.4.CR2-reference/server/reference/tmp/deploy/tmp54012brokervoting-v3_0-exp.war/WEB-INF/classes/applicationContext_Reports.xml (No such file or directory)
	org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from file [/export/home/weblogic/jboss-4.0.4.CR2-reference/bin/export/home/weblogic/jboss-4.0.4.CR2-reference/server/reference/tmp/deploy/tmp54012brokervoting-v3_0-exp.war/WEB-INF/classes/applicationContext_Reports.xml]; nested exception is java.io.FileNotFoundException: export/home/weblogic/jboss-4.0.4.CR2-reference/server/reference/tmp/deploy/tmp54012brokervoting-v3_0-exp.war/WEB-INF/classes/applicationContext_Reports.xml (No such file or directory)
	java.io.FileNotFoundException: export/home/weblogic/jboss-4.0.4.CR2-reference/server/reference/tmp/deploy/tmp54012brokervoting-v3_0-exp.war/WEB-INF/classes/applicationContext_Reports.xml (No such file or directory)
		at java.io.FileInputStream.open(Native Method)
		at java.io.FileInputStream.(FileInputStream.java:106)
		at org.springframework.core.io.FileSystemResource.getInputStream(FileSystemResource.java:85)
		at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:167)
		at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:148)
		at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:126)
		at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:142)
		at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:113)
		at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:81)
		at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:89)
		at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:269)
		at org.springframework.context.support.FileSystemXmlApplicationContext.(FileSystemXmlApplicationContext.java:89)
		at org.springframework.context.support.FileSystemXmlApplicationContext.(FileSystemXmlApplicationContext.java:74)
		at com.evergreen.brokervoting.util.ReportServiceReloader.runReports(ReportServiceReloader.java:60)
		at com.evergreen.brokervoting.util.ReportServiceReloader.main(ReportServiceReloader.java:30)
		at com.evergreen.brokervoting.reports.ReportsRunner.run(ReportsRunner.java:66)
		at java.lang.Thread.run(Thread.java:595)
	2006-09-02 18:51:54,155 ERROR [com.evergreen.brokervoting.util.ReportServiceReloader] Failed to reload the service



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3969072#3969072

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3969072



More information about the jboss-user mailing list