Hi all,
I'm new to appFuse 2.x and I'm in trouble with the tutorial example from 
http://appfuse.org/display/APF/Using+Hibernate here .
I'm following the dao test compiling process carefully (I think... ;-)) but
still receive an error from spring like this:

Running org.obiwan.medweb.dao.PersonDaoTest
 INFO [main] PersonDaoTest.loadContextLocations(177) | Loading context for
locations: classpath*:/applicationContext-res
ources.xml,classpath*:/applicationContext-dao.xml,classpath*:/applicationContext.xml,classpath:**/applicationContext*.xml
AbandonedObjectPool is used
([EMAIL PROTECTED])
   LogAbandoned: false
   RemoveAbandoned: true
   RemoveAbandonedTimeout: 60
Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 3.766 sec
<<< FAILURE!

Results :
Tests run: 2, Failures: 0, Errors: 2, Skipped: 0

 ERROR [Thread-3] DisposableBeanAdapter.destroy(148) | Couldn't invoke
destroy method of bean with name 'sessionFactory'

java.lang.IllegalStateException: Shutdown in progress
        at java.lang.Shutdown.remove(Shutdown.java:104)
        at java.lang.Runtime.removeShutdownHook(Runtime.java:218)
        at
net.sf.ehcache.CacheManager.removeShutdownHook(CacheManager.java:524)
        at net.sf.ehcache.CacheManager.shutdown(CacheManager.java:711)
        at
org.hibernate.cache.EhCacheProvider.stop(EhCacheProvider.java:158)
        at
org.hibernate.impl.SessionFactoryImpl.close(SessionFactoryImpl.java:798)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at
org.springframework.orm.hibernate3.AbstractSessionFactoryBean$TransactionAwareInvocationHandler.invoke(AbstractSessionFac
toryBean.java:313)
        at $Proxy16.close(Unknown Source)
        at
org.springframework.orm.hibernate3.AbstractSessionFactoryBean.destroy(AbstractSessionFactoryBean.java:193)
        at
org.springframework.orm.hibernate3.LocalSessionFactoryBean.destroy(LocalSessionFactoryBean.java:854)
        at
org.springframework.beans.factory.support.DisposableBeanAdapter.destroy(DisposableBeanAdapter.java:145)
        at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBean(DefaultSingletonBeanRegistry.java:335)

        at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingleton(DefaultSingletonBeanRegistry.java
:308)
        at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons(DefaultSingletonBeanRegistry.jav
a:282)
        at
org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:656)
        at
org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:634)
        at
org.springframework.context.support.AbstractApplicationContext$1.run(AbstractApplicationContext.java:571)
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] There are test failures.
[INFO]
------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 18 seconds
[INFO] Finished at: Wed Mar 21 22:51:22 CET 2007
[INFO] Final Memory: 15M/27M
[INFO]
------------------------------------------------------------------------


but it'weird...I couldn't find no 'sessionFactory' bean declaration in my
applicationContext*.xml files (apart other beans references)  then I thought
that some appfuse dependency jar had it embeddeded...and if so why has
Spring failed to invoke destroy method ? 
Anyone could help?
Cheers
Daniele
-- 
View this message in context: 
http://www.nabble.com/PersonDaoTest-won%27t-compile-tf3444199s2369.html#a9604665
Sent from the AppFuse - User mailing list archive at Nabble.com.

Reply via email to