play_java_starter_example: net::ERR_CONNECTION_RESET in public assets.

131 views
Skip to first unread message

Hugo Play

unread,
Nov 5, 2017, 6:39:40 AM11/5/17
to Play Framework
Hi guys!

I've downloaded your starter example for Play Java (play_java_starter_example).

The server seems to be up and running according to the console: [info] play.api.Play - Application started (Dev)

However when I try to navigate to localhost:9000 the content takes too long to load and I'm finding ERR_CONNECTION_RESET issues(which explains why it is taking so long).

>In Chrome the html content is loaded, but main.css, hello.js and favicon.ico are reporting ERR_CONNECTION_RESET in Chrome Developer Tool:

GET http://localhost:9000/assets/javascripts/hello.js net::ERR_CONNECTION_RESET localhost/:13 
GET http://localhost:9000/assets/stylesheets/main.css net::ERR_CONNECTION_RESET localhost/:11
GET http://localhost:9000/assets/images/favicon.png net::ERR_CONNECTION_RESET :9000/assets/images/favicon.png:1

The Network tab of the Chrome Developer Tool is showing me that:
main.css, Timing: Stalled, 2.6 min
hello.js, Timing: Stalled,1.3 min.

>In IE the html content is not even loaded.

Full console log:

E:\Play\play-java-starter-example>.\sbt-dist\bin\sbt.bat run
Java HotSpot(TM) 64-Bit Server VM warning: Ignoring option MaxPermSize; support was removed in 8.0
[info] Loading settings from plugins.sbt ...
[info] Loading project definition from E:\Play\play-java-starter-example\project
[info] Loading settings from build.sbt ...
[info] Set current project to play-java-starter-example (in build file:/E:/Play/play-java-starter-example/)

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by play.runsupport.classloader.DelegatingClassLoader (file:/C:/Users/user/.ivy2/cache/com.typesafe.play/run-support_2.12/jars/run-support_2.12-2.6.6.jar) to method java.lang.ClassLoader.findResource(java.lang.String)
WARNING: Please consider reporting this to the maintainers of play.runsupport.classloader.DelegatingClassLoader
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
--- (Running the application, auto-reloading is enabled) ---

[info] p.c.s.AkkaHttpServer - Listening for HTTP on /0:0:0:0:0:0:0:0:9000

(Server started, use Enter to stop and go back to the console...)

[info] application - ApplicationTimer demo: Starting application at 2017-11-05T08:36:39.546604900Z
[info] p.a.h.EnabledFilters - Enabled Filters (see <https://www.playframework.com/documentation/latest/Filters>):

    play.filters.csrf.CSRFFilter
    play.filters.headers.SecurityHeadersFilter
    play.filters.hosts.AllowedHostsFilter
    filters.ExampleFilter

[info] play.api.Play - Application started (Dev)



Any ideas? Thanks!

Hugo Play

unread,
Nov 6, 2017, 2:55:20 PM11/6/17
to Play Framework
So I answer myself, 
Just uninstalling Java 9 and installing Java 8 seemed to make it work.

Robbie Smith

unread,
Nov 9, 2017, 3:19:13 PM11/9/17
to Play Framework
I installed Java 8, but I got this warning: UnsupportedClassVersionError: Module has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0

Seems like the Play example was done in JAVA 9. How were you able to make it work in 8?

Igmar Palsenberg

unread,
Nov 9, 2017, 3:26:46 PM11/9/17
to Play Framework


Op donderdag 9 november 2017 21:19:13 UTC+1 schreef Robbie Smith:
I installed Java 8, but I got this warning: UnsupportedClassVersionError: Module has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0

Seems like the Play example was done in JAVA 9. How were you able to make it work in 8?

sbt clean cleanFiles compile should do it. Else show a full stacktrace, that should tell which class is affected.


Igmar
Reply all
Reply to author
Forward
0 new messages