Urgent Help Request
I am developing an app in java based on the Play Framework
I just tried to move my app into production on Amazon and it fails with an Exception (stack trace below).
After reaching out to the Play Framework community - I got this response from James Roper (an active Play Framework commiter):
"The couchbase driver comes with Netty 3.2.0. Play uses a much more recent version of Netty. This is most likely what is causing your issue. Remove Netty 3.2.0 from your installation. I don't know what affect this might have on the couchbase driver, if it doesn't work, there is little we can do about that."
Can someone suggest a resolution to this issue?
at akka.jsr166y.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:975) [com.typesafe.akka.akka-actor-akka-actor-2.0.2.jar:2.0.2]
at akka.jsr166y.ForkJoinPool.runWorker(ForkJoinPool.java:1479) [com.typesafe.akka.akka-actor-akka-actor-2.0.2.jar:2.0.2]
at akka.jsr166y.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:104) [com.typesafe.akka.akka-actor-akka-actor-2.0.2.jar:2.0.2]
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.AbstractStringBuilder.setLength(AbstractStringBuilder.java:143) ~[na:1.6.0_26]
at java.lang.StringBuilder.setLength(StringBuilder.java:55) ~[na:1.6.0_26]
at org.jboss.netty.handler.codec.http.CookieEncoder.encodeServerSide(CookieEncoder.java:170) ~[org.jboss.netty.netty-netty-3.2.0.Final.jar:na]
at org.jboss.netty.handler.codec.http.CookieEncoder.encode(CookieEncoder.java:93) ~[org.jboss.netty.netty-netty-3.2.0.Final.jar:na]
at play.api.mvc.Cookies$.encode(Http.scala:559) ~[play.play_2.9.1-play_2.9.1-2.0.3.jar:2.0.3]
at play.api.mvc.Cookies$.merge(Http.scala:583) ~[play.play_2.9.1-play_2.9.1-2.0.3.jar:2.0.3]
at play.api.mvc.PlainResult$class.withCookies(Results.scala:84) ~[play.play_2.9.1-play_2.9.1-2.0.3.jar:2.0.3]
at play.api.mvc.SimpleResult.withCookies(Results.scala:192) ~[play.play_2.9.1-play_2.9.1-2.0.3.jar:2.0.3]
at play.core.j.JavaHelpers$class.createResult(JavaHelpers.scala:27) ~[play.play_2.9.1-play_2.9.1-2.0.3.jar:2.0.3]
at play.core.Router$HandlerInvoker$$anon$4$$anon$1.createResult(Router.scala:1085) ~[play.play_2.9.1-play_2.9.1-2.0.3.jar:2.0.3]
at play.core.j.JavaAction$class.apply(JavaAction.scala:74) ~[play.play_2.9.1-play_2.9.1-2.0.3.jar:2.0.3]
at play.core.Router$HandlerInvoker$$anon$4$$anon$1.apply(Router.scala:1085) ~[play.play_2.9.1-play_2.9.1-2.0.3.jar:2.0.3]
at play.core.ActionInvoker$$anonfun$receive$1$$anonfun$6.apply(Invoker.scala:126) ~[play.play_2.9.1-play_2.9.1-2.0.3.jar:2.0.3]
at play.core.ActionInvoker$$anonfun$receive$1$$anonfun$6.apply(Invoker.scala:126) ~[play.play_2.9.1-play_2.9.1-2.0.3.jar:2.0.3]
at play.utils.Threads$.withContextClassLoader(Threads.scala:17) ~[play.play_2.9.1-play_2.9.1-2.0.3.jar:2.0.3]
at play.core.ActionInvoker$$anonfun$receive$1.apply(Invoker.scala:125) [play.play_2.9.1-play_2.9.1-2.0.3.jar:2.0.3]
... 11 common frames omitted
We test with netty 3.2.0, but I'd expect it to work and we'd help you out with anything in the 3.2.x series. What version does the Play framework use?
As a matter of fact, we do have specific support in there for older versions of netty, because there were some incompatible API changes.
As long as netty has remained compatible, James Roper's suggestion is a good one. If there's a problem, we'd be glad to try to help out with whatever version the play framework is using.