servletexception:jsp文件在aws bitnami tomcat 8.5上三次尝试都找不到一次

7ajki6be  于 2021-10-10  发布在  Java
关注(0)|答案(1)|浏览(415)

两场战争是在同一个承诺的基础上建立起来的,但不是在同一天。6月15日发布的版本部署在aws(bitnami tomcat8.5图像)上,运行良好。6月23日部署的版本给出了javax.servlet.servletexception,表示找不到文件/web inf/jsp/view/home.jsp。然而,它在已部署的战争中。当尝试访问home.jsp页面时,有1/3的时间页面会抛出错误。其他两次都可以。这只会发生在jsp中,而不会发生在thymeleaf页面中。我用beyondcompare软件比较了这两个WAR:除了git.properties中的build datetime之外,它们是相同的。我想服务器上可能发生了变化。但是当我把6月15日的版本放回去时,它又完美地工作了!以下是堆栈跟踪:

23-06-2021 06:07:16.054 [http-nio-8080-exec-29] INFO  c.i.i.controller.HomeController - Requested Home Page
  23-06-2021 06:07:16.058 [http-nio-8080-exec-29] DEBUG c.i.i.controller.HomeController - Region for home=
  23-06-2021 06:07:16.060 [http-nio-8080-exec-29] DEBUG c.i.i.service.impl.RegionServiceImpl - No region found for name=
  23-06-2021 06:07:16.063 [http-nio-8080-exec-29] DEBUG c.i.i.s.impl.VehicleServiceImpl - Finding vehicles with useFeatured=true
  23-06-2021 06:07:16.089 [http-nio-8080-exec-29] DEBUG c.i.i.service.impl.RegionServiceImpl - No region found for name=
  23-06-2021 06:07:16.176 [http-nio-8080-exec-29] ERROR o.s.b.w.s.support.ErrorPageFilter - Forwarding to error page from request [/] due to exception [java.io.IOException: JSPException including path '/WEB-INF/jsp/view/home.jsp'.]
  org.apache.tiles.request.render.CannotRenderException: java.io.IOException: JSPException including path '/WEB-INF/jsp/view/home.jsp'.
          at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:399)
          at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:238)
          at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:221)
          at org.apache.tiles.renderer.DefinitionRenderer.render(DefinitionRenderer.java:59)
          at org.springframework.web.servlet.view.tiles3.TilesView.renderMergedOutputModel(TilesView.java:147)
          at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:316)
          at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1393)
          at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1138)
          at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1077)
          at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:962)
          at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.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.java:883)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
          at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
          at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)
          at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)
          at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)
          at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
          at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:119)
          at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
          at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
          at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)
          at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)
          at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
          at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:105)
          at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
          at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)
          at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
          at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)
          at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
          at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:218)
          at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:212)
          at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
          at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)
          at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)
          at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
          at org.springframework.security.web.csrf.CsrfFilter.doFilterInternal(CsrfFilter.java:117)
          at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
          at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
          at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)
          at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)
          at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
          at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
          at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110)
          at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)
          at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
          at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)
          at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
          at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
          at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)
          at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)
          at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:358)
          at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:271)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
          at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
          at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
          at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
          at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
          at org.springframework.boot.web.servlet.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:126)
          at org.springframework.boot.web.servlet.support.ErrorPageFilter.access$000(ErrorPageFilter.java:64)
          at org.springframework.boot.web.servlet.support.ErrorPageFilter$1.doFilterInternal(ErrorPageFilter.java:101)
          at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
          at org.springframework.boot.web.servlet.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:119)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
          at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
          at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java: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.ErrorReportValve.invoke(ErrorReportValve.java:81)
          at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:690)
          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
          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(AbstractProtocol.java:818)
          at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1626)
          at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
          at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
          at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
          at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
          at java.base/java.lang.Thread.run(Thread.java:834)
  Caused by: java.io.IOException: java.io.IOException: JSPException including path '/WEB-INF/jsp/view/home.jsp'.
          at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:504)
          at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:386)
          at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:330)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
          at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
          at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:113)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
          at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:113)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
          at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:113)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
          at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:713)
          at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:462)
          at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:387)
          at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:315)
          at org.springframework.security.web.header.HeaderWriterFilter$HeaderWriterRequestDispatcher.forward(HeaderWriterFilter.java:171)
          at org.apache.tiles.request.servlet.ServletRequest.forward(ServletRequest.java:265)
          at org.apache.tiles.request.servlet.ServletRequest.doForward(ServletRequest.java:228)
          at org.apache.tiles.request.AbstractClientRequest.dispatch(AbstractClientRequest.java:57)
          at org.apache.tiles.request.render.DispatchRenderer.render(DispatchRenderer.java:47)
          at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:259)
          at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:397)
          ... 96 common frames omitted
  Caused by: java.io.IOException: JSPException including path '/WEB-INF/jsp/view/home.jsp'.
          at org.apache.tiles.request.servlet.ServletUtil.wrapServletException(ServletUtil.java:63)
          at org.apache.tiles.request.jsp.JspRequest.doInclude(JspRequest.java:125)
          at org.apache.tiles.request.AbstractViewRequest.dispatch(AbstractViewRequest.java:47)
          at org.apache.tiles.request.render.DispatchRenderer.render(DispatchRenderer.java:47)
          at org.apache.tiles.request.render.ChainedDelegateRenderer.render(ChainedDelegateRenderer.java:68)
          at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:259)
          at org.apache.tiles.template.InsertAttributeModel.renderAttribute(InsertAttributeModel.java:188)
          at org.apache.tiles.template.InsertAttributeModel.execute(InsertAttributeModel.java:132)
          at org.apache.tiles.jsp.taglib.InsertAttributeTag.doTag(InsertAttributeTag.java:299)
          at org.apache.jsp.WEB_002dINF.jsp.layout.default_002dlayout_jsp._jspx_meth_tiles_005finsertAttribute_005f1(default_002dlayout_jsp.java:751)
          at org.apache.jsp.WEB_002dINF.jsp.layout.default_002dlayout_jsp._jspService(default_002dlayout_jsp.java:212)
          at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:71)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
          at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:476)
          ... 124 common frames omitted
  Caused by: javax.servlet.ServletException: JSP file [/WEB-INF/jsp/view/home.jsp] not found
          at org.apache.jasper.servlet.JspServlet.handleMissingResource(JspServlet.java:407)
          at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:388)
          at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:330)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
          at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:113)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
          at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:113)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
          at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:113)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
          at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:713)
          at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:583)
          at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:519)
          at org.springframework.security.web.header.HeaderWriterFilter$HeaderWriterRequestDispatcher.include(HeaderWriterFilter.java:177)
          at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:865)
          at org.apache.jasper.runtime.PageContextImpl.doInclude(PageContextImpl.java:679)
          at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:673)
          at org.apache.tiles.request.jsp.JspRequest.doInclude(JspRequest.java:123)
          ... 136 common frames omitted

