Solutions

Configuration invalid, can not start JDBC repository error when starting OpenIDM 4.5.x

Last updated Jul 9, 2018

The purpose of this article is to provide assistance if you see a "Configuration invalid, can not start JDBC repository" error when starting OpenIDM 4.5.x. This error only occurs when you are using either MySQL™ or PostgreSQL® as your repository, and have more than one database connection configuration file.


Symptoms

The following message are shown when you start OpenIDM:

Executing ./startup.sh... 
Using OPENIDM_HOME: /opt/openidm 
Using PROJECT_HOME: /opt/openidm 
Using OPENIDM_OPTS: -Xmx1024m -Xms1024m 
Using LOGGING_CONFIG: -Djava.util.logging.config.file=/opt/openidm/conf/logging.properties 
Using boot properties at /opt/openidm/conf/boot/boot.properties 
May 5, 2017 3:27:17 PM org.forgerock.openidm.repo.jdbc.impl.JDBCRepoService init 
WARNING: Configuration invalid, can not start JDBC repository. 
java.lang.NullPointerException 
   at org.forgerock.openidm.repo.jdbc.impl.JDBCRepoService.init(JDBCRepoService.java:898) 
   at org.forgerock.openidm.repo.jdbc.impl.JDBCRepoService.activate(JDBCRepoService.java:202) 
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
   at java.lang.reflect.Method.invoke(Method.java:498) 
   at org.apache.felix.scr.impl.helper.BaseMethod.invokeMethod(BaseMethod.java:227) 
   at org.apache.felix.scr.impl.helper.BaseMethod.access$500(BaseMethod.java:38) 
   at org.apache.felix.scr.impl.helper.BaseMethod$Resolved.invoke(BaseMethod.java:591) 
   at org.apache.felix.scr.impl.helper.BaseMethod.invoke(BaseMethod.java:472) 
   at org.apache.felix.scr.impl.helper.ActivateMethod.invoke(ActivateMethod.java:146) 
   at org.apache.felix.scr.impl.manager.ImmediateComponentManager.createImplementationObject(ImmediateComponentManager.java:226) 
   at org.apache.felix.scr.impl.manager.ImmediateComponentManager.createComponent(ImmediateComponentManager.java:118) 
   at org.apache.felix.scr.impl.manager.AbstractComponentManager$Unsatisfied.activate(AbstractComponentManager.java:997) 
   at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:333) 
   at org.apache.felix.scr.impl.manager.DependencyManager.serviceAdded(DependencyManager.java:283) 
   at org.apache.felix.scr.impl.manager.DependencyManager.serviceChanged(DependencyManager.java:170) 
   at org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:932) 
   at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:793) 
   at org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:543) 
   at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4419) 
   at org.apache.felix.framework.Felix.registerService(Felix.java:3423) 
   at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:346) 
   at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerService(AbstractComponentManager.java:449) 
   at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerComponentService(AbstractComponentManager.java:460) 
   at org.apache.felix.scr.impl.manager.AbstractComponentManager$Unsatisfied.activate(AbstractComponentManager.java:1009) 
   at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:333) 
   at org.apache.felix.scr.impl.manager.AbstractComponentManager.enable(AbstractComponentManager.java:157)
   at org.apache.felix.scr.impl.config.UnconfiguredComponentHolder.enableComponents(UnconfiguredComponentHolder.java:68) 
   at org.apache.felix.scr.impl.BundleComponentActivator.loadDescriptor(BundleComponentActivator.java:253)
   at org.apache.felix.scr.impl.BundleComponentActivator.initialize(BundleComponentActivator.java:147) 
   at org.apache.felix.scr.impl.BundleComponentActivator.<init>(BundleComponentActivator.java:111) 
   at org.apache.felix.scr.impl.Activator.loadComponents(Activator.java:285) 
   at org.apache.felix.scr.impl.Activator.bundleChanged(Activator.java:203) 
   at org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:868) 
   at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:789) 
   at org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:514) 
   at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4403) 
   at org.apache.felix.framework.Felix.startBundle(Felix.java:2092) 
   at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1291) 
   at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:304) 
   at java.lang.Thread.run(Thread.java:745)

