【问题标题】:I'm trying to install Apache Gobblin. How can I install it using Gradle?我正在尝试安装 Apache Gobblin。如何使用 Gradle 安装它?
【发布时间】:2019-05-15 02:52:00
【问题描述】:

我想在我的 MacOS X 上安装 Apache Gobblin。为此,我下载了 0.14.0 版并按照此处的步骤操作。

Install Gobblin

我做的第一件事是这样的:

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

然后:

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

最后:

./gradlew build

我遇到了这样的错误。

    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
  

我的 Java 版本:

java 9.0.4

Java(TM) SE 运行时环境(内部版本 9.0.4+11)

Java HotSpot(TM) 64 位服务器 VM(内部版本 9.0.4+11,混合模式)

我的 Maven 版本:

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

Maven 主页:/usr/local/Cellar/maven/3.5.3/libexec

Java 版本:9.0.4,供应商:甲骨文公司

Java 主页:/Library/Java/JavaVirtualMachines/jdk-9.0.4.jdk/Contents/Home

默认语言环境:en_TR,平台编码:UTF-8

操作系统名称:“mac os x”,版本:“10.14.1”,架构:“x86_64”,系列:“mac”

如果有人有任何信息或建议,我正在等待。

【问题讨论】:

    标签: java macos maven gradle gobblin


    【解决方案1】:

    刚刚深入研究了代码。你确定他们的构建脚本支持 Java 9 吗?

    查看您遇到问题的行:globalDependencies.gradle:44。见ToolProvider.getSystemToolClassLoader()。现在让我们看看 Java 9 的 its docs

    已弃用。 此方法可能会在 Java SE 的未来版本中被删除。使用system tool providerservice loader 机制来定位系统工具以及用户安装的工具。 返回可用于加载系统工具的类加载器,如果未提供此类特殊加载器,则返回 null。

    实施要求:

    这个实现总是返回 null。

    看到了吗? 它总是返回null

    不过,Java 8 中的 were different

    返回此平台提供的工具的类加载器。这不包括用户安装的工具。使用服务提供者机制来定位用户安装的工具。

    所以脚本在null 对象上调用getURLs,显然会引发NPE。它可能需要修复!

    【讨论】:

    • 感谢您的回报。那么如何解决呢?用java8够吗?
    • 试试看吧。
    • stackoverflow.com/questions/46513639/… 按照这里的答案,我将我的java版本从9降级到8,然后重建它,我的问题解决了,谢谢你的帮助。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多