我尝试使用 Kamon.io 监控的 play-akka 应用程序在这里遇到了一些问题。我在告诉我我没有使用 kamon.start() 并且在 Runtime 中找到有关 javaOptions 的工作后遇到了麻烦:= Seq("-Dkamon.auto-start=true"); 我现在发现自己的 application.conf 文件出现资源未找到错误。
当我不运行 aspectjweaver 时,kamon 会抛出一个不同的错误,但我的应用程序会工作。这是我遇到的错误,如果有人可以提供帮助,它将极大地帮助我!多谢你们!
[info] Running Play application with Aspectj Weaver.
--- (Running the application, auto-reloading is enabled) ---
[WeavingURLClassLoader] warning javax.* types are not being woven because the we
aver option '-Xset:weaveJavaxPackages=true' has not been specified
com.typesafe.config.ConfigException$IO: application.conf: java.io.IOException: r
esource not found on classpath: application.conf
at com.typesafe.config.impl.Parseable.parseValue(Parseable.java:188)
at com.typesafe.config.impl.Parseable.parseValue(Parseable.java:174)
at com.typesafe.config.impl.Parseable.parse(Parseable.java:299)
at com.typesafe.config.ConfigFactory.parseResources(ConfigFactory.java:1
002)
at com.typesafe.config.ConfigFactory.parseResources(ConfigFactory.java:9
30)
at com.typesafe.config.ConfigFactory.parseApplicationConfig(ConfigFactor
y.java:251)
at com.typesafe.config.ConfigFactory.defaultApplication(ConfigFactory.ja
va:519)
at com.typesafe.config.ConfigFactory$1.call(ConfigFactory.java:305)
at com.typesafe.config.ConfigFactory$1.call(ConfigFactory.java:302)
at com.typesafe.config.impl.ConfigImpl$LoaderCache.getOrElseUpdate(Confi
gImpl.java:65)
at com.typesafe.config.impl.ConfigImpl.computeCachedConfig(ConfigImpl.ja
va:92)
at com.typesafe.config.ConfigFactory.load(ConfigFactory.java:302)
at com.typesafe.config.ConfigFactory.load(ConfigFactory.java:278)
at kamon.Kamon$.ifStarted(Kamon.scala:95)
at kamon.Kamon$.metrics(Kamon.scala:78)
at akka.kamon.instrumentation.LookupDataAware$LookupData$.apply$default$
3(DispatcherInstrumentation.scala:184)
at akka.kamon.instrumentation.DispatcherInstrumentation.aroundDispatcher
sLookup(DispatcherInstrumentation.scala:83)
at akka.dispatch.Dispatchers.lookup(Dispatchers.scala:81)
at akka.dispatch.Dispatchers.defaultGlobalDispatcher(Dispatchers.scala:7
1)
at akka.actor.ActorSystemImpl.<init>(ActorSystem.scala:599)
at akka.actor.ActorSystem$.apply(ActorSystem.scala:142)
at akka.actor.ActorSystem$.apply(ActorSystem.scala:126)
at play.api.libs.concurrent.ActorSystemProvider$.start(Akka.scala:291)
at play.core.server.DevServerStart$$anonfun$mainDev$1.apply(DevServerSta
rt.scala:205)
at play.core.server.DevServerStart$$anonfun$mainDev$1.apply(DevServerSta
rt.scala:61)
at play.utils.Threads$.withContextClassLoader(Threads.scala:21)
at play.core.server.DevServerStart$.mainDev(DevServerStart.scala:60)
at play.core.server.DevServerStart$.mainDevHttpMode(DevServerStart.scala
:50)
at play.core.server.DevServerStart.mainDevHttpMode(DevServerStart.scala)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at play.runsupport.Reloader$.startDevMode(Reloader.scala:207)
at play.sbt.run.PlayRun$$anonfun$playRunTask$1$$anonfun$apply$2$$anonfun
$apply$3.devModeServer$lzycompute$1(PlayRun.scala:73)
at play.sbt.run.PlayRun$$anonfun$playRunTask$1$$anonfun$apply$2$$anonfun
$apply$3.play$sbt$run$PlayRun$$anonfun$$anonfun$$anonfun$$devModeServer$1(PlayRu
n.scala:73)
at play.sbt.run.PlayRun$$anonfun$playRunTask$1$$anonfun$apply$2$$anonfun
$apply$3.apply(PlayRun.scala:99)
at play.sbt.run.PlayRun$$anonfun$playRunTask$1$$anonfun$apply$2$$anonfun
$apply$3.apply(PlayRun.scala:52)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
Caused by: java.io.IOException: resource not found on classpath: application.con
f
at com.typesafe.config.impl.Parseable$ParseableResources.rawParseValue(P
arseable.java:735)
at com.typesafe.config.impl.Parseable$ParseableResources.rawParseValue(P
arseable.java:710)
at com.typesafe.config.impl.Parseable.parseValue(Parseable.java:180)
at com.typesafe.config.impl.Parseable.parseValue(Parseable.java:174)
at com.typesafe.config.impl.Parseable.parse(Parseable.java:299)
at com.typesafe.config.ConfigFactory.parseResources(ConfigFactory.java:1
002)
at com.typesafe.config.ConfigFactory.parseResources(ConfigFactory.java:9
30)
at com.typesafe.config.ConfigFactory.parseApplicationConfig(ConfigFactor
y.java:251)
at com.typesafe.config.ConfigFactory.defaultApplication(ConfigFactory.ja
va:519)
at com.typesafe.config.ConfigFactory$1.call(ConfigFactory.java:305)
at com.typesafe.config.ConfigFactory$1.call(ConfigFactory.java:302)
at com.typesafe.config.impl.ConfigImpl$LoaderCache.getOrElseUpdate(Confi
gImpl.java:65)
at com.typesafe.config.impl.ConfigImpl.computeCachedConfig(ConfigImpl.ja
va:92)
at com.typesafe.config.ConfigFactory.load(ConfigFactory.java:302)
at com.typesafe.config.ConfigFactory.load(ConfigFactory.java:278)
at kamon.Kamon$.ifStarted(Kamon.scala:95)
at kamon.Kamon$.metrics(Kamon.scala:78)
at akka.kamon.instrumentation.LookupDataAware$LookupData$.apply$default$
3(DispatcherInstrumentation.scala:184)
at akka.kamon.instrumentation.DispatcherInstrumentation.aroundDispatcher
sLookup(DispatcherInstrumentation.scala:83)
at akka.dispatch.Dispatchers.lookup(Dispatchers.scala:81)
at akka.dispatch.Dispatchers.defaultGlobalDispatcher(Dispatchers.scala:7
1)
at akka.actor.ActorSystemImpl.<init>(ActorSystem.scala:599)
at akka.actor.ActorSystem$.apply(ActorSystem.scala:142)
at akka.actor.ActorSystem$.apply(ActorSystem.scala:126)
at play.api.libs.concurrent.ActorSystemProvider$.start(Akka.scala:291)
at play.core.server.DevServerStart$$anonfun$mainDev$1.apply(DevServerSta
rt.scala:205)
at play.core.server.DevServerStart$$anonfun$mainDev$1.apply(DevServerSta
rt.scala:61)
at play.utils.Threads$.withContextClassLoader(Threads.scala:21)
at play.core.server.DevServerStart$.mainDev(DevServerStart.scala:60)
at play.core.server.DevServerStart$.mainDevHttpMode(DevServerStart.scala
:50)
at play.core.server.DevServerStart.mainDevHttpMode(DevServerStart.scala)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at play.runsupport.Reloader$.startDevMode(Reloader.scala:207)
at play.sbt.run.PlayRun$$anonfun$playRunTask$1$$anonfun$apply$2$$anonfun
$apply$3.devModeServer$lzycompute$1(PlayRun.scala:73)
at play.sbt.run.PlayRun$$anonfun$playRunTask$1$$anonfun$apply$2$$anonfun
$apply$3.play$sbt$run$PlayRun$$anonfun$$anonfun$$anonfun$$devModeServer$1(PlayRu
n.scala:73)
at play.sbt.run.PlayRun$$anonfun$playRunTask$1$$anonfun$apply$2$$anonfun
$apply$3.apply(PlayRun.scala:99)
at play.sbt.run.PlayRun$$anonfun$playRunTask$1$$anonfun$apply$2$$anonfun
$apply$3.apply(PlayRun.scala:52)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
[trace] Stack trace suppressed: run last aspectj-runner:run for the full output.
[error] (aspectj-runner:run) java.lang.reflect.InvocationTargetException
[error] Total time: 13 s, completed 3-Nov-2015 3:18:25 PM