Error using dom4j module in JBoss EAP 6

Solution Verified - Updated -

Issue

  • We are trying to use dom4j module available with JBoss EAP 6
  • We are getting the following exception for the following statement
Document doc ...
Element element ...
DocumentSource docSource = new DocumentSource(element);
  • Exception:
java.lang.IllegalAccessError: tried to access class org.dom4j.io.DocumentInputSource from class org.dom4j.io.DocumentSource
  • The same code is working if we bundle dom4j-1.6.1.jar in our application (this is not from <module name="org.dom4j" slot="main" /> )

Environment

JBoss Enterprise Application Platform (EAP) 6.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.