Wildfly 11 cast error with Dom4j

Asked

Viewed 505 times

0

Hello!

While trying to run my Java EE project, you are popping Exception "java.lang.Classcastexception: org.dom4j.Documentfactory cannot be cast to org.dom4j.Documentfactory" . Below is the Wildfly console:

JAVA_OPTS already set in environment; overriding default settings with values: -Xms128m -Xmx512m -server -Dhttp.nonProxyHosts=localhost,127.0.0.1,Arena -Xverify:none -agentlib:jdwp=transport=dt_socket,address=8787,server=y,suspend=n -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Djboss.management.http.port=9990 -Djboss.http.port=8080
=========================================================================
JBoss Bootstrap Environment

JBOSS_HOME: /usr/local/WildFly/wildfly-11.0.0.Final

JAVA: /usr/local/JDK/jdk1.8.0_151/bin/java

JAVA_OPTS:  -Xms128m -Xmx512m -server -Dhttp.nonProxyHosts=localhost,127.0.0.1,Arena -Xverify:none -agentlib:jdwp=transport=dt_socket,address=8787,server=y,suspend=n -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Djboss.management.http.port=9990 -Djboss.http.port=8080
=========================================================================

15:13:59,572 ERROR [stderr] (ServerService Thread Pool -- 71) Mon Feb 12       15:13:59 BRST 2018 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
15:14:00,082 WARN  [org.jboss.jca.core.connectionmanager.pool.strategy.OnePool] (ServerService Thread Pool -- 71) IJ000407: No lazy enlistment available for for_clinic_mysql_DS
15:14:00,339 INFO  [org.hibernate.dialect.Dialect] (ServerService Thread Pool -- 71) HHH000400: Using dialect: org.hibernate.dialect.MySQLDialect
15:14:00,453 INFO  [org.hibernate.envers.boot.internal.EnversServiceImpl] (ServerService Thread Pool -- 71) Envers integration enabled? : true
15:14:00,716 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 71) MSC000001: Failed to start service jboss.persistenceunit."for_clinic-web-1.0.0-SNAPSHOT.war#FOR_Clinic-PU": org.jboss.msc.service.StartException in service jboss.persistenceunit."for_clinic-web-1.0.0-SNAPSHOT.war#FOR_Clinic-PU": java.lang.ClassCastException: org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:195)
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:125)
at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:640)
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:209)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
at org.jboss.threads.JBossThread.run(JBossThread.java:320)
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.hibernate.internal.util.xml.XMLHelper$1.doWork(XMLHelper.java:33)
at org.hibernate.internal.util.xml.XMLHelper$1.doWork(XMLHelper.java:27)
at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.workWithClassLoader(ClassLoaderServiceImpl.java:358)
at org.hibernate.internal.util.xml.XMLHelper.<init>(XMLHelper.java:26)
at org.hibernate.envers.boot.internal.EnversServiceImpl.initialize(EnversServiceImpl.java:115)
at org.hibernate.envers.boot.internal.AdditionalJaxbMappingProducerImpl.produceAdditionalMappings(AdditionalJaxbMappingProducerImpl.java:99)
at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:288)
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:848)
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:875)
at org.jboss.as.jpa.hibernate5.TwoPhaseBootstrapImpl.build(TwoPhaseBootstrapImpl.java:44)
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:167)
... 7 more

15:14:00,727 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "for_clinic-web-1.0.0-SNAPSHOT.war")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.persistenceunit.\"for_clinic-web-1.0.0-SNAPSHOT.war#FOR_Clinic-PU\"" => "java.lang.ClassCastException: org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory
Caused by: java.lang.ClassCastException: org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory"}}
15:14:00,743 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 40) WFLYSRV0010: Deployed "for_clinic-web-1.0.0-SNAPSHOT.war" (runtime-name : "for_clinic-web-1.0.0-SNAPSHOT.war")
15:14:00,762 INFO  [org.jboss.as.controller] (Controller Boot Thread)    WFLYCTL0183: Service status report
WFLYCTL0186:   Services which failed to start:      service jboss.persistenceunit."for_clinic-web-1.0.0-SNAPSHOT.war#FOR_Clinic-PU": java.lang.ClassCastException: org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory

15:14:00,865 INFO  [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0212: Resuming server
15:14:00,868 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9990/management
15:14:00,868 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9990
15:14:00,868 ERROR [org.jboss.as] (Controller Boot Thread) WFLYSRV0026: WildFly Full 11.0.0.Final (WildFly Core 3.0.8.Final) started (with errors) in 27074ms - Started 523 of 788 services (38 services failed or missing dependencies, 370 services are lazy, passive or on-demand)
15:14:04,470 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 4) WFLYCTL0013: Operation ("read-attribute") failed - address: ([
("deployment" => "for_clinic-web-1.0.0-SNAPSHOT.war"),
("subsystem" => "ejb3"),
("stateless-session-bean" => "usuarioDAO")
]) - failure description: "WFLYEJB0370: EJB component for address [
(\"deployment\" => \"for_clinic-web-1.0.0-SNAPSHOT.war\"),
(\"subsystem\" => \"ejb3\"),
(\"stateless-session-bean\" => \"usuarioDAO\")
] is in state DOWN, must be in state UP"

15:14:05,862 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-3) WFLYJCA0019: Stopped Driver service with driver-name = for_clinic-web-1.0.0-SNAPSHOT.war_com.mysql.cj.jdbc.Driver_6_0
15:14:05,864 INFO  [org.jboss.as.jpa] (ServerService Thread Pool -- 3) WFLYJPA0011: Stopping Persistence Unit (phase 1 of 2) Service 'for_clinic-web-1.0.0-SNAPSHOT.war#FOR_Clinic-PU'
15:14:05,932 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-7) WFLYSRV0028: Stopped deployment for_clinic-web-1.0.0-SNAPSHOT.war (runtime-name: for_clinic-web-1.0.0-SNAPSHOT.war) in 80ms
15:14:05,934 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-5) WFLYSRV0027: Starting deployment of "for_clinic-web-1.0.0-SNAPSHOT.war" (runtime-name: "for_clinic-web-1.0.0-SNAPSHOT.war")
15:14:07,325 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-7) WFLYSRV0059: Class Path entry activation.jar in /usr/local/WildFly/wildfly-11.0.0.Final/standalone/deployments/for_clinic-web-1.0.0-SNAPSHOT.war/WEB-INF/lib/mail-1.4.jar  does not point to a valid jar for a Class-Path reference.
15:14:07,503 INFO  [org.jboss.as.jpa] (MSC service thread 1-1) WFLYJPA0002: Read persistence.xml for FOR_Clinic-PU
15:14:07,638 INFO  [org.jboss.as.jpa] (ServerService Thread Pool -- 3) WFLYJPA0010: Starting Persistence Unit (phase 1 of 2) Service 'for_clinic-web-1.0.0-SNAPSHOT.war#FOR_Clinic-PU'
15:14:07,704 INFO  [org.jboss.weld.deployer] (MSC service thread 1-7) WFLYWELD0003: Processing weld deployment for_clinic-web-1.0.0-SNAPSHOT.war
15:14:07,713 INFO  [org.jboss.as.ejb3.deployment] (MSC service thread 1-7) WFLYEJB0473: JNDI bindings for session bean named 'usuarioService' in deployment unit 'deployment "for_clinic-web-1.0.0-SNAPSHOT.war"' are as follows:

    java:global/for_clinic-web-1.0.0-SNAPSHOT/usuarioService!br.com.for_systems.for_clinic_ejb.service.facade.UsuarioFacade
    java:app/for_clinic-web-1.0.0-SNAPSHOT/usuarioService!br.com.for_systems.for_clinic_ejb.service.facade.UsuarioFacade
    java:module/usuarioService!br.com.for_systems.for_clinic_ejb.service.facade.UsuarioFacade
    java:global/for_clinic-web-1.0.0-SNAPSHOT/usuarioService
    java:app/for_clinic-web-1.0.0-SNAPSHOT/usuarioService
    java:module/usuarioService

15:14:07,713 INFO  [org.jboss.as.ejb3.deployment] (MSC service thread 1-7) WFLYEJB0473: JNDI bindings for session bean named 'pacienteDAO' in deployment unit 'deployment "for_clinic-web-1.0.0-SNAPSHOT.war"' are as follows:

    java:global/for_clinic-web-1.0.0-SNAPSHOT/pacienteDAO!br.com.for_systems.for_clinic_domain.persistence.repository.PacienteRepository
    java:app/for_clinic-web-1.0.0-SNAPSHOT/pacienteDAO!br.com.for_systems.for_clinic_domain.persistence.repository.PacienteRepository
    java:module/pacienteDAO!br.com.for_systems.for_clinic_domain.persistence.repository.PacienteRepository
    java:global/for_clinic-web-1.0.0-SNAPSHOT/pacienteDAO
    java:app/for_clinic-web-1.0.0-SNAPSHOT/pacienteDAO
    java:module/pacienteDAO

15:14:07,713 INFO  [org.jboss.as.ejb3.deployment] (MSC service thread 1-7) WFLYEJB0473: JNDI bindings for session bean named 'pacienteBusiness' in deployment unit 'deployment "for_clinic-web-1.0.0-SNAPSHOT.war"' are as follows:

    java:global/for_clinic-web-1.0.0-SNAPSHOT/pacienteBusiness!br.com.for_systems.for_clinic_ejb.business.PacienteBO
    java:app/for_clinic-web-1.0.0-SNAPSHOT/pacienteBusiness!br.com.for_systems.for_clinic_ejb.business.PacienteBO
    java:module/pacienteBusiness!br.com.for_systems.for_clinic_ejb.business.PacienteBO
    java:global/for_clinic-web-1.0.0-SNAPSHOT/pacienteBusiness
    java:app/for_clinic-web-1.0.0-SNAPSHOT/pacienteBusiness
    java:module/pacienteBusiness

15:14:07,713 INFO  [org.jboss.as.ejb3.deployment] (MSC service thread 1-7) WFLYEJB0473: JNDI bindings for session bean named 'pacienteService' in deployment unit 'deployment "for_clinic-web-1.0.0-SNAPSHOT.war"' are as follows:

java:global/for_clinic-web-1.0.0-SNAPSHOT/pacienteService!br.com.for_systems.for_clinic_ejb.service.facade.PacienteFacade
java:app/for_clinic-web-1.0.0-SNAPSHOT/pacienteService!br.com.for_systems.for_clinic_ejb.service.facade.PacienteFacade
java:module/pacienteService!br.com.for_systems.for_clinic_ejb.service.facade.PacienteFacade
    java:global/for_clinic-web-1.0.0-SNAPSHOT/pacienteService
    java:app/for_clinic-web-1.0.0-SNAPSHOT/pacienteService
    java:module/pacienteService

15:14:07,713 INFO  [org.jboss.as.ejb3.deployment] (MSC service thread 1-7) WFLYEJB0473: JNDI bindings for session bean named 'usuarioDAO' in deployment unit 'deployment "for_clinic-web-1.0.0-SNAPSHOT.war"' are as follows:

    java:global/for_clinic-web-1.0.0-SNAPSHOT/usuarioDAO!br.com.for_systems.for_clinic_domain.persistence.repository.UsuarioRepository
    java:app/for_clinic-web-1.0.0-SNAPSHOT/usuarioDAO!br.com.for_systems.for_clinic_domain.persistence.repository.UsuarioRepository
java:module/usuarioDAO!br.com.for_systems.for_clinic_domain.persistence.repository.UsuarioRepository
    java:global/for_clinic-web-1.0.0-SNAPSHOT/usuarioDAO
    java:app/for_clinic-web-1.0.0-SNAPSHOT/usuarioDAO
    java:module/usuarioDAO

15:14:07,947 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-7) WFLYJCA0005: Deploying non-JDBC-compliant driver class com.mysql.cj.jdbc.Driver (version 6.0)
15:14:07,966 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-1) WFLYJCA0018: Started Driver service with driver-name = for_clinic-web-1.0.0-SNAPSHOT.war_com.mysql.cj.jdbc.Driver_6_0
15:14:08,008 INFO  [org.jboss.as.jpa] (ServerService Thread Pool -- 3) WFLYJPA0010: Starting Persistence Unit (phase 2 of 2) Service 'for_clinic-web-1.0.0-SNAPSHOT.war#FOR_Clinic-PU'
15:14:08,013 INFO  [org.hibernate.dialect.Dialect] (ServerService Thread Pool -- 3) HHH000400: Using dialect: org.hibernate.dialect.MySQLDialect
15:14:08,027 INFO  [org.hibernate.envers.boot.internal.EnversServiceImpl] (ServerService Thread Pool -- 3) Envers integration enabled? : true
15:14:08,065 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 3) MSC000001: Failed to start service jboss.persistenceunit."for_clinic-web-1.0.0-SNAPSHOT.war#FOR_Clinic-PU": org.jboss.msc.service.StartException in service jboss.persistenceunit."for_clinic-web-1.0.0-SNAPSHOT.war#FOR_Clinic-PU": java.lang.ClassCastException: org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory
    at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:195)
    at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:125)
    at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:640)
    at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:209)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
    at org.jboss.threads.JBossThread.run(JBossThread.java:320)
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.hibernate.internal.util.xml.XMLHelper$1.doWork(XMLHelper.java:33)
    at org.hibernate.internal.util.xml.XMLHelper$1.doWork(XMLHelper.java:27)
    at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.workWithClassLoader(ClassLoaderServiceImpl.java:358)
    at org.hibernate.internal.util.xml.XMLHelper.<init>(XMLHelper.java:26)
    at org.hibernate.envers.boot.internal.EnversServiceImpl.initialize(EnversServiceImpl.java:115)
    at org.hibernate.envers.boot.internal.AdditionalJaxbMappingProducerImpl.produceAdditionalMappings(AdditionalJaxbMappingProducerImpl.java:99)
    at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:288)
    at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:848)
    at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:875)
    at org.jboss.as.jpa.hibernate5.TwoPhaseBootstrapImpl.build(TwoPhaseBootstrapImpl.java:44)
    at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:167)
... 7 more

15:14:08,070 ERROR [org.jboss.as.controller.management-operation] (DeploymentScanner-threads - 1) WFLYCTL0013: Operation ("full-replace-deployment") failed - address: ([]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.persistenceunit.\"for_clinic-web-1.0.0-SNAPSHOT.war#FOR_Clinic-PU\"" => "java.lang.ClassCastException: org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory
    Caused by: java.lang.ClassCastException: org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory"}}
15:14:08,172 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 1) WFLYSRV0016: Replaced deployment "for_clinic-web-1.0.0-SNAPSHOT.war" with deployment "for_clinic-web-1.0.0-SNAPSHOT.war"
15:14:08,172 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 1) WFLYCTL0183: Service status report
WFLYCTL0186:   Services which failed to start:      service jboss.persistenceunit."for_clinic-web-1.0.0-SNAPSHOT.war#FOR_Clinic-PU": java.lang.ClassCastException: org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory

