无法设置MarkLogic Spring Batch基本应用

问题描述

我正在尝试使用spring批处理git文档将示例应用程序设置为在MarkLogic服务器中加载100个文档,但是每次尝试运行我的工作时都会出现此错误

    *** What went wrong:
Execution Failed for task ':runYourJob'.
> Could not resolve all files for configuration ':testRuntimeClasspath'.
   > Could not download marklogic-xcc.jar (com.marklogic:marklogic-xcc:9.0.2)
      > Could not get resource 'https://jcenter.bintray.com/com/marklogic/marklogic-xcc/9.0.2/marklogic-xcc-9.0.2.jar'.
         > Could not GET 'https://repo.jfrog.org/artifactory/libs-release-bintray/com/marklogic/marklogic-xcc/9.0.2/marklogic-xcc-9.0.2.jar?referrer'.
            > PKIX path building Failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target**

基本设置的网址在这里https://github.com/marklogic-community/marklogic-spring-batch/wiki/Getting-Started

我正在使用IntelliJ作为IDE,并且还尝试下载.jar并将其添加到类路径依赖项中。我会很感激这里的任何帮助。如果这可能是一个问题,我就不会担心。

编辑:构建任何marklogic gradle应用程序时此错误很常见,并且不特定于Spring。我在Windows 10机器上的ModifyOpenJDK11上使用MarkLogic 10和Gradle版本5.4.1。

解决方法

无法获取资源'https://jcenter.bintray.com/com/marklogic/marklogic-xcc/9.0.2/marklogic-xcc-9.0.2.jar'

位置https://jcenter.bintray.com/com/marklogic/marklogic-xcc/9.0.2/不包含请求的jar marklogic-xcc-9.0.2.jar。确保指向包含该jar的有效Maven存储库。

,

您的错误的根本原因是build.gradle中缺少依赖项。

我的Spring框架MVC版本是:

MarkLogic Java API      5.3.0
JDK                     11
Spring Framework        5.2.7
Spring Batch            4.2.4           

如果您克隆整个项目并且尚未升级任何依赖项,则:

  1. 24中添加行core:build.gradle

enter image description here

  1. IntelliJ中加载gradle更改并干净地部署项目。

在成功构建gradle之后,安装了一个App服务器(在我的情况下,App名称为ml-spring-batch @ 7010):

enter image description here

  1. IntelliJ中,仅针对samples执行gradle任务。在cmd中,运行任务:gradle runYourJob。 gradle任务完成后,内容数据库中将加载100个文档。

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...