jeffyu328 发表于 2018-9-10 11:19:03

JasperException:NullPointerException StringUtil BaseTag


出现个问题:用户免登陆访问的页面,会报这个错,但如果用户登录了网站,session中有用户时,此session 下打开的页面就正常。
求教各位大咖!!!

type Exception reportmessage java.lang.NullPointerExceptiondescription The server encountered an internal error that prevented it from fulfilling this request.exceptionorg.apache.jasper.JasperException: java.lang.NullPointerException        org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:549)        org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:470)        org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)        javax.servlet.http.HttpServlet.service(HttpServlet.java:728)        org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)        org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:209)        org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:267)        org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1221)        org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1005)        org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:952)        org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:870)        org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961)        org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:852)        javax.servlet.http.HttpServlet.service(HttpServlet.java:621)        org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)        javax.servlet.http.HttpServlet.service(HttpServlet.java:728)        org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)        org.jeecgframework.core.aop.GZipFilter.doFilter(GZipFilter.java:93)        com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:140)        org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)        org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)        org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:150)        org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)root causejava.lang.NullPointerException        jodd.util.StringUtil.replace(StringUtil.java:35)        org.jeecgframework.tag.core.easyui.BaseTag.doEndTag(BaseTag.java:80)

jeffyu328 发表于 2018-9-10 12:05:08

本帖最后由 jeffyu328 于 2018-9-10 12:11 编辑

问题:lanCode为空,应该是js插件适用XX-en.js还是XXX-zh-cn.js的后缀叫langCode.
解决方法一:不要调用<t:base 标题来加载
<%--<t:base type="jquery,easyui,tools,DatePicker"></t:base>--%>
解决方法二:
在具体页面调用的方法的HttpServletRequest的参数里里加“lang”值
req.getSession().setAttribute("lang","zh-cn");//HttpServletRequest req或request

admin 发表于 2018-9-11 13:28:33

请说明你的jeecg版本号

gaoqz 发表于 2018-11-6 10:17:21

admin 发表于 2018-9-11 13:28 static/image/common/back.gif
请说明你的jeecg版本号

严重: Servlet.service() for servlet in context with path threw exception with root cause
java.lang.NullPointerException
        at org.jeecgframework.core.util.StringUtil.replace(StringUtil.java:1187)
        at org.jeecgframework.tag.core.easyui.FormValidationTag.doEndTag(FormValidationTag.java:186)

版本3.7.8

jeffyu328 发表于 2018-12-28 14:42:42

admin 发表于 2018-9-11 13:28 static/image/common/back.gif
请说明你的jeecg版本号

版本是3.7.1
页: [1]
查看完整版本: JasperException:NullPointerException StringUtil BaseTag