Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-1319

size-rotating-file-handler fails with error if encoding isn't set in the configuration

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 7.0.0.Final
    • Fix Version/s: 7.0.1.Final
    • Component/s: Logging
    • Labels:
      None

      Description

      The following size-rotating-file-handler configuration

      <size-rotating-file-handler name="FILE2" autoflush="true">
                      <level name="TRACE"/>
                      <formatter>
                          <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>
                      </formatter>
                      <file relative-to="jboss.server.log.dir" path="server.log"/>
                      <rotate-size value="2048"/>
                      <max-backup-index value="5"/>
                  </size-rotating-file-handler>
      

      fails with

      20:10:42,402 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC00001: Failed to start service jboss.logging.handler.FILE2: org.jboss.msc.service.StartException in service jboss.logging.handler.FILE2: java.io.UnsupportedEncodingException: undefined
      	at org.jboss.as.logging.SizeRotatingFileHandlerService.start(SizeRotatingFileHandlerService.java:70)
      	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1765)
      	at org.jboss.msc.service.ServiceControllerImpl$ClearTCCLTask.run(ServiceControllerImpl.java:2291)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_21]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_21]
      	at java.lang.Thread.run(Thread.java:619) [:1.6.0_21]
      Caused by: java.io.UnsupportedEncodingException: undefined
      	at java.util.logging.Handler.setEncoding(Handler.java:130) [:1.6.0_21]
      	at org.jboss.logmanager.handlers.OutputStreamHandler.setEncoding(OutputStreamHandler.java:90) [jboss-logmanager-1.2.0.GA.jar:1.2.0.GA]
      	at org.jboss.as.logging.SizeRotatingFileHandlerService.start(SizeRotatingFileHandlerService.java:68)
      	... 5 more
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  jaikiran Jaikiran Pai
                  Reporter:
                  jaikiran Jaikiran Pai
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: