[SOLVED]
Hello everyone!
I´m working on a collage assignment involving the usage of Spring and Java beans. I´m now at a state when exporting the project(s) would make sense. So I did but when I re - import the projects to another mashine I get the following error:
I changed absolutely nothing after re imprting plus i made sure all needed ressources are in the right place. There are 3 config.xml, two of them are the equal though.Code:Jul 18, 2012 5:03:34 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions Information: Loading XML bean definitions from class path resource [config.xml] org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from URL location [classpath:config.xml] Offending resource: file [K:\KOMPO_HA\Projects\MyMovDB.MainGUI\config.xml]; nested exception is org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from URL location [classpath:config.xml] Offending resource: class path resource [config.xml]; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Detected cyclic loading of class path resource [config.xml] - check your import definitions! at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68) at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85)
This is my main config, located in my project root directory:
http://pastebin.com/BEbEzYwE
This is a second config located both in my Main project�s package and in an exported jar file imported to my main project:
http://pastebin.com/siYmujsy
My main project does not much besides loading a gui component and displaying it, single method:
The wird thing is, the application runs perfectly smooth on my laptop. But even creating a new project on my laptop which is basically a copy of my orginal project leads to the errors mentioned above as well as trying to get it run on my pc. I googled a lot already, but I have no idea how to solve this problem - perhaps you guys can help me out with thatCode:public void initComponents (){ try{ ApplicationContext mApp = new FileSystemXmlApplicationContext("config.xml"); InfoText test = (InfoText) mApp.getBean("MovDBGUI"); test.setVisible(true); }catch (Exception e){ e.printStackTrace(); } }![]()
Thanks in advance!
edit:
I had a path set wrong in one of the xml´s, so that it was basically loading itself again...Fixed!


Reply With Quote