May 5, 2017 3:27:17 PM org.forgerock.openidm.logging.LogServiceTracker logEntry 
SEVERE: Bundle: org.forgerock.openidm.repo-jdbc [13] [org.forgerock.openidm.repo.jdbc] The activate method has thrown an exception 
org.apache.felix.log.LogException: org.forgerock.openidm.config.enhanced.InvalidException: Configuration invalid, can not start JDBC repository. 
   at org.forgerock.openidm.repo.jdbc.impl.JDBCRepoService.init(JDBCRepoService.java:959) 
   at org.forgerock.openidm.repo.jdbc.impl.JDBCRepoService.activate(JDBCRepoService.java:202) 
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
   at java.lang.reflect.Method.invoke(Method.java:498) 
   at org.apache.felix.scr.impl.helper.BaseMethod.invokeMethod(BaseMethod.java:227) 
   at org.apache.felix.scr.impl.helper.BaseMethod.access$500(BaseMethod.java:38) 
   at org.apache.felix.scr.impl.helper.BaseMethod$Resolved.invoke(BaseMethod.java:591) 
   at org.apache.felix.scr.impl.helper.BaseMethod.invoke(BaseMethod.java:472) 
   at org.apache.felix.scr.impl.helper.ActivateMethod.invoke(ActivateMethod.java:146) 
   at org.apache.felix.scr.impl.manager.ImmediateComponentManager.createImplementationObject(ImmediateComponentManager.java:226) 
   at org.apache.felix.scr.impl.manager.ImmediateComponentManager.createComponent(ImmediateComponentManager.java:118) 
   at org.apache.felix.scr.impl.manager.AbstractComponentManager$Unsatisfied.activate(AbstractComponentManager.java:997) 
   at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:333) 
   at org.apache.felix.scr.impl.manager.DependencyManager.serviceAdded(DependencyManager.java:283) 
   at org.apache.felix.scr.impl.manager.DependencyManager.serviceChanged(DependencyManager.java:170) 
   at org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:932) 
   at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:793) 
   at org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:543) 
   at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4419) 
   at org.apache.felix.framework.Felix.registerService(Felix.java:3423) 
   at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:346) 
   at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerService(AbstractComponentManager.java:449) 
   at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerComponentService(AbstractComponentManager.java:460) 
   at org.apache.felix.scr.impl.manager.AbstractComponentManager$Unsatisfied.activate(AbstractComponentManager.java:1009) 
   at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:333) 
   at org.apache.felix.scr.impl.manager.AbstractComponentManager.enable(AbstractComponentManager.java:157)
   at org.apache.felix.scr.impl.config.UnconfiguredComponentHolder.enableComponents(UnconfiguredComponentHolder.java:68) 
   at org.apache.felix.scr.impl.BundleComponentActivator.loadDescriptor(BundleComponentActivator.java:253)
   at org.apache.felix.scr.impl.BundleComponentActivator.initialize(BundleComponentActivator.java:147) 
   at org.apache.felix.scr.impl.BundleComponentActivator.<init>(BundleComponentActivator.java:111) 
   at org.apache.felix.scr.impl.Activator.loadComponents(Activator.java:285) 
   at org.apache.felix.scr.impl.Activator.bundleChanged(Activator.java:203) 
   at org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:868) 
   at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:789) 
   at org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:514) 
   at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4403) 
   at org.apache.felix.framework.Felix.startBundle(Felix.java:2092) 
   at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1291) 
   at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:304) 
   at java.lang.Thread.run(Thread.java:745) 
Caused by: java.lang.NullPointerException 
   at org.forgerock.openidm.repo.jdbc.impl.JDBCRepoService.init(JDBCRepoService.java:898) 
... 41 more

May 5, 2017 3:27:17 PM org.forgerock.openidm.logging.LogServiceTracker logEntry 
SEVERE: Bundle: org.forgerock.openidm.repo-jdbc [13] [org.forgerock.openidm.repo.jdbc] Component instance could not be created, activation failed 
-> May 5, 2017 3:27:24 PM org.ops4j.pax.web.service.jetty.internal.ServerControllerImpl$Stopped start 
WARNING: HTTP is not enabled in Pax Web configuration - removing connector: 0.0.0.0:8080@2ceb65b4{HTTP/1.1}{0.0.0.0:0} 
OpenIDM ready

Once OpenIDM has started, it seems to function normally.

Recent Changes

Upgraded to, or installed OpenIDM 4.5.x.

Configured an additional database connection configuration file (for example, datasource.jdbc-activiti.json per the solution in JobEntity was updated by another transaction concurrently exception when using workflows in OpenIDM 4.x).

Causes

The repository service attempts to start before the data source it needs is available, which causes this error. Once all the data sources are registered, the repository service is able to find the correct data source and then proceeds to start correctly, which is why OpenIDM then functions normally. 

Solution

Firstly, this error is harmless and can be ignored since OpenIDM functions normally once started. However, this issue can be resolved by upgrading to IDM 5 or later; you can download this from BackStage.

Workaround

If you have multiple database connection configuration files in the /path/to/openidm/conf directory but do not need them all, you can delete the unused ones since this error does not happen if you only have one file.

See Also

N/A

Related Training

N/A

Related Issue Tracker IDs

OPENIDM-6514 (JDBC repo errors on startup when using mysql)



Copyright and TrademarksCopyright © 2018 ForgeRock, all rights reserved.
Loading...