* GAUCE 버전 : 4.0
* WAS 종류(WebLogic 등등) : WebLogic 9.2
가우스 4.0 API를 보고 테스트 개발을 하고 있습니다.
HttpGauceRequest 객체를 얻기 위해서 아래와 같이 코드를 작성했습니다.
(환경 : struts 2.0)
-----------------------------------------------------------------------------------------
HttpServletRequest request = ServletActionContext.getRequest();
HttpServletResponse response = ServletActionContext.getResponse();
GauceInputStream gis = ((HttpGauceRequest) request).getGauceInputStream();
GauceOutputStream gos = ((HttpGauceResponse) response).getGauceOutputStream();
-----------------------------------------------------------------------------------------
그런데 "GauceInputStream gis = ((HttpGauceRequest) request).getGauceInputStream();" 이 부분에서
ClassCastException 에러가 발생합니다.
java.lang.ClassCastException: org.apache.struts2.dispatcher.StrutsRequestWrapper
at stw.common.logon.TestAction.execute(TestAction.java:40)
at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown Source)
at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:404)
at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:267)
Truncated. see log file for complete stacktrace