等六月花开 2022-05-12 18:00 采纳率: 100%
浏览 295
已结题

Java项目在本地可以正常运行但是上传到服务器上会出现报错

有两个报错
1)
请求该页面出现异常:The host did not accept the connection within timeout of 15000 ms
result
java.lang.NullPointerException
at com.quartz.RoadshowTimer.dotask(RoadshowTimer.java:40)
at com.quartz.RunThread.run(RunThread.java:36)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:11
49) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:6
24) at java.lang.Thread.run(Thread.java:748)
2)
org.springframework.web.util.NestedServletException: Handler dispatch failed; nested ex
ception is java.lang.NoSuchMethodError: com.sysmanage.user.mapper.DeptUserMapper.findDeptFormByUserid(Ljava/lang/String;)Ljava/util/List; at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServl
et.java:1055) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServle
t.java:943) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkSer
vlet.java:1006) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java
:898) at javax.servlet.http.HttpServlet.service(HttpServlet.java:626)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.ja
va:883) at javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:231) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:166) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:166) at com.system.config.XssAndSqlFilter.doFilter(XssAndSqlFilter.java:58)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:166) at org.springframework.boot.actuate.web.trace.servlet.HttpTraceFilter.doFilterI
nternal(HttpTraceFilter.java:88) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestF
ilter.java:119) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:166) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilte
r(FilterChainProxy.java:320) at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.
invoke(FilterSecurityInterceptor.java:127) at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.
doFilter(FilterSecurityInterceptor.java:91) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilte
r(FilterChainProxy.java:334) at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(
ExceptionTranslationFilter.java:119) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilte
r(FilterChainProxy.java:334) at org.springframework.security.web.session.SessionManagementFilter.doFilter(Se
ssionManagementFilter.java:137) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilte
r(FilterChainProxy.java:334) at org.springframework.security.web.authentication.AnonymousAuthenticationFilte
r.doFilter(AnonymousAuthenticationFilter.java:111) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilte
r(FilterChainProxy.java:334) at org.springframework.security.web.servletapi.SecurityContextHolderAwareReques
tFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:170) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilte
r(FilterChainProxy.java:334) at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilt
er(RequestCacheAwareFilter.java:63) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilte
r(FilterChainProxy.java:334) at org.springframework.security.oauth2.provider.authentication.OAuth2Authentica
tionProcessingFilter.doFilter(OAuth2AuthenticationProcessingFilter.java:176) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilte
r(FilterChainProxy.java:334) at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter
(LogoutFilter.java:116) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilte
r(FilterChainProxy.java:334) at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(
HeaderWriterFilter.java:74) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestF
ilter.java:119) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilte
r(FilterChainProxy.java:334) at org.springframework.security.web.context.SecurityContextPersistenceFilter.do
Filter(SecurityContextPersistenceFilter.java:105) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilte
r(FilterChainProxy.java:334) at org.springframework.security.web.context.request.async.WebAsyncManagerIntegr
ationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestF
ilter.java:119) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilte
r(FilterChainProxy.java:334) at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterCha
inProxy.java:215) at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.
java:178) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(Delegati
ngFilterProxy.java:358) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilt
erProxy.java:271) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:166) at org.springframework.web.filter.RequestContextFilter.doFilterInternal(Request
ContextFilter.java:100) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestF
ilter.java:119) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:166) at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormConten
tFilter.java:93) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestF
ilter.java:119) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:166) at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(Hidde
nHttpMethodFilter.java:94) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestF
ilter.java:119) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:166) at org.springframework.boot.web.servlet.support.ErrorPageFilter.doFilter(ErrorP
ageFilter.java:128) at org.springframework.boot.web.servlet.support.ErrorPageFilter.access$000(Erro
rPageFilter.java:66) at org.springframework.boot.web.servlet.support.ErrorPageFilter$1.doFilterInter
nal(ErrorPageFilter.java:103) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestF
ilter.java:119) at org.springframework.boot.web.servlet.support.ErrorPageFilter.doFilter(ErrorP
ageFilter.java:121) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:166) at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.fil
terAndRecordMetrics(WebMvcMetricsFilter.java:114) at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doF
ilterInternal(WebMvcMetricsFilter.java:104) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestF
ilter.java:119) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:166) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(Char
acterEncodingFilter.java:201) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestF
ilter.java:119) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:166) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:201) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:97) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
.java:544) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143
) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogVa
lve.java:698) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:78) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:364)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:616)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java
:65) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtoco
l.java:831) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.jav
a:1629) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:
49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:11
49) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:6
24) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.ja
va:61) at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NoSuchMethodError: com.sysmanage.user.mapper.DeptUserMapper.findDe
ptFormByUserid(Ljava/lang/String;)Ljava/util/List; at com.web.assets.service.AssetsapprovalService.getUserList(AssetsapprovalServi
ce.java:306) at com.web.assets.controller.AssetsapprovalController.shenhe(AssetsapprovalCont
roller.java:91) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62
) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:43) at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(Invoc
ableHandlerMethod.java:190) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForReque
st(InvocableHandlerMethod.java:138) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandle
rMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:105) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerA
dapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:893) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerA
dapter.handleInternal(RequestMappingHandlerAdapter.java:798) at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.hand
le(AbstractHandlerMethodAdapter.java:87) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServl
et.java:1040) ... 95 more
20

  • 写回答

1条回答 默认 最新

  • l759692959 2022-05-13 16:52
    关注

    Caused by: java.lang.NoSuchMethodError:
    **com.sysmanage.user.mapper.DeptUserMapper.findDeptFormByUserid(Ljava/lang/String;)Ljava/util/List; **
    at com.web.assets.service.AssetsapprovalService.getUserList(AssetsapprovalService.java:306)

    findDeptFormByUserid报错,既然本地可以正常运行,可能是服务器代码的findDeptFormByUserid部分与本地的代码不一致

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论 编辑记录

报告相同问题?

问题事件

  • 系统已结题 5月24日
  • 已采纳回答 5月16日
  • 创建了问题 5月12日

悬赏问题

  • ¥15 微信小程序:渲染收货地址时页面不显示
  • ¥20 win7 64位DirectShow提示初始化失败如何解决?
  • ¥20 小规模孤立词识别系统设计
  • ¥15 关于Java对接海康威视车牌识别一体机SDK是否需要固定外网的IP?
  • ¥15 Linux扩容时,格式化卡住了:vgdispaly查看卷组信息,没有输出
  • ¥18 关于#ubuntu#的问题:使用背景-工作职责内有七八台ubuntu系统的电脑,平时需要互相调取资料,想实现把这几台电脑用交换机组成一个局域网,来实现指定文件夹的互相调取和写入
  • ¥20 求一个简易射频信号综测仪
  • ¥15 esp8266 tally灯 接收端改为发射端
  • ¥30 Labview代码调用access 数据库,相同代码其中一个调用不出来是为什么
  • ¥15 基于51单片机的交通灯系统,找改程序有点急