当前位置: 首页 > 知识库问答 >
问题:

ServletException:JSP文件在AWS bitnami Tomcat 8.5上三次尝试都找不到一次

鲁霄
2023-03-14

两场战争是在同一个promise的基础上建立起来的,但不是在同一天。6月15日发布的版本部署在AWS(bitnami Tomcat8.5图像)上,运行良好。6月23日部署的版本提供了一个javax。servlet。ServletException表示文件/WEB-INF/jsp/view/home。找不到jsp。然而,它在已部署的战争中。当试图进入家庭时。jsp页面,1/3的时间,页面抛出错误。其他两次都可以。这只会发生在JSP中,而不会发生在Thymeleaf页面中。我用BeyondCompare软件比较了这两个WAR:除了git中的构建日期时间之外,它们是相同的。财产。我想服务器上可能发生了变化。但是当我把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:

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.4.5</version>
    <relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.icimedia</groupId>
<artifactId>ici-autos</artifactId>
<version>2.2.0</version>    

<packaging>war</packaging>

<properties>
    <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>
    <!-- Apache Tiles -->
    <tiles.version>3.0.8</tiles.version>
</properties>

<dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-batch</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-data-jpa</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-mail</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-thymeleaf</artifactId>
    </dependency>
    
    <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>               
</dependencies>

<build>
    <finalName>iciautos</finalName>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
        </plugin>
    
        <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>        
</build>

共有1个答案

慕鹏
2023-03-14

我找到了解决这个奇怪的间歇性问题的方法。它与为已编译的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

固定!

 类似资料:
  • 我有一个名为的MongoDB数据库,我尝试使用ES对其进行索引。使用这些插件: richardwilly98.elasticsearch/elasticsearch-river-mongodb/2.0.9和elasticsearch/elasticsearch-映射器-附件/2.5.0 这就是我试图创建索引时发生的情况。我试图删除索引并重新创建它,但没有任何帮助。 <代码>$curl-XPUT'h

  • 问题内容: 请查找每10秒钟重复一次的更新代码。但是,问题在于它每10秒在屏幕上创建一个新的GUI,而不是仅每10秒更新一次数据。请您指教 问题答案: 您只有一门课,Learningfromscrach。在其中,您具有主要功能。在主要功能内,您将创建 另一个 Learningfromscrach 实例 ,该 实例 现在传递给计时器,每10秒运行一次。当它在10秒内运行时,它会创建另一个Learni

  • 问题内容: 我已经按照这个问题的说明,文档进行了操作,甚至看过了这个问题,但是到目前为止,我无法使用来获取我的静态文件。 这些是我的(相关的?)设置: 在我的urls.py中: 我的base.html中有以下代码 我保证我不会产生幻觉: 但是,当导航到我的站点时缺少其样式表,并且当我转到时,我会尝试导航到,或者它告诉我不允许目录索引。 我在这里想念什么? 问题答案: Django对静态文件的处理仍

  • 问题内容: 我收到以下错误: 我的代码是: Windows 7,64位。Python 3.x最新,稳定。 有任何想法吗? 谢谢, 问题答案: 当命令是内置的shell时,请在调用中添加“ shell = True”。 例如,您将输入: 引用文档: 在Windows上唯一需要指定shell = True的时间是将要执行的命令内置到shell中(例如dir或copy)。您不需要shell = True

  • 当我在安装react本机依赖项后尝试执行npm start时,我收到以下错误。你能指导我如何解决这个问题吗。 /home/rakesh95/desktop/rakesh/myfamilyplan/node_modules/bindings/bindings.js:135抛出错误;^

  • 我使用的是spring boot 1.4.4,我有一个测试类,比如: 这是我的application.yml: application.yml是读取的,因为我将该值存储在字符串路径值中,conf.json位于/src/main/resources和/src/test/resouces中 但我要做什么:mapper.readtree(新URL(路径));我得到错误:文件找不到。 我试过:“class