请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

500 Internal Server Error

图片描述

<html><head><title>Apache Tomcat/7.0.75 - Error report</title><style><!--H1 {fontfamily:Tahoma,Arial,sansserif;color:white;backgroundcolor:#525D76;fontsize:22px;} H2 {fontfamily:Tahoma,Arial,sansserif;color:white;backgroundcolor:#525D76;fontsize:16px;} H3 {fontfamily:Tahoma,Arial,sansserif;color:white;backgroundcolor:#525D76;fontsize:14px;} BODY {fontfamily:Tahoma,Arial,sansserif;color:black;backgroundcolor:white;} B {fontfamily:Tahoma,Arial,sansserif;color:white;backgroundcolor:#525D76;} P {fontfamily:Tahoma,Arial,sansserif;background:white;color:black;fontsize:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 500 - Handler processing failed; nested exception is java.lang.ExceptionInInitializerError</h1><HR size="1" noshade="noshade"><p><b>type</b> Exception report</p><p><b>message</b> <u>Handler processing failed; nested exception is java.lang.ExceptionInInitializerError</u></p><p><b>description</b> <u>The server encountered an internal error that prevented it from fulfilling this request.</u></p><p><b>exception</b> <pre>org.springframework.web.util.NestedServletException: Handler processing failed; nested exception is java.lang.ExceptionInInitializerError
	org.springframework.web.servlet.DispatcherServlet.triggerAfterCompletionWithError(DispatcherServlet.java:1284)
	org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:965)
	org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:876)
	org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:931)
	org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:833)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
	org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:807)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:108)
</pre></p><p><b>root cause</b> <pre>java.lang.ExceptionInInitializerError
	com.gmall.util.MD5Util.MD5EncodeUtf8(MD5Util.java:51)
	com.gmall.service.impl.UserServiceImpl.login(UserServiceImpl.java:35)
	com.gmall.controller.portal.UserController.login(UserController.java:37)
	sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	java.lang.reflect.Method.invoke(Method.java:497)
	org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:214)
	org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)
	org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
	org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:748)
	org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:689)
	org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:83)
	org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:945)
	org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:876)
	org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:931)
	org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:833)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
	org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:807)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:108)
</pre></p><p><b>root cause</b> <pre>java.lang.NullPointerException
	java.io.Reader.&lt;init&gt;(Reader.java:78)
	java.io.InputStreamReader.&lt;init&gt;(InputStreamReader.java:97)
	com.gmall.util.PropertiesUtil.&lt;clinit&gt;(PropertiesUtil.java:24)
	com.gmall.util.MD5Util.MD5EncodeUtf8(MD5Util.java:51)
	com.gmall.service.impl.UserServiceImpl.login(UserServiceImpl.java:35)
	com.gmall.controller.portal.UserController.login(UserController.java:37)
	sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	java.lang.reflect.Method.invoke(Method.java:497)
	org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:214)
	org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)
	org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
	org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:748)
	org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:689)
	org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:83)
	org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:945)
	org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:876)
	org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:931)
	org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:833)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
	org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:807)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:108)
</pre></p><p><b>note</b> <u>The full stack trace of the root cause is available in the Apache Tomcat/7.0.75 logs.</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/7.0.75</h3></body></html>

正在回答 回答被采纳积分+3

2回答

提问者 慕少6292085 2018-12-25 23:09:09

21:42:53,359 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@4:19 - no applicable action for [encoding], current ElementPath  is [[configuration][appender][encoding]]

21:42:53,362 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property

21:42:53,421 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender]

21:42:53,424 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [gmall]

21:42:53,445 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@18:21 - no applicable action for [append], current ElementPath  is [[configuration][appender][rollingPolicy][append]]

21:42:53,449 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy - Will use gz compression

21:42:53,451 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy - Will use the pattern /developer/apache-tomcat-7.0.73/logs/gmall.log.%d{yyyy-MM-dd} for the active file

21:42:53,456 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - The date pattern is 'yyyy-MM-dd' from file name pattern '/developer/apache-tomcat-7.0.73/logs/gmall.log.%d{yyyy-MM-dd}.gz'.

21:42:53,456 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - Roll-over at midnight.

21:42:53,457 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - Setting initial period to Tue Dec 25 15:20:30 CST 2018

21:42:53,459 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property

21:42:53,462 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[gmall] - Active log file name: /developer/apache-tomcat-7.0.73/logs/gmall.log

21:42:53,462 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[gmall] - File property is set to [/developer/apache-tomcat-7.0.73/logs/gmall.log]

21:42:53,464 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender]

21:42:53,464 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [error]

21:42:53,465 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@33:21 - no applicable action for [append], current ElementPath  is [[configuration][appender][rollingPolicy][append]]


0 回复 有任何疑惑可以回复我~
  • 同学,你好,请查看MD5Util.java文件的51行,报错中有提到这个地方产生了一个ExceptionInInitializerError。
    回复 有任何疑惑可以回复我~ 2018-12-26 11:57:49
  • 提问者 慕少6292085 回复 geelylucky #2
    我用postman找到原因了,PropertiesUtil.java里边的filename我忘记改了,麻烦您了
    回复 有任何疑惑可以回复我~ 2018-12-26 22:47:24
geelylucky 2018-12-25 21:40:09

同学,你好,我是geely老师的助教。

你这个是空指针异常哦,请你提供后台应用程序报错信息,以便我准确地定位问题所在。

请继续留言告知。

0 回复 有任何疑惑可以回复我~
  • 提问者 慕少6292085 #1
    [21:43:10.201][DEBUG][org.mybatis.spring.SqlSessionUtils][http-bio-8088-exec-7] Creating a new SqlSession
    [21:43:10.235][DEBUG][org.mybatis.spring.SqlSessionUtils][http-bio-8088-exec-7] SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@156da75] was not registered for synchronization because synchronization is not active
    [21:43:10.646][DEBUG][o.m.s.t.SpringManagedTransaction][http-bio-8088-exec-7] JDBC Connection [jdbc:mysql://localhost:3306/gmall?characterEncoding=utf-8, UserName=root@localhost, MySQL-AB JDBC Driver] will not be managed by Spring
    [21:43:10.651][DEBUG][com.gmall.dao.UserMapper.checkUsername][http-bio-8088-exec-7] ==>  Preparing: SELECT count(1) from mmall_user where username = ? 
    [21:43:10.678][DEBUG][com.gmall.dao.UserMapper.checkUsername][http-bio-8088-exec-7] ==> Parameters: admin(String)
    [21:43:10.697][DEBUG][com.gmall.dao.UserMapper.checkUsername][http-bio-8088-exec-7] <==      Total: 1
    [21:43:10.700][DEBUG][org.mybatis.spring.SqlSessionUtils][http-bio-8088-exec-7] Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@156da75]
    回复 有任何疑惑可以回复我~ 2018-12-25 21:43:56
  • 提问者 慕少6292085 #2
    老哥,能看出什么端倪吗,我是照着视频敲的,不知道怎么看哪里错了
    回复 有任何疑惑可以回复我~ 2018-12-25 22:50:49
  • geelylucky 回复 提问者 慕少6292085 #3
    同学,你好,你提供的信息不是报错信息哦,这个信息都是没有DEBUG级别的信息,我无法从里面定位问题哦,你需要提供应用程序打印出来的错误信息。
    回复 有任何疑惑可以回复我~ 2018-12-25 23:02:57
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信