How correctly connect to Oracle 12g database in Play Framework?









up vote
-1
down vote

favorite












I am new in Play Framework (Scala) and need some advise.



I use Scala 2.12 and Play Framework 2.6.20. I need to use several databases in my project. Right now I connected MySQL database as it says in documentation. How correctly connect project to remote Oracle 12g database?



application.conf:



db 
mysql.driver = com.mysql.cj.jdbc.Driver
mysql.url = "jdbc:mysql://host:port/database?characterEncoding=UTF-8"
mysql.username = "username"
mysql.password = "password"



First of all to lib folder I put ojdbc8.jar file from oracle website.



Then add libraryDependencies += "com.oracle" % "ojdbc8" % "12.1.0.1" code to sbt.build file. Finally I wrote settings to aplication.conf file.



After that step I notice error in terminal:



[error] (*:update) sbt.ResolveException: unresolved dependency: com.oracle#ojdbc8;12.1.0.1: not found
[error] Total time: 6 s, completed 10.11.2018 16:48:30
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256M; support was removed in 8.0


EDIT:



application.conf:



db 
mysql.driver = com.mysql.cj.jdbc.Driver
mysql.url = "jdbc:mysql://@host:@port/@database?characterEncoding=UTF-8"
mysql.username = "@username"
mysql.password = "@password"

oracle.driver = oracle.jdbc.driver.OracleDriver
oracle.url = "jdbc:oracle:thin:@host:@port/@sid"
oracle.username = "@username"
oracle.password = "@password"



ERROR:



play.api.UnexpectedException: Unexpected exception[CreationException: Unable to create injector, see the following errors:

1) No implementation for play.api.db.Database was bound.
while locating play.api.db.Database
for the 1st parameter of controllers.GetMarkersController.<init>(GetMarkersController.scala:14)
while locating controllers.GetMarkersController
for the 7th parameter of router.Routes.<init>(Routes.scala:45)
at play.api.inject.RoutesProvider$.bindingsFromConfiguration(BuiltinModule.scala:121):
Binding(class router.Routes to self) (via modules: com.google.inject.util.Modules$OverrideModule -> play.api.inject.guice.GuiceableModuleConversions$$anon$1)


GetMarkersController.scala:



package controllers

import javax.inject._

import akka.actor.ActorSystem
import play.api.Configuration
import play.api.mvc.AbstractController, ControllerComponents
import play.api.libs.ws._
import scala.concurrent.duration._
import scala.concurrent.ExecutionContext, Future, Promise
import services._
import play.api.db.Database

class GetMarkersController @Inject()(db: Database, conf: Configuration, ws: WSClient, cc: ControllerComponents, actorSystem: ActorSystem)(implicit exec: ExecutionContext) extends AbstractController(cc)
def getMarkersValues(start_date: String, end_date: String) = Action.async
getValues(1.second, start_date: String, end_date: String).map
message => Ok(message)



private def getValues(delayTime: FiniteDuration, start_date: String, end_date: String): Future[String] =
val promise: Promise[String] = Promise[String]()
val service: GetMarkersService = new GetMarkersService(db)
actorSystem.scheduler.scheduleOnce(delayTime)
promise.success(service.get_markers(start_date, end_date))
(actorSystem.dispatcher)
promise.future











share|improve this question























  • What have you already tried? Share the code.
    – cchantep
    2 days ago










  • @cchantep can you check my post again please? I add some information. It seems like I use incorrect version of .jar file.
    – Nurzhan Nogerbek
    2 days ago










  • @cchantep do you have any ideas?
    – Nurzhan Nogerbek
    2 days ago










  • Check your build, nothing specific to Play
    – cchantep
    2 days ago














up vote
-1
down vote

favorite












I am new in Play Framework (Scala) and need some advise.



I use Scala 2.12 and Play Framework 2.6.20. I need to use several databases in my project. Right now I connected MySQL database as it says in documentation. How correctly connect project to remote Oracle 12g database?



application.conf:



db 
mysql.driver = com.mysql.cj.jdbc.Driver
mysql.url = "jdbc:mysql://host:port/database?characterEncoding=UTF-8"
mysql.username = "username"
mysql.password = "password"



First of all to lib folder I put ojdbc8.jar file from oracle website.



Then add libraryDependencies += "com.oracle" % "ojdbc8" % "12.1.0.1" code to sbt.build file. Finally I wrote settings to aplication.conf file.



