Search code examples
javamacosmavengradlegobblin

I'm trying to install Apache Gobblin. How can I install it using Gradle?


I want to install Apache Gobblin on my MacOS X. For this, I downloaded version 0.14.0 and followed the steps here.

Install Gobblin

The first thing I did was this:

tar -xvf incubator-gobblin-release-0.14.0.tar.gz

and then:

cd Users/xxxx/incubator-gobblin-release-0.14.0

and finally:

./gradlew build

I came across a error like this.

    Parallel execution is an incubating feature.
    Parallel execution with configuration on demand is an incubating feature.

    > Configure project :
    Build property: gobblinFlavor=standard
    Build property: jdkVersion=1.8
    Build property: 
    sonatypeArtifactRepository=https://oss.sonatype.org/service/local/staging/deploy/maven2/
    Build property: 
  
    sonatypeArtifactSnapshotRepository=https://oss.sonatype.org/content/repositories/snapshots/
    Build property:                
        
    nexusArtifactRepository=https://repository.apache.org/service/local/staging/deploy/maven2
    Build property: 
    
 nexusArtifactSnapshotRepository=https://repository.apache.org/content/repositories/snapshots
    Build property: doNotSignArtifacts=false
    Build property: avroVersion=1.8.1
    Build property: awsVersion=1.11.8
    Build property: bytemanVersion=2.2.1
    Build property: confluentVersion=2.0.1
    Build property: hadoopVersion=2.3.0
    Build property: hiveVersion=1.0.1
    Build property: kafka08Version=0.8.2.2
    Build property: kafka09Version=0.9.0.1
    Build property: pegasusVersion=11.0.0
    Build property: salesforceVersion=42.0.0
    Detected Gradle version major=4 minor=9

    FAILURE: Build failed with an exception.
    * Where:
    Script '/Users/xxxxxx/incubator-gobblin-release- 
    0.14.0/gradle/scripts/globalDependencies.gradle' line: 44

    * What went wrong:
    A problem occurred evaluating script.
    > Cannot invoke method getURLs() on null object

    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info 
    or --debug option to get more log output. Run with --scan to get full 
    insights.

    * Get more help at https://help.gradle.org

    Deprecated Gradle features were used in this build, making it 
    incompatible with Gradle 5.0.
    Use '--warning-mode all' to show the individual deprecation warnings.
    See https://docs.gradle.org/4.9/userguide/command_line_interface.html#sec:command_line_warnings
  

My Java Version:

java 9.0.4

Java(TM) SE Runtime Environment (build 9.0.4+11)

Java HotSpot(TM) 64-Bit Server VM (build 9.0.4+11, mixed mode)

My Maven Version:

Apache Maven 3.5.3 (3383c37e1f9e9b3bc3df5050c29c8aff9f295297; 2018-02-24T22:49:05+03:00)

Maven home: /usr/local/Cellar/maven/3.5.3/libexec

Java version: 9.0.4, vendor: Oracle Corporation

Java home: /Library/Java/JavaVirtualMachines/jdk-9.0.4.jdk/Contents/Home

Default locale: en_TR, platform encoding: UTF-8

OS name: "mac os x", version: "10.14.1", arch: "x86_64", family: "mac"

If anyone has any information or suggestions, I'm waiting.


Solution

  • Just digged a little into the codes. Are you sure that Java 9 is supported by their build scripts?

    Look at the line you have issue with: globalDependencies.gradle:44. See ToolProvider.getSystemToolClassLoader(). Now let's look at its docs for Java 9:

    Deprecated. This method is subject to removal in a future version of Java SE. Use the system tool provider or service loader mechanisms to locate system tools as well as user-installed tools. Returns a class loader that may be used to load system tools, or null if no such special loader is provided.

    Implementation Requirements:

    This implementation always returns null.

    See that? It always returns null!

    Things were different in Java 8, though:

    Returns the class loader for tools provided with this platform. This does not include user-installed tools. Use the service provider mechanism for locating user installed tools.

    So the script is calling getURLs on a null object and obviously throws an NPE. It probably needs to be fixed!