我正在尝试使用jetty-maven-plugin并看到一个问题:[警告]上下文启动失败o.e.j.m.p.JettyWebAppContext@21ba83e3 java.util.ServiceConfigurationError:org.apache.juli.logging.Log:提供者org.eclipse.jetty.apache.jsp.JuliLog不是子类型
我看到了几处类似错误的帖子,并且看到tomcat-juli是有问题的jar。但是我在项目依赖项中看不到它。我也没有使用AWT。
<dependency>
<groupId>com.intuit.ceg.platform</groupId>
<artifactId>mint-platform-core</artifactId>
<version>0.0.1-SNAPSHOT</version>
<exclusions>
<exclusion>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.intuit.ceg.platform</groupId>
<artifactId>notification-adapters</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.intuit.oinp.platform</groupId>
<artifactId>oinp-metrics-app</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.intuit.platform.integration.messaging.crypto</groupId>
<artifactId>messaging-crypto-client</artifactId>
<version>release-1.13</version>
<exclusions>
<exclusion>
<artifactId>idps-sdk</artifactId>
<groupId>com.intuit.idps</groupId>
</exclusion>
</exclusions>
</dependency>
<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-jetty</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<!--Rest- Assured dependencies -->
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>1.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.jayway.restassured</groupId>
<artifactId>rest-assured</artifactId>
<version>2.9.0</version>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>${mockito.version}</version>
<scope>test</scope>
</dependency>
<!-- Hibernate -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>4.3.9.Final</version>
<exclusions>
<exclusion>
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging</artifactId>
</exclusion>
<exclusion>
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging-annotations</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- https://mvnrepository.com/artifact/org.hibernate/hibernate-core -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>4.3.11.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-ehcache</artifactId>
<version>4.3.9.Final</version>
</dependency>
<!--Hikari connection pool changes -->
<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
<version>${hikari.cp.version}</version>
</dependency>
<!-- <dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>${hibernate-validator.version}</version>
</dependency> -->
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-jersey2-jaxrs</artifactId>
<version>1.5.8</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-jersey -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jersey</artifactId>
<version>1.5.4.RELEASE</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-api -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.10.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>1.5.4.RELEASE</version>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.7</version>
<configuration>
<instrumentation>
<excludes>
<exclude>**/models/**</exclude>
<exclude>**/springConfig/**</exclude>
<exclude>**/common/**</exclude>
<exclude>**/resources/**</exclude>
<exclude>**/kafka/**</exclude>
<exclude>**/kafka/producers/**</exclude>
<exclude>**/scheduler/controller/**</exclude>
<exclude>**/MetricsReporterApplication.class</exclude>
<exclude>**/SQSAsyncClientFactoryImpl.class</exclude>
<exclude>**/SQSClientImpl.class</exclude>
<exclude>**/SESWebHookEventConsumer.class</exclude>
<exclude>**/SendGridWebHookService.class</exclude>
</excludes>
</instrumentation>
<check>
<branchRate>60</branchRate>
<lineRate>95</lineRate>
<totalBranchRate>80</totalBranchRate>
<totalLineRate>97</totalLineRate>
<packageLineRate>97</packageLineRate>
<packageBranchRate>80</packageBranchRate>
<haltOnFailure>true</haltOnFailure>
<regexes>
<regex>
<pattern>com.intuit.ceg.platform.notifications.services.EventConsumerHelper.class</pattern>
<branchRate>97</branchRate>
<lineRate>97</lineRate>
</regex>
</regexes>
</check>
</configuration>
<executions>
<execution>
<goals>
<goal>clean</goal>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
<version>${maven.git.commit.id.version}</version>
<executions>
<execution>
<goals>
<goal>revision</goal>
</goals>
</execution>
</executions>
<configuration>
<dotGitDirectory>${project.basedir}/.git</dotGitDirectory>
<skipPoms>true</skipPoms>
</configuration>
</plugin>
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>9.4.18.v20190429</version>
<configuration>
<httpConnector>
<port>8080</port>
</httpConnector>
<scanIntervalSeconds>240</scanIntervalSeconds>
</configuration>
</plugin>
</plugins>
</build> ```
答案 0 :(得分:0)
只需更新您的码头版本。它应该工作。我也面临这个问题。我的配置如下
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>9.4.6.v20170531</version>
直到我的项目是一个简单的hello world时,它都能正常工作。但是当我用其他内容更新pom.xml时,开始出现问题。因此,我如下更新码头配置
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>9.4.12.v20180830</version>