KIM TIAGO BAPTISTA [
http://community.jboss.org/people/kimtiago] created the discussion
"AS7 and Dom4J"
To view the discussion, visit:
http://community.jboss.org/message/630474#630474
--------------------------------------------------------------
Hi,
I'm with serious problems with JBoss AS 7.0.2
In my project, I need to use Dom4J as dependency.
When i add Dom4J in my classpath, i receive this error:
{code}
19:00:24,181 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC00001: Failed
to start service jboss.persistenceunit."sgmj.
war#sgmj": org.jboss.msc.service.StartException in service
jboss.persistenceunit."sgmj.war#sgmj": Failed to start service
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1780)
[jboss-msc-1.0.1.GA.jar:
http://1.0.1.ga/ 1.0.1.GA]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
[:1.6.0_27]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
[:1.6.0_27]
at java.lang.Thread.run(Thread.java:662) [:1.6.0_27]
Caused by: java.lang.ClassCastException: org.dom4j.DocumentFactory cannot be cast to
org.dom4j.DocumentFactory
at org.dom4j.DocumentFactory.getInstance(DocumentFactory.java:97)
at org.dom4j.DocumentHelper.getDocumentFactory(DocumentHelper.java:36)
at org.dom4j.DocumentHelper.createDocument(DocumentHelper.java:41)
at
org.hibernate.envers.configuration.RevisionInfoConfiguration.generateDefaultRevisionInfoXmlMapping(RevisionInfoConfiguration.java:86)
at
org.hibernate.envers.configuration.RevisionInfoConfiguration.configure(RevisionInfoConfiguration.java:322)
at
org.hibernate.envers.configuration.AuditConfiguration.<init>(AuditConfiguration.java:94)
at
org.hibernate.envers.configuration.AuditConfiguration.getFor(AuditConfiguration.java:134)
at org.hibernate.envers.event.EnversIntegrator.integrate(EnversIntegrator.java:63)
at
org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:294)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1722)
at
org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:76)
at
org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:899)
at
org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:884)
at
org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:73)
at
org.jboss.as.jpa.service.PersistenceUnitService.createContainerEntityManagerFactory(PersistenceUnitService.java:143)
at
org.jboss.as.jpa.service.PersistenceUnitService.start(PersistenceUnitService.java:77)
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824)
[jboss-msc-1.0.1.GA.jar:
http://1.0.1.ga/ 1.0.1.GA]
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759)
[jboss-msc-1.0.1.GA.jar:
http://1.0.1.ga/ 1.0.1.GA]
... 3 more
{code}
When i remove, i receive this error:
{code}
19:11:50,616 AVISO [javax.enterprise.resource.
webcontainer.jsf.lifecycle] (http--127.0.0.1-8080-1) /teste.xhtml @21,85
listener="#{membroMjBean.buscaCep()}": java.lang.NoClassDefFoundError:
org/dom4j/DocumentException: javax.el.ELException: /teste.xhtml @21,85
listener="#{membroMjBean.buscaCep()}": java.lang.NoClassDefFoundError:
org/dom4j/DocumentException
at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:111)
[jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]
at
org.primefaces.component.behavior.ajax.AjaxBehavior.broadcast(AjaxBehavior.java:169)
[primefaces-3.0.M3.jar:]
at javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:760)
[jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794)
[jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259)
[jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
at
com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
[jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
[jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
[jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
[jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)
[jbossweb-7.0.1.Final.jar:7.0.2.Final]
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
[jbossweb-7.0.1.Final.jar:7.0.2.Final]
at
org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:67)
[weld-core-1.1.2.Final.jar:2011-07-26 15:02]
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
[jbossweb-7.0.1.Final.jar:7.0.2.Final]
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
[jbossweb-7.0.1.Final.jar:7.0.2.Final]
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
[jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
[jbossweb-7.0.1.Final.jar:7.0.2.Final]
at
org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:139)
[jboss-as-web-7.0.2.Final.jar:7.0.2.Final]
at org.jboss.as.web.NamingValve.invoke(NamingValve.java:57)
[jboss-as-web-7.0.2.Final.jar:7.0.2.Final]
at
org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:49)
[jboss-as-jpa-7.0.2.Final.jar:7.0.2.Final]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:154)
[jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
[jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
[jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362)
[jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
[jbossweb-7.0.1.Final.jar:7.0.2.Final]
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:667)
[jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:952)
[jbossweb-7.0.1.Final.jar:7.0.2.Final]
at java.lang.Thread.run(Thread.java:662) [:1.6.0_27]
Caused by: java.lang.NoClassDefFoundError: org/dom4j/DocumentException
at org.sistemasmj.sgmj.model.beans.MembroMjBean.buscaCep(MembroMjBean.java:44)
[classes:]
at
org.sistemasmj.sgmj.model.beans.MembroMjBean$Proxy$_$$_WeldClientProxy.buscaCep(MembroMjBean$Proxy$_$$_WeldClientProxy.java)
[classes:]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_27]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[:1.6.0_27]
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[:1.6.0_27]
at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_27]
at org.apache.el.parser.AstValue.invoke(AstValue.java:196)
[jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
[jbossweb-7.0.1.Final.jar:7.0.2.Final]
at
org.jboss.weld.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:43)
[weld-core-1.1.2.Final.jar:2011-07-26 15:02]
at org.jboss.weld.el.WeldMethodExpression.invoke(WeldMethodExpression.java:56)
[weld-core-1.1.2.Final.jar:2011-07-26 15:02]
at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
[jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]
... 26 more
Caused by: java.lang.ClassNotFoundException: org.dom4j.DocumentException from [Module
"deployment.sgmj.war:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:191)
at
org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:361)
at
org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:333)
at
org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:310)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:103)
... 37 more
{code}
I don't know what to do... I know AS7 has a module with Dom4J 1.6.1, the same version
I need.
If i put in classpath, AS7 don't like, if i remove, my application don't has
Dom4J.
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/630474#630474]
Start a new discussion in JBoss AS7 Development at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]