Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Java

Paul Yorde
Paul Yorde
10,497 Points

What are possible causes of Jetty Server Error in Gradle/Spark project?

So, this is related to building a spark application with gradle. Jetty should be running an embedded localhost server, however that's where the issue is happening.

I've tried this in two different editors on two different computers and got the same results as discussed below.

I am getting this result when I run main: STARTED @1175ms org.eclipse.jetty.server.Server@387f17e4. It will sit for a while and then show that message again. Any ideas?

I ran lsof -i:4567 and according to this its listening, I guess: java 89378 origin 51u IPv6 0x26bbf3e24d065a41 0t0 TCP *:tram (LISTEN). I also killed that process and tried to run main again, but same results.

and after a while the messages says: [org.eclipse.jetty.server.session.HashSessionManager@6e14b6c0Timer] DEBUG org.eclipse.jetty.server.session - Scavenging sessions at 1468615775992

I've also tried setting the port to 9090 before the call to get in .Main: port(9090);

The results is error 404 not found. Also the result for 4567.

I've also tried awaitInitialization(); also before the call to get. Then it just sets a waits with out any messages. So, it seems the server is not initializing. What does this mean???

Should I have a web.xml file?