Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DBCP as a dependency (should fix database connection) #265

Merged
merged 1 commit into from
Sep 19, 2024

Conversation

guusdk
Copy link
Member

@guusdk guusdk commented Sep 19, 2024

After updating Tomcat, I noticed that downloads were no longer being recorded in the database. I suspect that this is caused by the upgrade having removed the DBCP (database connection pool) library. This was found in logging when Tomcat was starting up:

[main] org.apache.catalina.core.NamingContextListener.addResource Failed to register in JMX: [javax.naming.NamingException: Could not load resource factory class [Root exception is java.lang.ClassNotFoundException: org.apache.commons.dbcp.BasicDataSourceFactory]]

Instead of adding the library to Tomcat, it is being bundled in this (root) application, which hopefully works well enough (and no longer depends on us having a specific Tomcat configuration when upgrading). The database driver is already being included in the same way, after all.

After updating Tomcat, I noticed that downloads were no longer being recorded in the database. I suspect that this is caused by the upgrade having removed the DBCP (database connection pool) library. This was found in logging when Tomcat was starting up:

```
[main] org.apache.catalina.core.NamingContextListener.addResource Failed to register in JMX: [javax.naming.NamingException: Could not load resource factory class [Root exception is java.lang.ClassNotFoundException: org.apache.commons.dbcp.BasicDataSourceFactory]]
```

Instead of adding the library to Tomcat, it is being bundled in this (root) application, which hopefully works well enough (and no longer depends on us having a specific Tomcat configuration when upgrading). The database driver is already being included in the same way, after all.
@guusdk guusdk merged commit 6871fae into igniterealtime:main Sep 19, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant