IllegalStateException: JBAS016071: Singleton not set for ModuleClassLoader for Module , How to use CDI with a thread pool

Solution Verified - Updated -

Issue

When using CDI injection in an application that launches its own threads sometimes the following exception is thrown

java.lang.IllegalStateException: JBAS016071: Singleton not set for ModuleClassLoader for Module

Environment

  • Enterprise Application Platform(EAP 6)

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.