Well, the problem occurs post successful entity manager creation. Initially
all the beans are checked for the entity manager, then initialization
starts. In the case I used, Hibernate Search initialization fails because of
directory read/write permissions. 

This is the root error that occurs

Caused by: org.hibernate.search.SearchException: Unable to create index
directory: h:\java\projects\indexDir\nl.myproject.model.Offer for index
nl.myproject.model.Offer
        at
org.hibernate.search.store.DirectoryProviderHelper.makeSanityCheckedDirectory(DirectoryProviderHelper.java:252)
        at
org.hibernate.search.store.DirectoryProviderHelper.getVerifiedIndexDir(DirectoryProviderHelper.java:236)
        at
org.hibernate.search.store.FSDirectoryProvider.initialize(FSDirectoryProvider.java:62)
        at
org.hibernate.search.store.DirectoryProviderFactory.createDirectoryProvider(DirectoryProviderFactory.java:166)
        ... 138 more


However, when jaxrs:server/cxf is included in the configuration, this is the
error that "occurs" which is caused by the root error. The error report does
indicate the area where it went wrong (search) but not the actual root
error, which is completely lost.


SEVERE: Exception sending context initialized event to listener instance of
class nl.myproject.webapp.MSA
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'org.apache.cxf.transport.servlet.ServletTransportFactory' defined
in class path resource [META-INF/cxf/cxf-servlet.xml]: Error setting
property values; nested exception is
org.springframework.beans.PropertyBatchUpdateException; nested
PropertyAccessExceptions (2) are:
PropertyAccessException 1:
org.springframework.beans.MethodInvocationException: Property 'bus' threw
exception; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'org.springframework.scheduling.quartz.SchedulerFactoryBean#0'
defined in class path resource [applicationContext-schedule.xml]: Cannot
resolve reference to bean 'facetReloadTrigger' while setting bean property
'triggers' with key [0]; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'facetReloadTrigger' defined in class path resource
[applicationContext-schedule.xml]: Cannot resolve reference to bean
'facetReloadJob' while setting bean property 'jobDetail'; nested exception
is org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'facetReloadJob' defined in class path resource
[applicationContext-schedule.xml]: Cannot resolve reference to bean
'searchManager' while setting bean property 'targetObject'; nested exception
is org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'searchManager': Injection of autowired dependencies failed;
nested exception is org.springframework.beans.factory.BeanCreationException:
Could not autowire method: public void
nl.myproject.service.impl.SearchManagerImpl.setSearchDao(nl.myproject.dao.SearchDao);
nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'searchDao' defined in class path resource
[applicationContext-dao.xml]: Cannot resolve reference to bean
'sessionFactory' while setting constructor argument; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'sessionFactory' defined in URL
[file:/H:/java/projects/mercados3/core/target/classes/applicationContext.xml]:
Invocation of init method failed; nested exception is
org.hibernate.HibernateException: could not init listeners
PropertyAccessException 2:
org.springframework.beans.MethodInvocationException: Property 'transportIds'
threw exception; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'org.springframework.scheduling.quartz.SchedulerFactoryBean#0'
defined in class path resource [applicationContext-schedule.xml]: Cannot
resolve reference to bean 'facetReloadTrigger' while setting bean property
'triggers' with key [0]; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'facetReloadTrigger' defined in class path resource
[applicationContext-schedule.xml]: Cannot resolve reference to bean
'facetReloadJob' while setting bean property 'jobDetail'; nested exception
is org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'facetReloadJob' defined in class path resource
[applicationContext-schedule.xml]: Cannot resolve reference to bean
'searchManager' while setting bean property 'targetObject'; nested exception
is org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'searchManager': Injection of autowired dependencies failed;
nested exception is org.springframework.beans.factory.BeanCreationException:
Could not autowire method: public void
nl.myproject.service.impl.SearchManagerImpl.setSearchDao(nl.myproject.dao.SearchDao);
nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'searchDao' defined in class path resource
[applicationContext-dao.xml]: Cannot resolve reference to bean
'sessionFactory' while setting constructor argument; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'sessionFactory' defined in URL
[file:/H:/java/projects/mercados3/core/target/classes/applicationContext.xml]:
Invocation of init method failed; nested exception is
org.hibernate.HibernateException: could not init listeners
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1361)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1086)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
        at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
        at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
        at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
        at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
        at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)
        at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)


I am not sure where the fault lies exactly but it seems a spring thing, so
I'll report it there.


-- 
View this message in context: 
http://cxf.547215.n5.nabble.com/CXF-not-shutting-down-properly-and-eating-real-error-messages-tp3338081p3339575.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to