-
Bug
-
Resolution: Done
-
Minor
-
WFK 1.1.0
-
None
-
EWS-1.0.0 either Tomcat 5 or Tomcat6,
Spring 2.5.6.SEC01,
Sun JDK 1.6.0_17,
Seam 2.2.0.EAP5 (EAP-5.0.1-unsigned)
RHEL5
-
Release Notes
-
Workaround Exists
-
-
-
Documented as Known Issue
There is an example of Seam-Spring integration at
https://svn.devel.redhat.com/repos/jboss-qa/wfk/trunk/spring/seamspring.
This example uses a distribution of Seam to get dependencies. The build is working on EAP 5 and EWS 5, which both contain Seam distribution includes. On EWS, we used Seam packaged with EAP, however it failed to run after an successful deployment. Community version of Seam 2.2.x is working though.
Seam in the EAP is missing some libraries compared to the community version (slf4j-impl, different cglib), if they are replaced, it seams that Tomcat class loader is not able to load class definitions even if we used unsigned jars.
[java] 13:37:11,078 WARN [Contexts] Exception destroying context
[java] org.springframework.transaction.CannotCreateTransactionException: Could not open JPA EntityManager for transaction; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: Could not initialize class org.hibernate.ejb.Ejb3Configuration
[java] at org.springframework.orm.jpa.JpaTransactionManager.doBegin(JpaTransactionManager.java:375)
[java] at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:374)
[java] at org.jboss.seam.ioc.spring.SpringTransaction.begin(SpringTransaction.java:67)
[java] at org.jboss.seam.util.Work.workInTransaction(Work.java:58)
[java] at org.jboss.seam.contexts.Contexts.flushAndDestroyContexts(Contexts.java:350)
[java] at org.jboss.seam.contexts.FacesLifecycle.endRequest(FacesLifecycle.java:129)
[java] at org.jboss.seam.jsf.SeamPhaseListener.afterRenderResponse(SeamPhaseListener.java:514)
[java] at org.jboss.seam.jsf.SeamPhaseListener.afterServletPhase(SeamPhaseListener.java:249)
[java] at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:196)
[java] at com.sun.faces.lifecycle.Phase.handleAfterPhase(Phase.java:175)
[java] at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:114)
[java] at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
[java] at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
[java] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
[java] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
[java] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
[java] at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
[java] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
[java] at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
[java] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
[java] at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
[java] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
[java] at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
[java] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
[java] at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:206)
[java] at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
[java] at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)
[java] at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)
[java] at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
[java] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
[java] at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)
[java] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
[java] at org.jboss.seam.web.HotDeployFilter.doFilter(HotDeployFilter.java:53)
[java] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
[java] at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
[java] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
[java] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
[java] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
[java] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
[java] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
[java] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
[java] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
[java] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
[java] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
[java] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
[java] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
[java] at java.lang.Thread.run(Thread.java:619)
[java] Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: Could not initialize class org.hibernate.ejb.Ejb3Configuration
[java] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338)
[java] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
[java] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
[java] at java.security.AccessController.doPrivileged(Native Method)
[java] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
[java] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
[java] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
[java] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
[java] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
[java] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
[java] at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:880)
[java] at org.springframework.web.jsf.DelegatingVariableResolver.resolveSpringBean(DelegatingVariableResolver.java:138)
[java] at org.springframework.web.jsf.DelegatingVariableResolver.resolveVariable(DelegatingVariableResolver.java:111)
[java] at com.sun.faces.el.VariableResolverChainWrapper.getValue(VariableResolverChainWrapper.java:107)
[java] at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:54)
[java] at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:72)
[java] at org.jboss.el.parser.AstIdentifier.getValue(AstIdentifier.java:44)
[java] at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
[java] at org.jboss.seam.core.Expressions$1.getValue(Expressions.java:112)
[java] at org.jboss.seam.persistence.ManagedPersistenceContext.getEntityManagerFactoryFromJndiOrValueBinding(ManagedPersistenceContext.java:234)
[java] at org.jboss.seam.persistence.ManagedPersistenceContext.initEntityManager(ManagedPersistenceContext.java:78)
[java] at org.jboss.seam.persistence.ManagedPersistenceContext.getEntityManager(ManagedPersistenceContext.java:107)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[java] at java.lang.reflect.Method.invoke(Method.java:597)
[java] at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
[java] at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:144)
[java] at org.jboss.seam.Component.callComponentMethod(Component.java:2249)
[java] at org.jboss.seam.Component.unwrap(Component.java:2275)
[java] at org.jboss.seam.Component.getInstance(Component.java:2041)
[java] at org.jboss.seam.Component.getInstance(Component.java:1983)
[java] at org.jboss.seam.Component.getInstance(Component.java:1977)
[java] at org.jboss.seam.Component.getInstance(Component.java:1972)
[java] at org.jboss.seam.ioc.spring.SeamManagedEntityManagerFactory.createEntityManager(SeamManagedEntityManagerFactory.java:59)
[java] at org.springframework.orm.jpa.JpaTransactionManager.createEntityManagerForTransaction(JpaTransactionManager.java:392)
[java] at org.springframework.orm.jpa.JpaTransactionManager.doBegin(JpaTransactionManager.java:320)
[java] ... 46 more
[java] Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.hibernate.ejb.Ejb3Configuration
[java] at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:130)
[java] at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:224)
[java] at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:291)
[java] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369)
[java] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)
[java] ... 82 more