Loading jar on startup using loadClass fails in EAP 5 but works in EAP 4

Solution Unverified - Updated -

Issue

We have an application which currently works in EAP 4.3.0 , but on upgrading to JBoss EAP 5 we are getting an error which is causing a jar to fail loading on startup.
We get the following error on startup;

FATAL [com.example.data.ContextLoaderListener] Failed to initialise application.
java.lang.NullPointerException
        at com.example.data.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:210)

The web application is a WAR file and on startup this is calling the following line

Class dataClazz = parentLoader.loadClass("com.example.Data");
The application is a standard WAR file and is calling the class com.example.Data which is loaded within the lib folder of JBoss as an external jar file to the application.

Environment

  • JBoss Enterprise Application Platform (EAP) 5.1.2
  • Migrating from EAP 4.3.0 to EAP 5.1.2

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content