500 Internal Server Error

来源:6-9 用户模块所有功能自测试

慕少6292085

2018-12-25

图片描述

<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>
写回答

2回答

慕少6292085

提问者

2018-12-25

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
2
慕少6292085
回复
geelylucky
我用postman找到原因了,PropertiesUtil.java里边的filename我忘记改了,麻烦您了
2018-12-26
共2条回复

geelylucky

2018-12-25

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

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

请继续留言告知。

0
5
Geely
回复
geelylucky
分析的思路是对的,同学可以看看这个思路
2019-01-03
共5条回复

从0开始 独立完成企业级Java电商网站服务端开发

前后端分离,数据库接口设计,架构设计,功能开发,上线运维

9476 学习 · 8804 问题

查看课程