Bug 1122580

Summary: [QE] (6.4.0) NullPointerException in org.jboss.modules.ModulesPolicy.implies method
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Josef Cacek <jcacek>
Component: ServerAssignee: Jason T. Greene <jason.greene>
Status: CLOSED CURRENTRELEASE QA Contact: Pavel Slavicek <pslavice>
Severity: medium Docs Contact: eap-docs <eap-docs>
Priority: unspecified    
Version: 6.3.0CC: cdewolf, chaowan, kkhan, msvehla, myarboro
Target Milestone: DR1   
Target Release: EAP 6.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1123849 (view as bug list) Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1099440, 1123849, 1126307    
Attachments:
Description Flags
console log with NPE exception none

Description Josef Cacek 2014-07-23 14:25:36 UTC
Created attachment 920246 [details]
console log with NPE exception

ProtectionDomain can have null codesource [1], but the methods in org.jboss.modules.ModulesPolicy class don't do the check for null and they try to use the codesource directly. It causes NPE when running EAP with Java Security Manager (JSM) enabled.

E.g.
public boolean implies(final ProtectionDomain domain, final Permission permission) {
    return domain.getCodeSource().equals(ourCodeSource) || policy.implies(domain, permission);
}

[1] http://docs.oracle.com/javase/6/docs/api/java/security/ProtectionDomain.html#getCodeSource()

The test which shows the issue is the JMXConnectorTestCase from testsuite/integration/basic, when it's running against EAP running on IBM JDK 6 with the JSM enabled.
Look at attachments for a server log which contains the stack-traces.

Comment 3 Kabir Khan 2014-08-24 11:04:59 UTC
Fixed by modules 1.3.4 upgrade https://bugzilla.redhat.com/show_bug.cgi?id=1126307. Setting to MODIFIED.

Comment 4 Ondrej Lukas 2014-09-19 12:58:17 UTC
Verified in 6.4.0.DR1.1