After that step I notice error in terminal:



[error] (*:update) sbt.ResolveException: unresolved dependency: com.oracle#ojdbc8;12.1.0.1: not found
[error] Total time: 6 s, completed 10.11.2018 16:48:30
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256M; support was removed in 8.0


EDIT:



application.conf:



db 
mysql.driver = com.mysql.cj.jdbc.Driver
mysql.url = "jdbc:mysql://@host:@port/@database?characterEncoding=UTF-8"
mysql.username = "@username"
mysql.password = "@password"

oracle.driver = oracle.jdbc.driver.OracleDriver
oracle.url = "jdbc:oracle:thin:@host:@port/@sid"
oracle.username = "@username"
oracle.password = "@password"



ERROR:



play.api.UnexpectedException: Unexpected exception[CreationException: Unable to create injector, see the following errors:

1) No implementation for play.api.db.Database was bound.
while locating play.api.db.Database
for the 1st parameter of controllers.GetMarkersController.<init>(GetMarkersController.scala:14)
while locating controllers.GetMarkersController
for the 7th parameter of router.Routes.<init>(Routes.scala:45)
at play.api.inject.RoutesProvider$.bindingsFromConfiguration(BuiltinModule.scala:121):
Binding(class router.Routes to self) (via modules: com.google.inject.util.Modules$OverrideModule -> play.api.inject.guice.GuiceableModuleConversions$$anon$1)


GetMarkersController.scala:



package controllers

import javax.inject._

import akka.actor.ActorSystem
import play.api.Configuration
import play.api.mvc.AbstractController, ControllerComponents
import play.api.libs.ws._
import scala.concurrent.duration._
import scala.concurrent.ExecutionContext, Future, Promise
import services._
import play.api.db.Database

class GetMarkersController @Inject()(db: Database, conf: Configuration, ws: WSClient, cc: ControllerComponents, actorSystem: ActorSystem)(implicit exec: ExecutionContext) extends AbstractController(cc)
def getMarkersValues(start_date: String, end_date: String) = Action.async
getValues(1.second, start_date: String, end_date: String).map
message => Ok(message)



private def getValues(delayTime: FiniteDuration, start_date: String, end_date: String): Future[String] =
val promise: Promise[String] = Promise[String]()
val service: GetMarkersService = new GetMarkersService(db)
actorSystem.scheduler.scheduleOnce(delayTime)
promise.success(service.get_markers(start_date, end_date))
(actorSystem.dispatcher)
promise.future











share|improve this question























  • What have you already tried? Share the code.
    – cchantep
    2 days ago










  • @cchantep can you check my post again please? I add some information. It seems like I use incorrect version of .jar file.
    – Nurzhan Nogerbek
    2 days ago










  • @cchantep do you have any ideas?
    – Nurzhan Nogerbek
    2 days ago










  • Check your build, nothing specific to Play
    – cchantep
    2 days ago












up vote
-1
down vote

favorite









up vote
-1
down vote

favorite











I am new in Play Framework (Scala) and need some advise.



I use Scala 2.12 and Play Framework 2.6.20. I need to use several databases in my project. Right now I connected MySQL database as it says in documentation. How correctly connect project to remote Oracle 12g database?



application.conf:



db 
mysql.driver = com.mysql.cj.jdbc.Driver
mysql.url = "jdbc:mysql://host:port/database?characterEncoding=UTF-8"
mysql.username = "username"
mysql.password = "password"



First of all to lib folder I put ojdbc8.jar file from oracle website.



Then add libraryDependencies += "com.oracle" % "ojdbc8" % "12.1.0.1" code to sbt.build file. Finally I wrote settings to aplication.conf file.



After that step I notice error in terminal:



[error] (*:update) sbt.ResolveException: unresolved dependency: com.oracle#ojdbc8;12.1.0.1: not found
[error] Total time: 6 s, completed 10.11.2018 16:48:30
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256M; support was removed in 8.0


EDIT:



application.conf:



db 
mysql.driver = com.mysql.cj.jdbc.Driver
mysql.url = "jdbc:mysql://@host:@port/@database?characterEncoding=UTF-8"
mysql.username = "@username"
mysql.password = "@password"

