Project

Profile

Help

Support #6002

closed

Saxon 9 EE || Schema Validation using command line

Added by Kumaran AG over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
2023-04-28
Due date:
% Done:

0%

Estimated time:
Legacy ID:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:
Java

Description

Hi Team,

We have implemented a validation pipeline in cloud to perform schema validation against dita files and it's working when running in windows while testing it from eclipse but we are having difficulty to figure out the same command to run in linux.

Once the java code deployed to cloud, the command is giving error and failing the process.

below is the command which fails to run in linux

java -cp "/opt/app/saxonlib/saxon9ee.jar;/opt/app/saxonlib/xml-resolver-1.2.jar" com.saxonica.Validate /tmp/input/zipextract/output/ALL-DITA-TOPICS/*.dita -catalog:/opt/app/catalog-dita.xml --multipleSchemaImports:on

Error: Could not find or load main class com.saxonica.Validate Caused by: java.lang.ClassNotFoundException: com.saxonica.Validate

need some help and guidance to fix this. Thanks!!

Actions #1

Updated by Martin Honnen over 1 year ago

I think, with Java and Linux in general, the path separator is the colon : and not the semicolon ; so try java -cp "/opt/app/saxonlib/saxon9ee.jar:/opt/app/saxonlib/xml-resolver-1.2.jar"

Actions #2

Updated by Michael Kay over 1 year ago

ClassNotFoundException can only mean one thing: the class is not on the classpath.

Like Martin, I suspect the cause is that you used semicolon as the separator in the path rather than colon.

Actions #3

Updated by Michael Kay over 1 year ago

  • Status changed from New to Closed

Hopefully the suggestions have fixed the problem.

Please register to edit this issue

Also available in: Atom PDF