[
https://issues.apache.org/jira/browse/HBASE-22264?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16821445#comment-16821445
]
Sean Busbey commented on HBASE-22264:
-------------------------------------
{quote}
652 # Add lib/jdk11 jars to the classpath
653
654 JAVA=$JAVA_HOME/bin/java
655 version=$(JAVA -version 2>&1 | awk -F '"' '/version/ {print $2}')
656 if [[ "$version" > "11" ]]; then
657 for f in ${HBASE_HOME}/lib/jdk11/*; do
658 if [ -f "${f}" ]; then
659 CLASSPATH="${CLASSPATH}:${f}"
660 fi
661 done
662 fi
{quote}
given brittleness of jdk version strings, can we 1) in debug mode output some
text about what we're doing here and 2) add an environment variable that
overrides this detection to include/exclude these dependencies when it's
defined?
> Rest Server (master branch) on jdk 11 throws NoClassDefFoundError :
> javax/annotation/Priority
> ---------------------------------------------------------------------------------------------
>
> Key: HBASE-22264
> URL: https://issues.apache.org/jira/browse/HBASE-22264
> Project: HBase
> Issue Type: Bug
> Reporter: Sakthi
> Assignee: Sakthi
> Priority: Major
> Labels: jdk11
> Attachments: hbase-22264.master.001.patch
>
>
> This is in continuation with HBASE-22249. When compiled with jdk 8 and run on
> jdk 11, the master branch throws the following exception while an attempt to
> start the hbase rest server:
> {code:java}
> Exception in thread "main" java.lang.NoClassDefFoundError:
> javax/annotation/Priority
> at
> org.glassfish.jersey.model.internal.ComponentBag.modelFor(ComponentBag.java:483)
> at
> org.glassfish.jersey.model.internal.ComponentBag.access$100(ComponentBag.java:89)
> at
> org.glassfish.jersey.model.internal.ComponentBag$5.call(ComponentBag.java:408)
> at
> org.glassfish.jersey.model.internal.ComponentBag$5.call(ComponentBag.java:398)
> at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
> at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
> at org.glassfish.jersey.internal.Errors.process(Errors.java:228)
> at
> org.glassfish.jersey.model.internal.ComponentBag.registerModel(ComponentBag.java:398)
> at
> org.glassfish.jersey.model.internal.ComponentBag.register(ComponentBag.java:235)
> at
> org.glassfish.jersey.model.internal.CommonConfig.register(CommonConfig.java:420)
> at
> org.glassfish.jersey.server.ResourceConfig.register(ResourceConfig.java:425)
> at org.apache.hadoop.hbase.rest.RESTServer.run(RESTServer.java:245)
> at org.apache.hadoop.hbase.rest.RESTServer.main(RESTServer.java:421)
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)