Ok, yes, well it's kind of a test to see if I can make it work to get past
some other issues. I don't expect any real support. Is it possible that
Appfuse itself reinitializes the sessionFactory, since the appFuse
entityPersisters are present in both cases and my own
entityPersisters/entities only in one.
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'handlerMapping' defined in ServletContext resource
[/WEB-INF/xfire-servlet.xml]: Initialization of bean failed; nested
exception is org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'dataPrepManager' defined in file
[D:\Java\project\core\target\classes\nl\project\service\impl\DataPrepManagerImpl.class]:
Instantiation of bean failed; nested exception is
org.springframework.beans.BeanInstantiationException: Could not instantiate
bean class [nl.project.service.impl.DataPrepManagerImpl]: Constructor threw
exception; nested exception is
org.springframework.orm.hibernate3.HibernateSystemException: Unknown entity:
nl.project.model.Language; nested exception is
org.hibernate.MappingException: Unknown entity: nl.project.model.Language
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:480)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
at
org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
at
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
at
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
at
org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:627)
at
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1217)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:293)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at
org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1337)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590)
at java.lang.Thread.run(Thread.java:619)
Caused by: org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'dataPrepManager' defined in file
[D:\Java\project\core\target\classes\nl\project\service\impl\DataPrepManagerImpl.class]:
Instantiation of bean failed; nested exception is
org.springframework.beans.BeanInstantiationException: Could not instantiate
bean class [nl.project.service.impl.DataPrepManagerImpl]: Constructor threw
exception; nested exception is
org.springframework.orm.hibernate3.HibernateSystemException: Unknown entity:
nl.project.model.Language; nested exception is
org.hibernate.MappingException: Unknown entity: nl.project.model.Language
at
org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:254)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:925)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:835)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at
org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:880)
at
org.codehaus.xfire.spring.remoting.Jsr181HandlerMapping.processBeans(Jsr181HandlerMapping.java:114)
at
org.codehaus.xfire.spring.remoting.Jsr181HandlerMapping.initApplicationContext(Jsr181HandlerMapping.java:65)
at
org.springframework.context.support.ApplicationObjectSupport.initApplicationContext(ApplicationObjectSupport.java:119)
at
org.springframework.web.context.support.WebApplicationObjectSupport.initApplicationContext(WebApplicationObjectSupport.java:69)
at
org.springframework.context.support.ApplicationObjectSupport.setApplicationContext(ApplicationObjectSupport.java:73)
at
org.springframework.context.support.ApplicationContextAwareProcessor.postProcessBeforeInitialization(ApplicationContextAwareProcessor.java:70)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:350)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1331)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
... 30 more
Caused by: org.springframework.beans.BeanInstantiationException: Could not
instantiate bean class [nl.project.service.impl.DataPrepManagerImpl]:
Constructor threw exception; nested exception is
org.springframework.orm.hibernate3.HibernateSystemException: Unknown entity:
nl.project.model.Language; nested exception is
org.hibernate.MappingException: Unknown entity: nl.project.model.Language
at
org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:115)
at
org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:87)
at
org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:248)
... 51 more
Caused by: org.springframework.orm.hibernate3.HibernateSystemException:
Unknown entity: nl.project.model.Language; nested exception is
org.hibernate.MappingException: Unknown entity: nl.project.model.Language
at
org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:676)
at
org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:412)
at
org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:424)
at
org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374)
at
org.springframework.orm.hibernate3.HibernateTemplate.merge(HibernateTemplate.java:824)
at
org.appfuse.dao.hibernate.GenericDaoHibernate.save(GenericDaoHibernate.java:128)
at
nl.project.service.impl.DataPrepManagerImpl.prepareCountries(DataPrepManagerImpl.java:183)
at
nl.project.service.impl.DataPrepManagerImpl.prepareAdmin(DataPrepManagerImpl.java:312)
at
nl.project.service.impl.DataPrepManagerImpl.<init>(DataPrepManagerImpl.java:79)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at
org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:100)
... 53 more
Caused by: org.hibernate.MappingException: Unknown entity:
nl.project.model.Language
at
org.hibernate.impl.SessionFactoryImpl.getEntityPersister(SessionFactoryImpl.java:580)
at
org.hibernate.impl.SessionImpl.getEntityPersister(SessionImpl.java:1365)
at
org.hibernate.event.def.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:144)
at
org.hibernate.event.def.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:81)
at org.hibernate.impl.SessionImpl.fireMerge(SessionImpl.java:704)
at org.hibernate.impl.SessionImpl.merge(SessionImpl.java:688)
at org.hibernate.impl.SessionImpl.merge(SessionImpl.java:692)
at
org.springframework.orm.hibernate3.HibernateTemplate$23.doInHibernate(HibernateTemplate.java:827)
at
org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:419)
... 64 more
Cheers,
Marc
mraible wrote:
>
> I wouldn't recommend using AppFuse 2.1-SNAPSHOT. It's still very much in
> an
> alpha state. That being said, posting your error message might help.
>
> Matt
>
> On Sat, Dec 13, 2008 at 11:50 AM, mschipperheyn
> <[email protected]>wrote:
>
>>
>> Hi,
>>
>> I've been trying to get my project and Appfuse running with
>> Hibernate 3.3.1
>> Hibernate EntityManager 3.4.0
>> Hibernate Search 3.1.0
>> Spring 2.5.6
>> Appfuse 2.1-snapshot
>>
>> I'm running into a strange problem where my sessionfactory gets
>> reinitialized halfway through Tomcat start up. It goes something like
>> this:
>> * sessionFactory: appfuse adds User and Role
>> * sessionFactory: myproject adds lots of other Entities
>> * sessionFactory: something reinitializes sessionFactory, adds User and
>> Role
>> again but not my Entities
>> * entityPersister: first line my app tries to save something throws
>> entityPersist error because it cant find Entity
>>
>> Any idea why this might happen?
>>
>> Cheers,
>>
>> Marc
>>
>> --
>> View this message in context:
>> http://www.nabble.com/SessionFactory-gets-reinitialized-and-lost-tp20993182s2369p20993182.html
>> Sent from the AppFuse - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
>
>
--
View this message in context:
http://www.nabble.com/SessionFactory-gets-reinitialized-and-lost-tp20993182s2369p21000517.html
Sent from the AppFuse - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]