项目

一般

简介

v9 旧版本,配置日志按天生成异常 Caused by: java.lang.NullPointerException: null

由 何 善才 在 超过一年 之前添加

版本信息:

Apusic Application Server Enterprise Edition 9.0 SP7 build 202109060946

异常信息:
 

23-09-08 10:08:12 信息 [apusic.con.out-ChatConnection_5835_1]  INFO com.jaguar.ChatConnection.run(ChatConnection.java:52) - 客户端进入连接:Client:/30.1.2.186:57672:57672

2023-09-08 10:08:12 信息 [apusic.con.out-ChatConnection_5835_1] ERROR com.jaguar.ChatConnection.run(ChatConnection.java:72) - Thread socket read return -1.null.2023-09-08 10:08:12

2023-09-08 10:08:12 信息 [apusic.con.out-ChatConnection_5835_1]  INFO com.jaguar.ChatConnection.run(ChatConnection.java:163) - /30.1.2.186:57672, userName=null 连接断开。Client:/30.1.2.186:57672:57672

2023-09-08 10:08:31 错误 [apusic.con.err-Thread-3686] java.lang.ClassNotFoundException: _IOT.stdLateCome.stdLateComeTimeTask
2023-09-08 10:08:31 错误 [apusic.con.err-Thread-3686]     at com.apusic.web.container.ReloadableClassLoader.loadClass(ReloadableClassLoader.java:144)
2023-09-08 10:08:31 错误 [apusic.con.err-Thread-3686]     at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
2023-09-08 10:08:31 错误 [apusic.con.err-Thread-3686]     at java.lang.Class.forName0(Native Method)
2023-09-08 10:08:31 错误 [apusic.con.err-Thread-3686]     at java.lang.Class.forName(Class.java:264)
2023-09-08 10:08:31 错误 [apusic.con.err-Thread-3686]     at com.jaguar.TimerTaskDaemon$1.run(TimerTaskDaemon.java:230)
2023-09-08 10:08:31 错误 [apusic.con.err-Thread-3686]     at java.lang.Thread.run(Thread.java:748)
2023-09-08 10:08:44 信息 [apusic.con.out-HTTPHandler-8-87] 10:08:44.934 [HTTPHandler-8-87] ERROR c.a.a.m.web.log.LogConfigController - add or edit DateFile globalHandler failed
javax.management.RuntimeMBeanException: javax.management.RuntimeMBeanException: RuntimeException thrown in operation addGlobalHandler
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.rethrow(DefaultMBeanServerInterceptor.java:839) ~[na:1.8.0_202]
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.rethrowMaybeMBeanException(DefaultMBeanServerInterceptor.java:852) ~[na:1.8.0_202]
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:821) ~[na:1.8.0_202]
    at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801) ~[na:1.8.0_202]
    at com.apusic.aasadmin.core.jvm.jmx.util.MBeanInvokeUtils.invoke(MBeanInvokeUtils.java:683) ~[aasadmin-core-jvm-9.0.3.jar:na]
    at com.apusic.aasadmin.core.jvm.jmx.util.MBeanInvokeUtils.invoke(MBeanInvokeUtils.java:625) ~[aasadmin-core-jvm-9.0.3.jar:na]
    at com.apusic.aasadmin.core.jvm.jmx.util.MBeanInvokeUtils.invoke(MBeanInvokeUtils.java:651) ~[aasadmin-core-jvm-9.0.3.jar:na]
    at com.apusic.aasadmin.core.server.aasengine.log.LogConfigServiceImpl.addOrModifyGlobalHandler(LogConfigServiceImpl.java:439) ~[aasadmin-core-server-aas-9.0.3.jar:na]
    at com.apusic.aasadmin.core.server.aasengine.log.LogConfigServiceImpl.addGlobalHandler(LogConfigServiceImpl.java:129) ~[aasadmin-core-server-aas-9.0.3.jar:na]
    at com.apusic.aasadmin.monitor.web.log.LogConfigController.configGlobalHandler(LogConfigController.java:347) [classes/:na]
    at com.apusic.aasadmin.monitor.web.log.LogConfigController.addOrEditGlobalHandler(LogConfigController.java:319) [classes/:na]
    at com.apusic.aasadmin.monitor.web.log.LogConfigController.delOrConfigGlobalHandler(LogConfigController.java:281) [classes/:na]
    at com.apusic.aasadmin.monitor.web.log.LogConfigController.saveGlobalLogConfig(LogConfigController.java:252) [classes/:na]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_202]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_202]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_202]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_202]
    at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:219) [spring-web-3.2.2.RELEASE.jar:3.2.2.RELEASE]
    at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132) [spring-web-3.2.2.RELEASE.jar:3.2.2.RELEASE]
    at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104) [spring-webmvc-3.2.2.RELEASE.jar:3.2.2.RELEASE]
    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:745) [spring-webmvc-3.2.2.RELEASE.jar:3.2.2.RELEASE]
    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:686) [spring-webmvc-3.2.2.RELEASE.jar:3.2.2.RELEASE]
    at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80) [spring-webmvc-3.2.2.RELEASE.jar:3.2.2.RELEASE]
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:925) [spring-webmvc-3.2.2.RELEASE.jar:3.2.2.RELEASE]
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856) [spring-webmvc-3.2.2.RELEASE.jar:3.2.2.RELEASE]
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:936) [spring-webmvc-3.2.2.RELEASE.jar:3.2.2.RELEASE]
    at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:838) [spring-webmvc-3.2.2.RELEASE.jar:3.2.2.RELEASE]
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:688) [javaee.jar:na]
    at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:812) [spring-webmvc-3.2.2.RELEASE.jar:3.2.2.RELEASE]
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:770) [javaee.jar:na]
    at com.apusic.web.container.ServletComponent.service(ServletComponent.java:87) [apusic.jar:na]
    at com.apusic.web.container.ServletFilterWrapper.doFilter(ServletFilterWrapper.java:38) [apusic.jar:na]
    at com.apusic.web.container.FilterChainImpl.doFilter(FilterChainImpl.java:48) [apusic.jar:na]
    at org.glassfish.tyrus.servlet.TyrusServletFilter.doFilter(TyrusServletFilter.java:290) [tyrus-server-1.7.jar:na]
    at com.apusic.web.container.FilterComponent.doFilter(FilterComponent.java:65) [apusic.jar:na]
    at com.apusic.web.container.FilterChainImpl.performFilter(FilterChainImpl.java:38) [apusic.jar:na]
    at com.apusic.web.container.FilterChainImpl.doFilter(FilterChainImpl.java:45) [apusic.jar:na]
    at com.apusic.aasadmin.monitor.web.filter.AuthorityFilter.doFilter(AuthorityFilter.java:231) [classes/:na]
    at com.apusic.web.container.FilterComponent.doFilter(FilterComponent.java:65) [apusic.jar:na]
    at com.apusic.web.container.FilterChainImpl.performFilter(FilterChainImpl.java:38) [apusic.jar:na]
    at com.apusic.web.container.FilterChainImpl.doFilter(FilterChainImpl.java:45) [apusic.jar:na]
    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) [spring-web-3.2.2.RELEASE.jar:3.2.2.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-3.2.2.RELEASE.jar:3.2.2.RELEASE]
    at com.apusic.web.container.FilterComponent.doFilter(FilterComponent.java:65) [apusic.jar:na]
    at com.apusic.web.container.FilterChainImpl.performFilter(FilterChainImpl.java:38) [apusic.jar:na]
    at com.apusic.web.container.FilterChainImpl.doFilter(FilterChainImpl.java:45) [apusic.jar:na]
    at com.apusic.aasadmin.monitor.web.filter.CheckLoginFilter.doFilter(CheckLoginFilter.java:53) [classes/:na]
    at com.apusic.web.container.FilterComponent.doFilter(FilterComponent.java:65) [apusic.jar:na]
    at com.apusic.web.container.FilterChainImpl.performFilter(FilterChainImpl.java:38) [apusic.jar:na]
    at com.apusic.web.container.FilterChainImpl.doFilter(FilterChainImpl.java:45) [apusic.jar:na]
    at com.apusic.aasadmin.monitor.web.filter.PrepareFilter.doFilter(PrepareFilter.java:51) [classes/:na]
    at com.apusic.web.container.FilterComponent.doFilter(FilterComponent.java:65) [apusic.jar:na]
    at com.apusic.web.container.FilterChainImpl.performFilter(FilterChainImpl.java:38) [apusic.jar:na]
    at com.apusic.web.container.WebContainer.invoke(WebContainer.java:1167) [apusic.jar:na]
    at com.apusic.web.container.WebContainer.doProcessRequest(WebContainer.java:948) [apusic.jar:na]
    at com.apusic.web.container.WebContainer.processRequest(WebContainer.java:809) [apusic.jar:na]
    at com.apusic.web.http.VirtualHost.processRequest(VirtualHost.java:370) [apusic.jar:na]
    at com.apusic.web.http.HttpServer.processRequest(HttpServer.java:317) [apusic.jar:na]
    at com.apusic.web.http.HttpConnectionHandler.service(HttpConnectionHandler.java:26) [apusic.jar:na]
    at com.apusic.web.http.ConnectionHandler.processRequest(ConnectionHandler.java:360) [apusic.jar:na]
    at com.apusic.web.http.ConnectionHandler.processConnection(ConnectionHandler.java:138) [apusic.jar:na]
    at com.apusic.web.http.ConnectionHandler.run(ConnectionHandler.java:52) [apusic.jar:na]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_202]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_202]
    at java.lang.Thread.run(Thread.java:748) [na:1.8.0_202]
Caused by: javax.management.RuntimeMBeanException: RuntimeException thrown in operation addGlobalHandler
    at com.apusic.jmx.MBeanDescriptor.invoke(MBeanDescriptor.java:561) ~[apusic.jar:na]
    at com.apusic.jmx.DynamicMBeanSupport.invoke(DynamicMBeanSupport.java:62) ~[apusic.jar:na]
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819) ~[na:1.8.0_202]
    ... 62 common frames omitted
Caused by: java.lang.NullPointerException: null
    at com.apusic.logging.DateFileHandler.generate(DateFileHandler.java:181) ~[apusic.jar:na]
    at com.apusic.logging.DateFileHandler.openFile(DateFileHandler.java:156) ~[apusic.jar:na]
    at com.apusic.logging.DateFileHandler.<init>(DateFileHandler.java:58) ~[apusic.jar:na]
    at com.apusic.tools.admin.LoggingAdmin.handlerConfig2Handler(LoggingAdmin.java:336) ~[razor.jar:na]
    at com.apusic.tools.admin.LoggingAdmin.addGlobalHandler(LoggingAdmin.java:252) ~[razor.jar:na]
    at com.apusic.tools.admin.AdminService.addGlobalHandler(AdminService.java:372) ~[razor.jar:na]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_202]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_202]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_202]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_202]
    at com.apusic.jmx.MBeanDescriptor.invoke(MBeanDescriptor.java:551) ~[apusic.jar:na]
    ... 64 common frames omitted
 

原因:

报错版本信息代码:

this.logCalendar=null ,空引用造成

解决:

方法一:如果是使用当前版本的可以将补丁包 fix-log-null-pointer-exception.jar 添加到sp目录下,然后重启中间件 

方法二: 升级到 2022版本的之后的中间件