New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[2.2.0-RC2] router URL handing errors with Mongodb #1678
Comments
Could you take a look at Also, did you do a clean before attempting to compile? |
@jroper I use cmd command line do "play clean", "play compile" again. It only have: import play.core._ import play.api.mvc._ import Router.queryString |
Ok that's odd, I tested just then and the setting is working fine for me. Could you add the following setting to your build:
Then run Also, could you check that you don't have a |
@jroper where to added sourcePositionMappers := Nil? can you say it more clearly where in build.scala? this is my build.scala, which line to added the sourcePositionMappers := Nil?
I have build.sbt in my root directory, this is the file content:
|
object ApplicationBuild extends Build { val appName = "blog" val main = play.Project(appName, appVersion, appDependencies).settings( ) } The output errors is: [info] Compiling 25 Scala sources and 2 Java sources to F:\Kepler\scala_blog\tar [error] POST /posts/:post_id/comments controllers.Comments.create(post_id: [error] POST /posts/:post_id/comments controllers.Comments.create(post_id: [error] POST /posts/:post_id/comments controllers.Comments.create(post_id: |
past the first 3 lines of target/scala-2.10/src_managed/main/routes_routing.scala import play.core._ |
You can't have both a |
please see very similar issue I have even without build.sbt, jroper, can you please please please help?? |
I create Comment.scala in controllers
then I added it to router:
I use mongodb, so I changed the class dependencies in Build.scala:
val appDependencies = Seq(
// Add your project dependencies here,
jdbc,
anorm,
"org.mongodb"%"bson"%"2.11.3",
"org.fusesource.scalate"%%"scalate-core"%"1.6.1",
"se.radley" %% "play-plugins-salat" % "1.3.0"
)
val main = play.Project(appName, appVersion, appDependencies).settings(
routesImport += "se.radley.plugin.salat.Binders._",
templatesImport += "org.bson.types.ObjectId"
)
I still get errors for url handling in play:
[error] F:\Kepler\scala_blog\conf\routes:13: No URL path binder found for type o
rg.bson.types.ObjectId. Try to implement an implicit PathBindable for this type.
[error] POST /posts/:post_id/comments controllers.Comments.create(post_id:
org.bson.types.ObjectId)
[error] F:\Kepler\scala_blog\conf\routes:13: No URL path binder found for type o
rg.bson.types.ObjectId. Try to implement an implicit PathBindable for this type.
[error] POST /posts/:post_id/comments controllers.Comments.create(post_id:
org.bson.types.ObjectId)
[error] F:\Kepler\scala_blog\conf\routes:13: No URL path binder found for type o
rg.bson.types.ObjectId. Try to implement an implicit PathBindable for this type.
The text was updated successfully, but these errors were encountered: