Ok. Got it. Will check it out. Thanks. On Sat, Oct 22, 2022, 17:21 Geng Biao <biaoge...@gmail.com> wrote:
> Hi Sriram, > > The flink-kubernetes-operator is developed with JDK11. Compatibility with > JDK16 is not guaranteed or verified. > > As for the error, according to this issue< > https://github.com/diffplug/spotless/issues/834> of spotless, it looks > like the exception is caused by the incompatibility of spotless and high > JDK version. > > Best, > Biao Geng > > From: Sriram Ganesh <srigns...@gmail.com> > Date: Saturday, October 22, 2022 at 7:30 PM > To: dev@flink.apache.org <dev@flink.apache.org> > Subject: Building flink kubernetes operator on Mac. > Hi Everyone, > > I am trying to build a flink-kubernetes-operator on Mac. I am getting > errors. > > Java version: 1.16 > Command: mvn clean install -DskipTests > > Error: > Oct 22, 2022 4:51:34 PM com.diffplug.spotless.FormatExceptionPolicyLegacy > error > SEVERE: Step 'removeUnusedImports' found problem in > > 'src/test/java/org/apache/flink/kubernetes/operator/standalone/KubernetesStandaloneClusterDescriptorTest.java': > null > java.lang.reflect.InvocationTargetException > at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native > Method) > at > > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) > at > > java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.base/java.lang.reflect.Method.invoke(Method.java:568) > at > > com.diffplug.spotless.java.GoogleJavaFormatStep$State.lambda$constructRemoveUnusedFunction$3(GoogleJavaFormatStep.java:190) > at > > com.diffplug.spotless.java.GoogleJavaFormatStep$State.lambda$createRemoveUnusedImportsOnly$1(GoogleJavaFormatStep.java:167) > at com.diffplug.spotless.FormatterFunc.apply(FormatterFunc.java:32) > at > > com.diffplug.spotless.FormatterStepImpl$Standard.format(FormatterStepImpl.java:78) > at com.diffplug.spotless.FormatterStep$Strict.format(FormatterStep.java:76) > at com.diffplug.spotless.Formatter.compute(Formatter.java:230) > at > com.diffplug.spotless.PaddedCell.calculateDirtyState(PaddedCell.java:201) > at > com.diffplug.spotless.PaddedCell.calculateDirtyState(PaddedCell.java:188) > at > > com.diffplug.spotless.maven.SpotlessCheckMojo.process(SpotlessCheckMojo.java:52) > at > > com.diffplug.spotless.maven.AbstractSpotlessMojo.execute(AbstractSpotlessMojo.java:146) > at > > com.diffplug.spotless.maven.AbstractSpotlessMojo.execute(AbstractSpotlessMojo.java:137) > at > > org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137) > at > > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210) > at > > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156) > at > > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148) > at > > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117) > at > > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81) > at > > org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56) > at > > org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128) > at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305) > at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192) > at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105) > at org.apache.maven.cli.MavenCli.execute(MavenCli.java:957) > at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289) > at org.apache.maven.cli.MavenCli.main(MavenCli.java:193) > at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native > Method) > at > > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) > at > > java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.base/java.lang.reflect.Method.invoke(Method.java:568) > at > > org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282) > at > org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225) > at > > org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406) > at > org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347) > at org.codehaus.classworlds.Launcher.main(Launcher.java:47) > Caused by: java.lang.IllegalAccessError: class > com.google.googlejavaformat.java.RemoveUnusedImports (in unnamed module > @0x1e406cbe) cannot access class com.sun.tools.javac.util.Context (in > module jdk.compiler) because module jdk.compiler does not export > com.sun.tools.javac.util to unnamed module @0x1e406cbe > at > > com.google.googlejavaformat.java.RemoveUnusedImports.removeUnusedImports(RemoveUnusedImports.java:187) > ... 38 more > > Please help. Thanks in advance. > > Thanks, > Sriram G > > -- > *Sriram G* > *Tech* >