4 Replies Latest reply on Jul 29, 2011 9:33 AM by Joshua Davis

    JBoss AS 7.0.0.Final and <async-handler>

    Joshua Davis Expert

      I was experimenting with setting up <async-handler> in the main configuration file today and I found that unless I specify level, queue-length, and overflow-action, JBoss AS will either fail to start or give errors on startup.  The thing is:

      1. jboss-logging.xsd shows these elements as optional (minOccurs="0")
      2. The error messages on start up didn't say anything about what was missing.

       

      For example, if you leave out <queue-length> you get this error:

       

      14:25:44,303 ERROR [org.jboss.msc.service.fail] MSC00001: Failed to start service jboss.logging.handler.ASYNC: org.jboss.msc.service.StartException in service jboss.logging.handler.ASYNC: Failed to start service

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1786)

              at org.jboss.msc.service.ServiceControllerImpl$ClearTCCLTask.run(ServiceControllerImpl.java:2291)

              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_25]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_25]

              at java.lang.Thread.run(Thread.java:662) [:1.6.0_25]

      Caused by: java.lang.IllegalArgumentException

              at java.util.concurrent.ArrayBlockingQueue.<init>(ArrayBlockingQueue.java:164) [:1.6.0_25]

              at java.util.concurrent.ArrayBlockingQueue.<init>(ArrayBlockingQueue.java:149) [:1.6.0_25]

              at org.jboss.logmanager.handlers.AsyncHandler.<init>(AsyncHandler.java:60) [jboss-logmanager-1.2.0.GA.jar:1.2.0.GA]

              at org.jboss.logmanager.handlers.AsyncHandler.<init>(AsyncHandler.java:83) [jboss-logmanager-1.2.0.GA.jar:1.2.0.GA]

              at org.jboss.as.logging.AsyncHandlerService.start(AsyncHandlerService.java:53)

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1765)

              ... 4 more

       

      Should I file a JIRA issue about it?   The error messages could be better.   I'm not sure why the XSD allows these to be optional.