I try to deploy a simple application in Scala using akka on Tomcat 7.
In the first version, the actor system and the main actor were started directly from a Scala object.
In the second version, I created an initializer (extending ServletContextListener) in order to start the actor system and the actor at the deployment of the war.
In both case, I get a java.lang.LinkageError like the following :
java.lang.LinkageError: loader constraint violation: when resolving method "akka.actor.Props$.apply(Lscala/reflect/ClassManifest;)Lakka/actor/Props;" the class loader (instance of org/apache/catalina/loader/WebappClassLoader) of the current class, com/my-app/Transfert$, and the class loader (instance of org/apache/catalina/loader/StandardClassLoader) for resolved class, akka/actor/Props$, have different Class objects for the type scala/reflect/ClassManifest used in the signature
com.my-app.Transfert$.<init>(Transfert.scala:14)
com.my-app.Transfert$.<clinit>(Transfert.scala)
com.my-app.Transfert.getState(Transfert.scala)
org.apache.jsp.transfert_jsp._jspService(transfert_jsp.java:85)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:433)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:389)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:333)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
I searched on Google and everywhere, but I didn't find a simple example of how to deploy a Scala/akka application on Tomcat 7 ?
I know there was an akka.http package in akka 1.3, but I want to use akka 2.0 (at least). It seems akka.http has disappeared in favor of the use of play-mini. But I would prefer not to use play-mini or play.
Is there any advice ? Any reading suggestion ? Or ??