我希望能够在Play Framework环境中执行用scala(或java)编写的短例程。我希望能够使用我的生产数据库支持的模型。
注意:我知道有可能使用Akka.system().scheduler().schedule
让akka执行作业,而这正是我要离开的地方。在我的情况下,服务器运行多次,所以我需要使用互斥锁来确保只有一个实例执行预定的工作......
我想要执行一个简单的cron作业:
sbt fulfillmentUdpate
这是我得到的地方:
我的build.sbt文件的顶部:
def registerTask(name: String, taskClass: String, description: String) = {
val sbtTask = (dependencyClasspath in Runtime) map { (deps) =>
val depURLs = deps.map(_.data.toURI.toURL).toArray
val classLoader = new URLClassLoader(depURLs, null)
val task = classLoader.
loadClass(taskClass).
newInstance().
asInstanceOf[Runnable]
task.run()
}
TaskKey[Unit](name, description) <<= sbtTask.dependsOn(compile in Compile)
}
lazy val hello = taskKey[Unit]("Fulfillment update")
lazy val root = (project in file(".")).enablePlugins(PlayJava).enablePlugins(SbtWeb)
.settings(
registerTask("fulfillment-update","tasks.FulfillmentUpdate", "Update Shipments with data from fulfillment center")
)
我在app / tasks目录中定义了scala代码:
package tasks
import com.typesafe.config.ConfigFactory
import play.api._
import play.api.inject.guice.GuiceApplicationBuilder
abstract class Task extends Runnable {
val config = Configuration(ConfigFactory.load(this.getClass.getClassLoader, "application.conf"))
val env = Environment(new java.io.File("."), config.getClass.getClassLoader, Mode.Dev)
val application = new GuiceApplicationBuilder()
.configure(config)
.build
}
class FulfillmentUpdate extends Task {
def run {
println("Hey!")
}
}
scala代码被正确拾取,所以我认为build.sbt部分没问题。但是,.build
失败。有一堆例外,但要点是Play无法连接到数据库。如果我打印出配置变量,我可以看到预期的配置数据。我不确定应该传递什么类加载器以及java.io.File的用途 - 我怀疑问题就在那里。
当我尝试执行这项工作时,sbt / play打印出来的位置。
13:48:04.509 [info] application - Creating Pool for datasource 'default'
13:48:05.178 [info] application - Creating Pool for datasource 'default'
[trace] Stack trace suppressed: run last *:fulfillmentUpdate for the full output.
[error] (*:fulfillmentUpdate) com.google.inject.CreationException: Unable to create injector, see the following errors:
[error]
[error] 1) Error in custom provider, Configuration error: Configuration error[Cannot connect to database [default]]
[error] while locating play.api.db.DBApiProvider
[error] while locating play.api.db.DBApi
[error] for parameter 0 at play.db.DefaultDBApi.<init>(DefaultDBApi.java:28)
[error] at play.db.DefaultDBApi.class(DefaultDBApi.java:28)
[error] while locating play.db.DefaultDBApi
[error] while locating play.db.DBApi
[error] for field at play.db.DBModule$NamedDatabaseProvider.dbApi(DBModule.java:61)
[error] while locating play.db.DBModule$NamedDatabaseProvider
[error] at com.google.inject.util.Providers$GuicifiedProviderWithDependencies.initialize(Providers.java:149)
[error] at play.db.DBModule.bindings(DBModule.java:40):
[error] Binding(interface play.db.Database qualified with QualifierInstance(@play.db.NamedDatabase(value=default)) to ProviderTarget(play.db.DBModule$NamedDatabaseProvider@6475e778)) (via modules: com.google.inject.util.Modules$OverrideModule -> play.api.inject.guice.GuiceableModuleConversions$$anon$1)
[error] Caused by: Configuration error: Configuration error[Cannot connect to database [default]]
[error] at play.api.Configuration$.configError(Configuration.scala:178)
[error] at play.api.Configuration.reportError(Configuration.scala:829)
[error] at play.api.db.DefaultDBApi$$anonfun$connect$1.apply(DefaultDBApi.scala:48)
[error] at play.api.db.DefaultDBApi$$anonfun$connect$1.apply(DefaultDBApi.scala:42)
[error] at scala.collection.immutable.List.foreach(List.scala:381)
[error] at play.api.db.DefaultDBApi.connect(DefaultDBApi.scala:42)
[error] at play.api.db.DBApiProvider.get$lzycompute(DBModule.scala:72)
[error] at play.api.db.DBApiProvider.get(DBModule.scala:62)
[error] at play.api.db.DBApiProvider.get(DBModule.scala:58)
[error] at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:81)
[error] at com.google.inject.internal.BoundProviderFactory.provision(BoundProviderFactory.java:72)
[error] at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:61)
[error] at com.google.inject.internal.BoundProviderFactory.get(BoundProviderFactory.java:62)
[error] at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38)
[error] at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62)
[error] at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:104)
[error] at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:85)
[error] at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:267)
[error] at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
[error] at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103)
[error] at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
[error] at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:145)
[error] at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
[error] at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:56)
[error] at com.google.inject.internal.SingleFieldInjector.inject(SingleFieldInjector.java:54)
[error] at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:132)
[error] at com.google.inject.internal.MembersInjectorImpl$1.call(MembersInjectorImpl.java:93)
[error] at com.google.inject.internal.MembersInjectorImpl$1.call(MembersInjectorImpl.java:80)
[error] at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103)
[error] at com.google.inject.internal.MembersInjectorImpl.injectAndNotify(MembersInjectorImpl.java:80)
[error] at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:62)
[error] at com.google.inject.internal.InjectorImpl.injectMembers(InjectorImpl.java:984)
[error] at com.google.inject.util.Providers$GuicifiedProviderWithDependencies.initialize(Providers.java:149)
[error] at com.google.inject.util.Providers$GuicifiedProviderWithDependencies$$FastClassByGuice$$2a7177aa.invoke(<generated>)
[error] at com.google.inject.internal.cglib.reflect.$FastMethod.invoke(FastMethod.java:53)
[error] at com.google.inject.internal.SingleMethodInjector$1.invoke(SingleMethodInjector.java:57)
[error] at com.google.inject.internal.SingleMethodInjector.inject(SingleMethodInjector.java:91)
[error] at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:132)
[error] at com.google.inject.internal.MembersInjectorImpl$1.call(MembersInjectorImpl.java:93)
[error] at com.google.inject.internal.MembersInjectorImpl$1.call(MembersInjectorImpl.java:80)
[error] at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
[error] at com.google.inject.internal.MembersInjectorImpl.injectAndNotify(MembersInjectorImpl.java:80)
[error] at com.google.inject.internal.Initializer$InjectableReference.get(Initializer.java:174)
[error] at com.google.inject.internal.Initializer.injectAll(Initializer.java:108)
[error] at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:174)
[error] at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:110)
[error] at com.google.inject.Guice.createInjector(Guice.java:96)
[error] at com.google.inject.Guice.createInjector(Guice.java:73)
[error] at com.google.inject.Guice.createInjector(Guice.java:62)
[error] at play.api.inject.guice.GuiceBuilder.injector(GuiceInjectorBuilder.scala:126)
[error] at play.api.inject.guice.GuiceApplicationBuilder.build(GuiceApplicationBuilder.scala:93)
[error] at tasks.Task.<init>(FulfillmentUpdate.scala:16)
[error] at tasks.FulfillmentUpdate.<init>(FulfillmentUpdate.scala:23)
[error] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[error] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
[error] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
[error] at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
[error] at java.lang.Class.newInstance(Class.java:442)
[error] at $83fce2be1de409ac7c44$$anonfun$1.apply(build.sbt:20)
[error] at $83fce2be1de409ac7c44$$anonfun$1.apply(build.sbt:15)
[error] at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
[error] at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
[error] at sbt.std.Transform$$anon$4.work(System.scala:63)
[error] at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
[error] at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
[error] at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
[error] at sbt.Execute.work(Execute.scala:235)
[error] at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
[error] at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
[error] at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
[error] at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[error] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[error] at java.lang.Thread.run(Thread.java:745)
[error] Caused by: Configuration error: Configuration error[Cannot instantiate class: tyrex.naming.MemoryContextFactory]
[error] at play.api.Configuration$.configError(Configuration.scala:178)
[error] at play.api.PlayConfig.reportError(Configuration.scala:1048)
[error] at play.api.db.HikariCPConnectionPool.create(HikariCPModule.scala:69)
[error] at play.api.db.PooledDatabase.createDataSource(Databases.scala:199)
[error] at play.api.db.DefaultDatabase.dataSource$lzycompute(Databases.scala:124)
[error] at play.api.db.DefaultDatabase.dataSource(Databases.scala:122)
[error] at play.api.db.DefaultDatabase.getConnection(Databases.scala:143)
[error] at play.api.db.DefaultDatabase.getConnection(Databases.scala:139)
[error] at play.api.db.DefaultDBApi$$anonfun$connect$1.apply(DefaultDBApi.scala:44)
[error] ... 74 more
[error] Caused by: javax.naming.NoInitialContextException: Cannot instantiate class: tyrex.naming.MemoryContextFactory [Root exception is java.lang.ClassNotFoundException: tyrex.naming.MemoryContextFactory]
[error] at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:674)
[error] at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:313)
[error] at javax.naming.InitialContext.init(InitialContext.java:244)
[error] at javax.naming.InitialContext.<init>(InitialContext.java:216)
[error] at play.api.libs.JNDI$.initialContext$lzycompute(JNDI.scala:40)
[error] at play.api.libs.JNDI$.initialContext(JNDI.scala:22)
[error] at play.api.db.HikariCPConnectionPool$$anonfun$1$$anonfun$apply$2.apply(HikariCPModule.scala:62)
[error] at play.api.db.HikariCPConnectionPool$$anonfun$1$$anonfun$apply$2.apply(HikariCPModule.scala:61)
[error] at scala.Option.foreach(Option.scala:257)
[error] at play.api.db.HikariCPConnectionPool$$anonfun$1.apply(HikariCPModule.scala:61)
[error] at play.api.db.HikariCPConnectionPool$$anonfun$1.apply(HikariCPModule.scala:54)
[error] at scala.util.Try$.apply(Try.scala:192)
[error] at play.api.db.HikariCPConnectionPool.create(HikariCPModule.scala:54)
[error] ... 80 more
[error] Caused by: java.lang.ClassNotFoundException: tyrex.naming.MemoryContextFactory
[error] at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
[error] at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
[error] at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
[error] at java.lang.Class.forName0(Native Method)
[error] at java.lang.Class.forName(Class.java:348)
[error] at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:72)
[error] at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:61)
[error] at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:672)
[error] ... 92 more
[error]
[error] 2) Error in custom provider, Configuration error: Configuration error[Cannot connect to database [default]]
[error] while locating play.api.db.DBApiProvider
[error] while locating play.api.db.DBApi
[error] for field at play.api.db.NamedDatabaseProvider.dbApi(DBModule.scala:80)
[error] while locating play.api.db.NamedDatabaseProvider
[error] at com.google.inject.util.Providers$GuicifiedProviderWithDependencies.initialize(Providers.java:149)
[error] at play.api.db.DBModule$$anonfun$namedDatabaseBindings$1.apply(DBModule.scala:34):
[error] Binding(interface play.api.db.Database qualified with QualifierInstance(@play.db.NamedDatabase(value=default)) to ProviderTarget(play.api.db.NamedDatabaseProvider@5f20b6fe)) (via modules: com.google.inject.util.Modules$OverrideModule -> play.api.inject.guice.GuiceableModuleConversions$$anon$1)
[error] Caused by: Configuration error: Configuration error[Cannot connect to database [default]]
[error] at play.api.Configuration$.configError(Configuration.scala:178)
[error] at play.api.Configuration.reportError(Configuration.scala:829)
[error] at play.api.db.DefaultDBApi$$anonfun$connect$1.apply(DefaultDBApi.scala:48)
[error] at play.api.db.DefaultDBApi$$anonfun$connect$1.apply(DefaultDBApi.scala:42)
[error] at scala.collection.immutable.List.foreach(List.scala:381)
[error] at play.api.db.DefaultDBApi.connect(DefaultDBApi.scala:42)
[error] at play.api.db.DBApiProvider.get$lzycompute(DBModule.scala:72)
[error] at play.api.db.DBApiProvider.get(DBModule.scala:62)
[error] at play.api.db.DBApiProvider.get(DBModule.scala:58)
[error] at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:81)
[error] at com.google.inject.internal.BoundProviderFactory.provision(BoundProviderFactory.java:72)
[error] at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:61)
[error] at com.google.inject.internal.BoundProviderFactory.get(BoundProviderFactory.java:62)
[error] at com.google.inject.internal.SingleFieldInjector.inject(SingleFieldInjector.java:54)
[error] at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:132)
[error] at com.google.inject.internal.MembersInjectorImpl$1.call(MembersInjectorImpl.java:93)
[error] at com.google.inject.internal.MembersInjectorImpl$1.call(MembersInjectorImpl.java:80)
[error] at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103)
[error] at com.google.inject.internal.MembersInjectorImpl.injectAndNotify(MembersInjectorImpl.java:80)
[error] at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:62)
[error] at com.google.inject.internal.InjectorImpl.injectMembers(InjectorImpl.java:984)
[error] at com.google.inject.util.Providers$GuicifiedProviderWithDependencies.initialize(Providers.java:149)
[error] at com.google.inject.util.Providers$GuicifiedProviderWithDependencies$$FastClassByGuice$$2a7177aa.invoke(<generated>)
[error] at com.google.inject.internal.cglib.reflect.$FastMethod.invoke(FastMethod.java:53)
[error] at com.google.inject.internal.SingleMethodInjector$1.invoke(SingleMethodInjector.java:57)
[error] at com.google.inject.internal.SingleMethodInjector.inject(SingleMethodInjector.java:91)
[error] at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:132)
[error] at com.google.inject.internal.MembersInjectorImpl$1.call(MembersInjectorImpl.java:93)
[error] at com.google.inject.internal.MembersInjectorImpl$1.call(MembersInjectorImpl.java:80)
[error] at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
[error] at com.google.inject.internal.MembersInjectorImpl.injectAndNotify(MembersInjectorImpl.java:80)
[error] at com.google.inject.internal.Initializer$InjectableReference.get(Initializer.java:174)
[error] at com.google.inject.internal.Initializer.injectAll(Initializer.java:108)
[error] at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:174)
[error] at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:110)
[error] at com.google.inject.Guice.createInjector(Guice.java:96)
[error] at com.google.inject.Guice.createInjector(Guice.java:73)
[error] at com.google.inject.Guice.createInjector(Guice.java:62)
[error] at play.api.inject.guice.GuiceBuilder.injector(GuiceInjectorBuilder.scala:126)
[error] at play.api.inject.guice.GuiceApplicationBuilder.build(GuiceApplicationBuilder.scala:93)
[error] at tasks.Task.<init>(FulfillmentUpdate.scala:16)
[error] at tasks.FulfillmentUpdate.<init>(FulfillmentUpdate.scala:23)
[error] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[error] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
[error] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
[error] at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
[error] at java.lang.Class.newInstance(Class.java:442)
[error] at $83fce2be1de409ac7c44$$anonfun$1.apply(build.sbt:20)
[error] at $83fce2be1de409ac7c44$$anonfun$1.apply(build.sbt:15)
[error] at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
[error] at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
[error] at sbt.std.Transform$$anon$4.work(System.scala:63)
[error] at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
[error] at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
[error] at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
[error] at sbt.Execute.work(Execute.scala:235)
[error] at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
[error] at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
[error] at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
[error] at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[error] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[error] at java.lang.Thread.run(Thread.java:745)
[error] Caused by: Configuration error: Configuration error[Cannot instantiate class: tyrex.naming.MemoryContextFactory]
[error] at play.api.Configuration$.configError(Configuration.scala:178)
[error] at play.api.PlayConfig.reportError(Configuration.scala:1048)
[error] at play.api.db.HikariCPConnectionPool.create(HikariCPModule.scala:69)
[error] at play.api.db.PooledDatabase.createDataSource(Databases.scala:199)
[error] at play.api.db.DefaultDatabase.dataSource$lzycompute(Databases.scala:124)
[error] at play.api.db.DefaultDatabase.dataSource(Databases.scala:122)
[error] at play.api.db.DefaultDatabase.getConnection(Databases.scala:143)
[error] at play.api.db.DefaultDatabase.getConnection(Databases.scala:139)
[error] at play.api.db.DefaultDBApi$$anonfun$connect$1.apply(DefaultDBApi.scala:44)
[error] ... 63 more
[error] Caused by: javax.naming.NoInitialContextException: Cannot instantiate class: tyrex.naming.MemoryContextFactory [Root exception is java.lang.ClassNotFoundException: tyrex.naming.MemoryContextFactory]
[error] at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:674)
[error] at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:313)
[error] at javax.naming.InitialContext.init(InitialContext.java:244)
[error] at javax.naming.InitialContext.<init>(InitialContext.java:216)
[error] at play.api.libs.JNDI$.initialContext$lzycompute(JNDI.scala:40)
[error] at play.api.libs.JNDI$.initialContext(JNDI.scala:22)
[error] at play.api.db.HikariCPConnectionPool$$anonfun$1$$anonfun$apply$2.apply(HikariCPModule.scala:62)
[error] at play.api.db.HikariCPConnectionPool$$anonfun$1$$anonfun$apply$2.apply(HikariCPModule.scala:61)
[error] at scala.Option.foreach(Option.scala:257)
[error] at play.api.db.HikariCPConnectionPool$$anonfun$1.apply(HikariCPModule.scala:61)
[error] at play.api.db.HikariCPConnectionPool$$anonfun$1.apply(HikariCPModule.scala:54)
[error] at scala.util.Try$.apply(Try.scala:192)
[error] at play.api.db.HikariCPConnectionPool.create(HikariCPModule.scala:54)
[error] ... 69 more
[error] Caused by: java.lang.ClassNotFoundException: tyrex.naming.MemoryContextFactory
[error] at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
[error] at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
[error] at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
[error] at java.lang.Class.forName0(Native Method)
[error] at java.lang.Class.forName(Class.java:348)
[error] at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:72)
[error] at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:61)
[error] at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:672)
[error] ... 81 more
[error]
[error] 2 errors
[error] Total time: 12 s, completed May 2, 2017 3:48:05 PM