Skip to content

Commit 68f14c1

Browse files
the-sakthibusbey
authored andcommitted
HBASE-22345 REST Server must have specific version of javax.annotations available at runtime
Rest Server throws NoClassDefFoundError : javax/annotation/Priority after buiding with JDK8 and running on JDK8 Signed-off-by: Sean Busbey <[email protected]>
1 parent 0c0d595 commit 68f14c1

File tree

6 files changed

+13
-14
lines changed

6 files changed

+13
-14
lines changed

hbase-assembly/src/main/assembly/client.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
<dependencySet>
4545
<excludes>
4646
<!-- Exclude J2EE libraries that get pulled in when building on JDK11 -->
47-
<exclude>javax.annotation:javax.annotation-api</exclude>
4847
<exclude>com.sun.xml.ws:jaxws-ri</exclude>
4948
<!-- Exclude libraries that we put in their own dirs under lib/ -->
5049
<exclude>org.jruby:jruby-complete</exclude>

hbase-assembly/src/main/assembly/hadoop-two-compat.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@
6767
<dependencySet>
6868
<excludes>
6969
<!-- Exclude J2EE libraries that get pulled in when building on JDK11 -->
70-
<exclude>javax.annotation:javax.annotation-api</exclude>
7170
<exclude>com.sun.xml.ws:jaxws-ri</exclude>
7271
<!-- Exclude libraries that we put in their own dirs under lib/ -->
7372
<exclude>org.jruby:jruby-complete</exclude>

hbase-protocol-shaded/pom.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,8 @@
162162
</relocations>
163163
<artifactSet>
164164
<excludes>
165-
<!-- exclude J2EE modules that come in for JDK11+ -->
165+
<!-- exclude J2EE modules that come in for JDK11+ or modules that come in for
166+
JDK8+ but need not be included -->
166167
<exclude>javax.annotation:javax.annotation-api</exclude>
167168
<!--Exclude protobuf itself. We get a patched version from hbase-thirdparty.
168169
-->

hbase-shaded/hbase-shaded-client/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@
5454
<configuration>
5555
<artifactSet>
5656
<excludes>
57-
<!-- exclude J2EE modules that come in for JDK11+ -->
58-
<exclude>javax.annotation:javax.annotation-api</exclude>
59-
<!-- exclude J2EE modules that come in for JDK11+ (since hadoop-3.2.0) -->
57+
<!-- exclude J2EE modules that come in for JDK11+ (since
58+
hadoop-3.2.0) or modules that come in for JDK8+ but
59+
need not be included -->
6060
<exclude>javax.activation:javax.activation-api</exclude>
6161
<!--
6262
Tell the shade plugin that in this case we want to include hadoop

hbase-shaded/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,9 @@
132132
<shadeTestJar>false</shadeTestJar>
133133
<artifactSet>
134134
<excludes>
135-
<!-- exclude J2EE modules that come in for JDK11+ -->
136-
<exclude>javax.annotation:javax.annotation-api</exclude>
137-
<!-- exclude J2EE modules that come in for JDK11+ (since hadoop-3.2.0) -->
135+
<!-- exclude J2EE modules that come in for JDK11+ (since
136+
hadoop-3.2.0) or modules that come in for JDK8+ but
137+
need not be included -->
138138
<exclude>javax.activation:javax.activation-api</exclude>
139139
<!-- default to excluding Hadoop, have module that want
140140
to include it redefine the exclude list -->

pom.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1991,6 +1991,11 @@
19911991
<artifactId>javax.activation</artifactId>
19921992
<version>1.2.0</version>
19931993
</dependency>
1994+
<dependency>
1995+
<groupId>javax.annotation</groupId>
1996+
<artifactId>javax.annotation-api</artifactId>
1997+
<version>1.2</version>
1998+
</dependency>
19941999
<dependency>
19952000
<groupId>org.eclipse.jetty</groupId>
19962001
<artifactId>jetty-server</artifactId>
@@ -2304,11 +2309,6 @@
23042309
</activation>
23052310
<dependencyManagement>
23062311
<dependencies>
2307-
<dependency>
2308-
<groupId>javax.annotation</groupId>
2309-
<artifactId>javax.annotation-api</artifactId>
2310-
<version>1.3.2</version>
2311-
</dependency>
23122312
<dependency>
23132313
<groupId>com.sun.xml.ws</groupId>
23142314
<artifactId>jaxws-ri</artifactId>

0 commit comments

Comments
 (0)