Error Building Hadoop 2.6.4 on OS X: - maven

[INFO] Apache Hadoop Annotations .......................... FAILURE [ 1.212 s]
I'm getting an error building Hadoop 2.6.4 on OS X. I tried various ways of skipping the Javadoc code, but it's still not working.
$ mvn clean package -DskipTests -DskipDocs -Dmaven.javadoc.skip=true
$ mvn clean package -Pdist -DskipTests -Dtar -Dmaven.javadoc.skip=true
$ mvn -version
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T08:41:47-08:00)
Maven home: /opt/local/share/java/maven3
Java version: 1.8.0_05, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.11.4", arch: "x86_64", family: "mac"
E.g. Here's sample output.
[ERROR] symbol: class AnnotationDesc
location: class ExcludeHandler
/Users/davidlaxer/hadoop/hadoop-common-project/hadoop-annotations/src/main/java/org/apache/hadoop/classification/tools/RootDocProcessor.java:[226,11] error: cannot find symbol
[ERROR] symbol: class Doc
location: class ExcludeHandler
/Users/davidlaxer/hadoop/hadoop-common-project/hadoop-annotations/src/main/java/org/apache/hadoop/classification/tools/ExcludePrivateAnnotationsJDiffDoclet.java:[36,11] error: cannot find symbol
[ERROR] symbol: variable LanguageVersion
location: class ExcludePrivateAnnotationsJDiffDoclet
/Users/davidlaxer/hadoop/hadoop-common-project/hadoop-annotations/src/main/java/org/apache/hadoop/classification/tools/ExcludePrivateAnnotationsJDiffDoclet.java:[42,16] error: cannot access Doclet
[ERROR] class file for com.sun.javadoc.Doclet not found
/Users/davidlaxer/hadoop/hadoop-common-project/hadoop-annotations/src/main/java/org/apache/hadoop/classification/tools/ExcludePrivateAnnotationsStandardDoclet.java:[35,11] error: cannot find symbol

Related

maven: Missing library from JVM

For mvn help:describe -Dplugin=help, I am getting:
Failed to execute goal org.apache.maven.plugins:maven-help-plugin:3.2.0:describe (default-cli)
on project standalone-pom: Execution default-cli of goal
org.apache.maven.plugins:maven-help-plugin:3.2.0:describe failed: An API incompatibility was encountered while executing
org.apache.maven.plugins:maven-help-plugin:3.2.0:describe:
java.lang.UnsatisfiedLinkError: Can't load library: /usr/lib/jvm/java-11-openjdk-amd64/lib/libawt_xawt.so
It says, it cannot load a library from my JVM, which I installed via apt, so I guess it also installed all needed libraries?
PS: In directory /usr/lib/jvm/java-11-openjdk-amd64/lib, these are files with libawt name:
libawt_headless.so libawt.so
cannot find the needed one libawt_xawt.so
mvn -version:
Apache Maven 3.6.3
Maven home: /usr/share/maven
Java version: 11.0.11, vendor: Ubuntu, runtime: /usr/lib/jvm/java-11-openjdk-amd64
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "5.8.0-59-generic", arch: "amd64", family: "unix"

Cannot execute Maven goal to build Tapestry 5.4.x from Getting started guide nor from the example source using Maven

I try to execute the Maven goal to build and run Apache Tapestry 5.4.x locally but it always failed:
Ideas I tried:
IntelliJ official Plugin arch type
Getting started from tapestry.org
Hotel booking example from GitHub.
Maven / Java version
tobia#FooDesktop MINGW64 ~/IdeaProjects
$ mvn --version
Apache Maven 3.6.0 (97c98ec64a1fdfee7767ce5ffb20918da4f719f3; 2018-10-24T20:41:47+02:00)
Maven home: C:\ProgramData\chocolatey\lib\maven\apache-maven-3.6.0\bin\..
Java version: 1.8.0_191, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk1.8.0_191\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
Errors
Getting Started:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.0.1:generate (default-cli) on project standalone-pom: org .apache.maven.archetype.exception.ArchetypeGenerationFailure: Error merging velocity templates: Lexical error, Encountered: "\ufffd" (65 533), after : "" at archetype-resources/src/main/webapp/mybootstrap/fonts/glyphicons-halflings-regular.eot[line 16, column 21] -> [Help 1]
Example:
[ERROR] /C:/Users/tobia/IdeaProjects/tapestry5-hotel-booking/src/main/java/com/tap5/hotelbooking/services/BasicAuthenticator.java:[87,13] try-with-resources is not supported in -source 1.5
For further information, please see the stracktraces attched to this: GitHub Gist.
After I posted this question to the offical Mailing list. The following Maven command worked:
mvn org.apache.maven.plugins:maven-archetype-plugin:2.4:generate \
-DarchetypeGroupId=org.apache.tapestry \
-DarchetypeArtifactId=quickstart \
-DarchetypeVersion=5.4.4 \
-DarchetypeRepository=local

Build HikariCP from source