oracle.driver = oracle.jdbc.driver.OracleDriver
oracle.url = "jdbc:oracle:thin:@host:@port/@sid"
oracle.username = "@username"
oracle.password = "@password"



ERROR:



play.api.UnexpectedException: Unexpected exception[CreationException: Unable to create injector, see the following errors:

1) No implementation for play.api.db.Database was bound.
while locating play.api.db.Database
for the 1st parameter of controllers.GetMarkersController.<init>(GetMarkersController.scala:14)
while locating controllers.GetMarkersController
for the 7th parameter of router.Routes.<init>(Routes.scala:45)
at play.api.inject.RoutesProvider$.bindingsFromConfiguration(BuiltinModule.scala:121):
Binding(class router.Routes to self) (via modules: com.google.inject.util.Modules$OverrideModule -> play.api.inject.guice.GuiceableModuleConversions$$anon$1)


GetMarkersController.scala:



package controllers

import javax.inject._

import akka.actor.ActorSystem
import play.api.Configuration
import play.api.mvc.AbstractController, ControllerComponents
import play.api.libs.ws._
import scala.concurrent.duration._
import scala.concurrent.ExecutionContext, Future, Promise
import services._
import play.api.db.Database

class GetMarkersController @Inject()(db: Database, conf: Configuration, ws: WSClient, cc: ControllerComponents, actorSystem: ActorSystem)(implicit exec: ExecutionContext) extends AbstractController(cc)
def getMarkersValues(start_date: String, end_date: String) = Action.async
getValues(1.second, start_date: String, end_date: String).map
message => Ok(message)



private def getValues(delayTime: FiniteDuration, start_date: String, end_date: String): Future[String] =
val promise: Promise[String] = Promise[String]()
val service: GetMarkersService = new GetMarkersService(db)
actorSystem.scheduler.scheduleOnce(delayTime)
promise.success(service.get_markers(start_date, end_date))
(actorSystem.dispatcher)
promise.future











share|improve this question















I am new in Play Framework (Scala) and need some advise.



I use Scala 2.12 and Play Framework 2.6.20. I need to use several databases in my project. Right now I connected MySQL database as it says in documentation. How correctly connect project to remote Oracle 12g database?



application.conf:



db 
mysql.driver = com.mysql.cj.jdbc.Driver
mysql.url = "jdbc:mysql://host:port/database?characterEncoding=UTF-8"
mysql.username = "username"
mysql.password = "password"



First of all to lib folder I put ojdbc8.jar file from oracle website.



Then add libraryDependencies += "com.oracle" % "ojdbc8" % "12.1.0.1" code to sbt.build file. Finally I wrote settings to aplication.conf file.



After that step I notice error in terminal:



[error] (*:update) sbt.ResolveException: unresolved dependency: com.oracle#ojdbc8;12.1.0.1: not found
[error] Total time: 6 s, completed 10.11.2018 16:48:30
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256M; support was removed in 8.0


EDIT:



application.conf:



db 
mysql.driver = com.mysql.cj.jdbc.Driver
mysql.url = "jdbc:mysql://@host:@port/@database?characterEncoding=UTF-8"
mysql.username = "@username"
mysql.password = "@password"

oracle.driver = oracle.jdbc.driver.OracleDriver
oracle.url = "jdbc:oracle:thin:@host:@port/@sid"
oracle.username = "@username"
oracle.password = "@password"



ERROR:



play.api.UnexpectedException: Unexpected exception[CreationException: Unable to create injector, see the following errors:

1) No implementation for play.api.db.Database was bound.
while locating play.api.db.Database
for the 1st parameter of controllers.GetMarkersController.<init>(GetMarkersController.scala:14)
while locating controllers.GetMarkersController
for the 7th parameter of router.Routes.<init>(Routes.scala:45)
at play.api.inject.RoutesProvider$.bindingsFromConfiguration(BuiltinModule.scala:121):
Binding(class router.Routes to self) (via modules: com.google.inject.util.Modules$OverrideModule -> play.api.inject.guice.GuiceableModuleConversions$$anon$1)


GetMarkersController.scala:



package controllers

import javax.inject._

import akka.actor.ActorSystem
import play.api.Configuration
import play.api.mvc.AbstractController, ControllerComponents
import play.api.libs.ws._
import scala.concurrent.duration._
import scala.concurrent.ExecutionContext, Future, Promise
import services._
import play.api.db.Database

