spring Spring3.2 和 jboss 作为 7

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/13786685/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-08 05:35:10  来源:igfitidea点击:

Spring3.2 and jboss as 7

springspring-mvcjboss7.x

提问by Rinat Mukhamedgaliev

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

如何解决此警告?如果我使用 Spring 3.2,我会看到这个警告:

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

14:24:19,014 WARN [org.jboss.as.ee](MSC 服务线程 1-10)JBAS011006:未安装可选组件 org.springframework.web.context.request.async.StandardServletAsyncWebRequest 由于异常:org.jboss。 as.server.deployment.DeploymentUnitProcessingException: JBAS011054: 找不到类 org.springframework.web.context.request.async.StandardServletAsyncWebRequest 的默认构造函数

采纳答案by Philippe Marschall

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

显然这是“正常的”,一切都应该仍然有效。中可能有一个(匿名)内部类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.

另请参见Applicaiton 在 JBoss7.0.2 Final (Arc) 中部署,但在 7.1.1 Final (Brontes)metadata-complete="true" notrespected 中失败。基本上它只是一个警告,一切都很好。

回答by artbristol

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):

要展开 aloplop85 的链接,您可以忽略此消息。您可能想抑制它,因为它会分散注意力(在我看来,正常工作的应用程序不应该在日志中打印堆栈跟踪)。说明在这里http://middlewaremagic.com/jboss/?p=2421,简短版本是将以下文本添加到配置文件中(例如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:

对于 JBoss 7.2.0,语法有点不同:

  <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>

回答by Sam

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

这就是我在 jboss-as-7.1.1 中压制它的方式

updated configuration/standalone.xml as

将配置/standalone.xml 更新为

  <subsystem xmlns="urn:jboss:domain:logging:1.1">
      <console-handler name="CONSOLE">
          <filter>
              <not>
                  <match pattern="JBAS011054|JBAS011006"/>
              </not>
          </filter>
      </console-handler>
  </subsystem>

回答by user2488945

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:

当找不到类的无参数构造函数时,JBoss 会警告您。在这种情况下,此 Spring 类没有无参数构造函数。就这一个:

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

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

No problem with that..That will work..

没问题..那会起作用..