[ 
https://issues.apache.org/jira/browse/HIVE-17879?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16216533#comment-16216533
 ] 

Zoltan Haindrich edited comment on HIVE-17879 at 10/24/17 8:44 AM:
-------------------------------------------------------------------

I think you should probably need to use add-modules to fix this; AFAIK with 
jdk9 some of the jdk shipped extensions are disabled by default:
https://github.com/kgyrtkirk/hive/blob/ebd6d420103b5b9730220925920a6d5395238a57/.travis.yml#L42
that travis script is able to build hive including itests:
https://travis-ci.org/kgyrtkirk/hive/builds/283701492

I had to make a more fine-grained setting to run the tests with surefire; I 
guess that should probably be also enough:
https://github.com/kgyrtkirk/hive/blob/ebd6d420103b5b9730220925920a6d5395238a57/pom.xml#L96

So far I was able to build the whole project ; and run the tests up to 
itests/util ; there are a few issues - most of them are connected to tools.jar 
problems; you might find my jdk9 recon branch usefull: 
https://github.com/kgyrtkirk/hive/tree/jdk9-trial

I haven't thinked about how to add jdk9 specific options so far; since 
add-module will make an error with jdk8...

But now that I've rethinked it a bit...I think the best next step forward would 
be to enable the master branch to start building with jdk9 ; but since there 
are many of those tools.jar problems; I don't really have a good idea in mind 
to fix that...


was (Author: kgyrtkirk):
I think you should probably need to use add-modules to fix this; AFAIK with 
jdk9 some of the jdk shipped extensions are disabled by default:
https://github.com/kgyrtkirk/hive/blob/ebd6d420103b5b9730220925920a6d5395238a57/.travis.yml#L42
that travis script is able to build hive including itests:
https://travis-ci.org/kgyrtkirk/hive/builds/283701492

I had to make a more fine-grained setting to run the tests with surefire; I 
guess that should probably be also enough:
https://github.com/kgyrtkirk/hive/blob/ebd6d420103b5b9730220925920a6d5395238a57/pom.xml#L96

So far I was able to build the whole project ; and run the tests up to 
itests/util ; there are a few issues - most of them are connected to tools.jar 
problems; you might find my jdk9 recon branch usefull: 
https://github.com/kgyrtkirk/hive/tree/jdk9-trial

> Can not find java.sql.date in JDK9 when building hive
> -----------------------------------------------------
>
>                 Key: HIVE-17879
>                 URL: https://issues.apache.org/jira/browse/HIVE-17879
>             Project: Hive
>          Issue Type: Sub-task
>            Reporter: liyunzhang
>
> when build hive with jdk9
> got following error
> {code}
> [ERROR] Failed to execute goal 
> org.datanucleus:datanucleus-maven-plugin:3.3.0-release:enhance (default) on 
> project hive-standalone-metastore: Error executing DataNucleus tool 
> org.datanucleus.enhancer.DataNucleusEnhancer: InvocationTargetException: 
> java/sql/Date: java.sql.Date -> [Help 1]
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute 
> goal org.datanucleus:datanucleus-maven-plugin:3.3.0-release:enhance (default) 
> on project hive-standalone-metastore: Error executing DataNucleus tool 
> org.datanucleus.enhancer.DataNucleusEnhancer
>       at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
>       at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
>       at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
>       at 
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
>       at 
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
>       at 
> org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
>       at 
> org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
>       at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
>       at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
>       at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
>       at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
>       at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
>       at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
>       at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>       at 
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>       at java.base/java.lang.reflect.Method.invoke(Method.java:564)
>       at 
> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
>       at 
> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
>       at 
> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
>       at 
> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
> Caused by: org.apache.maven.plugin.MojoExecutionException: Error executing 
> DataNucleus tool org.datanucleus.enhancer.DataNucleusEnhancer
>       at 
> org.datanucleus.maven.AbstractDataNucleusMojo.executeInJvm(AbstractDataNucleusMojo.java:350)
>       at 
> org.datanucleus.maven.AbstractEnhancerMojo.enhance(AbstractEnhancerMojo.java:266)
>       at 
> org.datanucleus.maven.AbstractEnhancerMojo.executeDataNucleusTool(AbstractEnhancerMojo.java:72)
>       at 
> org.datanucleus.maven.AbstractDataNucleusMojo.execute(AbstractDataNucleusMojo.java:126)
>       at 
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
>       at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
>       ... 20 more
> Caused by: java.lang.reflect.InvocationTargetException
>       at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>       at 
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>       at java.base/java.lang.reflect.Method.invoke(Method.java:564)
>       at 
> org.datanucleus.maven.AbstractDataNucleusMojo.executeInJvm(AbstractDataNucleusMojo.java:333)
>       ... 25 more
> Caused by: java.lang.NoClassDefFoundError: java/sql/Date
>       at org.datanucleus.ClassConstants.<clinit>(ClassConstants.java:66)
>       at 
> org.datanucleus.plugin.NonManagedPluginRegistry.registerExtensions(NonManagedPluginRegistry.java:206)
>       at 
> org.datanucleus.plugin.NonManagedPluginRegistry.registerExtensionPoints(NonManagedPluginRegistry.java:155)
>       at org.datanucleus.plugin.PluginManager.<init>(PluginManager.java:63)
>       at 
> org.datanucleus.plugin.PluginManager.createPluginManager(PluginManager.java:430)
>       at 
> org.datanucleus.AbstractNucleusContext.<init>(AbstractNucleusContext.java:85)
>       at 
> org.datanucleus.enhancer.EnhancementNucleusContextImpl.<init>(EnhancementNucleusContextImpl.java:48)
>       at 
> org.datanucleus.enhancer.EnhancementNucleusContextImpl.<init>(EnhancementNucleusContextImpl.java:37)
>       at 
> org.datanucleus.enhancer.DataNucleusEnhancer.<init>(DataNucleusEnhancer.java:161)
>       at 
> org.datanucleus.enhancer.CommandLineHelper.createDataNucleusEnhancer(CommandLineHelper.java:153)
>       at 
> org.datanucleus.enhancer.DataNucleusEnhancer.main(DataNucleusEnhancer.java:1108)
>       ... 30 more
> Caused by: java.lang.ClassNotFoundException: java.sql.Date
>       at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:466)
>       at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:563)
>       at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496)
>       ... 41 more
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to