Infrastructure at your Service

Stephane Biehler

Error starting D2 4.5 on Tomcat 8 No class found: JSAFE_SecureRandom

d2_logo_failed

When installing D2 and launching the tomcat server you can have an error on a missing lib: JSAFE_SecureRandom.

Here’s the trace you can have:

2018-01-17 17:32:19 [DEBUG] [localhost-startStop-1] - c.e.c.d.contents.D2FileCleaningTracker : Init D2FileCleaningTracker with /pkgs/dms-tomcat/D2_TOMCAT_HOME/temp/D2FileCleaningTracker_D2.ser
2018-01-17 17:32:20 [ERROR] [localhost-startStop-1] - c.emc.d2fs.dctm.servlets.D2HttpServlet : LoadOnStartup - java.lang.NoClassDefFoundError: com/rsa/jsafe/JSAFE_SecureRandom
2018-01-17 17:32:20 [ERROR] [localhost-startStop-1] - c.emc.d2fs.dctm.servlets.D2HttpServlet : {}
java.lang.NoClassDefFoundError: com/rsa/jsafe/JSAFE_SecureRandom
at com.documentum.fc.client.security.impl.InitializeKeystoreForDfc.execute(InitializeKeystoreForDfc.java:46) [dfc.jar:na]
at com.documentum.fc.client.security.internal.KeystoreMgr.initForDfcWithDefaultPolicy(KeystoreMgr.java:71) [dfc.jar:na]
at com.documentum.fc.client.security.impl.IdentityManager.initFromKeystore(IdentityManager.java:139) [dfc.jar:na]
at com.documentum.fc.client.security.impl.IdentityManager.<init>(IdentityManager.java:41) [dfc.jar:na]
at com.documentum.fc.impl.RuntimeContext.<init>(RuntimeContext.java:52) [dfc.jar:na]
at com.documentum.fc.impl.RuntimeContext.<clinit>(RuntimeContext.java:185) [dfc.jar:na]
at com.documentum.fc.client.DfClient.<clinit>(DfClient.java:772) [dfc.jar:na]
at com.emc.d2fs.dctm.servlets.init.SessionIterator.<init>(SessionIterator.java:77) [D2FS4DCTM-WEB-4.5.0.jar:na]
at com.emc.d2fs.dctm.servlets.init.LoadOnStartup.getSessions(LoadOnStartup.java:441) [D2FS4DCTM-WEB-4.5.0.jar:na]
at com.emc.d2fs.dctm.servlets.init.LoadOnStartup.processRequest(LoadOnStartup.java:164) [D2FS4DCTM-WEB-4.5.0.jar:na]
at com.emc.d2fs.dctm.servlets.D2HttpServlet.execute(D2HttpServlet.java:243) [D2FS4DCTM-API-4.5.0.jar:na]
at com.emc.d2fs.dctm.servlets.D2HttpServlet.doGetAndPost(D2HttpServlet.java:506) [D2FS4DCTM-API-4.5.0.jar:na]
at com.emc.d2fs.dctm.servlets.D2HttpServlet.doGet(D2HttpServlet.java:116) [D2FS4DCTM-API-4.5.0.jar:na]
at com.emc.d2fs.dctm.servlets.init.LoadOnStartup.init(LoadOnStartup.java:116) [D2FS4DCTM-WEB-4.5.0.jar:na]
at javax.servlet.GenericServlet.init(GenericServlet.java:158) [servlet-api.jar:3.0.FR]
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1284) [catalina.jar:7.0.53]
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1197) [catalina.jar:7.0.53]
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1087) [catalina.jar:7.0.53]
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5210) [catalina.jar:7.0.53]
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5493) [catalina.jar:7.0.53]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [catalina.jar:7.0.53]
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901) [catalina.jar:7.0.53]
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877) [catalina.jar:7.0.53]
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632) [catalina.jar:7.0.53]
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1073) [catalina.jar:7.0.53]
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1857) [catalina.jar:7.0.53]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_152]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_152]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_152]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_152]
at java.lang.Thread.run(Thread.java:748) [na:1.8.0_152]
Caused by: java.lang.ClassNotFoundException: com.rsa.jsafe.JSAFE_SecureRandom
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1720) [catalina.jar:7.0.53]
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571) [catalina.jar:7.0.53]
... 31 common frames omitted

What’s the cause of this?

When you generate the D2 war file it requires some libraries like the dfs sdk. If you look into the logs you can see what has been added to the war file or at least what is missing. Well, for the sdk 7.x there are 2 libs missing, for generating the D2 war file for the version 4.5:

[copy] Warning: Could not find file /D24.5P29/emc-dfs-sdk-7.3/lib/java/dfc/certjFIPS.jar to copy.
[copy] Warning: Could not find file /D24.5P29/emc-dfs-sdk-7.3/lib/java/dfc/jsafeFIPS.jar to copy.

Resolution

To resolve the issue, copy these 2 libraries from the 6.7SP2 dfs sdk and paste them into the lib folder of D2.

Leave a Reply

Stephane Biehler
Stephane Biehler

Consultant