wjw465150 / run-jetty-run

Automatically exported from code.google.com/p/run-jetty-run
0 stars 0 forks source link

getting nullpointerexception for websocket #161

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I can run any standard servlet and html pages. However I want to use 
WebSocketServlet in jetty. I created project and followed tutorial steps.
However if i want to connect socket from html5 via 
var connection = new 
WebSocket('ws://localhost:8080/Socket/servlet/websocket/anything');
it gives me below error:

java.lang.NullPointerException
    at org.eclipse.jetty.websocket.WebSocketFactory.upgrade(WebSocketFactory.java:236)

Full code was attached

What steps will reproduce the problem?
Tried with java v6 and v7 results were same.
I put jetty-websocket-xxx.jar file inside web-inf/lib  also result was same

What Eclipse version are you using ?

Version: Juno Service Release 1

What Run-Jetty-Run version are you using?

1.3.3.201203161919  

What OS are you using ? 32bit or 64 bit?
32bit windows7

Please provide any additional information below.

Original issue reported on code.google.com by eray.ince@gmail.com on 8 Feb 2013 at 2:06

Attachments:

GoogleCodeExporter commented 9 years ago
btw same question was asked in stackoverflow
http://stackoverflow.com/questions/14707694/jetty-8-1-9-v20130131-web-socket-iss
ues

Original comment by eray.ince@gmail.com on 8 Feb 2013 at 2:10

GoogleCodeExporter commented 9 years ago
http://stackoverflow.com/a/14775452/1093975 i wrote the solution

Original comment by eray.ince@gmail.com on 8 Feb 2013 at 4:03