How to access default scoped method of one jar from another jar in EAP 6?

Solution Verified - Updated -

Issue

  • There are 2 EJB module in an EAR. In one module, there is a class ejb.one.TestPojo.java with a method void helloWorld(String str){} and in the second module, there is a class ejb.one.Pojo.java, which will invoke a TestPojo.helloWorld(String) and the <ear-subdeployments-isolated> attribute of the EAR is already set to false. But still JBoss is throwing the following ERROR from the class ejb.one.Pojo.java while accessing the method helloWorld(String) of class ejb.one.TestPojo.java:
Caused by: java.lang.IllegalAccessError: tried to access method ejb.one.TestPojo.helloWorld(Ljava/lang/String;)Ljava/lang/String; from class ejb.one.Pojo

Environment

  • 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.