0
votes

I'm using mlcp with ml-gradle. Everything works locally, but when I run it on my continuous integration system (Jenkins), the mlcp command fails.

I know that mlcp supports adding logging, but since I'm pulling it in via gradle, I don't know how to do the required logging changes.

My system does have an http and https proxy specified via environment variables, but for this deploy I don't need them. I don't know, though, if mlcp pays any attention to proxy environment variables. If it is trying to use the proxy, the deploy should fail.

So I've got a two questions.

  1. Is there any documentation on proxies and mlcp?
  2. Can I add logging to mlcp when it's triggered via ml-gradle?
1
do you get particular error messages? I'd also recommend asking each question separately on SO..grtjn
I do have a stack trace, but there's no helpful information in it.Steve Anderson

1 Answers

0
votes

When using mlcp as a library via Gradle or Maven, you need to have a log4j.properties file somewhere on your classpath. Without that, you won't get any logging from mlcp.

Here's one way to do that with Gradle - https://github.com/marklogic-community/ml-gradle/tree/master/examples/mlcp-project

Note too that on Windows, when run as a library, mlcp will report the following error: "java.io.IOException: Could not locate executable null\bin\winutils.exe in the Hadoop binaries." mlcp should still run fine though - a couple lines later, it should also log "org.apache.hadoop.util.NativeCodeLoader - Unable to load native-hadoop library for your platform... using builtin-java classes where applicable".