Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Gives an error, when trying to run. #1

Closed
naveedehmad opened this Issue Apr 2, 2012 · 33 comments

Comments

Projects
None yet
8 participants

Here is the error:

object creation impossible, since: method prefix in trait Routes of type => String is not defined method setPrefix in trait Routes of type (prefix: String)Unit is not defined

It happens whey play tries to compile the sources. StackTrace:

target/scala-2.9.1/src_managed/main/routes_routing.scala:14: object creation impossible, since:
[error] method prefix in trait Routes of type => String is not defined
[error] method setPrefix in trait Routes of type (prefix: String)Unit is not defined
[error] object Routes extends Router.Routes {

Owner

orefalo commented Apr 2, 2012

hum, let me publish the latest version again. not sure when I last updated it.

Owner

orefalo commented Apr 2, 2012

please try again in 5-10mn

Thanks, will try again and let you know if that works.

Owner

orefalo commented Apr 4, 2012

any updates ? please close issue if it is fixed

Hi, rather than installing as a plugin, i forked and used in the code it worked like a charm. I'm closing the issue.

@naveedehmad naveedehmad closed this Apr 5, 2012

Owner

orefalo commented Apr 5, 2012

of course, that would work too. but the plugin will get you future updates. which you would have to watch for in a manual install

fabbo commented Apr 5, 2012

Hi, I've got the same problem.
I followed "Usage - Step 1" from https://github.com/orefalo/play2-authenticitytoken/blob/master/README.md

Not sure if I could write this in here, please forgive me if I should not.

@orefalo orefalo reopened this Apr 5, 2012

Me too. I followed "Usage - Step 1" then I got same issue.

Owner

orefalo commented Apr 6, 2012

Damn it, let me look into it.
in the mean time you may copy local and use as a subproject

Owner

orefalo commented Apr 6, 2012

ok, it works for me.
Could you guys try the following:

cd to play2-authenticitytoken/sample
run: play clean run

fabbo commented Apr 6, 2012

It does not work for me; I still receiving the same error.

Owner

orefalo commented Apr 6, 2012

what error ?

fabbo commented Apr 6, 2012

At running it starts normally, but when I go localhost:9000 , then it tries to compile and get this error:

[info] Compiling 4 Scala sources and 3 Java sources to /pathtoplay/play2-authenticitytoken/sample/target/scala-2.9.1/classes...
[error] /pathtoplay/play2-authenticitytoken/sample/target/scala-2.9.1/src_managed/main/routes_routing.scala:14: object creation impossible, since:
[error] method prefix in trait Routes of type => String is not defined
[error] method setPrefix in trait Routes of type (prefix: String)Unit is not defined
[error] object Routes extends Router.Routes {
[error] ^
[error] one error found
[error] {file:/pathtoplay/play2-authenticitytoken/sample/}sample/compile:compile: Compilation failed
[error] application -

! Internal server error, for request [GET /] ->

sbt.PlayExceptions$CompilationException: Compilation error [object creation impossible, since:
method prefix in trait Routes of type => String is not defined
method setPrefix in trait Routes of type (prefix: String)Unit is not defined]
at sbt.PlayReloader$$anon$2$$anonfun$reload$3$$anonfun$2$$anonfun$apply$11$$anonfun$apply$12.apply(PlayReloader.scala:224) ~[na:na]
at sbt.PlayReloader$$anon$2$$anonfun$reload$3$$anonfun$2$$anonfun$apply$11$$anonfun$apply$12.apply(PlayReloader.scala:224) ~[na:na]
at scala.Option.map(Option.scala:133) ~[scala-library.jar:0.11.2]
at sbt.PlayReloader$$anon$2$$anonfun$reload$3$$anonfun$2$$anonfun$apply$11.apply(PlayReloader.scala:224) ~[na:na]
at sbt.PlayReloader$$anon$2$$anonfun$reload$3$$anonfun$2$$anonfun$apply$11.apply(PlayReloader.scala:221) ~[na:na]
at scala.Option.map(Option.scala:133) ~[scala-library.jar:0.11.2]

And the browser:

Compilation error
object creation impossible, since: method prefix in trait Routes of type => String is not defined method setPrefix in trait Routes of type (prefix: String)Unit is not defined

Owner

orefalo commented Apr 6, 2012

ok, I got that too: and fixed it with a play clean run

note that I am also using play20 master.

Is play20 master same as the latest official version (March 13 2012)? or where I can download it? I am using the latest official version which I downloaded from play web site. And I tried play clean run, but get same issue.

Thanks!

Owner

orefalo commented Apr 6, 2012

try this
git clone git://github.com/playframework/Play20.git
cd Play20/framework
./cleanEverything
./build build-repository

I am using playframework-Play20-d83e322 to test. Still same issue, could you let me know which version you are testing?
Thanks,

I see the problem. I am using scala version. If this module supports scala version?

Owner

orefalo commented Apr 10, 2012

it doesn't, scala has its own set of tools to do auth tokens

Thanks. Maybe you can close this issue since it caused by using play 2.0 scala

Owner

orefalo commented Apr 10, 2012

I don't get your "play 2 scala" - there is only one play 2... and it does java & scala bindings.

Bottom line, you should get the embedded sample working without issue, it's built as a java application.

scan commented Apr 12, 2012

When you say scala has its own set of tools for Auth tokens, can you point me to an article on them?

scan commented Apr 12, 2012

Thanks

I still get this error, including when running the sample application. "object creation impossible, since: method prefix in trait Routes of type => String is not defined method setPrefix in trait Routes of type (prefix: String)Unit is not defined"

I was using the Play 2.0 downloaded from the website (2.0 final, March 13).

Installing and using the master branch from play! github repository fixed the issue for the sample application, as was suggested. It would be nice if the README were updated to reflect that this module won't work with the download from playframework.org.

Owner

orefalo commented Apr 21, 2012

yes I can do that

Contributor

Chcap commented May 27, 2012

Hi,

the problem ([error] method prefix in trait Routes of type => String is not defined) is still here with release 2.0.1 from play framework website.
On the other hand, it works with the play20 master (just need to set sbt.version to 0.11.3 instead of 0.11.2 in build.properties).

Regards

Owner

orefalo commented May 27, 2012

ok, could you submit a pull req ? -> for credits

Hi orefalo I am facing the same problem can you help me out. I am using play 2.0.2 and want to use auth token in my forms

Owner

orefalo commented Jul 18, 2012

I am afraid I can't I gave up on Play. the module is pretty much in a dead state. Tks

@orefalo orefalo closed this Jul 18, 2012

Orefalo (resolvers += "Crionics Github Repository" at "http://orefalo.github.com/m2repo/releases/" ) in this resolver yhe repository http://orefalo.github.com/m2repo/releases/ is giving 404 error can you pls help me out for this issue

Owner

orefalo commented Jul 18, 2012

include the java files in your project and you are done. no need for a resolver. cheerrs

thanks for your concern could you please list those java files and in which folder we have to add them in the project, That would be very grateful to yours.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment