大多数dropwizard:0.9.2
maven依赖项使用glassfish jersey 2
:
org.glassfish.jersey.media:jersey-media-multipart:jar:2.22.1:compile
org.apache.hive:hive-service:1.2.1
和com.klarna.hiverunner:3.1.0
都使用com.sun.jersey 1
:
com.sun.jersey:jersey-client:jar:1.9:runtime
我一直收到以下错误:
java.lang.RuntimeException: javax.servlet.ServletException: io.dropwizard.jersey.setup.JerseyServletContainer-2acbc859@570b3305==io.dropwizard.jersey.setup.JerseyServletContainer,1,false
Caused by: A MultiException has 3 exceptions. They are:
1. java.lang.NullPointerException
2. java.lang.IllegalStateException: Unable to perform operation: method inject on com.sun.jersey.core.impl.provider.entity.XMLRootElementProvider$App
3. java.lang.IllegalStateException: Unable to perform operation: create on org.glassfish.jersey.message.internal.MessageBodyFactory
如果我从jersey-core
中排除hive
:
java.lang.NoSuchMethodError: org.apache.hive.service.server.HiveServer2.init(Lorg/apache/hadoop/hive/conf/HiveConf;)V
目标是使用hive
设置内存hiverunner
,然后使用hiveDB
API端点将内容写入Derby
(dropwizard
)。< / p>
jersey 2
jersey 1
似乎停止使用JSONJAXBContext
。
有没有正确的方法来解决这个jersey 1 & 2
依赖冲突?