1

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?

danksim
  • 617
  • 3
  • 9
  • 27

0 Answers0