【问题标题】:Security Error in Intellij when running TomCat运行 TomCat 时 Intellij 中的安全错误
【发布时间】:2025-12-15 16:40:01
【问题描述】:
当我想在 Intellij 中运行一个 tomcat 时,每隔 10 秒就会出现一次错误,并且 localhost:8080 没有显示任何内容。谁能帮帮我?
WARNING - “null OEJP/4.6” FAIL “安全错误 - [Ljava.net.URI; 未被列入可反序列化的白名单,在加载之前阻止,自定义 tomee.serialization.class.blacklist 和 tomee.serialization.class.whitelist将其添加到此处不会失败。-Dtomee.serialization.class.blacklist=- -Dtomee.serialization.class.whitelist=[Ljava.net.URI; 例如(或在 conf/system.properties 中)。” - StackTrace 的调试
【问题讨论】:
标签:
java
maven
spring-mvc
tomcat
intellij-idea
【解决方案1】:
我真的不记得我为解决这个问题所采取的确切步骤,但我可以说我理解错误与我使用 intellij 的 spring 项目的工件有某种关系,并且在将波纹管部分添加到我的 pom.xml 之后。 xml 并让 maven 自动导入需要的东西,然后在创建新的 tomCat 服务器中创建新的工件,问题就消失了。
我在 groupID、artifactID 和 version 之后添加这些标签
<packaging>war</packaging>
<name>AnyName</name>
然后这些行到 pom 的末尾:
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.4</version>
<configuration>
<warSourceDirectory>src/main/webapp</warSourceDirectory>
<warName>Example</warName>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
</plugins>
<finalName>Example</finalName>
</build>