J'essaye de configurer une application de jeu pour utiliser Kamon. J'ai créé une nouvelle application de jeu en utilisantConfigurer Kamon et AspectjWeaver dans l'application Play
activator new kamon-play play-scala
Je posted it on github. Je cours sous OS X 10.11.1 et j'utilise JDK 1.8.0_65-b17 et le projet est configuré avec scala 2.11.6. Je l'ai configuré (au meilleur de ma compréhension) basé sur le instructions for configuring Play ainsi que le sbt-aspectj-runner kamon-play example. Cependant, lorsque je tente d'exécuter l'application en utilisant soit:
sbt run
ou
activator run
Je reçois l'erreur suivante:
[ERROR] [11/25/2015 09:04:39.574] [ForkJoinPool-1-worker-9] [ModuleLoader(akka://kamon)]
___ _ ___ _ _ ___ ___ _ _
/_ \ | | |_ | | | | | | \/ |(_) (_)
//_\ \ ___ _ __ ___ ___ | |_ | | | | | | ___ __ _ __ __ ___ _ __ | . . | _ ___ ___ _ _ __ __ _
| _ |/ __|| '_ \/_ \/__|| __| | | | |/\| |/_ \/_` |\ \/// _ \| '__| | |\/| || |/ __|/ __|| || '_ \/_` |
| | | |\__ \| |_) || __/| (__ | |_ /\__//\ /\ /| __/| (_| | \ V /| __/| | | | | || |\__ \\__ \| || | | || (_| |
\_| |_/|___/| .__/ \___| \___| \__|\____/ \/ \/ \___| \__,_| \_/ \___||_| \_| |_/|_||___/|___/|_||_| |_| \__, |
| | __/ |
|_| |___/
It seems like your application was not started with the -javaagent:/path-to-aspectj-weaver.jar option but Kamon detected
the following modules which require AspectJ to work properly:
kamon-akka, kamon-scala, kamon-play
If you need help on setting up the aspectj weaver go to http://kamon.io/introduction/get-started/ for more info. On the
other hand, if you are sure that you do not need or do not want to use the weaver then you can disable this error message
by changing the kamon.show-aspectj-missing-warning setting in your configuration file.
J'ai essayé tous les éléments suivants:
Ajout de
aspectj-play-runner:run
dans le fichier plugins.sbt (ne pas compiler)passant dans l'argument javaagent à l'activateur:
activator -J-javaagent::~/.ivy2/cache/org.aspectj/aspectjweaver/jars/aspectjweaver-1.8.5.jar
mais qui se traduit par l'erreur suivante:
Error opening zip file or JAR manifest missing : :~/.ivy2/cache/org.aspectj/aspectjweaver/jars/aspectjweaver-1.8.5.jar
Error occurred during initialization of VM
agent library failed to init: instrument
Passage de l'argument javaagent à sbt:
-
sbt run -Djavaagent:~/.ivy2/cache/org.aspectj/aspectjweaver/jars/aspectjweaver-1.8.5.jar
aussi essayé
sbt run -Djavaagent:~/.ivy2/cache/org.aspectj/aspectjweaver/jars/aspectjweaver-1.8.5.jar -Daspectj-play-runner:run
MISE À JOUR
je me suis dit que aspectj-play-coureur: l'exécution est une tâche/commande SBT donc j'essayé:
sbt
aspectj-runner:run
qui délivre:
[WeavingURLClassLoader] warning javax.* types are not being woven because the weaver option '-Xset:weaveJavaxPackages=true' has not been specified
java.lang.RuntimeException: Kamon has not been started yet. You must either explicitlt call Kamon.start(...) or enable automatic startup by adding -Dkamon.auto-start=true to your JVM options.
Alors j'ai essayé:
sbt -Dkamon.auto-start=true
aspectj-runner:run
qui sort:
[WeavingURLClassLoader] warning javax.* types are not being woven because the weaver option '-Xset:weaveJavaxPackages=true' has not been specified
com.typesafe.config.ConfigException$IO: application.conf: java.io.IOException: resource not found on classpath: application.conf
Enfin, les documents disent en fait je devrais courir
sbt
aspectj-play-runner:run
Mais la commande/tâche n'est pas eve n reconnu.