Can anyone help me in resolving this exception. http://localhost:9000 I get this like when I do sbt run
play.api.UnexpectedException: Unexpected exception[ProvisionException: Unable to provision, see the following errors:
1) Error in custom provider, Configuration error: Configuration error[Router not found: router.Routes]
while locating play.api.inject.RoutesProvider
while locating play.api.routing.Router
1 error]
at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1$$anonfun$apply$1$$anonfun$1.apply(DevServerStart.scala:165) ~[play-server_2.10-2.4.0.jar:2.4.0]
at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1$$anonfun$apply$1$$anonfun$1.apply(DevServerStart.scala:121) ~[play-server_2.10-2.4.0.jar:2.4.0]
at scala.Option.map(Option.scala:145) ~[scala-library.jar:na]
at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1$$anonfun$apply$1.apply(DevServerStart.scala:121) ~[play-server_2.10-2.4.0.jar:2.4.0]
at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1$$anonfun$apply$1.apply(DevServerStart.scala:119) ~[play-server_2.10-2.4.0.jar:2.4.0]
at scala.util.Success.flatMap(Try.scala:200) ~[scala-library.jar:na]
at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1.apply(DevServerStart.scala:119) ~[play-server_2.10-2.4.0.jar:2.4.0]
at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1.apply(DevServerStart.scala:111) ~[play-server_2.10-2.4.0.jar:2.4.0]
at scala.concurrent.impl.Future$PromiseCompletingRunnable.liftedTree1$1(Future.scala:24) ~[scala-library.jar:na]
at scala.concurrent.impl.Future$PromiseCompletingRunnable.run(Future.scala:24) ~[scala-library.jar:na]
1) Error in custom provider, Configuration error: Configuration error[Router not found: router.Routes]
while locating play.api.inject.RoutesProvider
while locating play.api.routing.Router
1 error
at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1025) ~[guice-4.0.jar:na]
at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1051) ~[guice-4.0.jar:na]
at play.api.inject.guice.GuiceInjector.instanceOf(GuiceInjectorBuilder.scala:321) ~[play_2.10-2.4.0.jar:2.4.0]
at play.api.inject.guice.GuiceInjector.instanceOf(GuiceInjectorBuilder.scala:316) ~[play_2.10-2.4.0.jar:2.4.0]
at play.api.Application$class.routes(Application.scala:111) ~[play_2.10-2.4.0.jar:2.4.0]
at play.api.DefaultApplication.routes(Application.scala:240) ~[play_2.10-2.4.0.jar:2.4.0]
at play.api.Play$.start(Play.scala:89) ~[play_2.10-2.4.0.jar:2.4.0]
at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1$$anonfun$apply$1$$anonfun$1.apply(DevServerStart.scala:156) ~[play-server_2.10-2.4.0.jar:2.4.0]
at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1$$anonfun$apply$1$$anonfun$1.apply(DevServerStart.scala:121) ~[play-server_2.10-2.4.0.jar:2.4.0]
at scala.Option.map(Option.scala:145) ~[scala-library.jar:na]
Caused by: play.api.Configuration$$anon$1: Configuration error[Router not found: router.Routes]
at play.api.Configuration$.configError(Configuration.scala:178) ~[play_2.10-2.4.0.jar:2.4.0]
at play.api.Configuration.reportError(Configuration.scala:829) ~[play_2.10-2.4.0.jar:2.4.0]
at play.api.routing.Router$$anonfun$load$2.apply(Router.scala:67) ~[play_2.10-2.4.0.jar:2.4.0]
at play.api.routing.Router$$anonfun$load$2.apply(Router.scala:66) ~[play_2.10-2.4.0.jar:2.4.0]
at scala.Option.map(Option.scala:145) ~[scala-library.jar:na]
at play.api.routing.Router$.load(Router.scala:66) ~[play_2.10-2.4.0.jar:2.4.0]
at play.api.inject.RoutesProvider.get$lzycompute(BuiltinModule.scala:66) ~[play_2.10-2.4.0.jar:2.4.0]
at play.api.inject.RoutesProvider.get(BuiltinModule.scala:63) ~[play_2.10-2.4.0.jar:2.4.0]
at play.api.inject.RoutesProvider.get(BuiltinModule.scala:62) ~[play_2.10-2.4.0.jar:2.4.0]
at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:81) ~[guice-4.0.jar:na]
Caused by: play.api.Configuration$$anon$1: Configuration error[Router
not found: router.Routes]
This line in your long error is pretty descriptive. It happens when you have no Routes file or your routes file is empty. Official docs have have info where to put that file and what should be inside.
Related
I am getting the below error during the migration of Play framework 2.3.x to 2.4.x:
play.api.UnexpectedException: Unexpected exception[NoSuchMethodError: com.google.inject.util.Providers.guicify(Ljavax/inject/Provider;)Lcom/google/inject/Provider;]
at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1$$anonfun$apply$1$$anonfun$1.apply(DevServerStart.scala:169) ~[play-server_2.11-2.4.11.jar:2.4.11]
at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1$$anonfun$apply$1$$anonfun$1.apply(DevServerStart.scala:121) ~[play-server_2.11-2.4.11.jar:2.4.11]
at scala.Option.map(Option.scala:146) ~[scala-library-2.11.6.jar:na]
at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1$$anonfun$apply$1.apply(DevServerStart.scala:121) ~[play-server_2.11-2.4.11.jar:2.4.11]
at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1$$anonfun$apply$1.apply(DevServerStart.scala:119) ~[play-server_2.11-2.4.11.jar:2.4.11]
at scala.util.Success.flatMap(Try.scala:230) ~[scala-library-2.11.6.jar:na]
at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1.apply(DevServerStart.scala:119) ~[play-server_2.11-2.4.11.jar:2.4.11]
at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1.apply(DevServerStart.scala:111) ~[play-server_2.11-2.4.11.jar:2.4.11]
at scala.concurrent.impl.Future$PromiseCompletingRunnable.liftedTree1$1(Future.scala:24) ~[scala-library-2.11.6.jar:na]
at scala.concurrent.impl.Future$PromiseCompletingRunnable.run(Future.scala:24) ~[scala-library-2.11.6.jar:na]
Caused by: java.lang.NoSuchMethodError: com.google.inject.util.Providers.guicify(Ljavax/inject/Provider;)Lcom/google/inject/Provider;
at play.api.inject.guice.GuiceableModuleConversions$$anon$1$$anonfun$configure$1$$anonfun$apply$2.apply(GuiceInjectorBuilder.scala:276) ~[play_2.11-2.4.11.jar:2.4.11]
at play.api.inject.guice.GuiceableModuleConversions$$anon$1$$anonfun$configure$1$$anonfun$apply$2.apply(GuiceInjectorBuilder.scala:275) ~[play_2.11-2.4.11.jar:2.4.11]
at scala.Option.foreach(Option.scala:257) ~[scala-library-2.11.6.jar:na]
at play.api.inject.guice.GuiceableModuleConversions$$anon$1$$anonfun$configure$1.apply(GuiceInjectorBuilder.scala:275) ~[play_2.11-2.4.11.jar:2.4.11]
at play.api.inject.guice.GuiceableModuleConversions$$anon$1$$anonfun$configure$1.apply(GuiceInjectorBuilder.scala:272) ~[play_2.11-2.4.11.jar:2.4.11]
at scala.collection.immutable.List.foreach(List.scala:381) ~[scala-library-2.11.6.jar:na]
at play.api.inject.guice.GuiceableModuleConversions$$anon$1.configure(GuiceInjectorBuilder.scala:272) ~[play_2.11-2.4.11.jar:2.4.11]
at com.google.inject.AbstractModule.configure(AbstractModule.java:59) ~[ipp-java-qbapihelper-1.2.0-jar-with-dependencies.jar:na]
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:223) ~[ipp-java-qbapihelper-1.2.0-jar-with-dependencies.jar:na]
at com.google.inject.spi.Elements.getElements(Elements.java:101) ~[ipp-java-qbapihelper-1.2.0-jar-with-dependencies.jar:na]
[error] application
I want to access a Neo4j DB from my Play Framework application in addition to a MySQL DB. The MySQL access is working properly. In preparation to code for accessing Neo4j via Bolt, I have:
Added a reference to the Driver in the project build.sbt:
libraryDependencies ++= Seq(
jdbc,
cache,
ws,
specs2 % Test,
"org.mindrot" % "jbcrypt" % "0.3m",
"mysql" % "mysql-connector-java" % "5.1.38",
"org.neo4j" % "neo4j-bolt" % "3.0.1"
)
and I restarted activator and watched it apparently resolve/retrieve the dependency that I can now find in ~/.ivy2/...
I have also placed a reference to my database in the application.conf as seen in this snippet:
db.default = {
driver: com.mysql.jdbc.Driver
url: "jdbc:mysql://127.0.0.1/borg"
username: "borg"
password: "XXXXX"
}
# Bolt port # defaults to 7687 I hope
db.neo4j = {
driver: org.neo4j.jdbc.Driver
url: "jdbc:neo4j:bolt://neo.myco.com"
username: "neo4j"
password: "XX"
}
I have not yet written any Scala code to attempt accessing the DB. Simply adding this specification to application.conf causes the application to fail when anything is retrieved from the site with messages as seen in the following stacktrace. I note a message about "Driver not found [org.neo4j.jdbc.Driver}]", which curiously has a right brace in a peculiar location. I wonder if that is a red herring. Any insights or experience out there?
CreationException: Unable to create injector, see the following errors:
1) Error in custom provider, Configuration error: Configuration error[Cannot connect to database [neo4j]]
while locating play.api.db.DBApiProvider
while locating play.api.db.DBApi for field
at play.api.db.NamedDatabaseProvider.dbApi(DBModule.scala:80)
while locating play.api.db.NamedDatabaseProvider
at com.google.inject.util.Providers$GuicifiedProviderWithDependencies.initialize(Providers.java:149)
at play.api.db.DBModule$$anonfun$namedDatabaseBindings$1.apply(DBModule.scala:34):
Binding(interface play.api.db.Database qualified with QualifierInstance(#play.db.NamedDatabase(value=default)) to ProviderTarget(play.api.db.NamedDatabaseProvider#746bce08)) (via modules: com.google.inject.util.Modules$OverrideModule -> play.api.inject.guice.GuiceableModuleConversions$$anon$1)
Caused by: Configuration error: Configuration error[Cannot connect to database [neo4j]]
at play.api.Configuration$.configError(Configuration.scala:178)
at play.api.Configuration.reportError(Configuration.scala:829)
at play.api.db.DefaultDBApi$$anonfun$connect$1.apply(DefaultDBApi.scala:48)
at play.api.db.DefaultDBApi$$anonfun$connect$1.apply(DefaultDBApi.scala:42)
at scala.collection.immutable.List.foreach(List.scala:381)
at play.api.db.DefaultDBApi.connect(DefaultDBApi.scala:42)
at play.api.db.DBApiProvider.get$lzycompute(DBModule.scala:72)
at play.api.db.DBApiProvider.get(DBModule.scala:62)
at play.api.db.DBApiProvider.get(DBModule.scala:58)
at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:81)
at com.google.inject.internal.BoundProviderFactory.provision(BoundProviderFactory.java:72)
at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:61)
at com.google.inject.internal.BoundProviderFactory.get(BoundProviderFactory.java:62)
at com.google.inject.internal.SingleFieldInjector.inject(SingleFieldInjector.java:54)
at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:132)
at com.google.inject.internal.MembersInjectorImpl$1.call(MembersInjectorImpl.java:93)
at com.google.inject.internal.MembersInjectorImpl$1.call(MembersInjectorImpl.java:80)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103)
at com.google.inject.internal.MembersInjectorImpl.injectAndNotify(MembersInjectorImpl.java:80)
at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:62)
at com.google.inject.internal.InjectorImpl.injectMembers(InjectorImpl.java:984)
at com.google.inject.util.Providers$GuicifiedProviderWithDependencies.initialize(Providers.java:149)
at com.google.inject.util.Providers$GuicifiedProviderWithDependencies$$FastClassByGuice$$2a7177aa.invoke(<generated>)
at com.google.inject.internal.cglib.reflect.$FastMethod.invoke(FastMethod.java:53)
at com.google.inject.internal.SingleMethodInjector$1.invoke(SingleMethodInjector.java:57)
at com.google.inject.internal.SingleMethodInjector.inject(SingleMethodInjector.java:91)
at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:132)
at com.google.inject.internal.MembersInjectorImpl$1.call(MembersInjectorImpl.java:93)
at com.google.inject.internal.MembersInjectorImpl$1.call(MembersInjectorImpl.java:80)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
at com.google.inject.internal.MembersInjectorImpl.injectAndNotify(MembersInjectorImpl.java:80)
at com.google.inject.internal.Initializer$InjectableReference.get(Initializer.java:174)
at com.google.inject.internal.Initializer.injectAll(Initializer.java:108)
at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:174)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:110)
at com.google.inject.Guice.createInjector(Guice.java:96)
at com.google.inject.Guice.createInjector(Guice.java:73)
at com.google.inject.Guice.createInjector(Guice.java:62)
at play.api.inject.guice.GuiceBuilder.injector(GuiceInjectorBuilder.scala:126)
at play.api.inject.guice.GuiceApplicationBuilder.build(GuiceApplicationBuilder.scala:93)
at play.api.inject.guice.GuiceApplicationLoader.load(GuiceApplicationLoader.scala:21)
at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1$$anonfun$apply$1$$anonfun$1$$anonfun$2.apply(DevServerStart.scala:153)
at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1$$anonfun$apply$1$$anonfun$1$$anonfun$2.apply(DevServerStart.scala:150)
at play.utils.Threads$.withContextClassLoader(Threads.scala:21)
at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1$$anonfun$apply$1$$anonfun$1.apply(DevServerStart.scala:150)
at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1$$anonfun$apply$1$$anonfun$1.apply(DevServerStart.scala:121)
at scala.Option.map(Option.scala:146)
at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1$$anonfun$apply$1.apply(DevServerStart.scala:121)
at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1$$anonfun$apply$1.apply(DevServerStart.scala:119)
at scala.util.Success.flatMap(Try.scala:231)
at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1.apply(DevServerStart.scala:119)
at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1.apply(DevServerStart.scala:111)
at scala.concurrent.impl.Future$PromiseCompletingRunnable.liftedTree1$1(Future.scala:24)
at scala.concurrent.impl.Future$PromiseCompletingRunnable.run(Future.scala:24)
at java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1402)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1689)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Caused by: Configuration error: Configuration error[Driver not found: [org.neo4j.jdbc.Driver}]]
at play.api.Configuration$.configError(Configuration.scala:178)
at play.api.PlayConfig.reportError(Configuration.scala:1048)
at play.api.db.DefaultDatabase$$anonfun$driver$1.apply(Databases.scala:115)
at play.api.db.DefaultDatabase$$anonfun$driver$1.apply(Databases.scala:109)
at scala.Option.map(Option.scala:146)
at play.api.db.DefaultDatabase.driver$lzycompute(Databases.scala:109)
at play.api.db.DefaultDatabase.driver(Databases.scala:108)
at play.api.db.DefaultDatabase.dataSource$lzycompute(Databases.scala:123)
at play.api.db.DefaultDatabase.dataSource(Databases.scala:122)
at play.api.db.DefaultDatabase.getConnection(Databases.scala:143)
at play.api.db.DefaultDatabase.getConnection(Databases.scala:139)
at play.api.db.DefaultDBApi$$anonfun$connect$1.apply(DefaultDBApi.scala:44)
... 56 more
Caused by: #70ombh24b: Cannot load Driver
at play.utils.Reflect$.createInstance(Reflect.scala:137)
at play.api.db.DefaultDatabase$$anonfun$driver$1.apply(Databases.scala:111)
... 65 more
Caused by: java.lang.ClassNotFoundException: org.neo4j.jdbc.Driver
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at play.utils.Reflect$.getClass(Reflect.scala:142)
at play.utils.Reflect$.createInstance(Reflect.scala:131)
... 66 more
I am developing a web application in Scala with Play 2.4 which needs to connect to DB2, Vertica, MySQL, and others.
Vertica and MySql configuration is working fine but I am not able to connect to DB2, version 10.5, fix pack 5.
Here is the application.conf setting
db.db2.driver=com.ibm.db2.jcc.DB2Driver
db.db2.url="jdbc:db2://host:port/database"
db.db2.username="user"
db.db2.password="pass"
db.db2.logStatements=false
db.db2.initSQL="select 1 from sysibm.sysdummy1"
I am using the following type 4 JDBC Drivers:
db2jcc.jar
db2jcc4.jar
However, I am getting the following errors (apologize for a long error message):
Unexpected exception
CreationException: Unable to create injector, see the following errors:
1) Error in custom provider, Configuration error: Configuration error[Cannot connect to database [db2]]
while locating play.api.db.DBApiProvider
while locating play.api.db.DBApi
for field at play.api.db.NamedDatabaseProvider.dbApi(DBModule.scala:80)
while locating play.api.db.NamedDatabaseProvider
at com.google.inject.util.Providers$GuicifiedProviderWithDependencies.initialize(Providers.java:149)
at play.api.db.DBModule$$anonfun$namedDatabaseBindings$1.apply(DBModule.scala:34):
Binding(interface play.api.db.Database qualified with QualifierInstance(#play.db.NamedDatabase(value=vertica)) to ProviderTarget(play.api.db.NamedDatabaseProvider#7e90fdad)) (via modules: com.google.inject.util.Modules$OverrideModule -> play.api.inject.guice.GuiceableModuleConversions$$anon$1)
Caused by: Configuration error: Configuration error[Cannot connect to database [db2]]
at play.api.Configuration$.configError(Configuration.scala:178)
at play.api.Configuration.reportError(Configuration.scala:829)
at play.api.db.DefaultDBApi$$anonfun$connect$1.apply(DefaultDBApi.scala:48)
at play.api.db.DefaultDBApi$$anonfun$connect$1.apply(DefaultDBApi.scala:42)
at scala.collection.immutable.List.foreach(List.scala:381)
at play.api.db.DefaultDBApi.connect(DefaultDBApi.scala:42)
at play.api.db.DBApiProvider.get$lzycompute(DBModule.scala:72)
at play.api.db.DBApiProvider.get(DBModule.scala:62)
at play.api.db.DBApiProvider.get(DBModule.scala:58)
at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:81)
at com.google.inject.internal.BoundProviderFactory.provision(BoundProviderFactory.java:72)
at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:61)
at com.google.inject.internal.BoundProviderFactory.get(BoundProviderFactory.java:62)
at com.google.inject.internal.SingleFieldInjector.inject(SingleFieldInjector.java:54)
at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:132)
at com.google.inject.internal.MembersInjectorImpl$1.call(MembersInjectorImpl.java:93)
at com.google.inject.internal.MembersInjectorImpl$1.call(MembersInjectorImpl.java:80)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103)
at com.google.inject.internal.MembersInjectorImpl.injectAndNotify(MembersInjectorImpl.java:80)
at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:62)
at com.google.inject.internal.InjectorImpl.injectMembers(InjectorImpl.java:984)
at com.google.inject.util.Providers$GuicifiedProviderWithDependencies.initialize(Providers.java:149)
at com.google.inject.util.Providers$GuicifiedProviderWithDependencies$$FastClassByGuice$$2a7177aa.invoke()
at com.google.inject.internal.cglib.reflect.$FastMethod.invoke(FastMethod.java:53)
at com.google.inject.internal.SingleMethodInjector$1.invoke(SingleMethodInjector.java:57)
at com.google.inject.internal.SingleMethodInjector.inject(SingleMethodInjector.java:91)
at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:132)
at com.google.inject.internal.MembersInjectorImpl$1.call(MembersInjectorImpl.java:93)
at com.google.inject.internal.MembersInjectorImpl$1.call(MembersInjectorImpl.java:80)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
at com.google.inject.internal.MembersInjectorImpl.injectAndNotify(MembersInjectorImpl.java:80)
at com.google.inject.internal.Initializer$InjectableReference.get(Initializer.java:174)
at com.google.inject.internal.Initializer.injectAll(Initializer.java:108)
at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:174)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:110)
at com.google.inject.Guice.createInjector(Guice.java:96)
at com.google.inject.Guice.createInjector(Guice.java:73)
at com.google.inject.Guice.createInjector(Guice.java:62)
at play.api.inject.guice.GuiceBuilder.injector(GuiceInjectorBuilder.scala:126)
at play.api.inject.guice.GuiceApplicationBuilder.build(GuiceApplicationBuilder.scala:93)
at play.api.inject.guice.GuiceApplicationLoader.load(GuiceApplicationLoader.scala:21)
at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1$$anonfun$apply$1$$anonfun$1$$anonfun$2.apply(DevServerStart.scala:153)
at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1$$anonfun$apply$1$$anonfun$1$$anonfun$2.apply(DevServerStart.scala:150)
at play.utils.Threads$.withContextClassLoader(Threads.scala:21)
at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1$$anonfun$apply$1$$anonfun$1.apply(DevServerStart.scala:150)
at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1$$anonfun$apply$1$$anonfun$1.apply(DevServerStart.scala:121)
at scala.Option.map(Option.scala:146)
at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1$$anonfun$apply$1.apply(DevServerStart.scala:121)
at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1$$anonfun$apply$1.apply(DevServerStart.scala:119)
at scala.util.Success.flatMap(Try.scala:230)
at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1.apply(DevServerStart.scala:119)
at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1.apply(DevServerStart.scala:111)
at scala.concurrent.impl.Future$PromiseCompletingRunnable.liftedTree1$1(Future.scala:24)
at scala.concurrent.impl.Future$PromiseCompletingRunnable.run(Future.scala:24)
at java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1423)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:902)
at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1689)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1644)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Caused by: Configuration error: Configuration error[Exception during pool initialization]
at play.api.Configuration$.configError(Configuration.scala:178)
at play.api.PlayConfig.reportError(Configuration.scala:1048)
at play.api.db.HikariCPConnectionPool.create(HikariCPModule.scala:69)
at play.api.db.PooledDatabase.createDataSource(Databases.scala:199)
at play.api.db.DefaultDatabase.dataSource$lzycompute(Databases.scala:124)
at play.api.db.DefaultDatabase.dataSource(Databases.scala:122)
at play.api.db.DefaultDatabase.getConnection(Databases.scala:143)
at play.api.db.DefaultDatabase.getConnection(Databases.scala:139)
at play.api.db.DefaultDBApi$$anonfun$connect$1.apply(DefaultDBApi.scala:44)
... 57 more
Caused by: com.zaxxer.hikari.pool.PoolInitializationException: Exception during pool initialization
at com.zaxxer.hikari.pool.BaseHikariPool.initializeConnections(BaseHikariPool.java:542)
at com.zaxxer.hikari.pool.BaseHikariPool.(BaseHikariPool.java:171)
at com.zaxxer.hikari.pool.HikariPool.(HikariPool.java:60)
at com.zaxxer.hikari.pool.HikariPool.(HikariPool.java:48)
at com.zaxxer.hikari.HikariDataSource.(HikariDataSource.java:80)
at play.api.db.HikariCPConnectionPool$$anonfun$1.apply(HikariCPModule.scala:58)
at play.api.db.HikariCPConnectionPool$$anonfun$1.apply(HikariCPModule.scala:54)
at scala.util.Try$.apply(Try.scala:191)
at play.api.db.HikariCPConnectionPool.create(HikariCPModule.scala:54)
... 63 more
Caused by: java.sql.SQLException: JDBC4 Connection.isValid() method not supported, connection test query must be configured
at com.zaxxer.hikari.pool.BaseHikariPool.addConnection(BaseHikariPool.java:441)
at com.zaxxer.hikari.pool.BaseHikariPool.initializeConnections(BaseHikariPool.java:540)
... 71 more
2) Error in custom provider, Configuration error: Configuration error[Cannot connect to database [db2]]
while locating play.api.db.DBApiProvider
while locating play.api.db.DBApi
for field at play.api.db.NamedDatabaseProvider.dbApi(DBModule.scala:80)
while locating play.api.db.NamedDatabaseProvider
at com.google.inject.util.Providers$GuicifiedProviderWithDependencies.initialize(Providers.java:149)
at play.api.db.DBModule$$anonfun$namedDatabaseBindings$1.apply(DBModule.scala:34):
Binding(interface play.api.db.Database qualified with QualifierInstance(#play.db.NamedDatabase(value=default)) to ProviderTarget(play.api.db.NamedDatabaseProvider#71350336)) (via modules: com.google.inject.util.Modules$OverrideModule -> play.api.inject.guice.GuiceableModuleConversions$$anon$1)
Caused by: Configuration error: Configuration error[Cannot connect to database [db2]]
at play.api.Configuration$.configError(Configuration.scala:178)
at play.api.Configuration.reportError(Configuration.scala:829)
at play.api.db.DefaultDBApi$$anonfun$connect$1.apply(DefaultDBApi.scala:48)
at play.api.db.DefaultDBApi$$anonfun$connect$1.apply(DefaultDBApi.scala:42)
at scala.collection.immutable.List.foreach(List.scala:381)
at play.api.db.DefaultDBApi.connect(DefaultDBApi.scala:42)
at play.api.db.DBApiProvider.get$lzycompute(DBModule.scala:72)
at play.api.db.DBApiProvider.get(DBModule.scala:62)
at play.api.db.DBApiProvider.get(DBModule.scala:58)
at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:81)
at com.google.inject.internal.BoundProviderFactory.provision(BoundProviderFactory.java:72)
at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:61)
at com.google.inject.internal.BoundProviderFactory.get(BoundProviderFactory.java:62)
at com.google.inject.internal.SingleFieldInjector.inject(SingleFieldInjector.java:54)
at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:132)
at com.google.inject.internal.MembersInjectorImpl$1.call(MembersInjectorImpl.java:93)
at com.google.inject.internal.MembersInjectorImpl$1.call(MembersInjectorImpl.java:80)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103)
at com.google.inject.internal.MembersInjectorImpl.injectAndNotify(MembersInjectorImpl.java:80)
at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:62)
at com.google.inject.internal.InjectorImpl.injectMembers(InjectorImpl.java:984)
at com.google.inject.util.Providers$GuicifiedProviderWithDependencies.initialize(Providers.java:149)
at com.google.inject.util.Providers$GuicifiedProviderWithDependencies$$FastClassByGuice$$2a7177aa.invoke()
at com.google.inject.internal.cglib.reflect.$FastMethod.invoke(FastMethod.java:53)
at com.google.inject.internal.SingleMethodInjector$1.invoke(SingleMethodInjector.java:57)
at com.google.inject.internal.SingleMethodInjector.inject(SingleMethodInjector.java:91)
at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:132)
at com.google.inject.internal.MembersInjectorImpl$1.call(MembersInjectorImpl.java:93)
at com.google.inject.internal.MembersInjectorImpl$1.call(MembersInjectorImpl.java:80)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
at com.google.inject.internal.MembersInjectorImpl.injectAndNotify(MembersInjectorImpl.java:80)
at com.google.inject.internal.Initializer$InjectableReference.get(Initializer.java:174)
at com.google.inject.internal.Initializer.injectAll(Initializer.java:108)
at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:174)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:110)
at com.google.inject.Guice.createInjector(Guice.java:96)
at com.google.inject.Guice.createInjector(Guice.java:73)
at com.google.inject.Guice.createInjector(Guice.java:62)
at play.api.inject.guice.GuiceBuilder.injector(GuiceInjectorBuilder.scala:126)
at play.api.inject.guice.GuiceApplicationBuilder.build(GuiceApplicationBuilder.scala:93)
at play.api.inject.guice.GuiceApplicationLoader.load(GuiceApplicationLoader.scala:21)
at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1$$anonfun$apply$1$$anonfun$1$$anonfun$2.apply(DevServerStart.scala:153)
at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1$$anonfun$apply$1$$anonfun$1$$anonfun$2.apply(DevServerStart.scala:150)
at play.utils.Threads$.withContextClassLoader(Threads.scala:21)
at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1$$anonfun$apply$1$$anonfun$1.apply(DevServerStart.scala:150)
at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1$$anonfun$apply$1$$anonfun$1.apply(DevServerStart.scala:121)
at scala.Option.map(Option.scala:146)
at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1$$anonfun$apply$1.apply(DevServerStart.scala:121)
at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1$$anonfun$apply$1.apply(DevServerStart.scala:119)
at scala.util.Success.flatMap(Try.scala:230)
at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1.apply(DevServerStart.scala:119)
at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1.apply(DevServerStart.scala:111)
at scala.concurrent.impl.Future$PromiseCompletingRunnable.liftedTree1$1(Future.scala:24)
at scala.concurrent.impl.Future$PromiseCompletingRunnable.run(Future.scala:24)
at java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1423)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:902)
at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1689)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1644)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Caused by: Configuration error: Configuration error[Exception during pool initialization]
at play.api.Configuration$.configError(Configuration.scala:178)
at play.api.PlayConfig.reportError(Configuration.scala:1048)
at play.api.db.HikariCPConnectionPool.create(HikariCPModule.scala:69)
at play.api.db.PooledDatabase.createDataSource(Databases.scala:199)
at play.api.db.DefaultDatabase.dataSource$lzycompute(Databases.scala:124)
at play.api.db.DefaultDatabase.dataSource(Databases.scala:122)
at play.api.db.DefaultDatabase.getConnection(Databases.scala:143)
at play.api.db.DefaultDatabase.getConnection(Databases.scala:139)
at play.api.db.DefaultDBApi$$anonfun$connect$1.apply(DefaultDBApi.scala:44)
... 57 more
Caused by: com.zaxxer.hikari.pool.PoolInitializationException: Exception during pool initialization
at com.zaxxer.hikari.pool.BaseHikariPool.initializeConnections(BaseHikariPool.java:542)
at com.zaxxer.hikari.pool.BaseHikariPool.(BaseHikariPool.java:171)
at com.zaxxer.hikari.pool.HikariPool.(HikariPool.java:60)
at com.zaxxer.hikari.pool.HikariPool.(HikariPool.java:48)
at com.zaxxer.hikari.HikariDataSource.(HikariDataSource.java:80)
at play.api.db.HikariCPConnectionPool$$anonfun$1.apply(HikariCPModule.scala:58)
at play.api.db.HikariCPConnectionPool$$anonfun$1.apply(HikariCPModule.scala:54)
at scala.util.Try$.apply(Try.scala:191)
at play.api.db.HikariCPConnectionPool.create(HikariCPModule.scala:54)
... 63 more
Caused by: java.sql.SQLException: JDBC4 Connection.isValid() method not supported, connection test query must be configured
at com.zaxxer.hikari.pool.BaseHikariPool.addConnection(BaseHikariPool.java:441)
at com.zaxxer.hikari.pool.BaseHikariPool.initializeConnections(BaseHikariPool.java:540)
... 71 more
3) Error in custom provider, Configuration error: Configuration error[Cannot connect to database [db2]]
while locating play.api.db.DBApiProvider
while locating play.api.db.DBApi
for field at play.api.db.NamedDatabaseProvider.dbApi(DBModule.scala:80)
while locating play.api.db.NamedDatabaseProvider
at com.google.inject.util.Providers$GuicifiedProviderWithDependencies.initialize(Providers.java:149)
at play.api.db.DBModule$$anonfun$namedDatabaseBindings$1.apply(DBModule.scala:34):
Binding(interface play.api.db.Database qualified with QualifierInstance(#play.db.NamedDatabase(value=db2)) to ProviderTarget(play.api.db.NamedDatabaseProvider#29f7b19c)) (via modules: com.google.inject.util.Modules$OverrideModule -> play.api.inject.guice.GuiceableModuleConversions$$anon$1)
Caused by: Configuration error: Configuration error[Cannot connect to database [db2]]
at play.api.Configuration$.configError(Configuration.scala:178)
at play.api.Configuration.reportError(Configuration.scala:829)
at play.api.db.DefaultDBApi$$anonfun$connect$1.apply(DefaultDBApi.scala:48)
at play.api.db.DefaultDBApi$$anonfun$connect$1.apply(DefaultDBApi.scala:42)
at scala.collection.immutable.List.foreach(List.scala:381)
at play.api.db.DefaultDBApi.connect(DefaultDBApi.scala:42)
at play.api.db.DBApiProvider.get$lzycompute(DBModule.scala:72)
at play.api.db.DBApiProvider.get(DBModule.scala:62)
at play.api.db.DBApiProvider.get(DBModule.scala:58)
at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:81)
at com.google.inject.internal.BoundProviderFactory.provision(BoundProviderFactory.java:72)
at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:61)
at com.google.inject.internal.BoundProviderFactory.get(BoundProviderFactory.java:62)
at com.google.inject.internal.SingleFieldInjector.inject(SingleFieldInjector.java:54)
at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:132)
at com.google.inject.internal.MembersInjectorImpl$1.call(MembersInjectorImpl.java:93)
at com.google.inject.internal.MembersInjectorImpl$1.call(MembersInjectorImpl.java:80)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103)
at com.google.inject.internal.MembersInjectorImpl.injectAndNotify(MembersInjectorImpl.java:80)
at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:62)
at com.google.inject.internal.InjectorImpl.injectMembers(InjectorImpl.java:984)
at com.google.inject.util.Providers$GuicifiedProviderWithDependencies.initialize(Providers.java:149)
at com.google.inject.util.Providers$GuicifiedProviderWithDependencies$$FastClassByGuice$$2a7177aa.invoke()
at com.google.inject.internal.cglib.reflect.$FastMethod.invoke(FastMethod.java:53)
at com.google.inject.internal.SingleMethodInjector$1.invoke(SingleMethodInjector.java:57)
at com.google.inject.internal.SingleMethodInjector.inject(SingleMethodInjector.java:91)
at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:132)
at com.google.inject.internal.MembersInjectorImpl$1.call(MembersInjectorImpl.java:93)
at com.google.inject.internal.MembersInjectorImpl$1.call(MembersInjectorImpl.java:80)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
at com.google.inject.internal.MembersInjectorImpl.injectAndNotify(MembersInjectorImpl.java:80)
at com.google.inject.internal.Initializer$InjectableReference.get(Initializer.java:174)
at com.google.inject.internal.Initializer.injectAll(Initializer.java:108)
at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:174)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:110)
at com.google.inject.Guice.createInjector(Guice.java:96)
at com.google.inject.Guice.createInjector(Guice.java:73)
at com.google.inject.Guice.createInjector(Guice.java:62)
at play.api.inject.guice.GuiceBuilder.injector(GuiceInjectorBuilder.scala:126)
at play.api.inject.guice.GuiceApplicationBuilder.build(GuiceApplicationBuilder.scala:93)
at play.api.inject.guice.GuiceApplicationLoader.load(GuiceApplicationLoader.scala:21)
at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1$$anonfun$apply$1$$anonfun$1$$anonfun$2.apply(DevServerStart.scala:153)
at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1$$anonfun$apply$1$$anonfun$1$$anonfun$2.apply(DevServerStart.scala:150)
at play.utils.Threads$.withContextClassLoader(Threads.scala:21)
at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1$$anonfun$apply$1$$anonfun$1.apply(DevServerStart.scala:150)
at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1$$anonfun$apply$1$$anonfun$1.apply(DevServerStart.scala:121)
at scala.Option.map(Option.scala:146)
at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1$$anonfun$apply$1.apply(DevServerStart.scala:121)
at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1$$anonfun$apply$1.apply(DevServerStart.scala:119)
at scala.util.Success.flatMap(Try.scala:230)
at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1.apply(DevServerStart.scala:119)
at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1.apply(DevServerStart.scala:111)
at scala.concurrent.impl.Future$PromiseCompletingRunnable.liftedTree1$1(Future.scala:24)
at scala.concurrent.impl.Future$PromiseCompletingRunnable.run(Future.scala:24)
at java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1423)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:902)
at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1689)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1644)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Caused by: Configuration error: Configuration error[Exception during pool initialization]
at play.api.Configuration$.configError(Configuration.scala:178)
at play.api.PlayConfig.reportError(Configuration.scala:1048)
at play.api.db.HikariCPConnectionPool.create(HikariCPModule.scala:69)
at play.api.db.PooledDatabase.createDataSource(Databases.scala:199)
at play.api.db.DefaultDatabase.dataSource$lzycompute(Databases.scala:124)
at play.api.db.DefaultDatabase.dataSource(Databases.scala:122)
at play.api.db.DefaultDatabase.getConnection(Databases.scala:143)
at play.api.db.DefaultDatabase.getConnection(Databases.scala:139)
at play.api.db.DefaultDBApi$$anonfun$connect$1.apply(DefaultDBApi.scala:44)
... 57 more
Caused by: com.zaxxer.hikari.pool.PoolInitializationException: Exception during pool initialization
at com.zaxxer.hikari.pool.BaseHikariPool.initializeConnections(BaseHikariPool.java:542)
at com.zaxxer.hikari.pool.BaseHikariPool.(BaseHikariPool.java:171)
at com.zaxxer.hikari.pool.HikariPool.(HikariPool.java:60)
at com.zaxxer.hikari.pool.HikariPool.(HikariPool.java:48)
at com.zaxxer.hikari.HikariDataSource.(HikariDataSource.java:80)
at play.api.db.HikariCPConnectionPool$$anonfun$1.apply(HikariCPModule.scala:58)
at play.api.db.HikariCPConnectionPool$$anonfun$1.apply(HikariCPModule.scala:54)
at scala.util.Try$.apply(Try.scala:191)
at play.api.db.HikariCPConnectionPool.create(HikariCPModule.scala:54)
... 63 more
Caused by: java.sql.SQLException: JDBC4 Connection.isValid() method not supported, connection test query must be configured
at com.zaxxer.hikari.pool.BaseHikariPool.addConnection(BaseHikariPool.java:441)
at com.zaxxer.hikari.pool.BaseHikariPool.initializeConnections(BaseHikariPool.java:540)
... 71 more
3 errors
Here is the application log output just before the above server errors:
<pre>
(Server started, use Ctrl+D to stop and go back to the console...)
[info] - application - Creating Pool for datasource 'default'
[info] - play.api.db.DefaultDBApi - Database [default] connected at jdbc:mysql://mdc2vra001/memsqldb
[info] - application - Creating Pool for datasource 'vertica'
[info] - play.api.db.DefaultDBApi - Database [vertica] connected at jdbc:vertica://mdcvtprod:5433/marsvprod?ResultBufferSize=1048567
[info] - application - Creating Pool for datasource 'db2'
[info] - application - Creating Pool for datasource 'default'
[info] - play.api.db.DefaultDBApi - Database [default] connected at jdbc:mysql://mdc2vra001/memsqldb
[info] - application - Creating Pool for datasource 'vertica'
[info] - play.api.db.DefaultDBApi - Database [vertica] connected at jdbc:vertica://mdcvtprod:5433/marsvprod?ResultBufferSize=1048567
[info] - application - Creating Pool for datasource 'db2'
[info] - application - Creating Pool for datasource 'default'
[info] - play.api.db.DefaultDBApi - Database [default] connected at jdbc:mysql://mdc2vra001/memsqldb
[info] - application - Creating Pool for datasource 'vertica'
[info] - play.api.db.DefaultDBApi - Database [vertica] connected at jdbc:vertica://mdcvtprod:5433/marsvprod?ResultBufferSize=1048567
[info] - application - Creating Pool for datasource 'db2'
[error] - application -
! #6pe5dpoi1 - Internal server error, for (GET) [/] ->
play.api.UnexpectedException: Unexpected exception[CreationException: Unable to create injector, see the following errors:
I am very new to Play application development. Any help will be very much appreciated.
I have also tried the following but getting the similar error
db2jcc.jar
db2jcc_license_cu.jar
What am I missing? :(
Thanks in advance for any advice.
-Chandan
I guess you're missing this:
Caused by: java.sql.SQLException: JDBC4 Connection.isValid() method not supported, connection test query must be configured
Since you are supplying both JDBC 3.0 (db2jcc.jar) and JDBC 4.0 (db2jcc4.jar) drivers, you cannot guarantee which of the two drivers will be loaded.
To ensure JDBC 4 functionality leave only db2jcc4.jar in the classpath.
I have a play! application with typesafe activator which works well on the original developer's computer. But when I try to run the app on my computer with the command " sudo ./activator run ", I get the following error.
play.api.UnexpectedException: Unexpected exception[ClassNotFoundException: com.samza.adapter.JobFactory]
at play.core.ReloadableApplication$$anonfun$get$1$$anonfun$apply$1$$anonfun$1.apply(ApplicationProvider.scala:151) ~[play_2.10-2.3.0.jar:2.3.0]
at play.core.ReloadableApplication$$anonfun$get$1$$anonfun$apply$1$$anonfun$1.apply(ApplicationProvider.scala:115) ~[play_2.10-2.3.0.jar:2.3.0]
at scala.Option.map(Option.scala:145) ~[scala-library.jar:na]
at play.core.ReloadableApplication$$anonfun$get$1$$anonfun$apply$1.apply(ApplicationProvider.scala:115) ~[play_2.10-2.3.0.jar:2.3.0]
at play.core.ReloadableApplication$$anonfun$get$1$$anonfun$apply$1.apply(ApplicationProvider.scala:113) ~[play_2.10-2.3.0.jar:2.3.0]
at scala.util.Success.flatMap(Try.scala:200) ~[scala-library.jar:na]
at play.core.ReloadableApplication$$anonfun$get$1.apply(ApplicationProvider.scala:113) ~[play_2.10-2.3.0.jar:2.3.0]
at play.core.ReloadableApplication$$anonfun$get$1.apply(ApplicationProvider.scala:105) ~[play_2.10-2.3.0.jar:2.3.0]
at scala.concurrent.impl.Future$PromiseCompletingRunnable.liftedTree1$1(Future.scala:24) ~[scala-library.jar:na]
at scala.concurrent.impl.Future$PromiseCompletingRunnable.run(Future.scala:24) ~[scala-library.jar:na]
at scala.concurrent.forkjoin.ForkJoinTask$AdaptedRunnableAction.exec(ForkJoinTask.java:1361) ~[scala-library.jar:na]
at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) ~[scala-library.jar:na]
at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) ~[scala-library.jar:na]
at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) ~[scala-library.jar:na]
at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107) ~[scala-library.jar:na]
Caused by: java.lang.ClassNotFoundException: com.samza.adapter.JobFactory
at java.net.URLClassLoader$1.run(URLClassLoader.java:366) ~[na:1.7.0_51]
at java.net.URLClassLoader$1.run(URLClassLoader.java:355) ~[na:1.7.0_51]
at java.security.AccessController.doPrivileged(Native Method) ~[na:1.7.0_51]
at java.net.URLClassLoader.findClass(URLClassLoader.java:354) ~[na:1.7.0_51]
at java.lang.ClassLoader.loadClass(ClassLoader.java:425) ~[na:1.7.0_51]
at java.lang.ClassLoader.loadClass(ClassLoader.java:358) ~[na:1.7.0_51]
at java.lang.Class.forName0(Native Method) ~[na:1.7.0_51]
at java.lang.Class.forName(Class.java:190) ~[na:1.7.0_51]
at org.apache.samza.job.JobRunner.run(JobRunner.scala:56) ~[samza-core_2.10-0.7.0.jar:na]
at com.samza.adapter.Adapter$$anonfun$start$1.apply(Adapter.scala:31) ~[na:na]
at com.samza.adapter.Adapter$$anonfun$start$1.apply(Adapter.scala:31) ~[na:na]
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244) ~[scala-library.jar:na]
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244) ~[scala-library.jar:na]
at scala.collection.Iterator$class.foreach(Iterator.scala:727) ~[scala-library.jar:na]
at scala.collection.AbstractIterator.foreach(Iterator.scala:1157) ~[scala-library.jar:na]
at scala.collection.IterableLike$class.foreach(IterableLike.scala:72) ~[scala-library.jar:na]
at scala.collection.AbstractIterable.foreach(Iterable.scala:54) ~[scala-library.jar:na]
at scala.collection.TraversableLike$class.map(TraversableLike.scala:244) ~[scala-library.jar:na]
at scala.collection.AbstractTraversable.map(Traversable.scala:105) ~[scala-library.jar:na]
at com.samza.adapter.Adapter$.start(Adapter.scala:29) ~[na:na]
at com.activities.Boot$.onStart(Boot.scala:26) ~[na:na]
at play.api.GlobalPlugin.onStart(GlobalSettings.scala:220) ~[play_2.10-2.3.0.jar:2.3.0]
at play.api.Play$$anonfun$start$1$$anonfun$apply$mcV$sp$1.apply(Play.scala:91) ~[play_2.10-2.3.0.jar:2.3.0]
at play.api.Play$$anonfun$start$1$$anonfun$apply$mcV$sp$1.apply(Play.scala:91) ~[play_2.10-2.3.0.jar:2.3.0]
at scala.collection.immutable.List.foreach(List.scala:318) ~[scala-library.jar:na]
at play.api.Play$$anonfun$start$1.apply$mcV$sp(Play.scala:91) ~[play_2.10-2.3.0.jar:2.3.0]
at play.api.Play$$anonfun$start$1.apply(Play.scala:91) ~[play_2.10-2.3.0.jar:2.3.0]
at play.api.Play$$anonfun$start$1.apply(Play.scala:91) ~[play_2.10-2.3.0.jar:2.3.0]
at play.utils.Threads$.withContextClassLoader(Threads.scala:21) ~[play_2.10-2.3.0.jar:2.3.0]
at play.api.Play$.start(Play.scala:90) ~[play_2.10-2.3.0.jar:2.3.0]
at play.core.ReloadableApplication$$anonfun$get$1$$anonfun$apply$1$$anonfun$1.apply(ApplicationProvider.scala:142) ~[play_2.10-2.3.0.jar:2.3.0]
... 14 common frames omitted
The com.samza.adapter.JobFactory class does exist and is in the correct directory.
The 29th to 32st lines of API.scala is:
def start: Unit = config getStringList ("task-containers") map
{
load(_) run
}
Then I tried to define the class path with command
export CLASSPATH=${CLASSPATH}:/directoryTo/com/samza/adapter
But unfortunately it didn't work..
The versions:
scala -version
Scala code runner version 2.11.0 -- Copyright 2002-2013, LAMP/EPFL
play -version
play 2.2.3 built with Scala 2.10.3 (running Java 1.7.0_51), http://www.playframework.com
typesafe-activator : 1.2.3
I've come across a similar problem before. Try to run the app using activator ui. If you are running on command line, try to run using activator start instead of activator run.
Check here for more references:
https://typesafe.com/activator/docs
We are using Play 2.1.0. When we launch it using "play run", it works fine. But when we do play stage; ./target/start -Dconfig.file=/Users/xxxx/Desktop/application.conf, it cause an error. Below are the trace:
! #6enc6p16c - Internal server error, for (GET) [/] ->
play.api.Application$$anon$1: Execution exception[[RuntimeException: java.lang.NoSuchFieldError: Application]]
at play.api.Application$class.handleError(Application.scala:289) ~[play_2.10.jar:2.1.0]
at play.api.DefaultApplication.handleError(Application.scala:383) [play_2.10.jar:2.1.0]
at play.core.server.netty.PlayDefaultUpstreamHandler$$anon$2$$anonfun$handle$1.apply(PlayDefaultUpstreamHandler.scala:132) [play_2.10.jar:2.1.0]
at play.core.server.netty.PlayDefaultUpstreamHandler$$anon$2$$anonfun$handle$1.apply(PlayDefaultUpstreamHandler.scala:128) [play_2.10.jar:2.1.0]
at play.api.libs.concurrent.PlayPromise$$anonfun$extend1$1.apply(Promise.scala:113) [play_2.10.jar:2.1.0]
at play.api.libs.concurrent.PlayPromise$$anonfun$extend1$1.apply(Promise.scala:113) [play_2.10.jar:2.1.0]
java.lang.RuntimeException: java.lang.NoSuchFieldError: Application
at play.libs.F$Promise$6.apply(F.java:401) ~[play_2.10.jar:2.1.0]
at scala.concurrent.Future$$anonfun$map$1.liftedTree2$1(Future.scala:253) ~[scala-library.jar:na]
at scala.concurrent.Future$$anonfun$map$1.apply(Future.scala:249) ~[scala-library.jar:na]
at scala.concurrent.Future$$anonfun$map$1.apply(Future.scala:249) ~[scala-library.jar:na]
at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:29) ~[scala-library.jar:na]
at akka.dispatch.BatchingExecutor$Batch$$anonfun$run$1.liftedTree1$1(BatchingExecutor.scala:67) ~[akka-actor_2.10.jar:na]
Caused by: java.lang.NoSuchFieldError: Application
at views.html.navbar$.apply(navbar.template.scala:40) ~[endovl_2.10-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT]
at views.html.navbar$.render(navbar.template.scala:65) ~[endovl_2.10-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT]
at views.html.main$.mainNavbar$1(main.template.scala:35) ~[endovl_2.10-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT]
at views.html.main$.apply(main.template.scala:43) ~[endovl_2.10-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT]
at views.html.index$.apply(index.template.scala:33) ~[endovl_2.10-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT]
at views.html.index$.render(index.template.scala:64) ~[endovl_2.10-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT]
^C[info] application - XXXXXX - Application shutdown...
Need help...
Below is the line which caused the NoSuchFieldError exception in view.html.navbar.
#navItem(routes.Application.index(), "Home")
And this is the line of code in navbar.template.scala
"""),_display_(Seq[Any](/*11.8*/navItem(routes.Application.index(), "Home"))),format.raw/*11.51*/("""