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.
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.,
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
Solved the issue by