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

Driver not found: [com.typesafe.slick.driver.ms.SQLServerDriver] #151

Closed
abrutus opened this issue Apr 30, 2014 · 9 comments
Closed

Driver not found: [com.typesafe.slick.driver.ms.SQLServerDriver] #151

abrutus opened this issue Apr 30, 2014 · 9 comments

Comments

@abrutus
Copy link

abrutus commented Apr 30, 2014

I downloaded the slick-extensions by adding this to the build.sbt

libraryDependencies += "com.typesafe.slick" %% "slick-extensions" % "2.0.1"

resolvers += "Typesafe Releases" at "http://repo.typesafe.com/typesafe/maven-releases/"

After reloading and running the IDE (idea) task, the code seems to be fine from the IDE UI/compile task. For some reason though, the config is unable to distinguish the MS SQL Server driver itself. The offending line on my application.conf is the following: db.default.driver=com.typesafe.slick.driver.ms.SQLServerDriver

After some google-fu, I narrowed it down to this line

 /** Extend this to add driver or change driver mapping */
  protected def driverByName: String => Option[JdbcDriver] = Map(
    "org.apache.derby.jdbc.EmbeddedDriver" -> DerbyDriver, "org.h2.Driver" -> H2Driver, "org.hsqldb.jdbcDriver" -> HsqldbDriver, "com.mysql.jdbc.Driver" -> MySQLDriver, "org.postgresql.Driver" -> PostgresDriver, "org.sqlite.JDBC" -> SQLiteDriver).get(_)

(assuming what I've searched is of relevance) How do I extend the line to allow it to use the drivers from the slick-extensions?

Or how would I go about using the SQL Server driver?

@francisdb
Copy link

see also #123 and #25
wonder if that pull req made it to a release yet

@freekh
Copy link
Contributor

freekh commented Apr 30, 2014

Yep, it should (and indeed it looks like) it is merged :)
I guess some docs are missing. Should not close this issue before those are in place.

F

On 30 Apr 2014, at 09:25, Francis De Brabandere notifications@github.com wrote:

see also #123 and #25
wonder if that pull req made it to a release yet


Reply to this email directly or view it on GitHub.

@francisdb
Copy link

@abrutus what you probably need is

db.default.slickdriver=com.typesafe.slick.driver.ms.SQLServerDriver
db.default.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver

@abrutus
Copy link
Author

abrutus commented Apr 30, 2014

@francisdb It appears to work (after adding the unmanaged dependency jar file). Thanks for the help! -- I'll go ahead and leave this opened so the documentation issue gets addressed.

@freekh
Copy link
Contributor

freekh commented Apr 30, 2014

Great! Thanks!

On 30 Apr 2014, at 10:30, abrutus notifications@github.com wrote:

@francisdb It appears to work (after adding the unmanaged dependency jar file). Thanks for the help! -- I'll go ahead and leave this opened so the documentation issue gets addressed.


Reply to this email directly or view it on GitHub.

@loicdescotte
Copy link
Contributor

Hi,

I've just updated the wiki page with your example.

By the way, I'm not sure we should maintain the "/docmentation" folder in this repo.
It was made to be integrated into play executable documentation.
But as we will not merge this plugin into Play core, maybe it simpler to just use the Github wiki?
Maybe we can open an dedicated issue for this question...

@freekh
Copy link
Contributor

freekh commented May 12, 2014

Thanks @loicdescotte!

I guess opening a dedicated issue for where the doc should go sounds like a good idea. It is up to the play guys now...

@loicdescotte
Copy link
Contributor

Ok, done here #156

@richdougherty
Copy link
Member

It looks like this issue can be closed now. Is that right?

@abrutus abrutus closed this as completed May 28, 2014
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

No branches or pull requests

5 participants