PDA

View Full Version : [Java Spring] Perchè dà questi errori in fase di compilazione semplice esempio?


e-commerce84
08-06-2010, 10:18
Ciao,
stiamo abbastanza disperati...stò seguendo il primo esempio di Spring proposto sulla guida di html.it
http://java.html.it/guide/lezione/4521/configurazione-dei-bean-nello-ioc-di-spring/

(Quì file zip contenente i sorgenti: http://java.html.it/guide/lezione/4521/configurazione-dei-bean-nello-ioc-di-spring/ )

Praticamente in fase di build del progetto NetBeans dà i seguenti errori:


run:
8-giu-2010 11.00.53 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from class path resource [beans.xml]
Exception in thread "main" org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [beans.xml]; nested exception is java.io.FileNotFoundException: class path resource [beans.xml] cannot be opened because it does not exist
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:349)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
at org.springframework.beans.factory.xml.XmlBeanFactory.<init>(XmlBeanFactory.java:73)
at org.springframework.beans.factory.xml.XmlBeanFactory.<init>(XmlBeanFactory.java:61)
at it.html.spring.report.ReportClient.main(ReportClient.java:13)
Caused by: java.io.FileNotFoundException: class path resource [beans.xml] cannot be opened because it does not exist
at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:143)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:336)
... 4 more
Java Result: 1
COSTRUITO CON SUCCESSO (tempo totale: 0 secondi)


Da quello che riusciamo a capire pare che il problema sia che non si riesce a trovare il file XML contenenti le configurazione dei bean di Spring...o qualcosa del genere perchè dice: "java.io.FileNotFoundException: class path resource [beans.xml] cannot be opened because it does not exist"

Per favore...potete aiutarci? purtroppo ci hanno detto di usare Spring ma non lo abbiamo visto praticamente per niente a lezione...

Grazie