0

I'm building a Java webapp that needs to access Hive through JDBC, deployed on a Glassfish.

Once the hive jdbc maven dependency

<dependency>
    <groupId>org.apache.hive</groupId>
    <artifactId>hive-jdbc</artifactId>
    <version>2.1.0</version>
</dependency>

is added, deployment breaks and Glassfish gives the following exception:

Error occurred during deployment: Exception while loading the app : CDI deployment failure:WELD-001408: Unsatisfied dependencies for type Injector with qualifiers @Default at injection point [BackedAnnotatedParameter] Parameter 1 of [BackedAnnotatedConstructor] @Inject public org.apache.hadoop.yarn.server.resourcemanager.webapp.RMWebAppFilter(Injector) at org.apache.hadoop.yarn.server.resourcemanager.webapp.RMWebAppFilter.(RMWebAppFilter.java:0) . Please see server.log for more details.

Eugen
  • 1,537
  • 7
  • 29
  • 57
  • Which version of Glassfish do you use? – unwichtich Jan 17 '17 at 09:16
  • I'm using GlassFish Server Open Source Edition 4.1.1 (build 1). The issue seems to have something to do with guava version having to be updated. I tried excluding them from my project, but I think I'll have to upgrade it on Glassfish itself – Eugen Jan 17 '17 at 14:33

3 Answers3

1

This seems to be a dependency issue with the libs provived by Glassfish 4.1.1 (1).

It works in Glassfish 4.1 (13). If possible, you should use this version.
You can download it here: https://glassfish.java.net/download-archive.html

unwichtich
  • 13,712
  • 4
  • 53
  • 66
  • Will try upgrading to (13) and get back to this asap. – Eugen Jan 17 '17 at 22:11
  • Updated to Glassfish 4.1 (13) and still have the same issue. I take out the hive jdbc dependency and it deploys with no issues instantly. – Eugen Jan 19 '17 at 11:11
1

Solved the issue by

  • Updating from Glassfish 4.1(1) to Glassfish 4.1(13). However this did not on itself solve the issue.
  • On Glassfish's deploy screen in the admin console I disabled Implicit CDI Discovery.
Eugen
  • 1,537
  • 7
  • 29
  • 57
1

Hive-jdbc has some unfortunate dependencies (javax.*, jetty etc). Your error comes from a transitively included YARN webapp.

Try to slim down the Maven dependencies of hive-jdbc, as some dependencies like YARN do not belong in a JDBC driver.,

Marcel
  • 266
  • 2
  • 5