Show SQL errors of Spring-security in tomcat

12,662

This message is not about an error occuring at runtime in your application:

INFO: SQLErrorCodes loaded: [DB2, Derby, H2, HSQL, Informix, MS-SQL, MySQL, Oracle, PostgreSQL, Sybase]

rather this is simply the Spring framework's JDBC support logging the fact that it has loaded support for translating error codes native to each of these SQL databases which translate into Spring's DataAccessException hierarchy. No error has occurred in the log message here.

If you want to be able to log more information about what Spring is doing, etc., the framework uses commons-logging and there are a number of ways to configure the actual output.

Share:
12,662
Mark Baijens
Author by

Mark Baijens

Software developer at Quantore. Working with the RAD framework Outsystems and .NET software. Pretty handy with javascript/jQuery aswell.

Updated on June 04, 2022

Comments

  • Mark Baijens
    Mark Baijens almost 2 years

    I got a web application using the spring-security framework. I setted up a database to store users and their roles, but tomcat gives the following error.

    17-sep-2010 11:56:14 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
    INFO: Loading XML bean definitions from class path resource [org/springframework/jdbc/support/sql-error-codes.xml]
    17-sep-2010 11:56:14 org.springframework.jdbc.support.SQLErrorCodesFactory <init>
    INFO: SQLErrorCodes loaded: [DB2, Derby, H2, HSQL, Informix, MS-SQL, MySQL, Oracle, PostgreSQL, Sybase]
    

    Is there any way how i can see the errors that occurred? I couldn't find anything in the tomcat and mysql logs.

    Im using tomcat 7.0.2 and mysql 5.1

    Update: Added log4j.properties

    log4j.rootLogger=warn, stdout
    
    log4j.appender.stdout=org.apache.log4j.ConsoleAppender
    log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
    
    # Pattern to output the caller's file name and line number.
    log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n
    
    log4j.logger.org.springframework.security=DEBUG
    # log4j.logger.org.springframework.target=System.out
    

    and web.xml

    <listener>
        <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
    </listener>
    

    No succes yet