Getting java.lang.NoClassDefFoundError for javax/xml/transform package classes in EAP 6

Solution Verified - Updated -

Issue

  • We have a jar file which is globally available as a global module in EAP 6 in which we have a module.xml and corresponding jar in $JBOSS-HOME/modules/com.../main. The jar depends on javax.xml package classes all available in rt.jar (eg. in jdk.1.7.0_75).
    Therefore we have not declared any explicit dependencies on these javax.xml package classes, but we getting the following errors like:
Caused by: java.lang.NoClassDefFoundError: javax/xml/transform/Source
  • We are able to circumvent that by adding stuff like:
<dependencies>
        <system export="true">
            <paths>
                <path name="javax/xml/transform"/>
            </paths>
        </system>
    </dependencies>
  • It is somewhat strange that it should be necessary to declare dependencies on standard jdk classes. Are we doing something wrong, or is this really required to specify these dependencies?

Environment

  • Red Hat JBoss Fuse Service Works (FSW)
    • 6.0.0
  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.x

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.