This article has been archived and is no longer maintained by ForgeRock.
The following error is shown when embedded OpenDJ tools such as import-ldif fail in OpenAM:[25/08/2016:17:19:43 +0000] category=TOOLS seq=0 severity=SEVERE msg=Unable to load class org.opends.server.backends.jeb.JEBackend referenced in configuration entry ds-cfg-backend-id=userRoot,cn=Backends,cn=config for use as a Directory Server backend: ClassNotFoundException(org.opends.server.backends.jeb.JEBackend)
You may also see errors similar to the following when embedded OpenDJ tools such as dsreplication or ldapsearch fail if you have upgraded to OpenAM 13.5.x:Error: Could not find or load main class org.opends.server.tools.dsreplication.ReplicationCliMain Error: Could not find or load main class org.opends.server.tools.LDAPSearch
Upgraded to, or installed OpenAM 13.5.x.
The necessary JE libraries are missing from the embedded OpenDJ installation in OpenAM 13.5.x, which cause the embedded OpenDJ tools to fail with the "Unable to load class" error.
- OpenAM 13.5 - missing both the opendj-je-backend.jar and je.jar files.
- OpenAM 13.5.1 and 13.5.2 - missing the opendj-je-backend.jar file only. The je.jar file has been replaced with a forgerock-je.jar file, which is included in the install.
The opendj.jar file is missing from the embedded OpenDJ installation in OpenAM 13.5.x if you have upgraded to OpenAM (instead of doing a fresh install); this can cause the "Could not find or load main class" errors when attempting to use the embedded OpenDJ tools.
These issues can be resolved as follows depending on which error(s) you are encountering and your version:
"Unable to load class" error (OpenAM 13.5.1 and 13.5.2):
- Copy the opendj-je-backend.jar file from the /path/to/tomcat/webapps/openam/WEB-INF/lib/ directory where OpenAM is deployed to the $HOME/[openam_instance]/opends/lib directory.
"Unable to load class" error (OpenAM 13.5):
- Copy the opendj-je-backend.jar and je-5.0.104.jar files from the /path/to/tomcat/webapps/openam/WEB-INF/lib/ directory where OpenAM is deployed to the $HOME/[openam_instance]/opends/lib directory.
- Rename the je-5.0.104.jar to je.jar.
"Could not find or load main class" error (OpenAM 13.5.x)
- Navigate to the following directory: /path/to/tomcat/webapps/openam/WEB-INF/template/opendj
- Unzip the opendj.zip file: $ unzip opendj.zip
- Copy the opendj.jar file from the exploded lib directory to the embedded OpenDJ lib directory: $HOME/[am_instance]/opends/opends/lib/
You can also prepare the original OpenAM 13.5.x war file to include these files to ensure any future installs are not affected by this issue. You should add the required files to the WEB-INF/template/opendj/opendj.zip and recompile the OpenAM 13.5.x war file.