【发布时间】:2011-01-13 00:34:55
【问题描述】:
我在使用 spring 文件上传功能上传文件时遇到异常。
正在尝试上传 291 KB jpg 文件。
对于小于 50 kb 的文件,它可以正常工作。以下是 bean 条目
<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>
请帮忙
嗨,我已经更新了 spring 2.5 jar
之后出现同样的错误
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.)
使用 Spring 2.0 jar 的原始异常
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)
【问题讨论】:
-
“紧急”没有任何意义;这不是支持热线。
-
我们需要超过 2 行的堆栈跟踪来诊断堆栈溢出
-
不幸的是,您的日志记录在堆栈跟踪变得有趣之前就截断了它。您使用的是哪个版本的 Tomcat 和 Spring?
-
我使用的是 Jboss4.0 和 Spring-Version: 2.0.1
标签: java spring tomcat servlets