我已经创建了一个Spring Boot应用程序。当我尝试在tomcat服务器上部署应用程序时,pom.xml中的码头依赖导致了此问题。我删除了Jetty依赖项,然后尝试进行部署。现在,我得到以下与非法循环继承依赖项有关的错误。我被困住了。 请找到以下错误和pom。
能否请您提出如何解决的建议?
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.4.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<tomcat.version>9.0</tomcat.version>
<start-class>spring-boot-example.Application</start-class>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
<version>2.0.4.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
<version>2.0.4.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-data</artifactId>
<version>4.1.3.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<version>2.0.4.RELEASE</version>
<scope>test</scope>
</dependency>
<!-- <dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jetty</artifactId>
<version>2.0.4.RELEASE</version>
</dependency> -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-freemarker</artifactId>
<version>2.0.4.RELEASE</version>
</dependency>
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>sqljdbc4</artifactId>
<version>4.0</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-core</artifactId>
<version>9.0.1</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-annotations-api</artifactId>
<version>9.0.10</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
</dependency>
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.3.1</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.4</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>11.0.2</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mail</artifactId>
</dependency>
<dependency>
<groupId>com.nulab-inc</groupId>
<artifactId>zxcvbn</artifactId>
<version>1.2.5</version>
</dependency>
<dependency>
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
<version>2.3.28</version>
</dependency>
<dependency>
<groupId>com.groupdocs</groupId>
<artifactId>groupdocs-signature</artifactId>
<version>18.8</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>com.groupdocs</groupId>
<artifactId>groupdocs-annotation</artifactId>
<version>18.10</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-taglibs</artifactId>
</dependency>
<dependency>
<groupId>org.apache.tika</groupId>
<artifactId>tika-core</artifactId>
<version>1.20</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>GroupDocsJavaAPI</id>
<name>GroupDocs Java API</name>
<url>http://artifact.groupdocs.com/repo/</url>
</repository>
</repositories>
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/CDSTApplication]]
at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:441)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1432)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1422)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:944)
... 21 more
Caused by: java.lang.IllegalStateException: Unable to complete the scan for annotations for web application [/CDSTApplication] due to a StackOverflowError. Possible root causes include a too low setting for -Xss and illegal cyclic inheritance dependencies. The class hierarchy being processed was [com.aspose.email.internal.E.d->com.aspose.email.internal.E.f->com.aspose.email.internal.E.d]
at org.apache.catalina.startup.ContextConfig.checkHandlesTypes(ContextConfig.java:2143)
at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2087)
at org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:2033)
at org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:2003)
at org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.java:1956)
at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1160)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:769)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:299)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5007)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
... 27 more
package com.aspose.email.internal.E;
import com.aspose.email.a.b.b;
import com.aspose.email.a.b.c;
import com.aspose.email.a.b.z;
import com.aspose.email.internal.h.j;
public class d extends f {
private String b;
private int c;
private int d;
static char[] a;
public d(String paramString) {
if (paramString == null) {
throw new c("s");
}
this.b = paramString;
this.c = 0;
this.d = paramString.length();
}
public void close() {
dispose(true);
}
protected void dispose(boolean paramBoolean) {
this.b = null;
super.dispose(paramBoolean);
}
public int peek() {
if (this.b == null) {
a();
}
if (this.c >= this.d) {
return -1;
}
return this.b.charAt(this.c);
}
public int read() {
if (this.b == null) {
a();
}
if (this.c >= this.d) {
return -1;
}
return this.b.charAt(this.c++);
}
public int read(char[] paramArrayOfChar, int paramInt1, int paramInt2) {
if (this.b == null) {
a();
}
if (paramArrayOfChar == null) {
throw new c("buffer");
}
if (paramArrayOfChar.length - paramInt1 < paramInt2) {
throw new b();
}
if ((paramInt1 < 0) || (paramInt2 < 0)) {
throw new com.aspose.email.a.b.d();
}
int i;
if (this.c > this.d - paramInt2) {
i = this.d - this.c;
} else {
i = paramInt2;
}
j.a(this.b, this.c, paramArrayOfChar, paramInt1, i);
this.c += i;
return i;
}
public String readLine() {
if (this.b == null) {
a();
}
if (this.c >= this.b.length()) {
return null;
}
if (a == null) {
a = new char[] { '\n', '\r' };
}
int i = j.a(this.b, a, this.c);
if (i == -1) {
return readToEnd();
}
int j = (this.b.charAt(i) == '\r') && (i + 1 < this.b.length()) && (this.b.charAt(i + 1) == '\n') ? 1 : 0;
String str = j.b(this.b, this.c, i - this.c);
this.c = (i + (j != 0 ? 2 : 1));
return str;
}
public String readToEnd() {
if (this.b == null) {
a();
}
String str = j.b(this.b, this.c, this.d - this.c);
this.c = this.d;
return str;
}
static void a() {
throw new z("StringReader", "Cannot read from a closed StringReader");
}
}
package com.aspose.email.internal.E;
import com.aspose.email.internal.a.t;
import com.aspose.email.internal.h.G;
public abstract class f implements com.aspose.email.a.j {
public static f uD = new a();
public void close() {
dispose(true);
}
public void dispose() {
dispose(true);
}
protected void dispose(boolean paramBoolean) {
if (paramBoolean) {
G.a(this);
}
}
public int peek() {
return -1;
}
public int read() {
return -1;
}
public int read(char[] paramArrayOfChar, int paramInt1, int paramInt2) {
for (int i = 0; i < paramInt2; i++) {
int j;
if ((j = read()) == -1) {
return i;
}
paramArrayOfChar[(paramInt1 + i)] = ((char) j);
}
return i;
}
public String readLine() {
t localt = new t();
int i;
while (((i = read()) != -1) && (i != 10)) {
if (i == 13) {
if (peek() != 10) {
break;
}
read();
break;
}
localt.w((char) i);
}
if ((i == -1) && (localt.b() == 0)) {
return null;
}
return localt.toString();
}
public String readToEnd() {
t localt = new t();
int i;
while ((i = read()) != -1) {
localt.w((char) i);
}
return localt.toString();
}
static final class a extends f {
public String readLine() {
return null;
}
public String readToEnd() {
return com.aspose.email.internal.h.j.a;
}
}
}