2012-12-09 33 views
39

如何解決此警告?如果我使用Spring 3.2我是看到這個警告:Spring3.2和jboss爲7

14:24:19014警告[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的默認構造函數

+1

你解決了這個問題嗎? – Ray

回答

37

顯然這是「正常的」,一切都應該仍然有效。有可能在StandardServletAsyncWebRequest有一個(匿名)內部類。請參閱Applicaiton is deployed in JBoss7.0.2 Final (Arc) but failed to in 7.1.1 Final (Brontes)metadata-complete="true" not respected。基本上這只是一個警告,一切都很好。

+0

@Ray我使用JSF) – Ray

+2

我已經在幾個應用程序中獲得了相當多的這些警告。到目前爲止,他們沒有造成任何問題。我現在只是無視他們,這似乎是大多數人正在做的事情。 – jyore

+1

正如菲利普所說,它似乎是「正常的」,應用程序(至少在我的情況下)正常工作。目前,我使用過濾器來隱藏這些評論,如[這裏]所述(http://middlewaremagic.com/jboss/?p=2421)。 – aloplop85

5

當找不到類的無參數構造函數時,JBoss會發出警告。 在這種情況下,這個Spring類沒有無參數構造函數。 就這一個:

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

與that..That沒有問題會運行

+0

這看起來像一個非標準的JBoss需求,而不是Spring的bug。那是對的嗎? – wavicle

10

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

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

這是我如何抑制它在我的jboss-AS-7.1.1

更新的配置/ 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>