chanan / akkaguice Goto Github PK
View Code? Open in Web Editor NEWAkka Guice Integration for Playframework
License: The Unlicense
Akka Guice Integration for Playframework
License: The Unlicense
Error in custom provider, akka.actor.InvalidActorNameException: actor name [PerRequest-114326323442451120] is not unique!
at akkaGuice.AkkaGuiceModule.RegisterActors(AkkaGuiceModule.java:59)
while locating akka.actor.ActorRef annotated with @com.google.inject.name.Named(value=PerRequest)
for parameter 4 at controllers.Application.(Application.java:24)
while locating controllers.Application
Using java version 1.7.0_51, I get this error when starting my Play app. Are there any specific features of this plugin and/or Guice that require higher Java versions? Should be documented somewhere at least.
java.lang.UnsupportedClassVersionError: akkaGuice/AkkaGuicePlugin : Unsupported major.minor version 52.0
I'm trying to integrate AkkaGuice and Play 2.4 and I'm getting the following error from Guice -
Could not find a suitable constructor in akkaGuice.AkkaGuicePlugin. Classes must have either one (and only one) constructor annotated with @Inject or a zero-argument constructor that is not private.
I am following the example in the README.
Any idea why this is happening ?
Regards, Deyan
Hi Chanan,
just got pointed to this project on the Play Framework mailinglist and this is exactly what I was looking for!
I started integrating AkkaGuice into my existing project and immediately bumped into the exception mentioned in the subject. I'm not quite sure what's going on but I think there is a clash between "org.reflections" % "reflections" % "0.9.9-RC1" used by AkkaGuice and the version used by Play.
I downgraded from Play 2.3.6 to 2.3.4 but the issue remains. Is this a known issue or is there any workaround available (If it helps I can provide you my full config)? Thanks!
Hi,
It seems that the library is compiled with Java 8 because I get the following error:
play.api.UnexpectedException: Unexpected exception[UnsupportedClassVersionError: akkaGuice/AkkaGuiceModule : Unsupported major.minor version 52.0]
at play.core.ReloadableApplication$$anonfun$get$1$$anonfun$apply$1$$anonfun$1.apply(ApplicationProvider.scala:170) ~[play_2.11-2.3.4.jar:2.3.4]
at play.core.ReloadableApplication$$anonfun$get$1$$anonfun$apply$1$$anonfun$1.apply(ApplicationProvider.scala:130) ~[play_2.11-2.3.4.jar:2.3.4]
at scala.Option.map(Option.scala:145) ~[scala-library-2.11.1.jar:na]
at play.core.ReloadableApplication$$anonfun$get$1$$anonfun$apply$1.apply(ApplicationProvider.scala:130) ~[play_2.11-2.3.4.jar:2.3.4]
at play.core.ReloadableApplication$$anonfun$get$1$$anonfun$apply$1.apply(ApplicationProvider.scala:128) ~[play_2.11-2.3.4.jar:2.3.4]
Caused by: java.lang.UnsupportedClassVersionError: akkaGuice/AkkaGuiceModule : Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method) ~[na:1.7.0_51]
at java.lang.ClassLoader.defineClass(ClassLoader.java:800) ~[na:1.7.0_51]
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) ~[na:1.7.0_51]
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449) ~[na:1.7.0_51]
at java.net.URLClassLoader.access$100(URLClassLoader.java:71) ~[na:1.7.0_51]
Would it be possible to compile the library with Java 7 backward compatibility.
Guess this is a suggestion more than an issue. Would make it clear to have a couple of changes?
public onStart(Application app) {
injector = Guice.createInjector(new AkkaGuiceModule());
GuiceExt extension = akkaGuice.GuiceExtension.GuiceProvider.createExtension(
ActorSystem.create("customactorsystem" ConfigFactory.load().getConfig("customactorsyste-config")).systemImpl()
);
extension.initialize(injector);
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.