Re: Scala tutorial out of date, "Illegal group reference" in 1.1-r715

17 views
Skip to first unread message

Alex Cruise

unread,
Dec 26, 2009, 7:31:09 PM12/26/09
to play-fr...@googlegroups.com
On Sat, Dec 26, 2009 at 4:10 PM, Alex Cruise <acr...@gmail.com> wrote:
And, when I try to open /@tests, I get this:
Oops: IllegalArgumentException
An unexpected error occured caused by exception IllegalArgumentException: Illegal group reference

Turns out my BasicTest was an object, not a class, and the '$' in the classname was confusing the regex on Router:331.  Changing it to a class has gotten me past this error. 

Just need to sprinkle a little java.util.regex.Pattern#quote to taste... :)

-0xe1a

Alex Cruise

unread,
Dec 26, 2009, 7:10:00 PM12/26/09
to play-fr...@googlegroups.com
Hey folks,

So far I'm pretty impressed with the conciseness and apparent simplicity of Play, and really happy that Scala support is available!

Now, I'm trying to follow along the tutorial with a recent nightly (1.1 unstable, r715) and running into a few problems.

First, in BasicTest, this line:
import play.db.jpa.QueryFunctions._
...should probably be QueryRunner, right?


And, when I try to open /@tests, I get this:
Oops: IllegalArgumentException
An unexpected error occured caused by exception IllegalArgumentException: Illegal group reference

play.exceptions.UnexpectedException: Unexpected Error
at play.templates.Template$ExecutableTemplate$ActionBridge.invokeMethod(Template.java:458)
at {module:test-runner}/app/views/TestRunner/index.html.(line:556)
at play.templates.Template.render(Template.java:213)
at play.mvc.results.RenderTemplate.<init>(RenderTemplate.java:22)
at play.mvc.Controller.renderTemplate(Controller.java:388)
at play.mvc.Controller.render(Controller.java:420)
at controllers.TestRunner.index(TestRunner.java:22)
at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:332)
at play.mvc.ActionInvoker.invoke(ActionInvoker.java:154)
at Invocation.HTTP Request(Play!)
Caused by: java.lang.IllegalArgumentException: Illegal group reference
at java.util.regex.Matcher.appendReplacement(Matcher.java:713)
at java.util.regex.Matcher.replaceAll(Matcher.java:813)
at java.lang.String.replaceAll(String.java:2189)
at play.mvc.Router.reverse(Router.java:331)
Any hints?

Thanks!

-0xe1a

Guillaume Bort

unread,
Dec 27, 2009, 7:23:44 AM12/27/09
to play-fr...@googlegroups.com
Ok thank you.

The tutorial is effectively out of date, but API are not yet stable.
You're trying several path for the Model stuff with scala ...

> --
>
> You received this message because you are subscribed to the Google Groups
> "play-framework" group.
> To post to this group, send email to play-fr...@googlegroups.com.
> To unsubscribe from this group, send email to
> play-framewor...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/play-framework?hl=en.
>

Reply all
Reply to author
Forward
0 new messages