Announcement Announcement Module
No announcement yet.
Howto add debug logging to the beanfactory Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Howto add debug logging to the beanfactory

    I have a problem with 2 beans with the same name being declared.

    org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'eventsContainer' defined in class path resource [uk/co/bigsoft/proj/dino/bus/event/dinoEvents.xml]: Invocation of init method failed; nested exception is org.springframework.oxm.jibx.JibxSystemException: Multiple bindings defined for class; nested exception is org.jibx.runtime.JiBXException: Multiple bindings defined for class

    I would like to switch on debug logging in the bean factory. Can anyone help with this?

    What file do I need to create?
    Where do I need to put it?
    and What do I put in it?

    There doesn't seem to be much help in the reference manual.

  • #2
    Put the following file named log4j.xml at classpath and make sure you have log4j binaries at classpath as well:

    HTML Code:
    <?xml version="1.0" encoding="UTF-8" ?>
    <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
    <log4j:configuration xmlns:log4j="">
    	<appender name="console" class="org.apache.log4j.ConsoleAppender">
    		<param name="Target" value="System.out"/>
    		<layout class="org.apache.log4j.PatternLayout">
    			<param name="ConversionPattern" value="%-5p %c{1} - %m%n"/>
    		<priority value="debug"/>
    		<appender-ref ref="console"/>