java.lang.SecurityException: Prohibited package name: java.* in JBoss EAP 7

Solution Unverified - Updated -

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 7.x

Issue

09:12:35,045 WARN  [org.jboss.modules.define] (Weld Thread Pool -- 8) Failed to define class java.com_redhat_example_ws.MyData in Module "deployment.ExampleApp.war" from Service Module Loader: java.lang.SecurityException: Prohibited package name: java.com_redhat_example_ws

Resolution

The web services application has generated stub classes in the java package, which is a prohibited package as it is reserved by the JDK. Regenerate the stubs into a different package.

Related Solutions

Root Cause

java.* is a prohibited package name

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments