2010-02-04 54 views
1

在使用春季檔案上傳功能上傳檔案時,我收到以下異常。春季檔案上傳異常

試圖上傳291 KB jpg文件。

對於小於50 kb的文件,它工作正常。以下是豆條目

<bean id="fileUploadController" class="com.businesscaliber.controller.FileUploadController"> 
     <property name="commandClass" value="com.businesscaliber.bean.FileUploadBean"/> 
     <property name="formView" value="admin.do"/> 
     <property name="successView" value="admin.do"/> 
    </bean> 

<bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver"> 
     <!-- one of the properties available; the maximum file size in bytes --> 
     <property name="maxUploadSize" value="100000"/> 
    </bean> 

請幫

嗨,我已經更新的春天2.5罐子

使用Spring 2.0中得到同樣的錯誤

11:45:29,562 INFO [STDOUT] 147375 [http-localhost%2F127.0.0.1-9090-3] ERROR org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/businesscaliber].[businesscaliber] - Servlet.service() for servlet businesscaliber threw exception 
javax.servlet.ServletException: Circular view path [exceptionController.do]: would dispatch back to the current handler URL [/businesscaliber/exceptionController.do] again. Check your ViewResolver setup! (Hint: This may be the result of an unspecified view, due to default view name generation.) 

Privious異常罐子後

1782687 [http-localhost%2F127.0.0.1-9090-3] ERROR org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/businesscaliber].[businesscaliber] - Servlet.service() for servlet businesscaliber threw exception 
java.lang.StackOverflowError 
    at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:215) 
    at org.apache.catalina.core.ApplicationHttpRequest.getSession(ApplicationHttpRequest.java:544) 2010-02-04 16:43:31,406 INFO [STDOUT] a:544) 
+4

「緊急」意味着什麼;這不是支持熱線。 – 2010-02-04 10:47:32

+2

我們需要兩行以上的堆棧跟蹤來診斷堆棧溢出 – skaffman 2010-02-04 11:09:58

+0

請檢查日誌已發佈 – Vicky 2010-02-04 11:15:08

回答

2

StackOverflowError顯示getSession()上的遞歸調用的跟蹤可以識別,因爲通過請求鏈中之前已被調用的servlet或過濾器錯誤地分派請求,導致它一次又一次地調用自己。

實際上,我沒有看到這與上傳文件有什麼關係,也許Spring文件上傳功能是在內部將請求轉發給一些特殊的小服務程序或過濾器,這些小巧巧妙的代碼也由原始請求的url-pattern覆蓋,因此已經事先被調用。

至少,您現在知道在哪裏查看以解決特定問題。在servlet或過濾器映射中存在歧義和遞歸。

+0

嗨,我用新的2.5 jar替換了舊的彈簧瓶,得到與Circular path異常相同的錯誤 – Vicky 2010-02-09 06:28:11