class GetMarkersController @Inject()(db: Database, conf: Configuration, ws: WSClient, cc: ControllerComponents, actorSystem: ActorSystem)(implicit exec: ExecutionContext) extends AbstractController(cc)
def getMarkersValues(start_date: String, end_date: String) = Action.async
getValues(1.second, start_date: String, end_date: String).map
message => Ok(message)



private def getValues(delayTime: FiniteDuration, start_date: String, end_date: String): Future[String] =
val promise: Promise[String] = Promise[String]()
val service: GetMarkersService = new GetMarkersService(db)
actorSystem.scheduler.scheduleOnce(delayTime)
promise.success(service.get_markers(start_date, end_date))
(actorSystem.dispatcher)
promise.future








database oracle scala playframework






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 20 hours ago

























asked 2 days ago









Nurzhan Nogerbek

76821838




76821838











  • What have you already tried? Share the code.
    – cchantep
    2 days ago










  • @cchantep can you check my post again please? I add some information. It seems like I use incorrect version of .jar file.
    – Nurzhan Nogerbek
    2 days ago










  • @cchantep do you have any ideas?
    – Nurzhan Nogerbek
    2 days ago










  • Check your build, nothing specific to Play
    – cchantep
    2 days ago
















  • What have you already tried? Share the code.
    – cchantep
    2 days ago










  • @cchantep can you check my post again please? I add some information. It seems like I use incorrect version of .jar file.
    – Nurzhan Nogerbek
    2 days ago










  • @cchantep do you have any ideas?
    – Nurzhan Nogerbek
    2 days ago










  • Check your build, nothing specific to Play
    – cchantep
    2 days ago















What have you already tried? Share the code.
– cchantep
2 days ago




What have you already tried? Share the code.
– cchantep
2 days ago












@cchantep can you check my post again please? I add some information. It seems like I use incorrect version of .jar file.
– Nurzhan Nogerbek
2 days ago




@cchantep can you check my post again please? I add some information. It seems like I use incorrect version of .jar file.
– Nurzhan Nogerbek
2 days ago












@cchantep do you have any ideas?
– Nurzhan Nogerbek
2 days ago




@cchantep do you have any ideas?
– Nurzhan Nogerbek
2 days ago












Check your build, nothing specific to Play
– cchantep
2 days ago




Check your build, nothing specific to Play
– cchantep
2 days ago












1 Answer
1






active

oldest

votes

















up vote
0
down vote













You cannot access Oracle without credentials. You need to have an account with Oracle. Then add something like the following to your build.sbt file



resolvers += "Oracle" at "https://maven.oracle.com"

credentials += Credentials("Oracle", "maven.oracle.com", "username", "password")


More information about accessing the OTN: https://docs.oracle.com/middleware/1213/core/MAVEN/config_maven_repo.htm#MAVEN9012



If you have the hard coded jar, you don't need to include as a dependency. See unmanagedDependencies https://www.scala-sbt.org/1.x/docs/Library-Dependencies.html






share|improve this answer




















  • Thank you for your answer. I have question. I add code which you recommended but unfortunately steal has the same error. Is it mean that I don't need libraryDependencies += "com.oracle" % "ojdbc8" % "12.1.0.1" in build.sbt file anymore?
    – Nurzhan Nogerbek
    yesterday










  • Also I notice in terminal this error message: [error] Unable to find credentials for [OAM 11g @ login.oracle.com].
    – Nurzhan Nogerbek
    yesterday










  • Yes. It is either or, if you have the jar you don't need to put it in the libraryDependencies. You don't need to do both.
    – Daniel Hinojosa
    yesterday










  • I think you found it. Add credentials += Credentials("OAM 11g", "login.oracle.com", "username", "password")
    – Daniel Hinojosa
    yesterday











  • I add to build.sbt file only that code which you recommended without libraryDependencies. Now when I try to take any data from database it raise error. From error I understand that there is steal no connection between Play Framework and remote Oracle database. Can you check my post again please?!
    – Nurzhan Nogerbek
    20 hours ago










Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53237927%2fhow-correctly-connect-to-oracle-12g-database-in-play-framework%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
0
down vote













You cannot access Oracle without credentials. You need to have an account with Oracle. Then add something like the following to your build.sbt file



resolvers += "Oracle" at "https://maven.oracle.com"

credentials += Credentials("Oracle", "maven.oracle.com", "username", "password")