下面是pom.xml:
`
org.springframework.boot
spring-boot-starter-parent
2.4.5


com.icimedia
ici-autos
2.2.0
war

<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>11</java.version>
<mapstruct.version>1.3.1.Final</mapstruct.version>
<org.projectlombok.version>1.18.12</org.projectlombok.version>

<tiles.version>3.0.8</tiles.version>



org.springframework.boot
spring-boot-starter-batch


org.springframework.boot
spring-boot-starter-data-jpa


org.springframework.boot
spring-boot-starter-mail


org.springframework.boot
spring-boot-starter-thymeleaf

<dependency>
    <groupId>mysql</groupId>
    <artifactId>mysql-connector-java</artifactId>
    <scope>runtime</scope>
</dependency>
<dependency>
    <groupId>org.projectlombok</groupId>
    <artifactId>lombok</artifactId>         
</dependency>
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-test</artifactId>
    <scope>test</scope>
    <exclusions>
        <exclusion>
            <groupId>org.junit.vintage</groupId>
            <artifactId>junit-vintage-engine</artifactId>
        </exclusion>
    </exclusions>
</dependency>
<dependency>
    <groupId>org.springframework.batch</groupId>
    <artifactId>spring-batch-test</artifactId>
    <scope>test</scope>
</dependency>

<dependency>
    <groupId>javax.xml.bind</groupId>
    <artifactId>jaxb-api</artifactId>
</dependency>
<dependency>
    <groupId>org.glassfish.jaxb</groupId>
    <artifactId>jaxb-runtime</artifactId>
    <scope>runtime</scope>
</dependency>
<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-oxm</artifactId>
</dependency>
<dependency>
    <groupId>org.mapstruct</groupId>
    <artifactId>mapstruct-jdk8</artifactId>
    <version>${mapstruct.version}</version>
</dependency>        

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-devtools</artifactId>
    <optional>true</optional>
</dependency>
<!-- configuration processor to generate configuration metadata -->
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-configuration-processor</artifactId>
    <scope>provided</scope>
</dependency>

<!-- Tomcat embedded container-->
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-tomcat</artifactId>
    <scope>provided</scope>
</dependency>
<!-- JSTL for JSP -->
<dependency>
    <groupId>javax.servlet</groupId>
    <artifactId>jstl</artifactId>
    <!-- <scope>provided</scope> -->
</dependency>
<!-- Need this to compile JSP -->
<dependency>
    <groupId>org.apache.tomcat.embed</groupId>
    <artifactId>tomcat-embed-jasper</artifactId>
    <scope>provided</scope>
</dependency>
<!-- Need this to compile JSP,
    tomcat-embed-jasper version is not working, no idea why -->
<dependency>
    <groupId>org.eclipse.jdt.core.compiler</groupId>
    <artifactId>ecj</artifactId>
    <version>4.6.1</version>
    <scope>provided</scope>
</dependency>

<!-- Apache Tiles dependencies -->
<dependency>
    <groupId>org.apache.tiles</groupId>
    <artifactId>tiles-core</artifactId>
    <version>${tiles.version}</version>
</dependency>
<dependency>
    <groupId>org.apache.tiles</groupId>
    <artifactId>tiles-extras</artifactId>
    <version>${tiles.version}</version>
</dependency>
<dependency>
    <groupId>org.apache.tiles</groupId>
    <artifactId>tiles-servlet</artifactId>
    <version>${tiles.version}</version>
</dependency>
<dependency>
    <groupId>org.apache.tiles</groupId>
    <artifactId>tiles-api</artifactId>
    <version>${tiles.version}</version>
</dependency>
<dependency>
    <groupId>org.apache.tiles</groupId>
    <artifactId>tiles-jsp</artifactId>
    <version>${tiles.version}</version>
</dependency>

<dependency>
    <groupId>javax.validation</groupId>
    <artifactId>validation-api</artifactId>
</dependency>
<dependency>
    <groupId>org.hibernate.validator</groupId>
    <artifactId>hibernate-validator</artifactId>
    </dependency>
<dependency>
    <groupId>org.hibernate.validator</groupId>
    <artifactId>hibernate-validator-annotation-processor</artifactId>
</dependency>

<!-- FTP client -->
<dependency>
    <groupId>commons-net</groupId>
    <artifactId>commons-net</artifactId>    
    <version>3.7.2</version>        
</dependency>        

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
    <groupId>org.springframework.security</groupId>
    <artifactId>spring-security-test</artifactId>
    <scope>test</scope>
</dependency>
<dependency>
    <groupId>org.thymeleaf.extras</groupId>
    <artifactId>thymeleaf-extras-springsecurity5</artifactId>
</dependency>
<dependency>
    <groupId>org.springframework.security</groupId>
    <artifactId>spring-security-taglibs</artifactId>
    </dependency>
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-cache</artifactId>
</dependency>
<dependency>
    <groupId>javax.cache</groupId>
    <artifactId>cache-api</artifactId>
    </dependency>
<dependency>
    <groupId>org.ehcache</groupId>
    <artifactId>ehcache</artifactId>
</dependency>               
    <plugin>
       <groupId>org.apache.maven.plugins</groupId>
       <artifactId>maven-compiler-plugin</artifactId>               
       <configuration>
           <source>${java.version}</source>
           <target>${java.version}</target>
           <annotationProcessorPaths>
            <path>
                   <groupId>org.mapstruct</groupId>
                   <artifactId>mapstruct-processor</artifactId>
                   <version>${mapstruct.version}</version>
               </path>
               <!-- For JPA static metamodel generation -->
               <path>
                   <groupId>org.hibernate</groupId>
                   <artifactId>hibernate-jpamodelgen</artifactId>
                   <version>${hibernate.version}</version>
               </path>
               <path>
                    <groupId>org.projectlombok</groupId>
                    <artifactId>lombok</artifactId>
                    <version>${org.projectlombok.version}</version>
                </path>
               </annotationProcessorPaths>
               <compilerArgs>
                   <arg>-Amapstruct.suppressGeneratorTimestamp=true</arg>
                   <arg>-Amapstruct.defaultComponentModel=spring</arg>
               </compilerArgs>
       </configuration>
   </plugin>
   <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>                
        <executions>
            <execution>
                <id>add-source</id>
                <phase>generate-sources</phase>
                <goals>
                    <goal>add-source</goal>
                </goals>
                <configuration>
                    <sources>
                        <source>target/generated-sources/annotations</source>
                    </sources>
                </configuration>
            </execution>
        </executions>
    </plugin>
    <plugin>
        <groupId>pl.project13.maven</groupId>
        <artifactId>git-commit-id-plugin</artifactId>
        <executions>
            <execution>
                <phase>initialize</phase>
                <goals>
                    <goal>revision</goal>
                </goals>                        
            </execution>
        </executions>
        <configuration>
            <dateFormat>yyyyMMdd-HHmmss</dateFormat><!--  human-readable part of the version number -->
            <dotGitDirectory>${project.basedir}/.git</dotGitDirectory>
            <generateGitPropertiesFile>true</generateGitPropertiesFile>         
            <offline>true</offline>                        
        </configuration>
    </plugin>
</plugins>        

`

5t7ly7z5

5t7ly7z51#

我找到了这个奇怪的间歇性问题的解决办法。它必须为已编译的JSP清除tomcat缓存。
正如本文所解释的,JSP是在/opt/bitnami/tomcat/work/catalina/localhost中编译的。因此,我们必须删除此缓存,但首先停止tomcat:

sudo /opt/bitnami/ctlscript.sh stop tomcat

然后删除缓存:

sudo rm -rf /opt/bitnami/tomcat/work/Catalina/localhost/iciautos

然后删除应用程序并复制新的应用程序:

sudo rm -rf /opt/bitnami/tomcat/webapps/iciautos
sudo rm -rf /opt/bitnami/tomcat/webapps/iciautos.war
sudo cp iciautos.war  /opt/bitnami/tomcat/webapps/

然后重新启动

sudo /opt/bitnami/ctlscript.sh start tomcat

固定的!

相关问题