尝试在Windows机器上运行Corb。

huangapple go评论90阅读模式
英文:

Tried to run Corb in windows machine

问题

我尝试按照 Corb2 文档的示例来运行样本 corb 示例。我在我的机器上安装了 MarkLogic 10,并下载了以下 JAR 文件:

  • marklogic-corb-2.3.2.jar
  • marklogic-xcc-10.0.10

按照文档的说明创建了 uris.xqy 和 transform.xqy 文件,并将它们都放在一个 corb 文件夹中。当我尝试运行时,出现以下错误:

PS C:\Users\Balaji\Downloads\corb\corb> java -server -cp "marklogic-corb-2.3.2.jar;marklogic-xcc-10.0.10" com.marklogic.developer.corb.Manager -DOPTIONS-FILE=job.properties
>Error: Unable to initialize main class com.marklogic.developer.corb.Manager
Caused by: java.lang.NoClassDefFoundError: com/marklogic/xcc/exceptions/XccConfigException

但是 Java 的主目录已经设置:

PS C:\Users\Balaji\Downloads\corb\corb> java -version
java version "11.0.19" 2023-04-18 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.19+9-LTS-224)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.19+9-LTS-224, mixed mode)

是否需要进行其他配置更改以运行 CORB?

英文:

I tried running sample corb example by following Corb2 documentation. I have MarkLogic 10 in my machine and for that I had downloaded the following jars:

  • marklogic-corb-2.3.2.jar
  • marklogic-xcc-10.0.10

And created uris.xqy and transform.xqy files as specified in documentation and kept all these in a corb folder. When I tried running it, it is showing and error like below

PS C:\Users\Balaji\Downloads\corb\corb> java -server -cp "marklogic-corb-2.3.2.jar;marklogic-xcc-10.0.10" com.marklogic.developer.corb.Manager -DOPTIONS-FILE=job.properties

>Error: Unable to initialize main class com.marklogic.developer.corb.Manager
Caused by: java.lang.NoClassDefFoundError: com/marklogic/xcc/exceptions/XccConfigException

But Java home path has bee set

PS C:\Users\Balaji\Downloads\corb\corb> java -version
java version "11.0.19" 2023-04-18 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.19+9-LTS-224)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.19+9-LTS-224, mixed mode)

Is there any other configuration changes need to be done to run CORB ?

答案1

得分: 2

当XCC jar不在类路径上时,您将看到关于找不到XCC类的错误。

您在类路径参数中忘记了.jar文件扩展名。

应该是:-cp "marklogic-corb-2.3.2.jar;marklogic-xcc-10.0.10.jar"

而不是:-cp "marklogic-corb-2.3.2.jar;marklogic-xcc-10.0.10"

英文:

You will see that error about not finding the XCC class when the XCC jar is not on the classpath.

You are missing the .jar file extension on the XCC jar in your classpath argument.

It should be: -cp "marklogic-corb-2.3.2.jar;marklogic-xcc-10.0.10.jar"

instead of: -cp "marklogic-corb-2.3.2.jar;marklogic-xcc-10.0.10"

huangapple
  • 本文由 发表于 2023年8月5日 01:34:57
  • 转载请务必保留本文链接:https://go.coder-hub.com/76838087.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定