org.apache.catalina.core.StandardContext.filterStart 异常启动过滤器 [OCPsoft Rewrite Filter]

org.apache.catalina.core.StandardContext.filterStart Exception starting filter [OCPsoft Rewrite Filter]

我已经成功创建了一个 spring 引导项目,它运行良好,但是当我尝试将它部署到外部 tomcat 时它失败了。 Here 是我的 pom XML 下面是我的 application.properties 文件。

server.servlet.context-path=/School
joinfaces.primefaces.theme=admin
joinfaces.jsf.project-stage=development
joinfaces.primefaces.csp=true
joinfaces.primefaces.font-awesome=true
server.servlet.session.cookie.http-only=true
server.servlet.session.cookie.secure=true
joinfaces.myfaces.clear-input-when-submitted-value-is-null-or-empty=true
spring.datasource.url= jdbc:postgresql://localhost:5432/mydb
spring.datasource.username=postgres
spring.datasource.password=password
spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=true
spring.datasource.driver-class-name=org.postgresql.Driver
spring.jpa.database-platform=org.hibernate.dialect.PostgreSQLDialect
spring.jpa.hibernate.ddl-auto=update
spring.jpa.show-sql=false
server.error.whitelabel.enabled=false
spring.mvc.throw-exception-if-no-handler-found=true
server.max-http-header-size=10MB
server.port=8443
security.require-ssl=true

这是我部署到外部时得到的错误堆栈跟踪 tomcat。

09-Dec-2021 11:05:18.222 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.filterStart Exception starting filter [OCPsoft Rewrite Filter]
    io.github.classgraph.ClassGraphException: Uncaught exception during scan
        at io.github.classgraph.ClassGraphException.newClassGraphException(ClassGraphException.java:89)
        at io.github.classgraph.ClassGraph.scan(ClassGraph.java:1570)
        at io.github.classgraph.ClassGraph.scan(ClassGraph.java:1588)
        at io.github.classgraph.ClassGraph.scan(ClassGraph.java:1601)
        at org.joinfaces.autoconfigure.rewrite.SpringBootAnnotationConfigProvider.scanClasses(SpringBootAnnotationConfigProvider.java:102)
        at org.joinfaces.autoconfigure.rewrite.SpringBootAnnotationConfigProvider.lambda$getConfiguration[=12=](SpringBootAnnotationConfigProvider.java:79)
        at java.util.Optional.orElseGet(Unknown Source)
        at org.joinfaces.autoconfigure.rewrite.SpringBootAnnotationConfigProvider.getConfiguration(SpringBootAnnotationConfigProvider.java:79)
        at org.joinfaces.autoconfigure.rewrite.SpringBootAnnotationConfigProvider.getConfiguration(SpringBootAnnotationConfigProvider.java:54)
        at org.ocpsoft.rewrite.config.ConfigurationLoader.build(ConfigurationLoader.java:138)
        at org.ocpsoft.rewrite.config.ConfigurationLoader.buildCached(ConfigurationLoader.java:118)
        at org.ocpsoft.rewrite.config.ConfigurationLoader.loadConfiguration(ConfigurationLoader.java:81)
        at org.ocpsoft.rewrite.servlet.impl.DefaultHttpRewriteProvider.init(DefaultHttpRewriteProvider.java:81)
        at org.ocpsoft.rewrite.servlet.impl.DefaultHttpRewriteProvider.init(DefaultHttpRewriteProvider.java:55)
        at org.ocpsoft.rewrite.servlet.RewriteFilter.init(RewriteFilter.java:142)
        at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:281)
        at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:262)
        at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:106)
        at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4554)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5197)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:743)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:719)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:705)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1015)
        at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1895)
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
    Caused by: java.lang.OutOfMemoryError: Java heap space
        at java.util.Arrays.copyOf(Unknown Source)
        at nonapi.io.github.classgraph.fileslice.reader.ClassfileReader.readTo(ClassfileReader.java:196)
        at nonapi.io.github.classgraph.fileslice.reader.ClassfileReader.readInt(ClassfileReader.java:322)
        at nonapi.io.github.classgraph.fileslice.reader.ClassfileReader.readInt(ClassfileReader.java:381)
        at io.github.classgraph.Classfile.<init>(Classfile.java:1938)
        at io.github.classgraph.Scanner$ClassfileScannerWorkUnitProcessor.processWorkUnit(Scanner.java:734)
        at io.github.classgraph.Scanner$ClassfileScannerWorkUnitProcessor.processWorkUnit(Scanner.java:657)
        at nonapi.io.github.classgraph.concurrency.WorkQueue.runWorkLoop(WorkQueue.java:246)
        at nonapi.io.github.classgraph.concurrency.WorkQueue.access[=12=]0(WorkQueue.java:50)
        at nonapi.io.github.classgraph.concurrency.WorkQueue.call(WorkQueue.java:201)
        at nonapi.io.github.classgraph.concurrency.WorkQueue.call(WorkQueue.java:198)
        ... 4 more
09-Dec-2021 11:05:18.236 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log Closing Spring root WebApplicationContext

我不知道我可能遗漏了什么或者我应该做什么配置才能让它工作。

您的 JVM 运行 内存不足,尝试通过 adding/modifying 以下 VM 参数增加您的 Java 堆 space:

-Xms64m -Xmx256m