dropwizard and hive/hiverunner integration with maven

旧巷老猫 提交于 2019-12-11 05:04:32

问题


most of the dropwizard:0.9.2 maven dependencies use glassfish jersey 2:

org.glassfish.jersey.media:jersey-media-multipart:jar:2.22.1:compile

org.apache.hive:hive-service:1.2.1 and com.klarna.hiverunner:3.1.0 both use com.sun.jersey 1:

com.sun.jersey:jersey-client:jar:1.9:runtime

I keep getting the following error:

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

I get the following if I exclude jersey-core from hive:

java.lang.NoSuchMethodError: org.apache.hive.service.server.HiveServer2.init(Lorg/apache/hadoop/hive/conf/HiveConf;)V

The goal is to set up an in-memory hive using hiverunner then write stuff to hiveDB (Derby) using dropwizard API endpoints.

Looks like jersey 2 stopped using jersey 1's JSONJAXBContext. Is there a proper way to get around this jersey 1 & 2 dependency conflict?

来源:https://stackoverflow.com/questions/40428446/dropwizard-and-hive-hiverunner-integration-with-maven

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!