For applications that use the Java OJAI API, use Maven to compile and determine the application's dependencies. Then, when you run the application, specify those dependencies in the application's classpath.
pom.xml file, if it is not
already
added:<repositories>
<repository>
<id>mapr-releases</id>
<url>https://repository.mapr.com/nexus/content/repositories/releases</url>
<snapshots><enabled>true</enabled></snapshots>
<releases><enabled>true</enabled></releases>
</repository>
</repositories><dependencies>
<dependency>
<groupId>com.mapr.ojai</groupId>
<artifactId>mapr-ojai-driver</artifactId>
<version>6.0.0-mapr</version>
</dependency>
</dependencies><version> property with the HPE Ezmeral Data Fabric Database version that you are using.When the cluster is secure, the node must also have a MapR ticket configured for the user that runs the application.
java -cp <classpath>:. -Djava.library.path=/opt/mapr/lib <main class JAR> <command line arguments>To help debug your Java OJAI application, you can enable OJAI tracing. MapR uses the
log4j API to log tracing messages. To enable writing these messages to
standard output, follow these steps:
/opt/mapr/conf/log4j.properties
file:log4j.logger.com.mapr.ojai.store.impl=TRACE, stdoutjava launch command:log4j
classes:-cp /opt/mapr/lib/central-logging-6.2.0-mapr.jar:<other classpaths>:.log4j.properties
file:-Dlog4j.configuration=file:/opt/mapr/conf/log4j.properties