첨부파일 저장시 오류[해결함]
- 작성자 :
- 이*
- 작성일 :
- 2009-09-28 09:33:32
- 조회수 :
- 5,077
- 구분 :
- 공통컴포넌트
- 진행상태 :
- 완료
Q
context-common.xml 파일에
<alias name="local.MultiCommonsMultipartResolver" alias="multipartResolver" /> 문장을 추가해주니 에러가 사라짐.
========================================================
저장 버튼을 클릭하면 컨트롤러를 찾았는데 메소드를 불러오지 못하고 에러가 발생합니다. 에러메세지를 보면 타입이 틀리다는 것 같은데 도무지 이해가 되지 않습니다. 예제 소스를 봐도 틀린 것 같지 않는데 확인 좀 부탁드립니다.
제가 확인해본바로는 MultipartHttpServletRequest 이것을 사용하면서 발생하는 에러인 것 같습니다.
controler 부분 소스
@SuppressWarnings("unchecked")
@RequestMapping("/women/common/bbs/insert.do")
public String insertCommonBbs(final MultipartHttpServletRequest multiRequest,
@ModelAttribute("searchVO") CommonBbsDefaultVO searchVO,
@ModelAttribute("commonBbsVO") CommonBbsVO commonBbsVO,
BindingResult bindingResult,
SessionStatus status,
Model model)
throws Exception {
log.debug(">>>[insertCommonBbs]"); <------이부분 찍히지 않음
=======================================================
에러 출력
Failed to invoke handler method [public java.lang.String egovframework.rte.women.common.bbs.web.EgovCommonBbsController.insertCommonBbs(org.springframework.web.multipart.MultipartHttpServletRequest,egovframework.rte.women.common.bbs.service.CommonBbsDefaultVO,egovframework.rte.women.common.bbs.service.CommonBbsVO,org.springframework.validation.BindingResult,org.springframework.web.bind.support.SessionStatus,org.springframework.ui.Model) throws java.lang.Exception]; nested exception is java.lang.IllegalStateException: Standard argument type [org.springframework.web.multipart.MultipartHttpServletRequest] resolved to incompatible value of type [class egovframework.rte.ptl.mvc.filter.HTMLTagFilterRequestWrapper]. Consider declaring the argument type in a less specific fashion.
<alias name="local.MultiCommonsMultipartResolver" alias="multipartResolver" /> 문장을 추가해주니 에러가 사라짐.
========================================================
저장 버튼을 클릭하면 컨트롤러를 찾았는데 메소드를 불러오지 못하고 에러가 발생합니다. 에러메세지를 보면 타입이 틀리다는 것 같은데 도무지 이해가 되지 않습니다. 예제 소스를 봐도 틀린 것 같지 않는데 확인 좀 부탁드립니다.
제가 확인해본바로는 MultipartHttpServletRequest 이것을 사용하면서 발생하는 에러인 것 같습니다.
controler 부분 소스
@SuppressWarnings("unchecked")
@RequestMapping("/women/common/bbs/insert.do")
public String insertCommonBbs(final MultipartHttpServletRequest multiRequest,
@ModelAttribute("searchVO") CommonBbsDefaultVO searchVO,
@ModelAttribute("commonBbsVO") CommonBbsVO commonBbsVO,
BindingResult bindingResult,
SessionStatus status,
Model model)
throws Exception {
log.debug(">>>[insertCommonBbs]"); <------이부분 찍히지 않음
=======================================================
에러 출력
Failed to invoke handler method [public java.lang.String egovframework.rte.women.common.bbs.web.EgovCommonBbsController.insertCommonBbs(org.springframework.web.multipart.MultipartHttpServletRequest,egovframework.rte.women.common.bbs.service.CommonBbsDefaultVO,egovframework.rte.women.common.bbs.service.CommonBbsVO,org.springframework.validation.BindingResult,org.springframework.web.bind.support.SessionStatus,org.springframework.ui.Model) throws java.lang.Exception]; nested exception is java.lang.IllegalStateException: Standard argument type [org.springframework.web.multipart.MultipartHttpServletRequest] resolved to incompatible value of type [class egovframework.rte.ptl.mvc.filter.HTMLTagFilterRequestWrapper]. Consider declaring the argument type in a less specific fashion.
A
안녕하세요.. 이솔님..
해당 오류는 일단 설정 상에 MultpartResolver 설정이 잘못된 것 같습니다..
저희 공통컴포넌트 같은 경우는 다음과 같이 설정되어 있는데.. 확인 부탁드립니다.
<!-- custom multi file resolver -->
<bean id="local.MultiCommonsMultipartResolver"
class="egovframework.com.cmm.web.EgovMultipartResolver">
<property name="maxUploadSize" value="100000000" />
<property name="maxInMemorySize" value="100000000" />
</bean>
<!-- choose one from above and alias it to the name Spring expects -->
<alias name="local.MultiCommonsMultipartResolver" alias="multipartResolver" />
한가지 더 확인하실 것은 JSP form상에서 enctype="multipart/form-data" 항목도 확인 해 주십시오.
그럼.. 즐거운 하루 되십시오..
감사합니다..
해당 오류는 일단 설정 상에 MultpartResolver 설정이 잘못된 것 같습니다..
저희 공통컴포넌트 같은 경우는 다음과 같이 설정되어 있는데.. 확인 부탁드립니다.
<!-- custom multi file resolver -->
<bean id="local.MultiCommonsMultipartResolver"
class="egovframework.com.cmm.web.EgovMultipartResolver">
<property name="maxUploadSize" value="100000000" />
<property name="maxInMemorySize" value="100000000" />
</bean>
<!-- choose one from above and alias it to the name Spring expects -->
<alias name="local.MultiCommonsMultipartResolver" alias="multipartResolver" />
한가지 더 확인하실 것은 JSP form상에서 enctype="multipart/form-data" 항목도 확인 해 주십시오.
그럼.. 즐거운 하루 되십시오..
감사합니다..