org.apache.catalina.core.StandardWrapperValve invoke 求解?
在使用IDEA 采用spring Hibernate springMVC 小web。实现登录功能的时候出现如下报错
六月 20, 2017 4:23:27 下午 org.apache.catalina.core.StandardWrapperValve invoke
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:436)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1078)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2517)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2506)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
相关代码如下:
jsp登陆表单
<form id="login-form" action="<%=path%>/user/login" method="post" onsubmit="return checkLoginForm()">
<div class="key">
<input id="userName" name="userName" type="text" placeholder="请输入帐号">
</div>
<div class="key">
<input id="password" name="password" type="password" placeholder="请输入密码">
</div>
<div class="Sign_up" ><a href="<%=path%>/user/signUp" style="color: #be2924">注册</a></div>
<div class="signin">
<input type="submit" value="login" id="submit">
</div>
</form>
loginController
@RequestMapping(value = "login",method = RequestMethod.POST)
public String login(@RequestParam("userName") String userName,@RequestParam("password") String password, HttpSession session, RedirectAttributes attributes, WordDefined defined, CommonDate date, LogUtil logUtil, NetUtil netUtil, HttpServletRequest request){
user = userService.selectUserByUserName(userName);
if (user == null){
attributes.addFlashAttribute("error",defined.LOGIN_USERID_ERROR);
return "redirect:/login";
}else {
userInfo = userInfoService.getUserInfoByUserId(user.getUserid());
if (!user.getPassword().equals(password)){
attributes.addFlashAttribute("error",defined.LOGIN_PASSWORD_ERROR);
return "redirect:/login";
}else {
if (!user.isStatus()){
attributes.addFlashAttribute("error",defined.LOGIN_USERID_DISABLED);
return "redirect:/login";
}else {
logService.save(logUtil.setLog(user.getId(),userName,date.getTime24(),defined.LOG_TYPE_LOGIN,defined.LOG_DETAIL_USER_LOGIN,netUtil.getIpAddress(request)));
session.setAttribute("userid",user.getUserid());
session.setAttribute("username",userName);
session.setAttribute("login_status",true);
userInfo.setLastlogintime(date.getTime24());
userService.update(user);
attributes.addFlashAttribute("message",defined.LOGIN_SUCCESS);
return "redirect:/chat";
}
}
}
}
userIfoDAOImpl
@Override
public UserInfo getUserInfoByUserId(int userId) {
String hql = "from UserInfo where UserInfo.userid= ?";
return (UserInfo) this.getHibernateTemplate().find(hql, userId);
}
userDAOImpl与userInfoDAOImpl类似
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论