- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我已经使用 Swagger 生成了 JAX-RS 服务器代码它使用以下命令运行:
mvn clean package jetty:run
现在,服务器的目的之一是在 ElasticSearch 中索引 POST 请求。但是,添加 elastic search high level rest client pom 中的内容使服务器在启动时中断。请参阅底部的错误消息。
我想补充一点,我实际上是将另一个项目作为 Maven 依赖项导入到服务器中,这就是我第一次遇到错误的地方,因为另一个项目将 elasticsearch 作为依赖项。我缩小了范围,结果发现在没有 Elasticsearch 依赖的情况下一切正常。直接在服务器 pom 中添加 elasticsearch 依赖关系会产生相同的错误,因此这就是问题所在。
我尝试过多个版本的elasticsearch,没有区别。
我还将在底部附加 POM 文件的内容。
底部附有 Maven 依赖关系树。
按照 Joakim Erdfelt 的建议,我尝试将 javax-servlet 更改为版本 3.1 和 Jetty 9.2.28.v20190418。问题仍然存在,但有新的错误消息,见底部。
原始错误消息:
Failed startup of context o.e.j.m.p.JettyWebAppContext@29c53c4f{/,file:/home/administrator/Documents/company/projects/gefion/repos/gefmail-db/jaxrs-server/src/main/webapp/,STARTING}{file:/home/administrator/Documents/company/projects/gefion/repos/gefmail-db/jaxrs-server/src/main/webapp/}
org.eclipse.jetty.util.MultiException: Multiple exceptions at org.eclipse.jetty.annotations.AnnotationConfiguration.scanForAnnotations (AnnotationConfiguration.java:536)
at org.eclipse.jetty.annotations.AnnotationConfiguration.configure (AnnotationConfiguration.java:447)
at org.eclipse.jetty.webapp.WebAppContext.configure (WebAppContext.java:479)
at org.eclipse.jetty.webapp.WebAppContext.startContext (WebAppContext.java:1337)
at org.eclipse.jetty.server.handler.ContextHandler.doStart (ContextHandler.java:741)
at org.eclipse.jetty.webapp.WebAppContext.doStart (WebAppContext.java:505)
at org.eclipse.jetty.maven.plugin.JettyWebAppContext.doStart (JettyWebAppContext.java:365)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start (AbstractLifeCycle.java:68)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start (ContainerLifeCycle.java:132)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart (ContainerLifeCycle.java:114)
at org.eclipse.jetty.server.handler.AbstractHandler.doStart (AbstractHandler.java:61)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart (ContextHandlerCollection.java:163)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start (AbstractLifeCycle.java:68)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start (ContainerLifeCycle.java:132)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart (ContainerLifeCycle.java:114)
at org.eclipse.jetty.server.handler.AbstractHandler.doStart (AbstractHandler.java:61)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start (AbstractLifeCycle.java:68)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start (ContainerLifeCycle.java:132)
at org.eclipse.jetty.server.Server.start (Server.java:387)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart (ContainerLifeCycle.java:114)
at org.eclipse.jetty.server.handler.AbstractHandler.doStart (AbstractHandler.java:61)
at org.eclipse.jetty.server.Server.doStart (Server.java:354)
at org.eclipse.jetty.maven.plugin.JettyServer.doStart (JettyServer.java:73)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start (AbstractLifeCycle.java:68)
at org.eclipse.jetty.maven.plugin.AbstractJettyMojo.startJetty (AbstractJettyMojo.java:534)
at org.eclipse.jetty.maven.plugin.AbstractJettyMojo.execute (AbstractJettyMojo.java:357)
at org.eclipse.jetty.maven.plugin.JettyRunMojo.execute (JettyRunMojo.java:167)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
原始pom文件:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>io.swagger</groupId>
<artifactId>swagger-jaxrs-server</artifactId>
<packaging>jar</packaging>
<name>swagger-jaxrs-server</name>
<version>1.0.0</version>
<licenses>
<license>
<name>Unlicense</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
<distribution>repo</distribution>
</license>
</licenses>
<build>
<sourceDirectory>src/main/java</sourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.1.0</version>
</plugin>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>${jetty-version}</version>
<configuration>
<webApp>
<contextPath>/</contextPath>
</webApp>
<webAppSourceDirectory>target/${project.artifactId}-${project.version}</webAppSourceDirectory>
<stopPort>8079</stopPort>
<stopKey>stopit</stopKey>
<stopWait>10</stopWait>
<httpConnector>
<port>8080</port>
<idleTimeout>60000</idleTimeout>
</httpConnector>
</configuration>
<executions>
<execution>
<id>start-jetty</id>
<phase>pre-integration-test</phase>
<goals>
<goal>start</goal>
</goals>
<configuration>
<scanIntervalSeconds>0</scanIntervalSeconds>
<daemon>true</daemon>
</configuration>
</execution>
<execution>
<id>stop-jetty</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.9.1</version>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>src/gen/java</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-jersey2-jaxrs</artifactId>
<scope>compile</scope>
<version>${swagger-core-version}</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>${logback-version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
<version>${logback-version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit-version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>${servlet-api-version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet-core</artifactId>
<version>${jersey2-version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-multipart</artifactId>
<version>${jersey2-version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-joda</artifactId>
<version>${jackson-version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.jaxrs</groupId>
<artifactId>jackson-jaxrs-json-provider</artifactId>
<version>${jackson-version}</version>
</dependency>
<!-- Base64 encoding that works in both JVM and Android -->
<dependency>
<groupId>com.brsanthu</groupId>
<artifactId>migbase64</artifactId>
<version>2.2</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.elasticsearch.client/elasticsearch-rest-high-level-client -->
<dependency>
<groupId>org.elasticsearch.client</groupId>
<artifactId>elasticsearch-rest-high-level-client</artifactId>
<version>7.0.0</version>
</dependency>
<!-- Bean Validation API support -->
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.1.0.Final</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>sonatype-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<properties>
<java.version>1.7</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<swagger-core-version>1.5.18</swagger-core-version>
<jetty-version>9.2.9.v20150224</jetty-version>
<jersey2-version>2.22.2</jersey2-version>
<jackson-version>2.8.9</jackson-version>
<junit-version>4.12</junit-version>
<logback-version>1.1.7</logback-version>
<servlet-api-version>2.5</servlet-api-version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
</project>
mvn 依赖:树
[INFO] io.swagger:swagger-jaxrs-server:jar:1.0.0
[INFO] +- org.elasticsearch.client:elasticsearch-rest-high-level-client:jar:7.0.0:compile
[INFO] | +- org.elasticsearch:elasticsearch:jar:7.0.0:compile
[INFO] | | +- org.elasticsearch:elasticsearch-core:jar:7.0.0:compile
[INFO] | | +- org.elasticsearch:elasticsearch-secure-sm:jar:7.0.0:compile
[INFO] | | +- org.elasticsearch:elasticsearch-x-content:jar:7.0.0:compile
[INFO] | | | +- org.yaml:snakeyaml:jar:1.17:compile
[INFO] | | | +- com.fasterxml.jackson.dataformat:jackson-dataformat-smile:jar:2.8.11:compile
[INFO] | | | +- com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:jar:2.8.11:compile
[INFO] | | | \- com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:jar:2.8.11:compile
[INFO] | | +- org.elasticsearch:elasticsearch-geo:jar:7.0.0:compile
[INFO] | | +- org.apache.lucene:lucene-core:jar:8.0.0:compile
[INFO] | | +- org.apache.lucene:lucene-analyzers-common:jar:8.0.0:compile
[INFO] | | +- org.apache.lucene:lucene-backward-codecs:jar:8.0.0:compile
[INFO] | | +- org.apache.lucene:lucene-grouping:jar:8.0.0:compile
[INFO] | | +- org.apache.lucene:lucene-highlighter:jar:8.0.0:compile
[INFO] | | +- org.apache.lucene:lucene-join:jar:8.0.0:compile
[INFO] | | +- org.apache.lucene:lucene-memory:jar:8.0.0:compile
[INFO] | | +- org.apache.lucene:lucene-misc:jar:8.0.0:compile
[INFO] | | +- org.apache.lucene:lucene-queries:jar:8.0.0:compile
[INFO] | | +- org.apache.lucene:lucene-queryparser:jar:8.0.0:compile
[INFO] | | +- org.apache.lucene:lucene-sandbox:jar:8.0.0:compile
[INFO] | | +- org.apache.lucene:lucene-spatial:jar:8.0.0:compile
[INFO] | | +- org.apache.lucene:lucene-spatial-extras:jar:8.0.0:compile
[INFO] | | +- org.apache.lucene:lucene-spatial3d:jar:8.0.0:compile
[INFO] | | +- org.apache.lucene:lucene-suggest:jar:8.0.0:compile
[INFO] | | +- org.elasticsearch:elasticsearch-cli:jar:7.0.0:compile
[INFO] | | | \- net.sf.jopt-simple:jopt-simple:jar:5.0.2:compile
[INFO] | | +- com.carrotsearch:hppc:jar:0.7.1:compile
[INFO] | | +- com.tdunning:t-digest:jar:3.2:compile
[INFO] | | +- org.hdrhistogram:HdrHistogram:jar:2.1.9:compile
[INFO] | | +- org.apache.logging.log4j:log4j-api:jar:2.11.1:compile
[INFO] | | \- org.elasticsearch:jna:jar:4.5.1:compile
[INFO] | +- org.elasticsearch.client:elasticsearch-rest-client:jar:7.0.0:compile
[INFO] | | +- org.apache.httpcomponents:httpclient:jar:4.5.7:compile
[INFO] | | +- org.apache.httpcomponents:httpcore:jar:4.4.11:compile
[INFO] | | +- org.apache.httpcomponents:httpasyncclient:jar:4.1.4:compile
[INFO] | | +- org.apache.httpcomponents:httpcore-nio:jar:4.4.11:compile
[INFO] | | +- commons-codec:commons-codec:jar:1.11:compile
[INFO] | | \- commons-logging:commons-logging:jar:1.1.3:compile
[INFO] | +- org.elasticsearch.plugin:parent-join-client:jar:7.0.0:compile
[INFO] | +- org.elasticsearch.plugin:aggs-matrix-stats-client:jar:7.0.0:compile
[INFO] | +- org.elasticsearch.plugin:rank-eval-client:jar:7.0.0:compile
[INFO] | \- org.elasticsearch.plugin:lang-mustache-client:jar:7.0.0:compile
[INFO] | \- com.github.spullara.mustache.java:compiler:jar:0.9.3:compile
[INFO] +- io.swagger:swagger-jersey2-jaxrs:jar:1.5.18:compile
[INFO] | \- io.swagger:swagger-jaxrs:jar:1.5.18:compile
[INFO] | +- io.swagger:swagger-core:jar:1.5.18:compile
[INFO] | | +- org.apache.commons:commons-lang3:jar:3.2.1:compile
[INFO] | | \- io.swagger:swagger-models:jar:1.5.18:compile
[INFO] | | \- io.swagger:swagger-annotations:jar:1.5.18:compile
[INFO] | +- org.reflections:reflections:jar:0.9.11:compile
[INFO] | | \- org.javassist:javassist:jar:3.21.0-GA:compile
[INFO] | \- com.google.guava:guava:jar:20.0:compile
[INFO] +- ch.qos.logback:logback-classic:jar:1.1.7:compile
[INFO] | \- org.slf4j:slf4j-api:jar:1.7.20:compile
[INFO] +- ch.qos.logback:logback-core:jar:1.1.7:compile
[INFO] +- junit:junit:jar:4.12:test
[INFO] | \- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] +- javax.servlet:servlet-api:jar:2.5:compile
[INFO] +- org.glassfish.jersey.containers:jersey-container-servlet-core:jar:2.22.2:compile
[INFO] | +- org.glassfish.hk2.external:javax.inject:jar:2.4.0-b34:compile
[INFO] | +- org.glassfish.jersey.core:jersey-common:jar:2.22.2:compile
[INFO] | | +- javax.annotation:javax.annotation-api:jar:1.2:compile
[INFO] | | +- org.glassfish.jersey.bundles.repackaged:jersey-guava:jar:2.22.2:compile
[INFO] | | +- org.glassfish.hk2:hk2-api:jar:2.4.0-b34:compile
[INFO] | | | +- org.glassfish.hk2:hk2-utils:jar:2.4.0-b34:compile
[INFO] | | | \- org.glassfish.hk2.external:aopalliance-repackaged:jar:2.4.0-b34:compile
[INFO] | | +- org.glassfish.hk2:hk2-locator:jar:2.4.0-b34:compile
[INFO] | | \- org.glassfish.hk2:osgi-resource-locator:jar:1.0.1:compile
[INFO] | +- org.glassfish.jersey.core:jersey-server:jar:2.22.2:compile
[INFO] | | +- org.glassfish.jersey.core:jersey-client:jar:2.22.2:compile
[INFO] | | \- org.glassfish.jersey.media:jersey-media-jaxb:jar:2.22.2:compile
[INFO] | \- javax.ws.rs:javax.ws.rs-api:jar:2.0.1:compile
[INFO] +- org.glassfish.jersey.media:jersey-media-multipart:jar:2.22.2:compile
[INFO] | \- org.jvnet.mimepull:mimepull:jar:1.9.6:compile
[INFO] +- com.fasterxml.jackson.datatype:jackson-datatype-joda:jar:2.8.9:compile
[INFO] | +- com.fasterxml.jackson.core:jackson-annotations:jar:2.8.0:compile
[INFO] | +- com.fasterxml.jackson.core:jackson-core:jar:2.8.9:compile
[INFO] | +- com.fasterxml.jackson.core:jackson-databind:jar:2.8.9:compile
[INFO] | \- joda-time:joda-time:jar:2.7:compile
[INFO] +- com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:jar:2.8.9:compile
[INFO] | +- com.fasterxml.jackson.jaxrs:jackson-jaxrs-base:jar:2.8.9:compile
[INFO] | \- com.fasterxml.jackson.module:jackson-module-jaxb-annotations:jar:2.8.9:compile
[INFO] +- com.brsanthu:migbase64:jar:2.2:compile
[INFO] \- javax.validation:validation-api:jar:1.1.0.Final:compile
版本更改时出现错误消息:javax-servlet 版本 3.1Jetty 9.2.28.v20190418
org.eclipse.jetty.util.MultiException: Multiple exceptions
at org.eclipse.jetty.annotations.AnnotationConfiguration.scanForAnnotations (AnnotationConfiguration.java:537)
at org.eclipse.jetty.annotations.AnnotationConfiguration.configure (AnnotationConfiguration.java:448)
at org.eclipse.jetty.webapp.WebAppContext.configure (WebAppContext.java:479)
at org.eclipse.jetty.webapp.WebAppContext.startContext (WebAppContext.java:1337)
at org.eclipse.jetty.server.handler.ContextHandler.doStart (ContextHandler.java:741)
at org.eclipse.jetty.webapp.WebAppContext.doStart (WebAppContext.java:505)
at org.eclipse.jetty.maven.plugin.JettyWebAppContext.doStart (JettyWebAppContext.java:366)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start (AbstractLifeCycle.java:68)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start (ContainerLifeCycle.java:132)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart (ContainerLifeCycle.java:114)
at org.eclipse.jetty.server.handler.AbstractHandler.doStart (AbstractHandler.java:61)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart (ContextHandlerCollection.java:163)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start (AbstractLifeCycle.java:68)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start (ContainerLifeCycle.java:132)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart (ContainerLifeCycle.java:114)
at org.eclipse.jetty.server.handler.AbstractHandler.doStart (AbstractHandler.java:61)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start (AbstractLifeCycle.java:68)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start (ContainerLifeCycle.java:132)
at org.eclipse.jetty.server.Server.start (Server.java:387)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart (ContainerLifeCycle.java:114)
at org.eclipse.jetty.server.handler.AbstractHandler.doStart (AbstractHandler.java:61)
at org.eclipse.jetty.server.Server.doStart (Server.java:354)
at org.eclipse.jetty.maven.plugin.JettyServer.doStart (JettyServer.java:73)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start (AbstractLifeCycle.java:68)
at org.eclipse.jetty.maven.plugin.AbstractJettyMojo.startJetty (AbstractJettyMojo.java:535)
at org.eclipse.jetty.maven.plugin.AbstractJettyMojo.execute (AbstractJettyMojo.java:358)
at org.eclipse.jetty.maven.plugin.JettyRunMojo.execute (JettyRunMojo.java:167)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: java.lang.RuntimeException: Error scanning entry META-INF/versions/9/org/elasticsearch/core/internal/io/Streams.class from jar file:/home/administrator/.m2/repository/org/elasticsearch/elasticsearch-core/7.0.0/elasticsearch-core-7.0.0.jar
at org.eclipse.jetty.annotations.AnnotationParser.parseJar (AnnotationParser.java:913)
at org.eclipse.jetty.annotations.AnnotationParser.parse (AnnotationParser.java:831)
at org.eclipse.jetty.annotations.AnnotationConfiguration$ParserTask.call (AnnotationConfiguration.java:164)
at org.eclipse.jetty.annotations.AnnotationConfiguration$1.run (AnnotationConfiguration.java:549)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob (QueuedThreadPool.java:635)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run (QueuedThreadPool.java:555)
at java.lang.Thread.run (Thread.java:748)
Caused by: java.lang.IllegalArgumentException
at org.objectweb.asm.ClassReader.<init> (Unknown Source)
at org.objectweb.asm.ClassReader.<init> (Unknown Source)
at org.objectweb.asm.ClassReader.<init> (Unknown Source)
at org.eclipse.jetty.annotations.AnnotationParser.scanClass (AnnotationParser.java:973)
at org.eclipse.jetty.annotations.AnnotationParser.parseJarEntry (AnnotationParser.java:956)
at org.eclipse.jetty.annotations.AnnotationParser.parseJar (AnnotationParser.java:909)
at org.eclipse.jetty.annotations.AnnotationParser.parse (AnnotationParser.java:831)
at org.eclipse.jetty.annotations.AnnotationConfiguration$ParserTask.call (AnnotationConfiguration.java:164)
at org.eclipse.jetty.annotations.AnnotationConfiguration$1.run (AnnotationConfiguration.java:549)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob (QueuedThreadPool.java:635)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run (QueuedThreadPool.java:555)
at java.lang.Thread.run (Thread.java:748)
最佳答案
原因...
Error scanning entry
META-INF/versions/9/org/elasticsearch/core/internal/io/Streams.class
from jar file:/home/administrator/.m2/repository/org/elasticsearch/elasticsearch-core/7.0.0/elasticsearch-core-7.0.0.jar
...告诉您项目中存在 JEP-238 Multi-Release JAR 文件。
支持 JEP-238 Multi-Release JAR 文件的 Jetty 第一个版本是 Jetty 9.4.9。
查看过去的问题(以及有关此主题的答案):
关于java - Swagger 生成的 JAX-RS 服务器与 ElasticSearch 依赖关系中断,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56381566/
Apache CXF 可以完成任务。但我想在没有任何 spring 依赖的情况下组合它。提前谢谢你! 最佳答案 JAX-WS 和 JAX-RS 都是 Java EE 6 的一部分.因此,您可以在不使用
Apache CXF 可以完成任务。但我想在没有任何 spring 依赖的情况下组合它。提前谢谢你! 最佳答案 JAX-WS 和 JAX-RS 都是 Java EE 6 的一部分.因此,您可以在不使用
所以我的意思是你有一个分类特征 $X$(假设你已经把它变成了整数)并说你想使用特征 $A$ 将它嵌入到某个维度中,其中 $A$ 是 arity x n_embed . 通常的做法是什么?使用 for
所以我的意思是你有一个分类特征 $X$(假设你已经把它变成了整数)并说你想使用特征 $A$ 将它嵌入到某个维度中,其中 $A$ 是 arity x n_embed . 通常的做法是什么?使用 for
我知道网上有很多文档主要描述技术差异。 但是我很想知道您更喜欢一种特定类型而不是其他类型的常见用例是什么? 这些偏好是因为集成模式/产品支持特定类型吗? 最佳答案 谢谢你的回答。然而实际用例差异以及何
我想将 CXF 与 Google Guice 集成。我已经在我的项目中使用 Guice,并且我想避免添加额外的依赖项。 CXF 是我的选择,因为要求之一是能够向服务用户提供 XML、JSON、JSON
来自 JSR-339: For simplicity, JAX-RS implementations are NOT REQUIRED to support processing groups oth
我开始使用 JAX WS 研究 Java Web 服务。我正在阅读的书的第一章展示了如何仅使用 java SE 构建和部署简单的 jax ws web 服务。特别是,Web 服务是通过 Endpoin
在 JAX 的快速入门教程中,我发现可以使用以下代码行为可微函数 fun 高效地计算 Hessian 矩阵: from jax import jacfwd, jacrev def hessian(fu
JAX-RS 提供了 StreamingOutput 接口(interface),我们可以实现它来对我们的响应主体进行原始流处理。 public interface StreamingOutput {
有没有办法获得java.lang.reflect.Method为给定的 @Path 调用的方法(用 HttpServletRequest 注释) ? 这是我的用例:我在 Java EE 中 Filte
我接到了一家公司的任务,该任务向我发送了一台已完成所有设置的虚拟机。任务是我必须创建一个 API 来从数据库中检索人员详细信息并显示它。 问题是,当我运行应用程序时,服务器返回一个包含 hello w
我有一个 POST 方法调用,它接受很少的表单参数。我希望 JAX-RS 能够处理不存在特定表单参数的情况。 示例: @POST @Produces (MediaType.APPLICATION_JS
我有 JAX-RS 网络应用程序,我想记录从获取请求到响应的时间量。在带有 servlet 过滤器的 Spring Boot 中很容易。但是我的应用程序中的过滤器无法正常工作: @Provider p
使用以下网址。 http://doma.in/context/resource/some/.../undefined 我想获取 ../resource 之后的路径名,即 /some/.../undef
我编写了 2 个 Web 服务,一个使用 Jax-WS,一个使用 Jax-RPC。他们只是返回一个字符串。 我使用 jMeter 进行了压力测试,奇怪的是,Jax-RPC 速度更快。 我什么时候才能在
我花了几个小时在嵌入式 Jetty 9.1.0.v20131115 和 RESTEasy 3.0.5.Final 中安装自定义登录服务。我的登录服务将在数据库中查找用户并为他们分配角色。它看起来像这样
有没有办法操纵jaxws中使用的编码器。 我喜欢发送一个在网络服务请求中提交的 cdata,为此我想在这里尝试类似描述的东西:http://odedpeer.blogspot.de/2010/07/j
我想从 java 服务器 (Restful Jax-rs) 发送图像。我的客户是安卓。 @GET public Response getUserImage() { byte[] image =new
我对网络服务很陌生。我找不到 JAX-WS 和 CXF 之间的区别。 据我了解,JAX-WS是java提供的规范,CXF是实现。 如果我错了,请纠正我。 最佳答案 是的,你是对的。 JAX-WS 是基
我是一名优秀的程序员,十分优秀!