I want to replace BoneCP with HikariPC. Downloaded tar.gz from here and extracted. I don't know if this is a right command but inside hikaricp-java6 directory I run
$ mvn clean compile assembly:single
maven prints error
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /Users/gkiko/Downloads/brettwooldridge-HikariCP-5cb1000/hikaricp-java6/src/main/java/com/zaxxer/hikari/util/ConcurrentBag.java:[358,20] cannot find symbol
symbol : method hasQueuedPredecessors()
location: class com.zaxxer.hikari.util.ConcurrentBag.Synchronizer
[ERROR] /Users/gkiko/Downloads/brettwooldridge-HikariCP-5cb1000/hikaricp-java6/src/main/java/com/zaxxer/hikari/pool/HikariPool.java:[150,37] cannot find symbol
symbol : method setRemoveOnCancelPolicy(boolean)
location: class java.util.concurrent.ScheduledThreadPoolExecutor
[ERROR] /Users/gkiko/Downloads/brettwooldridge-HikariCP-5cb1000/hikaricp-java6/src/main/java/com/zaxxer/hikari/pool/HikariPool.java:[486,28] cannot find symbol
symbol : method abort(java.util.concurrent.ExecutorService)
location: interface com.zaxxer.hikari.proxy.IHikariConnectionProxy
[INFO] 3 errors
[INFO] ------------------------------------------
[INFO] -------------------------------------------------------
[INFO] BUILD FAILURE
maven version:
Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; 2014-02-14T21:37:52+04:00)
Maven home: /usr/local/Cellar/maven/3.2.1/libexec
Java version: 1.6.0_65, vendor: Apple Inc.
Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Default locale: en_US, platform encoding: MacRoman
OS name: "mac os x", version: "10.9.4", arch: "x86_64", family: "mac"
java version:
java version "1.7.0_55"
Java(TM) SE Runtime Environment (build 1.7.0_55-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.55-b03, mixed mode)
Could you please tell me how to get jar file of HikariCP so I can add it to my java web app and use it with sqlite?
Java 8 is required to build HikariCP -- even the Java 6/7 compatible version. But you can download the JAR from the maven central repository here:
http://search.maven.org/#search%7Cga%7C1%7Chikaricp
Click on the 'jar' link for the HikariCP-java6 version 2.0.1 entry (second line).

Building gremlin-plugin for neo4j

I'm trying to install the gremlin-plugin so I can use neo4django in python. I tried to follow the steps laid out at https://github.com/neo4j-contrib/gremlin-plugin but I haven't had any success.
I have
downloaded gremlin-plugin-master.zip
unzip gremlin-plugin-master.zip
cd gremlin-plugin-master/
mvn clean package
At which point, I receive a message which contains the following snippit
...
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project neo4j-gremlin-plugin: Compilation failure
[ERROR] /home/mint/Downloads/gremlin-plugin-master/src/main/java/org/neo4j/server/plugin/gremlin/GremlinPlugin.java:[79,23] method autoStartTransaction in class com.tinkerpop.blueprints.impls.neo4j2.Neo4j2Graph cannot be applied to given types;
[ERROR] required: boolean
[ERROR] found: no arguments
[ERROR] reason: actual and formal argument lists differ in length
[ERROR] -> [Help 1]
....
Does anybody know what this means? I couldn't find anything that seemed to match this kind of error in this context and I have no idea where to start debugging this.
$ mvn -v
Apache Maven 3.0.4
Maven home: /usr/share/maven
Java version: 1.7.0_51, vendor: Oracle Corporation
Java home: /usr/lib/jdk1.7.0_51/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.11.0-12-generic", arch: "amd64", family: "unix"
EDIT:
After cloning the repo, I was able to compile.
Fresh clone of the repo solved the issue.

Netty compile error

I can't compile netty anymore. mvn compile gives the following:
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) # netty-common ---
[INFO] Compiling 60 source files to /home/dennis/git/netty4/common/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] Unable to locate the Javac Compiler in:
/opt/java/jre1.6.0_30/../lib/tools.jar
Please ensure you are using JDK 1.4 or above and
not a JRE (the com.sun.tools.javac.Main class is required).
In most cases you can change the location of your Java
installation by setting the JAVA_HOME environment variable.
[INFO] 1 error
My configuration:
export JAVA_HOME=/opt/java/jre1.6.0_30
export M2_HOME=/opt/apache-maven-3.0.3
export M2=$M2_HOME/bin
export PATH=$JAVA_HOME/bin:$PATH
export PATH=$M2:$PATH
A part of my path:
$echo $PATH
/opt/java/jre1.6.0_30/bin:/opt/apache-maven-3.0.3/bin:/opt/git/bin:[...]
Maven status:
dennis#denpc:~/git/netty4$ mvn --version
Apache Maven 3.0.3 (r1075438; 2011-02-28 18:31:09+0100)
Maven home: /opt/apache-maven-3.0.3
Java version: 1.6.0_30, vendor: Sun Microsystems Inc.
Java home: /opt/java/jre1.6.0_30
Default locale: de_DE, platform encoding: UTF-8
OS name: "linux", version: "2.6.24-30-generic", arch: "i386", family: "unix"
Any ideas?
Please ensure you are using JDK 1.4 or above and
not a JRE [...]
It might have to do with this line in the error given in your post above. I believe you might want to make sure that you have the path to your JDK set, as well. Otherwise, it's just finding the JRE (jre1.6.0_30).
Note: The JDK might be found in your Java SDK folder.

Resources