More information about accessing the OTN: https://docs.oracle.com/middleware/1213/core/MAVEN/config_maven_repo.htm#MAVEN9012



If you have the hard coded jar, you don't need to include as a dependency. See unmanagedDependencies https://www.scala-sbt.org/1.x/docs/Library-Dependencies.html






share|improve this answer




















  • Thank you for your answer. I have question. I add code which you recommended but unfortunately steal has the same error. Is it mean that I don't need libraryDependencies += "com.oracle" % "ojdbc8" % "12.1.0.1" in build.sbt file anymore?
    – Nurzhan Nogerbek
    yesterday










  • Also I notice in terminal this error message: [error] Unable to find credentials for [OAM 11g @ login.oracle.com].
    – Nurzhan Nogerbek
    yesterday










  • Yes. It is either or, if you have the jar you don't need to put it in the libraryDependencies. You don't need to do both.
    – Daniel Hinojosa
    yesterday










  • I think you found it. Add credentials += Credentials("OAM 11g", "login.oracle.com", "username", "password")
    – Daniel Hinojosa
    yesterday











  • I add to build.sbt file only that code which you recommended without libraryDependencies. Now when I try to take any data from database it raise error. From error I understand that there is steal no connection between Play Framework and remote Oracle database. Can you check my post again please?!
    – Nurzhan Nogerbek
    20 hours ago














up vote
0
down vote













You cannot access Oracle without credentials. You need to have an account with Oracle. Then add something like the following to your build.sbt file



resolvers += "Oracle" at "https://maven.oracle.com"

credentials += Credentials("Oracle", "maven.oracle.com", "username", "password")


More information about accessing the OTN: https://docs.oracle.com/middleware/1213/core/MAVEN/config_maven_repo.htm#MAVEN9012



If you have the hard coded jar, you don't need to include as a dependency. See unmanagedDependencies https://www.scala-sbt.org/1.x/docs/Library-Dependencies.html






share|improve this answer




















  • Thank you for your answer. I have question. I add code which you recommended but unfortunately steal has the same error. Is it mean that I don't need libraryDependencies += "com.oracle" % "ojdbc8" % "12.1.0.1" in build.sbt file anymore?
    – Nurzhan Nogerbek
    yesterday










  • Also I notice in terminal this error message: [error] Unable to find credentials for [OAM 11g @ login.oracle.com].
    – Nurzhan Nogerbek
    yesterday










  • Yes. It is either or, if you have the jar you don't need to put it in the libraryDependencies. You don't need to do both.
    – Daniel Hinojosa
    yesterday










  • I think you found it. Add credentials += Credentials("OAM 11g", "login.oracle.com", "username", "password")
    – Daniel Hinojosa
    yesterday











  • I add to build.sbt file only that code which you recommended without libraryDependencies. Now when I try to take any data from database it raise error. From error I understand that there is steal no connection between Play Framework and remote Oracle database. Can you check my post again please?!
    – Nurzhan Nogerbek
    20 hours ago












up vote
0
down vote










up vote
0
down vote









You cannot access Oracle without credentials. You need to have an account with Oracle. Then add something like the following to your build.sbt file



resolvers += "Oracle" at "https://maven.oracle.com"

credentials += Credentials("Oracle", "maven.oracle.com", "username", "password")


More information about accessing the OTN: https://docs.oracle.com/middleware/1213/core/MAVEN/config_maven_repo.htm#MAVEN9012



If you have the hard coded jar, you don't need to include as a dependency. See unmanagedDependencies https://www.scala-sbt.org/1.x/docs/Library-Dependencies.html






share|improve this answer












You cannot access Oracle without credentials. You need to have an account with Oracle. Then add something like the following to your build.sbt file



resolvers += "Oracle" at "https://maven.oracle.com"

credentials += Credentials("Oracle", "maven.oracle.com", "username", "password")


More information about accessing the OTN: https://docs.oracle.com/middleware/1213/core/MAVEN/config_maven_repo.htm#MAVEN9012



If you have the hard coded jar, you don't need to include as a dependency. See unmanagedDependencies https://www.scala-sbt.org/1.x/docs/Library-Dependencies.html







share|improve this answer












share|improve this answer



share|improve this answer










answered 2 days ago









Daniel Hinojosa

72737




