unresolved dependency for postgresql 9.2 jar in play framework

让人想犯罪 __ 提交于 2019-12-05 02:29:42

The 9.2 version of Postgresql driver has not yet hit the Maven central repo, so you'll have to use the 9.1 version :

"postgresql" % "postgresql" % "9.1-901-1.jdbc4"

Or you can use the 9.2 version by dropping the JAR in your myApp/lib folder and remove any dependency from your project/Build.scala file (the lib folder is automatically added by sbt).

I have found this in the Repository:

"org.postgresql" % "postgresql" % "9.2-1003-jdbc4"

When I change 9.2 version to 9.1 version, it works perfectly. Thanks for your answer nico_ekito

My buid.scala

  val appDependencies = Seq(
  "postgresql" % "postgresql" % "9.1-901-1.jdbc4",
  jdbc,
  javaCore,
  javaEbean
  )

My application.conf

db.default.driver=org.postgresql.Driver
db.default.url="jdbc:postgresql://localhost:5432/DBName"
db.default.user=postgres
db.default.password=123456

I solved the problem using the information at the following link:

https://github.com/tminglei/slick-pg/issues/1

I hope you find it useful!! :)

good luck ;)

linixinil.

In file application.conf:

 db.default.driver=org.postgresql.Driver
 db.default.url="jdbc:postgresql://localhost:5432/dataBaseName"
 db.default.user=user
 db.default.password="password"

create the pasta /lib in your main project and should add the .jar do postgres.

Download here, and after reload the project.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!