Results 1 to 3 of 3

Thread: Missing error messages for SingletonBeanFactoryLocator

  1. #1
    Join Date
    Nov 2004
    Posts
    3

    Default Missing error messages for SingletonBeanFactoryLocator

    Hello,

    we use the SingletonBeanFactoryLocator for accessing our Spring Beans. When we upgraded from Spring 1.0.2 to Spring 1.1.1 we realized that errors during the creation of our ApplicationContexts are not reported in detail anymore. With Spring 1.0.2 we saw "nice" stack traces and nested exceptions which were always quite instructive for finding our errors (e.g., bean property not writable, ...).

    But now, even in the Spring debug log there is no indication of what happended; the ApplicationContexts are destroyed and the SingletonBeanFactoryLocator throws a FatalBeanException (log below).

    Code:
    12:09:03,632 INFO  [DefaultListableBeanFactory] Creating shared instance of singleton bean 'ESNDataSource'
    12:09:03,632 DEBUG [DefaultListableBeanFactory] Creating instance of bean 'ESNDataSource' with merged definition [Root bean with class [org.apache.commons.dbcp.BasicDataSource] defined in class path resource [EsnDataAccessBeans.xml]]
    12:09:03,632 DEBUG [CachedIntrospectionResults] Getting BeanInfo for class [org.apache.commons.dbcp.BasicDataSource]
    12:09:03,648 DEBUG [CachedIntrospectionResults] Caching PropertyDescriptors for class [org.apache.commons.dbcp.BasicDataSource]
    12:09:03,648 DEBUG [CachedIntrospectionResults] Found property 'accessToUnderlyingConnectionAllowed' of type [boolean]; editor=[null]
    12:09:03,648 DEBUG [CachedIntrospectionResults] Found property 'class' of type [class java.lang.Class]; editor=[null]
    12:09:03,648 DEBUG [CachedIntrospectionResults] Found property 'connection' of type [interface java.sql.Connection]; editor=[null]
    12:09:03,648 DEBUG [CachedIntrospectionResults] Found property 'defaultAutoCommit' of type [boolean]; editor=[null]
    12:09:03,648 DEBUG [CachedIntrospectionResults] Found property 'defaultCatalog' of type [class java.lang.String]; editor=[null]
    12:09:03,648 DEBUG [CachedIntrospectionResults] Found property 'defaultReadOnly' of type [boolean]; editor=[null]
    12:09:03,648 DEBUG [CachedIntrospectionResults] Found property 'defaultTransactionIsolation' of type [int]; editor=[null]
    12:09:03,648 DEBUG [CachedIntrospectionResults] Found property 'driverClassName' of type [class java.lang.String]; editor=[null]
    12:09:03,648 DEBUG [CachedIntrospectionResults] Found property 'initialSize' of type [int]; editor=[null]
    12:09:03,648 DEBUG [CachedIntrospectionResults] Found property 'logAbandoned' of type [boolean]; editor=[null]
    12:09:03,648 DEBUG [CachedIntrospectionResults] Found property 'logWriter' of type [class java.io.PrintWriter]; editor=[null]
    12:09:03,648 DEBUG [CachedIntrospectionResults] Found property 'loginTimeout' of type [int]; editor=[null]
    12:09:03,648 DEBUG [CachedIntrospectionResults] Found property 'maxActive' of type [int]; editor=[null]
    12:09:03,648 DEBUG [CachedIntrospectionResults] Found property 'maxIdle' of type [int]; editor=[null]
    12:09:03,648 DEBUG [CachedIntrospectionResults] Found property 'maxOpenPreparedStatements' of type [int]; editor=[null]
    12:09:03,648 DEBUG [CachedIntrospectionResults] Found property 'maxWait' of type [long]; editor=[null]
    12:09:03,648 DEBUG [CachedIntrospectionResults] Found property 'minEvictableIdleTimeMillis' of type [long]; editor=[null]
    12:09:03,648 DEBUG [CachedIntrospectionResults] Found property 'minIdle' of type [int]; editor=[null]
    12:09:03,648 DEBUG [CachedIntrospectionResults] Found property 'numActive' of type [int]; editor=[null]
    12:09:03,648 DEBUG [CachedIntrospectionResults] Found property 'numIdle' of type [int]; editor=[null]
    12:09:03,648 DEBUG [CachedIntrospectionResults] Found property 'numTestsPerEvictionRun' of type [int]; editor=[null]
    12:09:03,648 DEBUG [CachedIntrospectionResults] Found property 'password' of type [class java.lang.String]; editor=[null]
    12:09:03,648 DEBUG [CachedIntrospectionResults] Found property 'poolPreparedStatements' of type [boolean]; editor=[null]
    12:09:03,648 DEBUG [CachedIntrospectionResults] Found property 'removeAbandoned' of type [boolean]; editor=[null]
    12:09:03,648 DEBUG [CachedIntrospectionResults] Found property 'removeAbandonedTimeout' of type [int]; editor=[null]
    12:09:03,648 DEBUG [CachedIntrospectionResults] Found property 'testOnBorrow' of type [boolean]; editor=[null]
    12:09:03,648 DEBUG [CachedIntrospectionResults] Found property 'testOnReturn' of type [boolean]; editor=[null]
    12:09:03,664 DEBUG [CachedIntrospectionResults] Found property 'testWhileIdle' of type [boolean]; editor=[null]
    12:09:03,664 DEBUG [CachedIntrospectionResults] Found property 'timeBetweenEvictionRunsMillis' of type [long]; editor=[null]
    12:09:03,664 DEBUG [CachedIntrospectionResults] Found property 'url' of type [class java.lang.String]; editor=[null]
    12:09:03,664 DEBUG [CachedIntrospectionResults] Found property 'username' of type [class java.lang.String]; editor=[null]
    12:09:03,664 DEBUG [CachedIntrospectionResults] Found property 'validationQuery' of type [class java.lang.String]; editor=[null]
    12:09:03,664 DEBUG [CachedIntrospectionResults] Class [org.apache.commons.dbcp.BasicDataSource] is cache-safe
    12:09:03,664 INFO  [DefaultListableBeanFactory] Destroying singletons in factory {org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [x,ESNDataSource,ESNSessionFactory,transactionManager,commandDao,businessDataDao,viewDataDao,ESNTransactionManager,businessDataService,filterSettlsTrades,filterStandings,filterKontrahenten,filterStati,filterDataDao,filterDataDaoTarget,availStati]; Root of BeanFactory hierarchy}
    12:09:03,664 INFO  [DefaultListableBeanFactory] Destroying inner beans in factory {org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [x,ESNDataSource,ESNSessionFactory,transactionManager,commandDao,businessDataDao,viewDataDao,ESNTransactionManager,businessDataService,filterSettlsTrades,filterStandings,filterKontrahenten,filterStati,filterDataDao,filterDataDaoTarget,availStati]; Root of BeanFactory hierarchy}
    12:09:03,664 INFO  [DefaultListableBeanFactory] Destroying singletons in factory {org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [baag.boa.esn.dataAccess,baag.boa.esn.commands,baag.boa.esn]; Root of BeanFactory hierarchy}
    12:09:03,664 INFO  [DefaultListableBeanFactory] Destroying inner beans in factory {org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [baag.boa.esn.dataAccess,baag.boa.esn.commands,baag.boa.esn]; Root of BeanFactory hierarchy}
    org.springframework.beans.FatalBeanException: Unable to load group definition. Group resource name [classpath*:beanRefFactory.xml], factory key [baag.boa.esn]
    	at org.springframework.beans.factory.access.SingletonBeanFactoryLocator.createDefinition(SingletonBeanFactoryLocator.java:479)
    	at org.springframework.beans.factory.access.SingletonBeanFactoryLocator.useBeanFactory(SingletonBeanFactoryLocator.java:373)
    	at baag.boa.esn.server.workflowfwtest.SettlementGenerationTest.init(SettlementGenerationTest.java:89)
    	at baag.boa.esn.server.workflowfwtest.SettlementGenerationTest.main(SettlementGenerationTest.java:39)
    Exception in thread "main"
    Did we miss something important here?
    Does anybody have the same problem?

    Thanks in advance for any comments!
    Reinhard Braumandl

  2. #2
    Join Date
    Nov 2004
    Posts
    3

    Default

    So, to answer it myself (after looking at the source code of
    SingletonBeanFactoryLocator), a BeansException ist caught, but not used any
    further as nested exception to the FatalBeanException or for a log message.
    Reinhard Braumandl

  3. #3
    Join Date
    Aug 2004
    Location
    Toronto, Canada
    Posts
    736

    Default

    This code got refactored for 1.1.1 to work better in some appservers like Orion, and the nested error, which _was_ being attached before (1.1 and before), accidentally stopped being included.

    This was discovered and fixed about 3 weeks ago. You may use the CVS version, which should generally be quite safe, as we are ready to release 1.1.2 this weekend...
    Colin Sampaleanu
    SpringSource - http://www.springsource.com

Similar Threads

  1. Replies: 3
    Last Post: Oct 17th, 2005, 09:55 AM
  2. Replies: 4
    Last Post: Aug 11th, 2005, 07:32 AM
  3. Spring + Hibernate ORA-00936: missing expression
    By Hugh_la_Main in forum Data
    Replies: 1
    Last Post: Jun 28th, 2005, 08:48 AM
  4. Replies: 2
    Last Post: May 2nd, 2005, 05:01 PM
  5. Replies: 3
    Last Post: Mar 18th, 2005, 11:16 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •