Answer the question
In order to leave comments, you need to log in
How to properly connect Play Framework with Oracle 12?
Hello comrades! I am trying to connect to a remote Oracle 12
database in a Play Framework project. I am using Scala 2.12 and Play Framework 2.6.20 . From the official Oracle page, I downloaded the ojdbc8.jar file . Next, I placed it in the lib directory . In the build.sbt file I put the following:
credentials += Credentials("oracle", "login.oracle.com", "@email", "@password")
resolvers += "oracle" at "maven.oracle.com"
libraryDependencies ++= Seq("com.oracle.jdbc" % "ojdbc8" % "12.2.0.1")
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: com.oracle.jdbc#ojdbc8;12.2.0.1: oracle: unable to get resource for com/oracle/jdbc#ojdbc8;12.2.0.1: res=maven.oracle.com/com/oracle/jdbc/ojdbc8/12.2.0.1/ojdbc8-12.2.0.1.pom: java.net.MalformedURLException: no protocol: maven.oracle.com/com/oracle/jdbc/ojdbc8/12.2.0.1/ojdbc8-12.2.0.1.pom
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] Note: Unresolved dependencies path:
[warn] com.oracle.jdbc:ojdbc8:12.2.0.1 (C:\Users\NNogerbek\IdeaProjects\saturn\build.sbt#L25-26)
[warn] +- saturn:saturn_2.12:1.0
[error] (*:update) sbt.ResolveException: unresolved dependency: com.oracle.jdbc#ojdbc8;12.2.0.1: oracle: unable to get resource for com/oracle/jdbc#ojdbc8;12.2.0.1: res=maven.oracle.com/com/oracle/jdbc/ojdbc8/12.2.0.1/ojdbc8-12.2.0.1.pom: java.net.MalformedURLException: no protocol: maven.oracle.com/com/oracle/jdbc/ojdbc8/12.2.0.1/ojdbc8-12.2.0.1.pom
Answer the question
In order to leave comments, you need to log in
And why did you download if you specify what should be dragged from the repository?
Correct is this:
resolvers += "oracle" at "https://maven.oracle.com"
credentials += Credentials("oracle download", "maven.oracle.com", "[email protected]", "password")
libraryDependencies ++= Seq(
"com.oracle.jdbc" % "ojdbc8" % "12.2.0.1"
)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question