Not getting "compilation error" page on my browser

208 views
Skip to first unread message

ashish2py

unread,
Mar 15, 2012, 1:38:05 AM3/15/12
to play-fr...@googlegroups.com
Hi friends ,
When I heard about the Play-2.0 final is released so I was very excited to try the latest play , 1 year prior I used play for my college project , I think that time community was around 400 peoples , but today Ohh.. above 4500 ... I proud to be a player ;)

I'm following the todolist-tutorial , for this code ,

  public static Result index() {
  return ok("Hello world);
}

I'm not getting "compilation error" page( beautiful page :) ) .
 
I'm getting an error on web-browser >
chrome > 
> Unable to load the webpage because the server sent no data.
firefox >
    > The connection to the server was reset while the page was loading.

On my Terminal >
    [todolist application] $ run

--- (Running the application from SBT, auto-reloading is enabled) ---

[info] play - Listening for HTTP on port 9000...

(Server started, use Ctrl+D to stop and go back to the console...)

[info] Compiling 1 Java source to /home/ashish/Documents/developer/play/todolist/target/scala-2.9.1/classes...
[error] Application.java:11: unclosed string literal
[error]  return ok("Hello world);
[error]            ^
[error] Application.java:11: ';' expected
[error]  return ok("Hello world);
[error]                          ^
[error] Application.java:14: reached end of file while parsing
[error] }
[error]  ^
[error] 3 errors
[error] {file:/home/ashish/Documents/developer/play/todolist/}todolist application/compile:compile: javac returned nonzero exit code
[error] application - 

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

sbt.PlayExceptions$CompilationException: Compilation error [unclosed string literal]
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]



Is there anything wrong with my play or something else ???

sun

unread,
Mar 15, 2012, 7:22:15 AM3/15/12
to play-framework
This will work:

christian sarnataro

unread,
Mar 15, 2012, 8:02:37 AM3/15/12
to play-fr...@googlegroups.com
Yes it works, but the question was about WHY the error is not shown inline.

DeLongey

unread,
Mar 23, 2012, 11:44:15 PM3/23/12
to play-fr...@googlegroups.com
Did you ever get it solved? I'm having the same issues and it's rather annoying to determine the cause of errors

Hubert Świetlicki

unread,
Mar 25, 2012, 3:36:12 PM3/25/12
to play-fr...@googlegroups.com
Haven't you missed the closing quoting mark in your controller? I see you are having the following line:  return ok("Hello world); One " is missing.

Ashish Tiwari

unread,
May 17, 2012, 3:22:16 PM5/17/12
to play-fr...@googlegroups.com

My problem is I'm not getting this "compilation error page " , according to Documentation . 

My chrome browser is showing > 


Now it becomes so hard to debug ... please help me guys ..

error.png

Ashish Tiwari

unread,
May 17, 2012, 6:51:36 PM5/17/12
to play-fr...@googlegroups.com
Phew ...... !! after lots of  R and D , Finally i solved my problem ..

I was using opejdk-6-jdk(java1.6.0_24) from Ubuntu's synaptic package manager , after removing this , I manually installed new JDK(java1.6.0_30) and everything is working .....


:)

Ashish Tiwari

unread,
May 17, 2012, 6:56:46 PM5/17/12
to play-fr...@googlegroups.com
I tested play2.0 on MacOSX to figure out this problem , java version is "1.6.0_26" ...and everything works fine ...
so finally ,
Problem was openjdk-6-jdk > java-version "1.6.0_24"


Reply all
Reply to author
Forward
0 new messages