Skip to content

Instantly share code, notes, and snippets.

@nosrednawall
Last active March 11, 2019 18:34
Show Gist options
  • Select an option

  • Save nosrednawall/c23cddd1507fd7901ae361165350632e to your computer and use it in GitHub Desktop.

Select an option

Save nosrednawall/c23cddd1507fd7901ae361165350632e to your computer and use it in GitHub Desktop.
resolver erro hibernate-core error org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory
<!--
reference
https://stackoverflow.com/questions/35533847/wildfly-10-java-lang-classcastexception-org-dom4j-documentfactory-cannot-be-ca
-->
<!-- a lot of code above -->
<dependencies>
<!-- Devido a erro de dependencia -->
<dependency>
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
<version>1.6.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>5.4.1.Final</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>5.4.1.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.4.1.Final</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-ehcache</artifactId>
<version>5.4.1.Final</version>
<scope>provided</scope>
</dependency>
<!-- a lot of code below -->
</dependencies>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment