]
Bartosz Baranowski commented on AS7-4900:
-----------------------------------------
Alexey Loubyansky are working on this issue ?
Re-creating a logging handler fails with message "JBAS014749:
Operation handler failed: null"
---------------------------------------------------------------------------------------------
Key: AS7-4900
URL:
https://issues.jboss.org/browse/AS7-4900
Project: Application Server 7
Issue Type: Bug
Components: CLI, Logging
Affects Versions: 7.1.2.Final (EAP)
Environment: AS 7.1.2
EAP 6.0.0 Beta2
Reporter: Masafumi Miura
Assignee: Alexey Loubyansky
Attachments: logging-add.cli, logging-remove.cli
Re-creating a logging handler using (:add, :remove, :add) fails with message
"JBAS014749: Operation handler failed: null".
For instance,
1. Add a logging handler:
{noformat:title=$./jboss-cli.sh --connect --file=/tmp/test/logging-add.cli}
#1
/subsystem=logging/periodic-rotating-file-handler=TESTLOG:add(suffix=.yyyy-MM-dd,autoflush=true,append=true,file={"relative-to"
=> "jboss.server.log.dir","path" => "TESTLOG.log"})
#2
/subsystem=logging/periodic-rotating-file-handler=TESTLOG:write-attribute(name=formatter,value="%d
%-5p [%c{1}](%t) - %m%n")
#3
/subsystem=logging/logger=org.jboss.support.test:add(level=ERROR,handlers=["TESTLOG"],use-parent-handlers=false)
The batch executed successfully.
{noformat}
2. Remove the logging handler:
{noformat:title=$./jboss-cli.sh --connect --file=/tmp/test/logging-remove.cli}
#1 /subsystem=logging/logger=org.jboss.support.test:remove
#2 /subsystem=logging/periodic-rotating-file-handler=TESTLOG:remove
The batch executed successfully.
{noformat}
3. Add the logging handler again:
{noformat:title=$./jboss-cli.sh --connect --file=/tmp/test/logging-add.cli}
#1
/subsystem=logging/periodic-rotating-file-handler=TESTLOG:add(suffix=.yyyy-MM-dd,autoflush=true,append=true,file={"relative-to"
=> "jboss.server.log.dir","path" => "TESTLOG.log"})
#2
/subsystem=logging/periodic-rotating-file-handler=TESTLOG:write-attribute(name=formatter,value="%d
%-5p [%c{1}](%t) - %m%n")
#3
/subsystem=logging/logger=org.jboss.support.test:add(level=ERROR,handlers=["TESTLOG"],use-parent-handlers=false)
Failed to execute batch: {"JBAS014653: Composite operation failed and was rolled
back. Steps that failed:" => {"Operation step-2" => "JBAS014749:
Operation handler failed: null"}}
{noformat}
Then JBoss shows the following ERROR in server.log:
{noformat:title=server.log}
ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 6)
JBAS014612: Operation ("write-attribute") failed - address: ([
("subsystem" => "logging"),
("periodic-rotating-file-handler" => "TESTLOG")
]): java.lang.NullPointerException
at
org.jboss.as.logging.handlers.FormatterSpec$PatternFormatterSpec.apply(FormatterSpec.java:62)
[jboss-as-logging-7.1.2.Final.jar:7.1.2.Final]
at
org.jboss.as.logging.handlers.AbstractLogHandlerWriteAttributeHandler.applyUpdateToRuntime(AbstractLogHandlerWriteAttributeHandler.java:93)
[jboss-as-logging-7.1.2.Final.jar:7.1.2.Final]
at
org.jboss.as.controller.AbstractWriteAttributeHandler$1.execute(AbstractWriteAttributeHandler.java:116)
[jboss-as-controller-7.1.2.Final.jar:7.1.2.Final]
at
org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:397)
[jboss-as-controller-7.1.2.Final.jar:7.1.2.Final]
at
org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:284)
[jboss-as-controller-7.1.2.Final.jar:7.1.2.Final]
at
org.jboss.as.controller.AbstractOperationContext.completeStep(AbstractOperationContext.java:211)
[jboss-as-controller-7.1.2.Final.jar:7.1.2.Final]
at
org.jboss.as.controller.AbstractWriteAttributeHandler.execute(AbstractWriteAttributeHandler.java:138)
[jboss-as-controller-7.1.2.Final.jar:7.1.2.Final]
at
org.jboss.as.controller.operations.global.GlobalOperationHandlers$WriteAttributeHandler.execute(GlobalOperationHandlers.java:503)
[jboss-as-controller-7.1.2.Final.jar:7.1.2.Final]
at
org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:397)
[jboss-as-controller-7.1.2.Final.jar:7.1.2.Final]
at
org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:284)
[jboss-as-controller-7.1.2.Final.jar:7.1.2.Final]
at
org.jboss.as.controller.AbstractOperationContext.completeStep(AbstractOperationContext.java:211)
[jboss-as-controller-7.1.2.Final.jar:7.1.2.Final]
at
org.jboss.as.controller.CompositeOperationHandler.execute(CompositeOperationHandler.java:85)
[jboss-as-controller-7.1.2.Final.jar:7.1.2.Final]
at
org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:397)
[jboss-as-controller-7.1.2.Final.jar:7.1.2.Final]
at
org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:284)
[jboss-as-controller-7.1.2.Final.jar:7.1.2.Final]
at
org.jboss.as.controller.AbstractOperationContext.completeStep(AbstractOperationContext.java:211)
[jboss-as-controller-7.1.2.Final.jar:7.1.2.Final]
at
org.jboss.as.controller.ModelControllerImpl$DefaultPrepareStepHandler.execute(ModelControllerImpl.java:473)
[jboss-as-controller-7.1.2.Final.jar:7.1.2.Final]
at
org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:397)
[jboss-as-controller-7.1.2.Final.jar:7.1.2.Final]
at
org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:284)
[jboss-as-controller-7.1.2.Final.jar:7.1.2.Final]
at
org.jboss.as.controller.AbstractOperationContext.completeStep(AbstractOperationContext.java:211)
[jboss-as-controller-7.1.2.Final.jar:7.1.2.Final]
at
org.jboss.as.controller.ModelControllerImpl.internalExecute(ModelControllerImpl.java:126)
[jboss-as-controller-7.1.2.Final.jar:7.1.2.Final]
at org.jboss.as.controller.ModelControllerImpl.execute(ModelControllerImpl.java:111)
[jboss-as-controller-7.1.2.Final.jar:7.1.2.Final]
at
org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler.doExecute(ModelControllerClientOperationHandler.java:139)
[jboss-as-controller-7.1.2.Final.jar:7.1.2.Final]
at
org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1.execute(ModelControllerClientOperationHandler.java:108)
[jboss-as-controller-7.1.2.Final.jar:7.1.2.Final]
at
org.jboss.as.protocol.mgmt.AbstractMessageHandler$2$1.doExecute(AbstractMessageHandler.java:286)
at
org.jboss.as.protocol.mgmt.AbstractMessageHandler$AsyncTaskRunner.run(AbstractMessageHandler.java:491)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
[rt.jar:1.6.0_24]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
[rt.jar:1.6.0_24]
at java.lang.Thread.run(Thread.java:679) [rt.jar:1.6.0_24]
at org.jboss.threads.JBossThread.run(JBossThread.java:122)
{noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: