weixin_42422582 2011-03-10 11:45
浏览 316
已采纳

程序报错,不知道是什么原因?

在执行登录的时候tomcat报错:
不知道是什么原因
[DNSGuard] DEBUG [http-8080-1] Permessionfilter.doFilter(48) | dnsguard
[DNSGuard] DEBUG [http-8080-1] Permessionfilter.doFilter(48) | login.jsp
[DNSGuard] DEBUG [http-8080-1] Permessionfilter.doFilter(145) | user login
[DNSGuard] DEBUG [http-8080-1] Permessionfilter.doFilter(48) | dnsguard
[DNSGuard] DEBUG [http-8080-1] Permessionfilter.doFilter(48) | login.jsp
[DNSGuard] DEBUG [http-8080-1] Permessionfilter.doFilter(145) | user login
[DNSGuard] DEBUG [http-8080-1] Permessionfilter.doFilter(48) | loginAction.do
[DNSGuard] DEBUG [http-8080-1] Permessionfilter.doFilter(145) | user login
[DNSGuard] DEBUG [http-8080-1] BaseDAO.queryRowSet(262) | select status from users where username ='admin' and pwd = md5('11111111')
[DNSGuard] DEBUG [http-8080-1] BaseDAO.queryForList(417) | select logintime from nta_log.login_log where account='admin' and onlogin=1 AND logflag=1 and latelyip <>2130706433
[DNSGuard] DEBUG [http-8080-1] BaseDAO.queryRowSet(262) | SELECT selectedID FROM nta_conf.permission_group_list t1, dns_web.users t2 WHERE username='admin' and t1.id = t2.group_id
[DNSGuard] DEBUG [http-8080-1] BaseDAO.queryRowSet(262) | select level from dns_web.menu where nodeid=1
[DNSGuard] DEBUG [http-8080-1] BaseDAO.queryRowSet(262) | select level from dns_web.menu where nodeid=2
[DNSGuard] DEBUG [http-8080-1] BaseDAO.queryRowSet(262) | select level from dns_web.menu where nodeid=3
[DNSGuard] DEBUG [http-8080-1] BaseDAO.queryRowSet(262) | select level from dns_web.menu where nodeid=4
[DNSGuard] DEBUG [http-8080-1] ActionExceptionHandler.execute(59) | java.lang.NumberFormatException: For input string: ",1,2,3,4,"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Integer.parseInt(Integer.java:447)
at java.lang.Integer.parseInt(Integer.java:497)
at com.risinginfo.nta.common.login.action.LoginAction.login(LoginAction.java:92)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280)
at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:216)
at org.springframework.web.struts.DelegatingActionProxy.execute(DelegatingActionProxy.java:106)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:75)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.risinginfo.nta.common.filter.Permessionfilter.doFilter(Permessionfilter.java:155)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.risinginfo.nta.common.jcaptcha.JCaptchaFilter.doFilter(JCaptchaFilter.java:91)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:861)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1584)
at java.lang.Thread.run(Thread.java:619)
public String getPermissionGroupID(String username)
{
String sql = "SELECT selectedID FROM nta_conf.permission_group_list t1, dns_web.users t2 ";
sql += " WHERE username='" + username + "'";
sql += " and t1.id = t2.group_id";
SqlRowSet rowSet = queryRowSet(sql);
String menu_id = ",";
if(rowSet.next())
{
String menu_id_tmp = rowSet.getString("selectedID");

        String[] menuArr = menu_id_tmp.split(",");
        for(int i = 0; i < menuArr.length; i++) {
            String nodeid = menuArr[i];
            menu_id += nodeid + ",";
            String parSql = "select level from dns_web.menu where nodeid=" + nodeid;
            SqlRowSet rowSet2 = queryRowSet(parSql);
            if(rowSet2.next()) {
                int level = rowSet2.getInt(1);
                for(int k = level - 1; k > 0; k--){
                    //4级
                    String parSql2 = "select parentid from dns_web.menu where nodeid=" + nodeid;
                    SqlRowSet rowSet3 = queryRowSet(parSql2);
                    if(rowSet3.next()){
                        String parentid = rowSet3.getString(1);
                        menu_id += parentid + ",";
                        nodeid = parentid;
                    }
                }
            }
        }
    }
    return menu_id;
}
  • 写回答

3条回答 默认 最新

  • 勤劳的小猿 2011-03-10 13:27
    关注

    LoginAction 92行
    无法把数字类型的数据放入String当中。应该是类型转换的时候 忽略了。
    你找找。

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥50 导入文件到网吧的电脑并且在重启之后不会被恢复
  • ¥15 (希望可以解决问题)ma和mb文件无法正常打开,打开后是空白,但是有正常内存占用,但可以在打开Maya应用程序后打开场景ma和mb格式。
  • ¥20 ML307A在使用AT命令连接EMQX平台的MQTT时被拒绝
  • ¥20 腾讯企业邮箱邮件可以恢复么
  • ¥15 有人知道怎么将自己的迁移策略布到edgecloudsim上使用吗?
  • ¥15 错误 LNK2001 无法解析的外部符号
  • ¥50 安装pyaudiokits失败
  • ¥15 计组这些题应该咋做呀
  • ¥60 更换迈创SOL6M4AE卡的时候,驱动要重新装才能使用,怎么解决?
  • ¥15 让node服务器有自动加载文件的功能