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 Intro to Java Web Development with Spark Diving into Web Development Accepting Requests

Sandeep Annapareddy
Sandeep Annapareddy
3,141 Points

Error when running using "POST" request

Hi, I have been getting the following error when using the "POST" request. It worked fine with the "GET" request. Please find the error below:

"C:\Program Files\Java\jdk1.8.0_65\bin\java" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2017.3.3\lib\idea_rt.jar=50183:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2017.3.3\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\Java\jdk1.8.0_65\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_65\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.8.0_65\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.8.0_65\jre\lib\ext\cldrdata.jar;C:\Program Files\Java\jdk1.8.0_65\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.8.0_65\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.8.0_65\jre\lib\ext\jfxrt.jar;C:\Program Files\Java\jdk1.8.0_65\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.8.0_65\jre\lib\ext\nashorn.jar;C:\Program Files\Java\jdk1.8.0_65\jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.8.0_65\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.8.0_65\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.8.0_65\jre\lib\ext\sunpkcs11.jar;C:\Program Files\Java\jdk1.8.0_65\jre\lib\ext\zipfs.jar;C:\Program Files\Java\jdk1.8.0_65\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.8.0_65\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_65\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_65\jre\lib\jfxswt.jar;C:\Program Files\Java\jdk1.8.0_65\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_65\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.8.0_65\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.8.0_65\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_65\jre\lib\rt.jar;C:\Users\sande\IdeaProjects\course-ideas\out\production\classes;C:\Users\sande\IdeaProjects\course-ideas\out\production\resources;C:\Users\sande.gradle\caches\modules-2\files-2.1\com.sparkjava\spark-template-handlebars\2.3\c545ed1f27dad7d3df0ba7e5252d3a3a4fb546fc\spark-template-handlebars-2.3.jar;C:\Users\sande.gradle\caches\modules-2\files-2.1\com.sparkjava\spark-core\2.3\b0326d867f1ecbc8d624f64175d2aa5809bb0599\spark-core-2.3.jar;C:\Users\sande.gradle\caches\modules-2\files-2.1\org.slf4j\slf4j-simple\1.7.12\42db62298b899818ff17352cbc00050e940bbfb0\slf4j-simple-1.7.12.jar;C:\Users\sande.gradle\caches\modules-2\files-2.1\com.github.jknack\handlebars-guava-cache\1.3.1\68e15e29458a4194cf783893cdf10c03998a99bc\handlebars-guava-cache-1.3.1.jar;C:\Users\sande.gradle\caches\modules-2\files-2.1\com.github.jknack\handlebars\1.3.1\24bdd1b9b2a9893eac594dd78b059fc62ff85743\handlebars-1.3.1.jar;C:\Users\sande.gradle\caches\modules-2\files-2.1\org.slf4j\slf4j-api\1.7.12\8e20852d05222dc286bf1c71d78d0531e177c317\slf4j-api-1.7.12.jar;C:\Users\sande.gradle\caches\modules-2\files-2.1\org.eclipse.jetty\jetty-webapp\9.3.2.v20150730\b4bcbd3c978b587c6e4ca13d2ac90bd25ed2c3a2\jetty-webapp-9.3.2.v20150730.jar;C:\Users\sande.gradle\caches\modules-2\files-2.1\org.eclipse.jetty.websocket\websocket-server\9.3.2.v20150730\b43bc3a2fcabd1eb04a522b251d98efd010a2c0f\websocket-server-9.3.2.v20150730.jar;C:\Users\sande.gradle\caches\modules-2\files-2.1\org.eclipse.jetty\jetty-servlet\9.3.2.v20150730\a7ce8b11d340e152dd7dc94e7605c84230f05cf5\jetty-servlet-9.3.2.v20150730.jar;C:\Users\sande.gradle\caches\modules-2\files-2.1\org.eclipse.jetty\jetty-security\9.3.2.v20150730\194f37706614f236bfbf384c1e7cf531771b38f7\jetty-security-9.3.2.v20150730.jar;C:\Users\sande.gradle\caches\modules-2\files-2.1\org.eclipse.jetty\jetty-server\9.3.2.v20150730\d53622049200cee5c344b29c848d581aa876f93e\jetty-server-9.3.2.v20150730.jar;C:\Users\sande.gradle\caches\modules-2\files-2.1\org.eclipse.jetty.websocket\websocket-servlet\9.3.2.v20150730\403f4956c46fc5d76257148b5ad36c1e1ca485cd\websocket-servlet-9.3.2.v20150730.jar;C:\Users\sande.gradle\caches\modules-2\files-2.1\javax.servlet\javax.servlet-api\3.1.0\3cd63d075497751784b2fa84be59432f4905bf7c\javax.servlet-api-3.1.0.jar;C:\Users\sande.gradle\caches\modules-2\files-2.1\org.eclipse.jetty\jetty-http\9.3.2.v20150730\5a811cf50295ddae7df488e62662524380f18821\jetty-http-9.3.2.v20150730.jar;C:\Users\sande.gradle\caches\modules-2\files-2.1\org.eclipse.jetty.websocket\websocket-client\9.3.2.v20150730\f7cdf36509f8b9d8de49ed60dcb215aa92c36e41\websocket-client-9.3.2.v20150730.jar;C:\Users\sande.gradle\caches\modules-2\files-2.1\org.eclipse.jetty.websocket\websocket-common\9.3.2.v20150730\bd2abf31292508104bacfaba7eceb88d7d5f9ad0\websocket-common-9.3.2.v20150730.jar;C:\Users\sande.gradle\caches\modules-2\files-2.1\org.eclipse.jetty\jetty-io\9.3.2.v20150730\22bd4ad4856527847772f975a997f17da1e6766\jetty-io-9.3.2.v20150730.jar;C:\Users\sande.gradle\caches\modules-2\files-2.1\org.eclipse.jetty\jetty-xml\9.3.2.v20150730\d064e05b277e7c5522f211c590a04adf99060bcd\jetty-xml-9.3.2.v20150730.jar;C:\Users\sande.gradle\caches\modules-2\files-2.1\org.eclipse.jetty.websocket\websocket-api\9.3.2.v20150730\be1525f9e86d45ff163394c573ff46773fb40812\websocket-api-9.3.2.v20150730.jar;C:\Users\sande.gradle\caches\modules-2\files-2.1\org.apache.commons\commons-lang3\3.1\905075e6c80f206bbe6cf1e809d2caa69f420c76\commons-lang3-3.1.jar;C:\Users\sande.gradle\caches\modules-2\files-2.1\org.antlr\antlr4-runtime\4.2.2\23f7a0544b36189d688de27688ebd3111f456c97\antlr4-runtime-4.2.2.jar;C:\Users\sande.gradle\caches\modules-2\files-2.1\org.mozilla\rhino\1.7R4\e982f2136574b9a423186fbaeaaa98dc3e5a5288\rhino-1.7R4.jar;C:\Users\sande.gradle\caches\modules-2\files-2.1\com.google.guava\guava\14.0.1\69e12f4c6aeac392555f1ea86fab82b5e5e31ad4\guava-14.0.1.jar;C:\Users\sande.gradle\caches\modules-2\files-2.1\org.eclipse.jetty\jetty-util\9.3.2.v20150730\96eab74d8886ee9d51b6a3eeab9744807e842169\jetty-util-9.3.2.v20150730.jar;C:\Users\sande.gradle\caches\modules-2\files-2.1\org.antlr\antlr4-annotations\4.2.2\ab9b4d205530b2b225987c1740f8d71103835aa4\antlr4-annotations-4.2.2.jar" com.teamtreehouse.courses.Main [Thread-1] INFO org.eclipse.jetty.util.log - Logging initialized @394ms [Thread-1] INFO spark.webserver.JettySparkServer - == Spark has ignited ... [Thread-1] INFO spark.webserver.JettySparkServer - >> Listening on 0.0.0.0:4567 [Thread-1] INFO org.eclipse.jetty.server.Server - jetty-9.3.2.v20150730 [Thread-1] ERROR spark.webserver.JettySparkServer - ignite failed java.net.BindException: Address already in use: bind at sun.nio.ch.Net.bind0(Native Method) at sun.nio.ch.Net.bind(Net.java:433) at sun.nio.ch.Net.bind(Net.java:425) at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:326) at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80) at org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java:244) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) at org.eclipse.jetty.server.Server.doStart(Server.java:384) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) at spark.webserver.JettySparkServer.ignite(JettySparkServer.java:131) at spark.SparkInstance.lambda$init$0(SparkInstance.java:341) at java.lang.Thread.run(Thread.java:745)

Process finished with exit code 100

Please help me out fixing this error. Thanks

Yanuar Prakoso
Yanuar Prakoso
15,196 Points

have you restart the run server...?

Exit code 100 probably means you have another process of server running. Please check in your 4:Run window in the bottom of your IDEA if there are two main tabs opened. If there is close all of them and choose disconnect or stop process. Then run your code once more.

1 Answer