Installing Hue on HDP 2.1

When installing Hue on Hadoop Data Platform from Horton Works, you might run into issue compiling the code.
Maven fails with the following stack trace:

cd hue-3.8.1/desktop/libs/hadoop/java && mvn clean install -DskipTests

Jul 13, 2015 10:49:26 p.m. com.google.inject.internal.MessageProcessor visit

INFO: An exception was caught and reported. Message: java.util.NoSuchElementException

java.util.NoSuchElementException

at java.util.AbstractList$1.next(libgcj.so.10)

at com.google.inject.spi.InjectionPoint.forMember(InjectionPoint.java:116)

at com.google.inject.spi.InjectionPoint.(InjectionPoint.java:73)

at com.google.inject.spi.InjectionPoint$InjectableMethod.toInjectionPoint(InjectionPoint.java:459)

at com.google.inject.spi.InjectionPoint.getInjectionPoints(InjectionPoint.java:725)

at com.google.inject.spi.InjectionPoint.forInstanceMethodsAndFields(InjectionPoint.java:358)

at com.google.inject.spi.InjectionPoint.forInstanceMethodsAndFields(InjectionPoint.java:377)

at com.google.inject.internal.BindingBuilder.toInstance(BindingBuilder.java:84)

at org.codehaus.plexus.DefaultPlexusContainer$ContainerModule.configure(DefaultPlexusContainer.java:803)

at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:229)

at com.google.inject.spi.Elements.getElements(Elements.java:103)

at com.google.inject.spi.Elements.getElements(Elements.java:80)

at org.sonatype.guice.bean.binders.MergedModule.configure(MergedModule.java:54)

at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:229)

at com.google.inject.spi.Elements.getElements(Elements.java:103)

at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:136)

at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:104)

at com.google.inject.Guice.createInjector(Guice.java:94)

at com.google.inject.Guice.createInjector(Guice.java:71)

at com.google.inject.Guice.createInjector(Guice.java:61)

at org.codehaus.plexus.DefaultPlexusContainer.addPlexusInjector(DefaultPlexusContainer.java:470)

at org.codehaus.plexus.DefaultPlexusContainer.(DefaultPlexusContainer.java:196)

at org.codehaus.plexus.DefaultPlexusContainer.(DefaultPlexusContainer.java:160)

at org.apache.maven.cli.MavenCli.container(MavenCli.java:375)

at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:191)

at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)

at java.lang.reflect.Method.invoke(libgcj.so.10)

at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)

at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)

at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)

at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)

Jul 13, 2015 10:49:26 p.m. com.google.inject.internal.MessageProcessor visit

INFO: An exception was caught and reported. Message: java.util.NoSuchElementException

java.util.NoSuchElementException

at java.util.AbstractList$1.next(libgcj.so.10)

at com.google.inject.spi.InjectionPoint.forMember(InjectionPoint.java:116)

at com.google.inject.spi.InjectionPoint.(InjectionPoint.java:73)

at com.google.inject.spi.InjectionPoint$InjectableMethod.toInjectionPoint(InjectionPoint.java:459)

at com.google.inject.spi.InjectionPoint.getInjectionPoints(InjectionPoint.java:725)

at com.google.inject.spi.InjectionPoint.forInstanceMethodsAndFields(InjectionPoint.java:358)

at com.google.inject.spi.InjectionPoint.forInstanceMethodsAndFields(InjectionPoint.java:377)

at com.google.inject.internal.BindingBuilder.toInstance(BindingBuilder.java:84)

at org.codehaus.plexus.DefaultPlexusContainer$DefaultsModule.configure(DefaultPlexusContainer.java:836)

at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:229)

at com.google.inject.spi.Elements.getElements(Elements.java:103)

at com.google.inject.spi.Elements.getElements(Elements.java:80)

at org.sonatype.guice.bean.binders.MergedModule.configure(MergedModule.java:54)

at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:229)

at com.google.inject.spi.Elements.getElements(Elements.java:103)

at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:136)

at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:104)

at com.google.inject.Guice.createInjector(Guice.java:94)

at com.google.inject.Guice.createInjector(Guice.java:71)

at com.google.inject.Guice.createInjector(Guice.java:61)

at org.codehaus.plexus.DefaultPlexusContainer.addPlexusInjector(DefaultPlexusContainer.java:470)

at org.codehaus.plexus.DefaultPlexusContainer.(DefaultPlexusContainer.java:196)

at org.codehaus.plexus.DefaultPlexusContainer.(DefaultPlexusContainer.java:160)

at org.apache.maven.cli.MavenCli.container(MavenCli.java:375)

at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:191)

at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)

at java.lang.reflect.Method.invoke(libgcj.so.10)

at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)

at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)

at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)

at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)

[ERROR] Error executing Maven.

WORKAROUND/FIX

This is caused because maven is compiling against libgcj, which comes with OpenJDK instead of Oracle JDK.

Steps to fix:

  1. Update java alternatives to point to Oracle JDK. alternatives –config java
  2. If your preferred JDK is not showing up in the list, run the following command. *alternatives –install /usr/bin/java java /opt/WebSphere/AppServer/java/bin/java 3 *
  3. Rerun step 1, alternatives, and choose the correct JDK.
  4. This should fix the above error.
 
1
Kudos
 
1
Kudos

Now read this

Trouble with EhCache

We are running EhCache in production, and the cache has been configured with Cache size in memory and on the disk. However, upon analysis of heap dump using Eclipse Memory Analysis Tool (MAT), we noticed the EhCache was using almost 80%... Continue →