我是玩框架的新手。在这里我正在做一个与数据库连接的项目。我尝试了mysql并获得了成功的输出。但我无法连接到HiveJDBC。
下面是我做的改动。
内部版本.scala
name := "SAI"
version := "1.0-SNAPSHOT"
libraryDependencies ++= Seq(
"org.apache.hive" % "hive-jdbc" % "0.13.0",
Jdbc,
javaEbean,
cache,
"org.slf4j" % "slf4j-api" % "1.7.5",
"ch.qos.logback" % "logback-classic" % "1.0.13",
"org.apache.commons" % "commons-email" % "1.3.2",
"org.apache.hive" % "hive-exec" % "0.13.0",
"org.apache.hive" % "hive-metastore" % "0.13.0",
"org.apache.hive" % "hive-service" % "0.13.0",
"org.apache.thrift" % "libfb303" % "0.9.1",
"log4j" % "log4j" % "1.2.17",
"org.apache.hadoop" % "hadoop-core" % "1.2.1"
)
play.Project.playJavaSettings
应用程序.conf
db.default.driver=org.apache.hive.jdbc.HiveDriver
db.default.url="jdbc:hive2://localhost:10000/test"
ebean.default="models.*"
在尝试连接时,我遇到了以下错误
! @6o8kokmi3 - Internal server error, for (GET) [/] ->
Configuration error: Configuration error[Cannot connect to database [default]]
at play.api.Configuration$.play$api$Configuration$$configError(Configuration.scala:92)
at play.api.Configuration.reportError(Configuration.scala:570)
at play.api.db.BoneCPPlugin$$anonfun$onStart$1.apply(DB.scala:252)
at play.api.db.BoneCPPlugin$$anonfun$onStart$1.apply(DB.scala:243)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
at scala.collection.immutable.List.foreach(List.scala:318)
at scala.collection.TraversableLike$class.map(TraversableLike.scala:244)
at scala.collection.AbstractTraversable.map(enter code hereTraversable.scala:105)
at play.api.db.BoneCPPlugin.onStart(DB.scala:243)
at play.api.Play$$anonfun$start$1$$anonfun$apply$mcV$sp$1.apply(Play.scala:88)
at play.api.Play$$anonfun$start$1$$anonfun$apply$mcV$sp$1.apply(Play.scala:88)
at scala.collection.immutable.List.foreach(List.scala:318)
at play.api.Play$$anonfun$start$1.apply$mcV$sp(Play.scala:88)
at play.api.Play$$anonfun$start$1.apply(Play.scala:88)
at play.api.Play$$anonfun$start$1.apply(Play.scala:88)
at play.utils.Threads$.withContextClassLoader(Threads.scala:18)
at play.api.Play$.start(Play.scala:87)`enter code here`
请让我知道我错过了什么,并提前感谢
暂无答案!
目前还没有任何答案,快来回答吧!