15:14:17,487 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 3) WFLYCTL0013: Operation ("read-attribute") failed - address: ([
    ("deployment" => "for_clinic-web-1.0.0-SNAPSHOT.war"),
    ("subsystem" => "ejb3"),
    ("stateless-session-bean" => "usuarioDAO")
]) - failure description: "WFLYEJB0370: EJB component for address [
    (\"deployment\" => \"for_clinic-web-1.0.0-SNAPSHOT.war\"),
    (\"subsystem\" => \"ejb3\"),
    (\"stateless-session-bean\" => \"usuarioDAO\")
] is in 

state down, must be in state up"

I have no idea what that could be. Has anyone ever faced that? Thank you!

2 answers

0


I’ve been through this error add the scope to your dependências and the problem will be solved!

<dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-core</artifactId>
        <version>5.1.0.Final</version>
        <scope>provided</scope>
    </dependency>

    <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-validator</artifactId>
        <version>5.2.4.Final</version>
        <scope>provided</scope>
    </dependency>

    <!-- for JPA, use hibernate-entitymanager instead of hibernate-core -->
    <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-entitymanager</artifactId>
        <version>5.1.0.Final</version>
        <scope>provided</scope>
    </dependency>

    <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-ehcache</artifactId>
        <version>5.1.0.Final</version>
        <scope>provided</scope>
    </dependency>

https://stackoverflow.com/questions/35533847/wildfly-10-java-lang-classcastexception-org-dom4j-documentfactory-cannot-be-ca

  • Hello @LR10 . I am now receiving a Nullpointerexception, after putting as provided the scope of the Hibernate dependencies. Below posted the console log.

  • you are using CDI ?

  • Hello, friend! Your previous solution worked. I cleared the Wildfly and Maven folder cache and it worked. Thanks!

  • value, what a wonder.

0

After making the changes suggested by @LR10, I am receiving a Nullpointerexception, as below:

"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"for_clinic-web-1.0.0-SNAPSHOT.war\".WeldStartService" => "Failed to start service
Caused by: org.jboss.weld.exceptions.DefinitionException: Exception List with 1 exceptions:
Exception 0 :
java.lang.NullPointerException
    at sun.reflect.annotation.TypeAnnotationParser.mapTypeAnnotations(TypeAnnotationParser.java:356)
    at sun.reflect.annotation.AnnotatedTypeFactory$AnnotatedTypeBaseImpl.<init>(AnnotatedTypeFactory.java:139)
    at sun.reflect.annotation.AnnotatedTypeFactory.buildAnnotatedType(AnnotatedTypeFactory.java:65)
    at sun.reflect.annotation.TypeAnnotationParser.buildAnnotatedType(TypeAnnotationParser.java:79)
    at java.lang.reflect.Field.getAnnotatedType(Field.java:1170)
    at org.hibernate.validator.internal.metadata.provider.TypeAnnotationAwareMetaDataProvider.findTypeAnnotationConstraintsForMember(TypeAnnotationAwareMetaDataProvider.java:65)
    at org.hibernate.validator.internal.metadata.provider.AnnotationMetaDataProvider.findPropertyMetaData(AnnotationMetaDataProvider.java:244)
    at org.hibernate.validator.internal.metadata.provider.AnnotationMetaDataProvider.getFieldMetaData(AnnotationMetaDataProvider.java:227)
    at org.hibernate.validator.internal.metadata.provider.AnnotationMetaDataProvider.retrieveBeanConfiguration(AnnotationMetaDataProvider.java:137)
    at org.hibernate.validator.internal.metadata.provider.AnnotationMetaDataProvider.getBeanConfiguration(AnnotationMetaDataProvider.java:125)
    at org.hibernate.validator.internal.metadata.provider.AnnotationMetaDataProvider.getBeanConfigurationForHierarchy(AnnotationMetaDataProvider.java:108)
    at org.hibernate.validator.internal.metadata.BeanMetaDataManager.createBeanMetaData(BeanMetaDataManager.java:203)
    at org.hibernate.validator.internal.metadata.BeanMetaDataManager.getOrCreateBeanMetaData(BeanMetaDataManager.java:231)
    at org.hibernate.validator.internal.metadata.BeanMetaDataManager.getBeanMetaData(BeanMetaDataManager.java:178)
    at org.hibernate.validator.internal.engine.ValidatorImpl.getConstraintsForClass(ValidatorImpl.java:326)
    at org.hibernate.validator.internal.cdi.ValidationExtension.determineConstrainedCallables(ValidationExtension.java:241)
    at org.hibernate.validator.internal.cdi.ValidationExtension.processAnnotatedType(ValidationExtension.java:228)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:88)
    at org.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:78)
    at org.jboss.weld.injection.MethodInvocationStrategy$SimpleMethodInvocationStrategy.invoke(MethodInvocationStrategy.java:129)
    at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:299)
    at org.jboss.weld.event.ExtensionObserverMethodImpl.sendEvent(ExtensionObserverMethodImpl.java:124)
    at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:277)
    at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:255)
    at org.jboss.weld.bootstrap.events.ContainerLifecycleEvents.fireProcessAnnotatedType(ContainerLifecycleEvents.java:197)
    at org.jboss.weld.bootstrap.events.ContainerLifecycleEvents.fireProcessAnnotatedType(ContainerLifecycleEvents.java:169)
    at org.jboss.weld.bootstrap.BeanDeployer.processAnnotatedTypes(BeanDeployer.java:156)
    at org.jboss.weld.bootstrap.BeanDeployment.createTypes(BeanDeployment.java:245)
    at org.jboss.weld.bootstrap.WeldStartup.startInitialization(WeldStartup.java:407)
    at org.jboss.weld.bootstrap.WeldBootstrap.startInitialization(WeldBootstrap.java:76)
    at org.jboss.as.weld.WeldStartService.start(WeldStartService.java:94)
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:2032)
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1955)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)

"}

  • The solution indicated by @LR10 previously worked. After I cleared the Wildfly and Maven cache, the problem is gone. Actually putting as provided the scope of Hibernate dependencies already works. Searching, I saw that this occurs because Wildfly already implements Hibernate implicitly.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.