72737











  • Thank you for your answer. I have question. I add code which you recommended but unfortunately steal has the same error. Is it mean that I don't need libraryDependencies += "com.oracle" % "ojdbc8" % "12.1.0.1" in build.sbt file anymore?
    – Nurzhan Nogerbek
    yesterday










  • Also I notice in terminal this error message: [error] Unable to find credentials for [OAM 11g @ login.oracle.com].
    – Nurzhan Nogerbek
    yesterday










  • Yes. It is either or, if you have the jar you don't need to put it in the libraryDependencies. You don't need to do both.
    – Daniel Hinojosa
    yesterday










  • I think you found it. Add credentials += Credentials("OAM 11g", "login.oracle.com", "username", "password")
    – Daniel Hinojosa
    yesterday











  • I add to build.sbt file only that code which you recommended without libraryDependencies. Now when I try to take any data from database it raise error. From error I understand that there is steal no connection between Play Framework and remote Oracle database. Can you check my post again please?!
    – Nurzhan Nogerbek
    20 hours ago
















  • Thank you for your answer. I have question. I add code which you recommended but unfortunately steal has the same error. Is it mean that I don't need libraryDependencies += "com.oracle" % "ojdbc8" % "12.1.0.1" in build.sbt file anymore?
    – Nurzhan Nogerbek
    yesterday










  • Also I notice in terminal this error message: [error] Unable to find credentials for [OAM 11g @ login.oracle.com].
    – Nurzhan Nogerbek
    yesterday










  • Yes. It is either or, if you have the jar you don't need to put it in the libraryDependencies. You don't need to do both.
    – Daniel Hinojosa
    yesterday










  • I think you found it. Add credentials += Credentials("OAM 11g", "login.oracle.com", "username", "password")
    – Daniel Hinojosa
    yesterday











  • I add to build.sbt file only that code which you recommended without libraryDependencies. Now when I try to take any data from database it raise error. From error I understand that there is steal no connection between Play Framework and remote Oracle database. Can you check my post again please?!
    – Nurzhan Nogerbek
    20 hours ago















Thank you for your answer. I have question. I add code which you recommended but unfortunately steal has the same error. Is it mean that I don't need libraryDependencies += "com.oracle" % "ojdbc8" % "12.1.0.1" in build.sbt file anymore?
– Nurzhan Nogerbek
yesterday




Thank you for your answer. I have question. I add code which you recommended but unfortunately steal has the same error. Is it mean that I don't need libraryDependencies += "com.oracle" % "ojdbc8" % "12.1.0.1" in build.sbt file anymore?
– Nurzhan Nogerbek
yesterday












Also I notice in terminal this error message: [error] Unable to find credentials for [OAM 11g @ login.oracle.com].
– Nurzhan Nogerbek
yesterday




Also I notice in terminal this error message: [error] Unable to find credentials for [OAM 11g @ login.oracle.com].
– Nurzhan Nogerbek
yesterday












Yes. It is either or, if you have the jar you don't need to put it in the libraryDependencies. You don't need to do both.
– Daniel Hinojosa
yesterday




Yes. It is either or, if you have the jar you don't need to put it in the libraryDependencies. You don't need to do both.
– Daniel Hinojosa
yesterday












I think you found it. Add credentials += Credentials("OAM 11g", "login.oracle.com", "username", "password")
– Daniel Hinojosa
yesterday





I think you found it. Add credentials += Credentials("OAM 11g", "login.oracle.com", "username", "password")
– Daniel Hinojosa
yesterday













I add to build.sbt file only that code which you recommended without libraryDependencies. Now when I try to take any data from database it raise error. From error I understand that there is steal no connection between Play Framework and remote Oracle database. Can you check my post again please?!
– Nurzhan Nogerbek
20 hours ago




I add to build.sbt file only that code which you recommended without libraryDependencies. Now when I try to take any data from database it raise error. From error I understand that there is steal no connection between Play Framework and remote Oracle database. Can you check my post again please?!
– Nurzhan Nogerbek
20 hours ago

















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53237927%2fhow-correctly-connect-to-oracle-12g-database-in-play-framework%23new-answer', 'question_page');

);

Post as a guest














































































這個網誌中的熱門文章

How to read a connectionString WITH PROVIDER in .NET Core?

Node.js Script on GitHub Pages or Amazon S3

Museum of Modern and Contemporary Art of Trento and Rovereto