Bug 1073866

Summary: Adding server-identity=ssl to SecurityRealm throws NPE
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Josef Cacek <jcacek>
Component: Domain ManagementAssignee: Darran Lofthouse <darran.lofthouse>
Status: CLOSED CURRENTRELEASE QA Contact: Petr Kremensky <pkremens>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.3.0CC: dandread, jmartisk, kkhan, msimka, nchaudha
Target Milestone: DR1Keywords: Regression
Target Release: EAP 6.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
In the previous release of JBoss EAP 6, the runtime updates returned a NullPointerException for the list of services being added, thus making the roll back of services, when needed, very difficult. In JBoss EAP 6.4, this error is fixed and the list of service references is provided for runtime updates.
Story Points: ---
Clone Of: 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:

Description Josef Cacek 2014-03-07 11:23:45 UTC
Adding an SSL server-identity causes NPE (when allow-resource-service-restart header is true). It's a regression - this works in 6.2.x

/core-service=management/security-realm=SSLRealm:add
/core-service=management/security-realm=SSLRealm/server-identity=ssl:add(keystore-password=mykeystore, keystore-path=/tmp/mykeystore.jks) {allow-resource-service-restart=true}

result:
{
    "outcome" => "failed",
    "failure-description" => "JBAS014749: Operation handler failed: null",
    "rolled-back" => true
}


EAP console contains:
12:05:16,016 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 1) JBAS014612: Operation ("add") failed - address: ([
    ("core-service" => "management"),
    ("security-realm" => "SSLRealm2"),
    ("server-identity" => "ssl")
]): java.lang.NullPointerException
	at org.jboss.as.domain.management.security.SecurityRealmAddHandler.addSSLServices(SecurityRealmAddHandler.java:538) [jboss-as-domain-management-7.4.0.Final-redhat-2.jar:7.4.0.Final-redhat-2]
	at org.jboss.as.domain.management.security.SecurityRealmAddHandler.installServices(SecurityRealmAddHandler.java:186) [jboss-as-domain-management-7.4.0.Final-redhat-2.jar:7.4.0.Final-redhat-2]
	at org.jboss.as.domain.management.security.SecurityRealmParentRestartHandler.recreateParentService(SecurityRealmParentRestartHandler.java:65) [jboss-as-domain-management-7.4.0.Final-redhat-2.jar:7.4.0.Final-redhat-2]
	at org.jboss.as.controller.RestartParentResourceHandlerBase$1.execute(RestartParentResourceHandlerBase.java:73) [jboss-as-controller-7.4.0.Final-redhat-2.jar:7.4.0.Final-redhat-2]
	at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:601) [jboss-as-controller-7.4.0.Final-redhat-2.jar:7.4.0.Final-redhat-2]
	at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:479) [jboss-as-controller-7.4.0.Final-redhat-2.jar:7.4.0.Final-redhat-2]
	at org.jboss.as.controller.AbstractOperationContext.completeStepInternal(AbstractOperationContext.java:283) [jboss-as-controller-7.4.0.Final-redhat-2.jar:7.4.0.Final-redhat-2]
	at org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:278) [jboss-as-controller-7.4.0.Final-redhat-2.jar:7.4.0.Final-redhat-2]
	at org.jboss.as.controller.ModelControllerImpl.internalExecute(ModelControllerImpl.java:230) [jboss-as-controller-7.4.0.Final-redhat-2.jar:7.4.0.Final-redhat-2]
	at org.jboss.as.controller.ModelControllerImpl.execute(ModelControllerImpl.java:136) [jboss-as-controller-7.4.0.Final-redhat-2.jar:7.4.0.Final-redhat-2]
	at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler.doExecute(ModelControllerClientOperationHandler.java:173) [jboss-as-controller-7.4.0.Final-redhat-2.jar:7.4.0.Final-redhat-2]
	at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler.access$300(ModelControllerClientOperationHandler.java:105) [jboss-as-controller-7.4.0.Final-redhat-2.jar:7.4.0.Final-redhat-2]
	at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1$1.run(ModelControllerClientOperationHandler.java:125) [jboss-as-controller-7.4.0.Final-redhat-2.jar:7.4.0.Final-redhat-2]
	at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1$1.run(ModelControllerClientOperationHandler.java:121) [jboss-as-controller-7.4.0.Final-redhat-2.jar:7.4.0.Final-redhat-2]
	at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.7.0_45]
	at javax.security.auth.Subject.doAs(Subject.java:415) [rt.jar:1.7.0_45]
	at org.jboss.as.controller.AccessAuditContext.doAs(AccessAuditContext.java:94) [jboss-as-controller-7.4.0.Final-redhat-2.jar:7.4.0.Final-redhat-2]
	at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1.execute(ModelControllerClientOperationHandler.java:121) [jboss-as-controller-7.4.0.Final-redhat-2.jar:7.4.0.Final-redhat-2]
	at org.jboss.as.protocol.mgmt.AbstractMessageHandler$2$1.doExecute(AbstractMessageHandler.java:283) [jboss-as-protocol-7.4.0.Final-redhat-2.jar:7.4.0.Final-redhat-2]
	at org.jboss.as.protocol.mgmt.AbstractMessageHandler$AsyncTaskRunner.run(AbstractMessageHandler.java:504) [jboss-as-protocol-7.4.0.Final-redhat-2.jar:7.4.0.Final-redhat-2]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_45]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_45]
	at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45]
	at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.1.1.Final-redhat-1.jar:2.1.1.Final-redhat-1]