[
https://issues.jboss.org/browse/WFCORE-1635?page=com.atlassian.jira.plugi...
]
Chao Wang commented on WFCORE-1635:
-----------------------------------
In the batch circumstance, sometimes IllegalStateException happens because the new
deployment service is not up yet when it tries to update scanners.
Here are two existing solutions:
1. Add same [waitForService() |
https://github.com/wildfly/wildfly/blob/9de9217e0106da10c7d05228bcf0559c8...]
method before controller.getValue(); But it's marked nasty workaround.
2. In case that new deployment scanner service is not up yet, return true to put the
server in a reload-required state.
Write attribute on a new deployment scanner fails in batch
----------------------------------------------------------
Key: WFCORE-1635
URL:
https://issues.jboss.org/browse/WFCORE-1635
Project: WildFly Core
Issue Type: Bug
Components: Deployment Scanner
Affects Versions: 3.0.0.Alpha3
Reporter: Chao Wang
Assignee: Chao Wang
Priority: Minor
Creating a new deployment-scanner and altering it's attribute fails if done in single
batch. Running the commands without batch or running batch on CLI embed-server works
fine.
*reproduce*
{noformat}
batch
/subsystem=deployment-scanner/scanner=scan:add(path=log,
relative-to="jboss.server.base.dir", auto-deploy-exploded=false,
scan-enabled=false)
/subsystem=deployment-scanner/scanner=scan:write-attribute(name=scan-interval,
value=6000)
run-batch
{noformat}
fails with
{noformat}
08:09:19,076 ERROR [org.jboss.as.controller.management-operation]
(management-handler-thread - 4) WFLYCTL0013: Operation ("write-attribute")
failed - address: ([
("subsystem" => "deployment-scanner"),
("scanner" => "scan")
]): java.lang.IllegalStateException
at
org.jboss.as.server.deployment.scanner.DeploymentScannerService.getValue(DeploymentScannerService.java:234)
at
org.jboss.as.server.deployment.scanner.DeploymentScannerService.getValue(DeploymentScannerService.java:62)
at
org.jboss.msc.service.ServiceControllerImpl.getValue(ServiceControllerImpl.java:1158)
at
org.jboss.as.controller.OperationContextImpl$OperationContextServiceController.getValue(OperationContextImpl.java:2282)
at
org.jboss.as.server.deployment.scanner.AbstractWriteAttributeHandler.applyUpdateToRuntime(AbstractWriteAttributeHandler.java:58)
at
org.jboss.as.controller.AbstractWriteAttributeHandler$1.execute(AbstractWriteAttributeHandler.java:104)
at
org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:890)
at
org.jboss.as.controller.AbstractOperationContext.processStages(AbstractOperationContext.java:659)
at
org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:370)
at
org.jboss.as.controller.OperationContextImpl.executeOperation(OperationContextImpl.java:1344)
at
org.jboss.as.controller.ModelControllerImpl.internalExecute(ModelControllerImpl.java:392)
at org.jboss.as.controller.ModelControllerImpl.execute(ModelControllerImpl.java:217)
at
org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler.doExecute(ModelControllerClientOperationHandler.java:208)
at
org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler.access$300(ModelControllerClientOperationHandler.java:130)
at
org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1$1.run(ModelControllerClientOperationHandler.java:152)
at
org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1$1.run(ModelControllerClientOperationHandler.java:148)
at java.security.AccessController.doPrivileged(AccessController.java:686)
at javax.security.auth.Subject.doAs(Subject.java:569)
at org.jboss.as.controller.AccessAuditContext.doAs(AccessAuditContext.java:92)
at
org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1.execute(ModelControllerClientOperationHandler.java:148)
at
org.jboss.as.protocol.mgmt.AbstractMessageHandler$ManagementRequestContextImpl$1.doExecute(AbstractMessageHandler.java:363)
at
org.jboss.as.protocol.mgmt.AbstractMessageHandler$AsyncTaskRunner.run(AbstractMessageHandler.java:472)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1153)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.lang.Thread.run(Thread.java:785)
at org.jboss.threads.JBossThread.run(JBossThread.java:320)
{noformat}
using the embed server works
{noformat}
embed-server
batch
/subsystem=deployment-scanner/scanner=scan:add(path=log,
relative-to="jboss.server.base.dir", auto-deploy-exploded=false,
scan-enabled=false)
/subsystem=deployment-scanner/scanner=scan:write-attribute(name=scan-interval,
value=6000)
run-batch
{noformat}
Setting only as minor as there is no real use case behind this (scan-interval can be set
while adding a new scanner) - run into it quite accidentally. No regression against
previous release.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)