Uploaded image for project: 'Mobylet'
  1. Mobylet
  2. MOBYLET-32

f:u()を使うとNullPointerExceptionが発生する

XMLWordPrintable

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major Major
    • 0.8.2
    • Affects Version/s: 0.8.1
    • Component/s: mobylet-taglibs
    • None

      SAStruts環境のjspでf:u()を利用するとNPEが発生するようです。
      URLEncoderUtilでRequestUtil.getRequest().getCharacterEncoding()をしているのですが、これがnullを返すためのようです。MobyletRequest の getCharacterEncoding() が Dialect の charset を返す必要にも見えますが、f:u() を mobylet で実装しないといけなそうにも見えます。

      java.lang.NullPointerException: charsetName
      	java.net.URLEncoder.encode(URLEncoder.java:193)
      	org.seasar.struts.util.URLEncoderUtil.encode(URLEncoderUtil.java:41)
      	org.seasar.struts.taglib.S2Functions.u(S2Functions.java:149)
      	sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	java.lang.reflect.Method.invoke(Method.java:597)
      	org.apache.commons.el.FunctionInvocation.evaluate(FunctionInvocation.java:172)
      	org.apache.commons.el.ExpressionString.evaluate(ExpressionString.java:114)
      	org.apache.commons.el.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:274)
      	org.apache.commons.el.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:190)
      	org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:924)
      	org.apache.jsp.WEB_002dINF.view.mobile.search_jsp._jspx_meth_s_005flink_005f1(search_jsp.java:618)
      	org.apache.jsp.WEB_002dINF.view.mobile.search_jsp._jspx_meth_c_005fif_005f2(search_jsp.java:592)
      	org.apache.jsp.WEB_002dINF.view.mobile.search_jsp._jspx_meth_c_005fforEach_005f1(search_jsp.java:522)
      	org.apache.jsp.WEB_002dINF.view.mobile.search_jsp._jspx_meth_c_005fwhen_005f0(search_jsp.java:323)
      	org.apache.jsp.WEB_002dINF.view.mobile.search_jsp._jspx_meth_c_005fchoose_005f0(search_jsp.java:273)
      	org.apache.jsp.WEB_002dINF.view.mobile.search_jsp._jspService(search_jsp.java:125)
      	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
      	javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
      	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
      	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
      	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
      	javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
      	org.seasar.framework.container.hotdeploy.HotdeployFilter.doHotdeployFilter(HotdeployFilter.java:86)
      	org.seasar.framework.container.hotdeploy.HotdeployFilter.doFilter(HotdeployFilter.java:67)
      	org.seasar.framework.container.filter.S2ContainerFilter.doFilter(S2ContainerFilter.java:79)
      	org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085)
      	org.seasar.struts.action.S2RequestProcessor.doForward(S2RequestProcessor.java:312)
      	org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:398)
      	org.seasar.struts.action.S2RequestProcessor.process(S2RequestProcessor.java:134)
      	org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
      	org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
      	javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
      	javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
      	org.seasar.framework.container.hotdeploy.HotdeployFilter.doHotdeployFilter(HotdeployFilter.java:86)
      	org.seasar.framework.container.hotdeploy.HotdeployFilter.doFilter(HotdeployFilter.java:67)
      	org.seasar.framework.container.filter.S2ContainerFilter.doFilter(S2ContainerFilter.java:79)
      	org.seasar.struts.filter.RoutingFilter.forward(RoutingFilter.java:219)
      	org.seasar.struts.filter.RoutingFilter.doFilter(RoutingFilter.java:90)
      	jp.sf.fess.filter.AuthenticationFilter.doFilter(AuthenticationFilter.java:98)
      	org.seasar.framework.container.hotdeploy.HotdeployFilter.doHotdeployFilter(HotdeployFilter.java:99)
      	org.seasar.framework.container.hotdeploy.HotdeployFilter.doFilter(HotdeployFilter.java:67)
      	org.seasar.framework.container.filter.S2ContainerFilter.doFilter(S2ContainerFilter.java:79)
      	org.mobylet.core.http.MobyletFilter.processFilter(MobyletFilter.java:88)
      	org.mobylet.core.http.MobyletFilter.doFilter(MobyletFilter.java:55)
      

            Assignee:
            stakeuchi stakeuchi
            Reporter:
            shinsuke shinsuke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: