JBoss Wildfly 10.1.0 fails to start if jacoco agent is attached and jmx=true

1,058 views
Skip to first unread message

vesa.l...@gmail.com

unread,
Feb 6, 2017, 4:45:24 AM2/6/17
to JaCoCo and EclEmma Users
Hi!

I have following startup failure from JBoss Wildfly 10.1.0 if JaCoCo agent is attached and jmx-option is set to true. Everything works well if jmx=false. No other options than JaCoCo agent option is addded to JBoss. Any idea what might cause this? It looks like jmx setting causes JaCoCo to interfere with logging settings

Br,

+Vesa

[wildfly@developer log]$ WARNING: Failed to load the specified log manager class org.jboss.logmanager.LogManager
Feb 06, 2017 11:43:57 AM org.jboss.msc.service.ServiceContainerImpl <clinit>
INFO: JBoss MSC version 1.2.6.Final
Feb 06, 2017 11:43:58 AM org.jboss.as.server.ApplicationServerService start
INFO: WFLYSRV0049: WildFly Full 10.1.0.Final (WildFly Core 2.2.0.Final) starting
Feb 06, 2017 11:44:09 AM org.jboss.as.controller.AbstractOperationContext executeStep
ERROR: WFLYCTL0013: Operation ("parallel-extension-add") failed - address: ([])
java.lang.RuntimeException: WFLYCTL0079: Failed initializing module org.jboss.as.logging
at org.jboss.as.controller.extension.ParallelExtensionAddHandler$1.execute(ParallelExtensionAddHandler.java:115)
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:1329)
at org.jboss.as.controller.ModelControllerImpl.boot(ModelControllerImpl.java:467)
at org.jboss.as.controller.AbstractControllerService.boot(AbstractControllerService.java:387)
at org.jboss.as.controller.AbstractControllerService.boot(AbstractControllerService.java:349)
at org.jboss.as.server.ServerService.boot(ServerService.java:397)
at org.jboss.as.server.ServerService.boot(ServerService.java:366)
at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:299)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.util.concurrent.ExecutionException: java.lang.IllegalStateException: WFLYLOG0078: The logging subsystem requires the log manager to be org.jboss.logmanager.LogManager. The subsystem has not be initialized and cannot be used. To use JBoss Log Manager you must add the system property "java.util.logging.manager" and set it to "org.jboss.logmanager.LogManager"
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at org.jboss.as.controller.extension.ParallelExtensionAddHandler$1.execute(ParallelExtensionAddHandler.java:107)
... 11 more
Caused by: java.lang.IllegalStateException: WFLYLOG0078: The logging subsystem requires the log manager to be org.jboss.logmanager.LogManager. The subsystem has not be initialized and cannot be used. To use JBoss Log Manager you must add the system property "java.util.logging.manager" and set it to "org.jboss.logmanager.LogManager"
at org.jboss.as.logging.LoggingExtension.initialize(LoggingExtension.java:147)
at org.jboss.as.controller.extension.ExtensionAddHandler.initializeExtension(ExtensionAddHandler.java:131)
at org.jboss.as.controller.extension.ExtensionAddHandler.initializeExtension(ExtensionAddHandler.java:104)
at org.jboss.as.controller.extension.ParallelExtensionAddHandler$ExtensionInitializeTask.call(ParallelExtensionAddHandler.java:144)
at org.jboss.as.controller.extension.ParallelExtensionAddHandler$ExtensionInitializeTask.call(ParallelExtensionAddHandler.java:127)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
at org.jboss.threads.JBossThread.run(JBossThread.java:320)

Feb 06, 2017 11:44:09 AM org.jboss.as.server.ServerService$4 logExit
FATAL: WFLYSRV0056: Server boot has failed in an unrecoverable manner; exiting. See previous messages for details.

Marc R. Hoffmann

unread,
Feb 6, 2017, 5:26:30 AM2/6/17
to jac...@googlegroups.com
Hi Vesa,

hi, this is all what happens when the jmx is activated:

https://github.com/jacoco/jacoco/blob/master/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/JmxRegistration.java

I don't see any relation to logging. Is there any additional output or
other logfiles (e.g. on stdout)?

Regards,
-marc

vluomala

unread,
Feb 6, 2017, 5:53:04 AM2/6/17
to JaCoCo and EclEmma Users

Hi Marc!

And thx for reply. You're correct, there shouldn't be anything that interferes with logging system in JmxRegistration. Sounds like this is side effect of something else inside of Wildfly, which would require deeper analysis with their code.

I can get same functionality with output=tcpserver + ant script, but using jmx would have been nicer way of dumping the coverage out.

Br,

+Vesa

beingji...@gmail.com

unread,
Mar 22, 2017, 6:50:46 PM3/22/17
to JaCoCo and EclEmma Users, vesa.l...@gmail.com

Hello Vesa,

I hope you are doing good. I am also struggling with JMX(jacoco) in wildfly 8.1. It would be a great help if you can provide me the approach you followed ant+tcpserver. I wonder if you can share a sample code and ant script. I would highly appreciate your help. I am working on tight dead line. I have a big application (.ear). I urgently need to integrate jacoco

I would appreciate your help.

Thanks
JT

vesa.l...@gmail.com

unread,
Apr 7, 2017, 6:24:57 AM4/7/17
to JaCoCo and EclEmma Users, vesa.l...@gmail.com, beingji...@gmail.com
Hi!

I just discarded management via jmx totally. We now start our server with output=tcpserver and then use ant dump-target to read .exec-file from default port (6300). Check documentation of ant tasks, it should be very straight forward.

Br,

+V

Evgeny Mandrikov

unread,
May 12, 2017, 7:40:41 AM5/12/17
to JaCoCo and EclEmma Users, vesa.l...@gmail.com, beingji...@gmail.com, Marc R. Hoffmann
Hi,

I described the cause of problem of JaCoCo JMX MBean and WildFly as well as workaround in https://github.com/jacoco/jacoco/issues/531#issuecomment-301053060

Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages