title: Error creating user registry object. The exception is java.lang.NoClassDefFoundError: com.dummy.registry.CustomRegistry (initialization failure)
body: <p>Hi I currently have an WAS 7.0.29 and we've planned to update it to fix pack 41.</p>
  
  <p>Upon the installation of the Fix pack I have encountered this:</p>
  
  <pre><code>[11/10/16 19:32:24:505 SGT] 00000000 UserRegistryC E   SECJ0281E: Error creating user registry object. The exception is java.lang.NoClassDefFoundError: com.dummy.registry.CustomRegistry (initialization failure)
      at java.lang.J9VMInternals.initialize(J9VMInternals.java:139)
      at java.lang.Class.forName(Class.java:294)
      at com.ibm.ws.security.registry.UserRegistryImpl.initialize(UserRegistryImpl.java:225)
      at com.ibm.ws.security.config.UserRegistryConfigImpl.do_createRegistryObjects(UserRegistryConfigImpl.java:686)
      at com.ibm.ws.security.config.UserRegistryConfigImpl.createRegistryObjects(UserRegistryConfigImpl.java:643)
      at com.ibm.ws.security.config.UserRegistryConfigImpl.getUserRegistryImpl(UserRegistryConfigImpl.java:628)
      at com.ibm.ws.security.config.UserRegistryConfigImpl.getString(UserRegistryConfigImpl.java:850)
      at com.ibm.ws.security.config.UserRegistryConfigImpl.getPrincipalName(UserRegistryConfigImpl.java:577)
      at com.ibm.ws.security.config.CSIv2ConfigImpl.initializeOnServer(CSIv2ConfigImpl.java:723)
      at com.ibm.ws.security.config.CSIv2ConfigImpl.initialize(CSIv2ConfigImpl.java:1151)
      at com.ibm.ws.security.config.CSIv2ConfigImpl.&lt;init&gt;(CSIv2ConfigImpl.java:100)
      at com.ibm.ws.security.config.SecurityConfigObjectFactoryImpl.createCSIv2Config(SecurityConfigObjectFactoryImpl.java:116)
      at com.ibm.ws.security.config.SecurityObjectLocator.do_getCSIv2Config(SecurityObjectLocator.java:852)
      at com.ibm.ejs.ras.RasHelper.printStackTrace(RasHelper.java:368)
      at com.ibm.ejs.ras.RasHelper.throwableToString(RasHelper.java:349)
      at com.ibm.ejs.ras.MessageEvent6.convertParameters(MessageEvent6.java:346)
      at com.ibm.ejs.ras.MessageEvent6.&lt;init&gt;(MessageEvent6.java:221)
      at com.ibm.ejs.ras.Tr.fireMessageEvent(Tr.java:1538)
      at com.ibm.ejs.ras.Tr.error(Tr.java:733)
      at com.ibm.ws.security.config.UserRegistryConfigImpl.do_createRegistryObjects(UserRegistryConfigImpl.java:696)
      at com.ibm.ws.security.config.UserRegistryConfigImpl.createRegistryObjects(UserRegistryConfigImpl.java:643)
      at com.ibm.ws.security.config.UserRegistryConfigImpl.getUserRegistryImpl(UserRegistryConfigImpl.java:628)
      at com.ibm.ws.security.config.UserRegistryConfigImpl.getString(UserRegistryConfigImpl.java:850)
      at com.ibm.ws.security.config.UserRegistryConfigImpl.getPrincipalName(UserRegistryConfigImpl.java:577)
      at com.ibm.ws.security.config.CSIv2ConfigImpl.initializeOnServer(CSIv2ConfigImpl.java:723)
      at com.ibm.ws.security.config.CSIv2ConfigImpl.initialize(CSIv2ConfigImpl.java:1151)
      at com.ibm.ws.security.config.CSIv2ConfigImpl.&lt;init&gt;(CSIv2ConfigImpl.java:100)
      at com.ibm.ws.security.config.SecurityConfigObjectFactoryImpl.createCSIv2Config(SecurityConfigObjectFactoryImpl.java:116)
      at com.ibm.ws.security.config.SecurityObjectLocator.do_getCSIv2Config(SecurityObjectLocator.java:852)
      at com.ibm.ws.security.config.SecurityObjectLocator.getCSIv2Config(SecurityObjectLocator.java:882)
      at com.ibm.ws.security.config.SecurityObjectLocator.getCSIv2Config(SecurityObjectLocator.java:873)
      at com.ibm.ws.security.auth.ContextManagerImpl.getProperty(ContextManagerImpl.java:2102)
      at com.ibm.ws.security.auth.ContextManagerImpl.getProperty(ContextManagerImpl.java:2141)
      at com.ibm.websphere.security.WSSecurityException.printStackTrace(WSSecurityException.java:230)
      at com.ibm.ffdc.util.formatting.IncidentReportHeader.writeTo(IncidentReportHeader.java:77)
      at com.ibm.ffdc.util.provider.IncidentStream.write(IncidentStream.java:207)
      at com.ibm.ffdc.util.provider.IncidentLogger.writeHeader(IncidentLogger.java:70)
      at com.ibm.ffdc.util.provider.IncidentLogger.writeIncidentTo(IncidentLogger.java:61)
      at com.ibm.ws.ffdc.impl.FfdcProvider.logIncident(FfdcProvider.java:206)
      at com.ibm.ws.ffdc.impl.FfdcProvider.logIncident(FfdcProvider.java:135)
      at com.ibm.ffdc.util.provider.FfdcProvider.log(FfdcProvider.java:259)
      at com.ibm.ws.ffdc.impl.FfdcProvider.log(FfdcProvider.java:148)
      at com.ibm.ffdc.util.provider.IncidentEntry.log(IncidentEntry.java:105)
      at com.ibm.ffdc.util.provider.Ffdc.log(Ffdc.java:90)
      at com.ibm.ws.ffdc.FFDCFilter.processException(FFDCFilter.java:114)
      at com.ibm.ws.security.config.UserRegistryConfigImpl.do_createRegistryObjects(UserRegistryConfigImpl.java:694)
      at com.ibm.ws.security.config.UserRegistryConfigImpl.createRegistryObjects(UserRegistryConfigImpl.java:643)
      at com.ibm.ws.security.config.UserRegistryConfigImpl.getUserRegistryImpl(UserRegistryConfigImpl.java:628)
      at com.ibm.ws.security.core.distSecurityComponentImpl.getRealmFromUserRegistry(distSecurityComponentImpl.java:2808)
      at com.ibm.ws.security.core.distSecurityComponentImpl.initialize(distSecurityComponentImpl.java:356)
      at com.ibm.ws.security.core.SecurityComponentImpl.initialize(SecurityComponentImpl.java:94)
      at com.ibm.ws.runtime.component.ContainerHelper.initWsComponent(ContainerHelper.java:1191)
      at com.ibm.ws.runtime.component.ContainerHelper.initializeComponent(ContainerHelper.java:1098)
      at com.ibm.ws.runtime.component.ContainerHelper.initializeComponents(ContainerHelper.java:900)
      at com.ibm.ws.runtime.component.ContainerImpl.initializeComponents(ContainerImpl.java:776)
      at com.ibm.ws.runtime.component.ContainerImpl.initializeComponents(ContainerImpl.java:750)
      at com.ibm.ws.runtime.component.ServerImpl.initialize(ServerImpl.java:349)
      at com.ibm.ws.runtime.WsServerImpl.bootServerContainer(WsServerImpl.java:280)
      at com.ibm.ws.runtime.WsServerImpl.start(WsServerImpl.java:214)
      at com.ibm.ws.runtime.WsServerImpl.main(WsServerImpl.java:666)
      at com.ibm.ws.runtime.WsServer.main(WsServer.java:59)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
      at java.lang.reflect.Method.invoke(Method.java:611)
      at com.ibm.wsspi.bootstrap.WSLauncher.launchMain(WSLauncher.java:213)
      at com.ibm.wsspi.bootstrap.WSLauncher.main(WSLauncher.java:93)
      at com.ibm.wsspi.bootstrap.WSLauncher.run(WSLauncher.java:74)
      at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
      at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
      at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
      at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
      at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
      at java.lang.reflect.Method.invoke(Method.java:611)
      at org.eclipse.core.launcher.Main.invokeFramework(Main.java:340)
      at org.eclipse.core.launcher.Main.basicRun(Main.java:282)
      at org.eclipse.core.launcher.Main.run(Main.java:981)
      at com.ibm.wsspi.bootstrap.WSPreLauncher.launchEclipse(WSPreLauncher.java:341)
      at com.ibm.wsspi.bootstrap.WSPreLauncher.main(WSPreLauncher.java:111)
  Caused by: java.lang.ExceptionInInitializerError
      at java.lang.J9VMInternals.initialize(J9VMInternals.java:221)
      at com.ibm.websphere.ras.Manager.createRASTraceLogger(Manager.java:241)
      at com.dummy.registry.CustomRegistry.&lt;clinit&gt;(CustomRegistry.java:126)
      at java.lang.J9VMInternals.initializeImpl(Native Method)
      at java.lang.J9VMInternals.initialize(J9VMInternals.java:199)
      at java.lang.Class.forName(Class.java:294)
      at com.ibm.ws.security.registry.UserRegistryImpl.initialize(UserRegistryImpl.java:225)
      at com.ibm.ws.security.config.UserRegistryConfigImpl.do_createRegistryObjects(UserRegistryConfigImpl.java:686)
      ... 36 more
  Caused by: java.security.AccessControlException: Access denied (java.util.PropertyPermission com.ibm.ws.ffdc.SupportORBFFDC read)
      at java.security.AccessController.throwACE(AccessController.java:121)
      at java.security.AccessController.checkPermission(AccessController.java:194)
      at java.lang.SecurityManager.checkPermission(SecurityManager.java:544)
      at java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1293)
      at java.lang.System.getProperty(System.java:404)
      at java.lang.System.getProperty(System.java:388)
      at com.ibm.websphere.ras.WsJrasTraceLogger.&lt;clinit&gt;(WsJrasTraceLogger.java:98)
      at java.lang.J9VMInternals.initializeImpl(Native Method)
      at java.lang.J9VMInternals.initialize(J9VMInternals.java:199)
      ... 43 more
  .
  </code></pre>
  
  <p>My guess is that the issue is in the CustomRegistry that we have made which looks like this:</p>
  
  <pre><code>public class CustomRegistry implements UserRegistry {
  
      protected static RASTraceLogger traceLogger;
  
      private static RASMessageLogger msgLogger;
  
      static {
          Manager mgr = Manager.getManager();
  
          traceLogger = mgr.createRASTraceLogger("MyWebsite", "Authentication", "Registry", CustomRegistry.class.getName());
  
          msgLogger = mgr.createRASMessageLogger("MyWebsite", "Authentication", "Registry", CustomRegistry.class.getName());
          msgLogger.setMessageFile("com.dummy.registry.RegistryMessages");
      }
  </code></pre>
  
  <p>It points the usage of mgr.createRASTraceLogger in the CustomRegistry but I'm not sure what is the right approach for it. </p>
  
  <p>Right now, I can't even start my server.</p>
  
  <p>Your suggestions will be a great help! :)</p>