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

Database drivers added to ext-dependencies are not found #11

Closed
mikub opened this issue Dec 12, 2020 · 4 comments
Closed

Database drivers added to ext-dependencies are not found #11

mikub opened this issue Dec 12, 2020 · 4 comments
Assignees

Comments

@mikub
Copy link
Contributor

mikub commented Dec 12, 2020

Titanoboa uses C3p0 connection pool and due to this bug swaldman/c3p0#105 any DB driver classes have to be loaded on the main class loader.

This means that any DB drivers you put into ext-dependencies will not be recognized by C3p0 and would have to be put into project.clj dependencies.
This requires re-build and is not in line with how Titanoboa is intended to be used (i.e. modular & easily extensible).

E.g. Postgres driver used in the following example https://github.com/mikub/titanoboa/wiki/Server-Configuration#non-core-systems has to be currently put into project.clj dependencies - or simply just copied into the /lib folder (the easiest workaround).

@mikub mikub self-assigned this Dec 12, 2020
@mikub
Copy link
Contributor Author

mikub commented Dec 13, 2020

I created a clone of c3p0 with the bug fix. Since the main repo seems reluctant with releasing this fix here is a build with it:
https://clojars.org/io.titanoboa/c3p0

So far using this dependency seems to fix the issue.

@mikub
Copy link
Contributor Author

mikub commented Feb 1, 2021

This still does not seem to fix the issue in all test cases (e.g. in test mode from repl this works but in standalone server mode it does not).

@mikub mikub reopened this Feb 1, 2021
@mikub
Copy link
Contributor Author

mikub commented Feb 4, 2021

Seems like the branch I deployed to clojars still did not have the patch.
However was able to find a patched version here:
https://mvnrepository.com/artifact/org.mule.mchange/c3p0/0.9.5.2-MULE-002

It is in Mule's mvn repo: https://repository.mulesoft.org/releases/

As far as this one is available no need to repackage and redeploy the patch to clojars then.

@mikub
Copy link
Contributor Author

mikub commented Feb 5, 2021

This is now fixed in 1.0.0.-alfa.1

@mikub mikub closed this as completed Feb 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant