40

How to resolve this warn? If i use Spring 3.2 i am see this warn:

14:24:19,014 WARN [org.jboss.as.ee] (MSC service thread 1-10) JBAS011006: Not installing optional component org.springframework.web.context.request.async.StandardServletAsyncWebRequest due to exception: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011054: Could not find default constructor for class org.springframework.web.context.request.async.StandardServletAsyncWebRequest

Slava Semushin
  • 14,904
  • 7
  • 53
  • 69
Rinat Mukhamedgaliev
  • 5,401
  • 8
  • 41
  • 59

4 Answers4

39

Apparently this is "normal", everything should still work. Likely there's an (anonymous) inner class in StandardServletAsyncWebRequest.

See also Applicaiton is deployed in JBoss7.0.2 Final (Arc ) but failed to in 7.1.1 Final (Brontes) and metadata-complete="true" not respected. Basically it's just a warning, everything is fine.

Philippe Marschall
  • 4,452
  • 1
  • 34
  • 52
  • 2
    I have gotten quite a few of these warnings in several applications. So far, they have not caused any problems. I have just been ignoring them for now, which seems to be what most people are doing. – jyore Dec 22 '12 at 04:24
  • 1
    As Philippe says, it seems to be "normal", the applications (at least in my case) work correctly. Currently, I hide those comments using a filter as explained [here](http://middlewaremagic.com/jboss/?p=2421). – aloplop85 Jul 03 '13 at 08:41
  • 2
    @Philippe - if it is "normal" then what is JBoss so annoyed about? What does one lose when this "optional" component is not installed, as JBoss says? – wavicle Sep 08 '14 at 17:54
  • @wavicle I'm not entirely sure. I can only assume it's related to component injection eg. if you wanted to have an instance of an anonymous inner class injected somewhere it would fail. – Philippe Marschall Sep 08 '14 at 21:23
10

To expand aloplop85's link, you can ignore this message. You might want to suppress it because it is distracting (in my opinion, a working application should never normally print stack traces in the log). The instructions are here http://middlewaremagic.com/jboss/?p=2421, short version is to add the following text into the config file (e.g.standalone.xml):

  <subsystem xmlns="urn:jboss:domain:logging:1.0">
      <console-handler name="CONSOLE">
          <!-- levels, formatters etc. -->
          <filter>
              <not>
                  <match pattern="JBAS011054"/>
              </not>
          </filter>
      </console-handler>
      <!-- and the same for other handlers -->
  </subsystem>

For JBoss 7.2.0, the syntax is a bit different:

  <subsystem xmlns="urn:jboss:domain:logging:1.2">
      <console-handler name="CONSOLE">
         <!-- levels, formatters etc. -->
         <filter value='not(match("JBAS011054"))' />
      </console-handler>
      <!-- and the same for other handlers -->
  </subsystem>
bschlueter
  • 3,817
  • 1
  • 30
  • 48
artbristol
  • 32,010
  • 5
  • 70
  • 103
8

This is how I suppressed it in my jboss-as-7.1.1

updated configuration/standalone.xml as

  <subsystem xmlns="urn:jboss:domain:logging:1.1">
      <console-handler name="CONSOLE">
          <filter>
              <not>
                  <match pattern="JBAS011054|JBAS011006"/>
              </not>
          </filter>
      </console-handler>
  </subsystem>
Sam
  • 554
  • 1
  • 12
  • 23
6

JBoss warns you when can't find no-args constructor for a class. In this case, there is no no-arg constructor for this Spring class. Just this one:

public StandardServletAsyncWebRequest(HttpServletRequest request, HttpServletResponse response) { super(request, response); }

No problem with that..That will work..

user2488945
  • 61
  • 1
  • 1