# Database connections faulted due to java.lang.ClassNotFoundException

**URL:** <https://forum.inductiveautomation.com/t/database-connections-faulted-due-to-java-lang-classnotfoundexception/66306>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [November 9, 2022, 4:51pm UTC](https://forum.inductiveautomation.com/t/database-connections-faulted-due-to-java-lang-classnotfoundexception/66306 "2022-11-09T16:51:58Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![L\_F](https://avatars.discourse-cdn.com/v4/letter/l/5f8ce5/32.png) [@L\_F](https://forum.inductiveautomation.com/u/L_F)\
**Post date:** [November 9, 2022, 4:51pm UTC](https://forum.inductiveautomation.com/t/database-connections-faulted-due-to-java-lang-classnotfoundexception/66306/1 "2022-11-09T16:51:58Z")

</div>

My gateway (Ignition 8.1.10) has two database connections: the Sample\_SQLite\_Database and Test\_Tag\_DB. The databases have worked very well for a while, but have recently faulted with the following message:

`java.lang.ClassNotFoundException: org.apache.commons.dbcp2.BasicDataSourceFactory at java.base/java.net.URLClassLoader.findClass(Unknown Source) at java.base/java.lang.ClassLoader.loadClass(Unknown Source) at java.base/java.lang.ClassLoader.loadClass(Unknown Source) at com.inductiveautomation.ignition.gateway.IgnitionGateway.createDataSource(IgnitionGateway.java:2772) at com.inductiveautomation.ignition.gateway.datasource.DatasourceImpl.<init>(DatasourceImpl.java:198) at com.inductiveautomation.ignition.gateway.datasource.DatasourceManagerImpl.installDatasource(DatasourceManagerImpl.java:464) at com.inductiveautomation.ignition.gateway.datasource.DatasourceManagerImpl.addAll(DatasourceManagerImpl.java:442) at com.inductiveautomation.ignition.gateway.datasource.DatasourceManagerImpl.startup(DatasourceManagerImpl.java:370) at com.inductiveautomation.ignition.gateway.IgnitionGateway.startupInternal(IgnitionGateway.java:1204) at com.inductiveautomation.ignition.gateway.redundancy.RedundancyManagerImpl.startup(RedundancyManagerImpl.java:290) at com.inductiveautomation.ignition.gateway.IgnitionGateway.initRedundancy(IgnitionGateway.java:732) at com.inductiveautomation.ignition.gateway.IgnitionGateway.lambda$initInternal$0(IgnitionGateway.java:666) at com.inductiveautomation.ignition.common.execution.impl.BasicExecutionEngine$ThrowableCatchingRunnable.run(BasicExecutionEngine.java:539) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.base/java.util.concurrent.FutureTask.run(Unknown Source) at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.base/java.lang.Thread.run(Unknown Source)`

How do I point Ignition to the correct directory?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [November 9, 2022, 5:14pm UTC](https://forum.inductiveautomation.com/t/database-connections-faulted-due-to-java-lang-classnotfoundexception/66306/2 "2022-11-09T17:14:48Z")

</div>

My best guess as to what happened here is that you or somebody else deleted the `commons-*` JAR files from the `$IGNITION/user-lib/jdbc` folder. Can you confirm this?

---

<div class="post-metadata">

**Author:** ![L\_F](https://avatars.discourse-cdn.com/v4/letter/l/5f8ce5/32.png) [@L\_F](https://forum.inductiveautomation.com/u/L_F)\
**Post date:** [November 9, 2022, 5:59pm UTC](https://forum.inductiveautomation.com/t/database-connections-faulted-due-to-java-lang-classnotfoundexception/66306/3 "2022-11-09T17:59:46Z")

</div>

![jdbc_folder](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/3/d36283b1b45ac341d5466ced04bec0c70fa8f9d4.png)

At least 2 of the `commons-*` files are present.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [November 9, 2022, 6:04pm UTC](https://forum.inductiveautomation.com/t/database-connections-faulted-due-to-java-lang-classnotfoundexception/66306/4 "2022-11-09T18:04:49Z")

</div>

Hmm... is `/usr/local` really where you have Ignition installed? That seems odd.

If that's where Ignition is installed and you're sure that's the Ignition that is running then get your wrapper logs and upload them here.

---

<div class="post-metadata">

**Author:** ![L\_F](https://avatars.discourse-cdn.com/v4/letter/l/5f8ce5/32.png) [@L\_F](https://forum.inductiveautomation.com/u/L_F)\
**Post date:** [November 9, 2022, 6:45pm UTC](https://forum.inductiveautomation.com/t/database-connections-faulted-due-to-java-lang-classnotfoundexception/66306/5 "2022-11-09T18:45:56Z")

</div>

Unfortunately, `/usr/local` is the correct directory - we are likely reinstalling Ignition in the next few weeks. Here are the logs.  
[Logs.zip](https://forum.inductiveautomation.com/uploads/short-url/2tLi6dHmFa1BeFU0lZzsjGNY9if.zip) (2.6 MB)

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [November 9, 2022, 6:52pm UTC](https://forum.inductiveautomation.com/t/database-connections-faulted-due-to-java-lang-classnotfoundexception/66306/6 "2022-11-09T18:52:15Z")

</div>

You sure you have the right logs/server/whatever? That error you posted doesn't appear in them anywhere.

---

<div class="post-metadata">

**Author:** ![L\_F](https://avatars.discourse-cdn.com/v4/letter/l/5f8ce5/32.png) [@L\_F](https://forum.inductiveautomation.com/u/L_F)\
**Post date:** [November 9, 2022, 7:09pm UTC](https://forum.inductiveautomation.com/t/database-connections-faulted-due-to-java-lang-classnotfoundexception/66306/7 "2022-11-09T19:09:14Z")

</div>

Those are the logs.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [November 9, 2022, 7:12pm UTC](https://forum.inductiveautomation.com/t/database-connections-faulted-due-to-java-lang-classnotfoundexception/66306/8 "2022-11-09T19:12:05Z")

</div>

Well, looks like there's only ~12 hours of logging there, and it doesn't include the last gateway startup, which is when that error occurred. If you can restart and get the logs that might help.

Otherwise call support and they'll probably be able to get more information and verify the install checks out and hopefully help you.

---

<div class="post-metadata">

**Author:** ![L\_F](https://avatars.discourse-cdn.com/v4/letter/l/5f8ce5/32.png) [@L\_F](https://forum.inductiveautomation.com/u/L_F)\
**Post date:** [November 9, 2022, 7:51pm UTC](https://forum.inductiveautomation.com/t/database-connections-faulted-due-to-java-lang-classnotfoundexception/66306/9 "2022-11-09T19:51:06Z")

</div>

I restarted the gateway, here's the log file. I already checked and the exception is in the log.  
[wrapper.log](https://forum.inductiveautomation.com/uploads/short-url/7QRgJSeXtq8HKGFjOKEI4joXCXp.log) (3.1 MB)

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [November 9, 2022, 8:10pm UTC](https://forum.inductiveautomation.com/t/database-connections-faulted-due-to-java-lang-classnotfoundexception/66306/10 "2022-11-09T20:10:00Z")

</div>

permissions problem on /temp maybe?

```auto
14:46:32 | java.io.IOException: Unable to delete file: temp/jdbc/commons-dbcp2-2.5.02033489711022934966.jar
14:46:32 | at com.inductiveautomation.ignition.gateway.bootstrap.BootstrapFileUtils.forceDelete(BootstrapFileUtils.java:158)
14:46:32 | at com.inductiveautomation.ignition.gateway.bootstrap.BootstrapFileUtils.cleanDirectory(BootstrapFileUtils.java:123)
14:46:32 | at com.inductiveautomation.ignition.gateway.bootstrap.BootstrapFileUtils.deleteDirectory(BootstrapFileUtils.java:174)
14:46:32 | at com.inductiveautomation.ignition.gateway.bootstrap.BootstrapFileUtils.forceDelete(BootstrapFileUtils.java:150)
14:46:32 | at com.inductiveautomation.ignition.gateway.bootstrap.BootstrapFileUtils.cleanDirectory(BootstrapFileUtils.java:123)
14:46:32 | at com.inductiveautomation.ignition.gateway.bootstrap.GatewayFilter.init(GatewayFilter.java:49)
14:46:32 | at org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:351)
14:46:32 | at org.eclipse.jetty.servlet.FilterHolder.initialize(FilterHolder.java:140)
14:46:32 | at org.eclipse.jetty.servlet.ServletHandler.lambda$initialize$0(ServletHandler.java:731)
14:46:32 | at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Unknown Source)
14:46:32 | at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Unknown Source)
14:46:32 | at java.base/java.util.stream.ReferencePipeline$Head.forEach(Unknown Source)
14:46:32 | at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:755)
14:46:32 | at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:379)
14:46:32 | at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1449)
14:46:32 | at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1414)
14:46:32 | at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:910)
14:46:32 | at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:288)
14:46:32 | at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:524)
14:46:32 | at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73)
14:46:32 | at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
14:46:32 | at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:110)
14:46:32 | at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97)
14:46:32 | at com.inductiveautomation.catapult.handlers.RemoteHostNameLookupHandler.doStart(RemoteHostNameLookupHandler.java:55)
14:46:32 | at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73)
14:46:32 | at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
14:46:32 | at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:110)
14:46:32 | at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97)
14:46:32 | at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73)
14:46:32 | at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
14:46:32 | at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:117)
14:46:32 | at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97)
14:46:32 | at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73)
14:46:32 | at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
14:46:32 | at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:117)
14:46:32 | at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97)
14:46:32 | at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73)
14:46:32 | at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
14:46:32 | at org.eclipse.jetty.server.Server.start(Server.java:423)
14:46:32 | at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:110)
14:46:32 | at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97)
14:46:32 | at org.eclipse.jetty.server.Server.doStart(Server.java:387)
14:46:32 | at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73)
14:46:32 | at com.inductiveautomation.catapult.IgnitionServer.start(IgnitionServer.java:1177)
14:46:32 | at com.inductiveautomation.ignition.gateway.web.WebResourceManagerImpl.start(WebResourceManagerImpl.java:325)
14:46:32 | at com.inductiveautomation.ignition.gateway.IgnitionGateway.start(IgnitionGateway.java:560)
14:46:32 | at com.inductiveautomation.ignition.gateway.IgnitionGateway.main(IgnitionGateway.java:294)
14:46:32 | at com.inductiveautomation.catapult.Catapult.main(Catapult.java:8)
14:46:32 | at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
14:46:32 | at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
14:46:32 | at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
14:46:32 | at java.base/java.lang.reflect.Method.invoke(Unknown Source)
14:46:32 | at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:349)
14:46:32 | at java.base/java.lang.Thread.run(Unknown Source)

```

or maybe it's `/usr/local/temp`? not sure if that path is relative...
