How to create custom Modules in JBoss EAP 6

Solution Verified - Updated -

Issue

  • While running my EJB JAR or WAR application which is deployed on JBoss EAP 6, we get the following exception:

    java.lang.NoClassDefFoundError: Could not initialize class net.sf.json.JsonConfig
    
  • Is it possible to create a custom module containing the JAR which contains the above inside a JBoss custom module and then it could be made available to the MDB/EJBs deployed on EAP 6.

  • How can I pack a external jar as JBoss module?
  • How can I configure JBoss to load shared libraries from a shared location?
  • What is the best practice concerning 3rd party libraries in EAP 6?

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6
    • 7

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.