Announcement Announcement Module
Collapse
No announcement yet.
Spring Configuration problem when exporting project (eclipse) Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring Configuration problem when exporting project (eclipse)

    [SOLVED]

    Hello everyone!

    Im working on a collage assignment involving the usage of Spring and Java beans. Im 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:

    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)
    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.

    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:

    Code:
    public void initComponents (){
    		
    		try{
    			ApplicationContext mApp = new FileSystemXmlApplicationContext("config.xml");
    			InfoText test = (InfoText) mApp.getBean("MovDBGUI");
    			test.setVisible(true);	
    		}catch (Exception e){
    			e.printStackTrace();
    		}
    	}
    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 that

    Thanks in advance!

    edit:
    I had a path set wrong in one of the xmls, so that it was basically loading itself again...Fixed!
    Last edited by Zappzarrap; Jul 18th, 2012, 05:26 PM.
Working...
X