When I run a corb script on Linux I get:
Error: Could not find or load main class com.marklogic.developer.corb.Manager.
I resolved this error when I ran the CoRB job from my Windows laptop (MarkLogic was running on a separate Linux server), however I cannot resolve it when running it on the Linux server hosting MarkLogic server (.cmd was converted to .sh).
When the bash/java command is run the directory reference is not where the .sh file is being run from at the command line ($HOME/corb) ?
Any ideas on the cause/solution?
Setup
Linux 7.9 / MarkLogic 10.3 / openjdk version "1.8.0_275" Corb => $HOME/corb / MarkLogic XCC => $HOME/MarkXCC.java-10.0.10
Sample code
runme.sh
#!/bin/bash
java -cp "$HOME/corb/marklogic-corb-2.5.4.jar:$HOME/MarkXCC.java-10.0.10/lib/marklogic-xcc-10.0.10.jar" -DOPTIONS-FILE=journallistingcorb.properties com.marklogic.developer.corb.Manager
Command used
cd $HOME/corb
bash runme.sh
Response
Error: Could not find or load main class com.marklogic.developer.corb.Manager
I have changed the corb reference forms "$HOME/corb/marklogic-corb-2.5.4.jar" to "marklogic-corb-2.5.4.jar" and also swapping the positions of the corb and xcc '.jar' references, and include/exclude the '-server' parameter (in front of '-cp').
When you see that message, it means that the CoRB jar isn't on your classpath.
Either the file path is wrong, or you don't have read permissions to "see" the jar.