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

Suggest removing jdbc dependency #280

Open
richdougherty opened this issue Jun 21, 2015 · 3 comments
Open

Suggest removing jdbc dependency #280

richdougherty opened this issue Jun 21, 2015 · 3 comments

Comments

@richdougherty
Copy link
Member

The standard Play template bundles the jdbc dependency. Users will usually need to remove this dependency when they add the play-slick dependency. Mention this in the docs.

Could also mention that the error A binding to play.api.db.DBApi was already configured happens when both jdbc and play-slick are on the classpath together.

@dotta
Copy link
Contributor

dotta commented Jun 22, 2015

Doc for this already exists here: https://www.playframework.com/documentation/2.4.x/PlaySlickFAQ#A-binding-to-play.api.db.DBApi-was-already-configured

I guess the issue is that it's not easy to discover. If you have something in mind please share :-)

@jdelafon
Copy link

jdelafon commented Mar 10, 2017

Actually it seems to be enough to deactivate the incompatible module in "application.conf":

play.modules.disabled += "play.api.db.DBModule"

Is this bad? Should it be documented? At least it allows you to still have access for instance to the Databases object, which was very useful in my case.

@marcospereira
Copy link
Member

marcospereira commented Mar 13, 2017

Hey @jdelafon,

Yes, if you want to use Databases object, then you can keep the jdbc dependency and just disable the DBModule. Just keep in mind that by disabling DBModule you won't be able to inject instances of play.api.db.Database and play.api.db.DBApi (unless you provide your own bindings).

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

5 participants