13 Replies Latest reply on May 24, 2013 2:35 AM by Sueleyman Vurucu

    Wildfly 8.0.0.Alpha1 LogManager Bug ??

    Sueleyman Vurucu Expert

      Hi Friends,

       

      I use custom log4j appenders in my serve conf.

       

       

      <custom-handler name="FILE" class="my.components.logging.DailyRollingFileAppenderExtended" module="my.libs">
                      <level name="DEBUG" />
                      <formatter>
                          <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] %s%E%n" />
                      </formatter>
                      <properties>
                          <property name="file" value="${jboss.server.log.dir}/server.log" />
                          <property name="append" value="true" />
                          <property name="datePattern" value="'.'yyyy-MM-dd" />
                          <property name="maxBackupDays" value="7" />
                      </properties>
                  </custom-handler>
      

       

      For the first start I must delete the logging.properties in <jboss_home>\standalone\configuration. After that Jboss generates a logging.properties which is consistent with my server conf. So far so good.

       

      But for the second start I get the Expetion shown below:

      Calling "F:\IDE\wildfly-8.0.0.Alpha1\bin\standalone.conf.bat"

      ===============================================================================

       

        JBoss Bootstrap Environment

       

        JBOSS_HOME: F:\IDE\wildfly-8.0.0.Alpha1

       

        JAVA: C:\Program Files\Java\jdk1.7.0_17\bin\java

       

        JAVA_OPTS: -XX:+TieredCompilation -XX:+UseCompressedOops -Dprogram.name=standalone.bat -Xms64M -Xmx512M -XX:MaxPermSize=256M -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman

       

      ===============================================================================

       

      10:20:44,186 INFO  [org.jboss.msc] (main) JBoss MSC version 1.1.2.Final

      10:20:44,227 INFO  [org.jboss.as] (MSC service thread 1-6) JBAS015899: WildFly 8.0.0.Alpha1 "WildFly" starting

      10:20:44,935 INFO  [org.xnio] (MSC service thread 1-6) XNIO Version 3.1.0.CR3

      10:20:44,937 INFO  [org.jboss.as.server] (Controller Boot Thread) JBAS015888: Creating http management service using socket-binding (management-http)

      10:20:44,939 INFO  [org.xnio.nio] (MSC service thread 1-6) XNIO NIO Implementation Version 3.1.0.CR3

      10:20:44,948 INFO  [org.jboss.remoting] (MSC service thread 1-6) JBoss Remoting version 4.0.0.Beta1

      10:20:44,962 WARN  [org.jboss.as.logging] (Controller Boot Thread) JBAS011511: Replacing handler 'FILE' during add operation. Either the handler type or the module name differs from the initial configuration.

      10:20:44,966 ERROR [stderr] (Controller Boot Thread) java.lang.NullPointerException

       

      10:20:44,970 ERROR [stderr] (Controller Boot Thread)     at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)

       

      And this Expcetion is thrown in a infinte loop. I assume that's a bug, isn't it ?

        • 1. Re: Wildfly 8.0.0.Alpha1 LogManager Bug ??
          jaikiran pai Master

          Moved to WildFly forum.

           

           

          Please post that entire exception stacktrace.

          • 2. Re: Wildfly 8.0.0.Alpha1 LogManager Bug ??
            Sueleyman Vurucu Expert

            10:20:44,186 INFO  [org.jboss.msc] (main) JBoss MSC version 1.1.2.Final

            10:20:44,227 INFO  [org.jboss.as] (MSC service thread 1-6) JBAS015899: WildFly 8.0.0.Alpha1 "WildFly" starting

            10:20:44,935 INFO  [org.xnio] (MSC service thread 1-6) XNIO Version 3.1.0.CR3

            10:20:44,937 INFO  [org.jboss.as.server] (Controller Boot Thread) JBAS015888: Creating http management service using socket-binding (management-http)

            10:20:44,939 INFO  [org.xnio.nio] (MSC service thread 1-6) XNIO NIO Implementation Version 3.1.0.CR3

            10:20:44,948 INFO  [org.jboss.remoting] (MSC service thread 1-6) JBoss Remoting version 4.0.0.Beta1

            10:20:44,962 WARN  [org.jboss.as.logging] (Controller Boot Thread) JBAS011511: Replacing handler 'FILE' during add operation. Either the handler type or the module name differs from the initial configuration.

            10:20:44,966 ERROR [stderr] (Controller Boot Thread) java.lang.NullPointerException

             

            10:20:44,970 ERROR [stderr] (Controller Boot Thread)     at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)

             

            10:20:44,970 ERROR [stderr] (Controller Boot Thread)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

             

            10:20:44,970 ERROR [stderr] (Controller Boot Thread)     at java.lang.reflect.Method.invoke(Method.java:601)

             

            10:20:44,971 ERROR [stderr] (Controller Boot Thread)     at org.jboss.logmanager.config.AbstractPropertyConfiguration$1.applyPostCreate(AbstractPropertyConfiguration.java:218)

             

            10:20:44,971 ERROR [stderr] (Controller Boot Thread)     at org.jboss.logmanager.config.AbstractPropertyConfiguration$1.applyPostCreate(AbstractPropertyConfiguration.java:198)

             

            10:20:44,971 ERROR [stderr] (Controller Boot Thread)     at org.jboss.logmanager.config.LogContextConfigurationImpl.doApplyPostCreate(LogContextConfigurationImpl.java:316)

             

            10:20:44,972 ERROR [stderr] (Controller Boot Thread)     at org.jboss.logmanager.config.LogContextConfigurationImpl.doPrepare(LogContextConfigurationImpl.java:341)

             

            10:20:44,972 ERROR [stderr] (Controller Boot Thread)     at org.jboss.logmanager.config.LogContextConfigurationImpl.prepare(LogContextConfigurationImpl.java:290)

             

            10:20:44,973 ERROR [stderr] (Controller Boot Thread)     at org.jboss.as.logging.logmanager.ConfigurationPersistence.prepare(ConfigurationPersistence.java:282)

             

            10:20:44,973 ERROR [stderr] (Controller Boot Thread)     at org.jboss.as.logging.LoggingOperations$CommitOperationStepHandler.execute(LoggingOperations.java:97)

             

            10:20:44,973 ERROR [stderr] (Controller Boot Thread)     at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:440)

             

            10:20:44,974 ERROR [stderr] (Controller Boot Thread)     at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:322)

             

            10:20:44,974 ERROR [stderr] (Controller Boot Thread)     at org.jboss.as.controller.AbstractOperationContext.completeStepInternal(AbstractOperationContext.java:229)

             

            10:20:44,974 ERROR [stderr] (Controller Boot Thread)     at org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:224)

             

            10:20:44,975 ERROR [stderr] (Controller Boot Thread)     at org.jboss.as.controller.ModelControllerImpl.boot(ModelControllerImpl.java:296)

             

            10:20:44,975 ERROR [stderr] (Controller Boot Thread)     at org.jboss.as.controller.AbstractControllerService.boot(AbstractControllerService.java:226)

             

            10:20:44,975 ERROR [stderr] (Controller Boot Thread)     at org.jboss.as.server.ServerService.boot(ServerService.java:342)

             

            10:20:44,976 ERROR [stderr] (Controller Boot Thread)     at org.jboss.as.server.ServerService.boot(ServerService.java:317)

             

            10:20:44,976 ERROR [stderr] (Controller Boot Thread)     at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:189)

             

            10:20:44,976 ERROR [stderr] (Controller Boot Thread)     at java.lang.Thread.run(Thread.java:722)

             

            10:20:44,977 ERROR [stderr] (Controller Boot Thread) java.lang.NullPointerException

             

            10:20:44,977 ERROR [stderr] (Controller Boot Thread)     at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)

             

            10:20:44,977 ERROR [stderr] (Controller Boot Thread)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

             

            10:20:44,977 ERROR [stderr] (Controller Boot Thread)     at java.lang.reflect.Method.invoke(Method.java:601)

             

            10:20:44,978 ERROR [stderr] (Controller Boot Thread)     at org.jboss.logmanager.config.AbstractPropertyConfiguration$1.applyPostCreate(AbstractPropertyConfiguration.java:218)

             

            10:20:44,978 ERROR [stderr] (Controller Boot Thread)     at org.jboss.logmanager.config.AbstractPropertyConfiguration$1.applyPostCreate(AbstractPropertyConfiguration.java:198)

             

            10:20:44,978 ERROR [stderr] (Controller Boot Thread)     at org.jboss.logmanager.config.LogContextConfigurationImpl.doApplyPostCreate(LogContextConfigurationImpl.java:316)

             

            10:20:44,979 ERROR [stderr] (Controller Boot Thread)     at org.jboss.logmanager.config.LogContextConfigurationImpl.doPrepare(LogContextConfigurationImpl.java:341)

             

            10:20:44,979 ERROR [stderr] (Controller Boot Thread)     at org.jboss.logmanager.config.LogContextConfigurationImpl.prepare(LogContextConfigurationImpl.java:290)

             

            10:20:44,979 ERROR [stderr] (Controller Boot Thread)     at org.jboss.as.logging.logmanager.ConfigurationPersistence.prepare(ConfigurationPersistence.java:282)

             

            10:20:44,980 ERROR [stderr] (Controller Boot Thread)     at org.jboss.as.logging.LoggingOperations$CommitOperationStepHandler.execute(LoggingOperations.java:97)

             

            10:20:44,980 ERROR [stderr] (Controller Boot Thread)     at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:440)

             

            10:20:44,980 ERROR [stderr] (Controller Boot Thread)     at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:322)

             

            10:20:44,981 ERROR [stderr] (Controller Boot Thread)     at org.jboss.as.controller.AbstractOperationContext.completeStepInternal(AbstractOperationContext.java:229)

             

            10:20:44,981 ERROR [stderr] (Controller Boot Thread)     at org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:224)

             

            10:20:44,981 ERROR [stderr] (Controller Boot Thread)     at org.jboss.as.controller.ModelControllerImpl.boot(ModelControllerImpl.java:296)

             

            10:20:44,981 ERROR [stderr] (Controller Boot Thread)     at org.jboss.as.controller.AbstractControllerService.boot(AbstractControllerService.java:226)

             

            10:20:44,982 ERROR [stderr] (Controller Boot Thread)     at org.jboss.as.server.ServerService.boot(ServerService.java:342)

             

            10:20:44,982 ERROR [stderr] (Controller Boot Thread)     at org.jboss.as.server.ServerService.boot(ServerService.java:317)

             

            10:20:44,982 ERROR [stderr] (Controller Boot Thread)     at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:189)

             

            10:20:44,983 ERROR [stderr] (Controller Boot Thread)     at java.lang.Thread.run(Thread.java:722)

            ...

            • 3. Re: Wildfly 8.0.0.Alpha1 LogManager Bug ??
              jaikiran pai Master

              What happens if you rename your appender from FILE to something else?

              • 4. Re: Wildfly 8.0.0.Alpha1 LogManager Bug ??
                Sueleyman Vurucu Expert

                I rename The appender FILE to FILE2 then I get the excpetion shown below;

                 

                Calling "F:\IDE\wildfly-8.0.0.Alpha1\bin\standalone.conf.bat"

                ===============================================================================

                 

                  JBoss Bootstrap Environment

                 

                  JBOSS_HOME: F:\IDE\wildfly-8.0.0.Alpha1

                 

                  JAVA: C:\Program Files\Java\jdk1.7.0_17\bin\java

                 

                  JAVA_OPTS: -XX:+TieredCompilation -XX:+UseCompressedOops -Dprogram.name=standalone.bat -Xms64M -Xmx512M -XX:MaxPermSize=256M -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman

                 

                ===============================================================================

                 

                11:43:09,633 INFO  [org.jboss.msc] (main) JBoss MSC version 1.1.2.Final

                11:43:09,675 INFO  [org.jboss.as] (MSC service thread 1-5) JBAS015899: WildFly 8.0.0.Alpha1 "WildFly" starting

                11:43:10,357 INFO  [org.xnio] (MSC service thread 1-13) XNIO Version 3.1.0.CR3

                11:43:10,371 INFO  [org.jboss.as.server] (Controller Boot Thread) JBAS015888: Creating http management service using socket-binding (management-http)

                11:43:10,372 INFO  [org.xnio.nio] (MSC service thread 1-13) XNIO NIO Implementation Version 3.1.0.CR3

                11:43:10,381 INFO  [org.jboss.remoting] (MSC service thread 1-13) JBoss Remoting version 4.0.0.Beta1

                11:43:10,395 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS014612: Operation ("add") failed - address: ([

                    ("subsystem" => "logging"),

                    ("console-handler" => "CONSOLE")

                ]): java.lang.IllegalArgumentException: No reference found for 'org.jboss.as.logging.logmanager.Log4jAppenderHandler'

                    at org.jboss.logmanager.config.AbstractPropertyConfiguration$5.validate(AbstractPropertyConfiguration.java:399) [jboss-logmanager-1.4.1.Final.jar:1.4.1.Final]

                    at org.jboss.logmanager.config.AbstractPropertyConfiguration$5.validate(AbstractPropertyConfiguration.java:391) [jboss-logmanager-1.4.1.Final.jar:1.4.1.Final]

                    at org.jboss.logmanager.config.LogContextConfigurationImpl.doPrepare(LogContextConfigurationImpl.java:333) [jboss-logmanager-1.4.1.Final.jar:1.4.1.Final]

                    at org.jboss.logmanager.config.LogContextConfigurationImpl.prepare(LogContextConfigurationImpl.java:292) [jboss-logmanager-1.4.1.Final.jar:1.4.1.Final]

                    at org.jboss.as.logging.logmanager.ConfigurationPersistence.prepare(ConfigurationPersistence.java:282) [wildfly-logging-8.0.0.Alpha1.jar:8.0.0.Alpha1]

                    at org.jboss.as.logging.LoggingOperations$CommitOperationStepHandler.execute(LoggingOperations.java:97) [wildfly-logging-8.0.0.Alpha1.jar:8.0.0.Alpha1]

                    at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:440) [wildfly-controller-8.0.0.Alpha1.jar:8.0.0.Alpha1]

                    at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:322) [wildfly-controller-8.0.0.Alpha1.jar:8.0.0.Alpha1]

                    at org.jboss.as.controller.AbstractOperationContext.completeStepInternal(AbstractOperationContext.java:229) [wildfly-controller-8.0.0.Alpha1.jar:8.0.0.Alpha1]

                    at org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:224) [wildfly-controller-8.0.0.Alpha1.jar:8.0.0.Alpha1]

                    at org.jboss.as.controller.ModelControllerImpl.boot(ModelControllerImpl.java:296) [wildfly-controller-8.0.0.Alpha1.jar:8.0.0.Alpha1]

                    at org.jboss.as.controller.AbstractControllerService.boot(AbstractControllerService.java:226) [wildfly-controller-8.0.0.Alpha1.jar:8.0.0.Alpha1]

                    at org.jboss.as.server.ServerService.boot(ServerService.java:342) [wildfly-server-8.0.0.Alpha1.jar:8.0.0.Alpha1]

                    at org.jboss.as.server.ServerService.boot(ServerService.java:317) [wildfly-server-8.0.0.Alpha1.jar:8.0.0.Alpha1]

                    at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:189) [wildfly-controller-8.0.0.Alpha1.jar:8.0.0.Alpha1]

                    at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_17]

                 

                11:43:10,514 INFO  [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status report

                JBAS014775:    New missing/unsatisfied dependencies:

                      service jboss.remoting.endpoint.management (missing) dependents: [service jboss.remoting.management.channel.registry]

                 

                11:43:10,516 FATAL [org.jboss.as.server] (Controller Boot Thread) JBAS015957: Server boot has failed in an unrecoverable manner; exiting. See previous messages for details.

                11:43:10,522 INFO  [org.jboss.as] (MSC service thread 1-16) JBAS015950: WildFly 8.0.0.Alpha1 "WildFly" stopped in 3ms

                Drcken Sie eine beliebige Taste . . .

                Batchvorgang abbrechen (J/N)?

                • 5. Re: Wildfly 8.0.0.Alpha1 LogManager Bug ??
                  Sueleyman Vurucu Expert

                  So If I delete logging.properties then wildfly generate a new one. But same behaviour for the next startup.

                  • 6. Re: Wildfly 8.0.0.Alpha1 LogManager Bug ??
                    jaikiran pai Master

                    Thank you for testing. Let's wait for someone who knows more about logging than I do.

                    • 7. Re: Wildfly 8.0.0.Alpha1 LogManager Bug ??
                      Sueleyman Vurucu Expert

                      Thanks jaikiran,

                      I hope someone see this issue fast .

                      • 8. Re: Wildfly 8.0.0.Alpha1 LogManager Bug ??
                        Sueleyman Vurucu Expert

                        This error occurs only for log4j appenders. .

                         

                        I attach the full error log during second server start.

                        • 9. Re: Wildfly 8.0.0.Alpha1 LogManager Bug ??
                          James Perkins Master

                          This definitely looks like a bug. I'll see if I can reproduce it.

                           

                          --

                          James R. Perkins

                          • 10. Re: Wildfly 8.0.0.Alpha1 LogManager Bug ??
                            James Perkins Master

                            This is definitely a bug. I can't see an obvious workaround, but as I debug it further I'll see if there isn't something that can be done. The JIRA is https://issues.jboss.org/browse/WFLY-1379.

                             

                            The best thing for now will be to not use log4j appenders. Or use your own wrapper handler around the appender.

                             

                            --

                            James R. Perkins

                            • 11. Re: Wildfly 8.0.0.Alpha1 LogManager Bug ??
                              Sueleyman Vurucu Expert

                              James Perkins schrieb:

                               

                              The best thing for now will be to not use log4j appenders. Or use your own wrapper handler around the appender.

                               

                              --

                              James R. Perkins

                               

                              Hi James,

                               

                              unfortunally, I have to much appenders which needs log4j. It's over than 30. I can live with 7.2.0.Final until 8.0.0.Aplpha2 is ready . I hope youll fix this issue before than .

                              • 12. Re: Wildfly 8.0.0.Alpha1 LogManager Bug ??
                                James Perkins Master

                                Wow, 30 appenders? That's a lot I hope to have a fix for it here soon. Just follow the JIRA for updates if you're interested.

                                 

                                --

                                James R. Perkins

                                1 of 1 people found this helpful