WildFly 9.0.1 WFLYCTL0158 Handler "CONSOLE" is not found
Asked Answered
C

1

9

Suddenly (after working fine for some time), WildFly 9.0.1 (and also 9.0.2) seem to have somehow lost the CONSOLE handler for logging.

When trying to debug an application from NetBeans 8.0.2, the Console window shows: ERROR [stderr] (default task-14) Handler java.util.logging.ConsoleHandler is not defined as last entry, and the web application seems to be stuck (before actually starting).

In WildFly's management console, there seems to be a root logger using 2 handlers: CONSOLE and FILE. Both Handlers seem to be existing in standalone-full.xml:

  ...
    <subsystem xmlns="urn:jboss:domain:logging:3.0">
        <console-handler name="CONSOLE">
            <level name="INFO"/>
            <formatter>
                <named-formatter name="COLOR-PATTERN"/>
            </formatter>
        </console-handler>
        <periodic-rotating-file-handler name="FILE" autoflush="true">
            <formatter>
                <named-formatter name="PATTERN"/>
            </formatter>
            <file relative-to="jboss.server.log.dir" path="server.log"/>
            <suffix value=".yyyy-MM-dd"/>
            <append value="true"/>
        </periodic-rotating-file-handler>
        ...
        <root-logger>
            <level name="INFO"/>
            <handlers>
                <handler name="CONSOLE"/>
                <handler name="FILE"/>
            </handlers>
        </root-logger>
        ...
    </subsystem>
  ...

When changing config in the management console, I can delete the handlers out of the root logger. Then I can save, but taking them in again seems impossible, since I get the WFLYCTL0158, telling that the handler would not be defined.

Central answered 10/11, 2015 at 4:44 Comment(5)
Seems odd since WildFly doesn't use the java.util.logging.ConsoleHandler. Are you using a profiler by chance when starting in NetBeans?Languishment
Same problem. In my case I am using a war that uses java.util.logging.ConsoleHandler that I cannot change. Is it possible to configure WildFly to use the same ConsoleHandler?Djokjakarta
Hello @Central it would be wise to leave the stack trace so we could better assist you.Oulu
Did you ever figure this out?Siegler
I'm meanwhile in another employment and have no access to the stack trace. As far as I know, this problem stays unsolved. I leave it up to the admins here to either let it open for others who might have a similar problem or to remove it. Nevertheless, if anyone has a solution, I'd be interested in it for the case I get a similar situation in future. Thanks a lot anyway for all your effort!Central
Y
0

JBoss Knowledge base says you should ensure right jars (logback-classic-1.1.9.jar and logback-core-1.1.9.jar in that case) are in WEB-INF/lib directory if you are using an application framework.

UPDATE

For those who do not have access to link above, and wonder what the next steps are, you can add following to pom.xml to make it work with your application framework, which will then add it to WEB-INF/lib during the build.

<dependency>
  <groupId>ch.qos.logback</groupId>
  <artifactId>logback-classic</artifactId>
  <version>1.2.3</version>
</dependency>

<dependency>
  <groupId>ch.qos.logback</groupId>
  <artifactId>logback-core</artifactId>
  <version>1.2.3</version>
</dependency>
Yatzeck answered 22/4, 2019 at 15:16 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.