Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] jetty 8.0.4 websocket problem..


Hi all ^^

I develop a websocket application with jetty 8.0.4..

I have a problem like this..

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------

[INFO] Scanning for projects...
[WARNING] The POM for org.mortbay.jetty:maven-jetty-plugin:jar:8.0.4 is missing, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for org.mortbay.jetty:maven-jetty-plugin:8.0.4: Plugin org.mortbay.jetty:maven-jetty-plugin:8.0.4 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.mortbay.jetty:maven-jetty-plugin:jar:8.0.4
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building jetty8 Maven Webapp 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.mortbay.jetty:maven-jetty-plugin:jar:8.0.4 is missing, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for org.mortbay.jetty:maven-jetty-plugin:8.0.4: Plugin org.mortbay.jetty:maven-jetty-plugin:8.0.4 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.mortbay.jetty:maven-jetty-plugin:jar:8.0.4
[INFO] 
[INFO] >>> jetty-maven-plugin:8.1.0.RC1:run (default-cli) @ jetty8 >>>
[INFO] 
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ jetty8 ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ jetty8 ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-resources-plugin:2.4.3:testResources (default-testResources) @ jetty8 ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ jetty8 ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] <<< jetty-maven-plugin:8.1.0.RC1:run (default-cli) @ jetty8 <<<
[INFO] 
[INFO] --- jetty-maven-plugin:8.1.0.RC1:run (default-cli) @ jetty8 ---
[INFO] Configuring Jetty for project: jetty8 Maven Webapp
[INFO] webAppSourceDirectory E:\eGovFrameDev-2.0.0-FullVer\workspace\jetty8\src\main\webapp does not exist. Defaulting to E:\eGovFrameDev-2.0.0-FullVer\workspace\jetty8\src\main\webapp
[INFO] Reload Mechanic: automatic
[INFO] Classes = E:\eGovFrameDev-2.0.0-FullVer\workspace\jetty8\target\classes
2011-12-23 15:39:42.578:INFO:oejs.Server:jetty-8.1.0.RC1
[INFO] Context path = /
[INFO] Tmp directory = E:\eGovFrameDev-2.0.0-FullVer\workspace\jetty8\target\tmp
[INFO] Web defaults = org/eclipse/jetty/webapp/webdefault.xml
[INFO] Web overrides =  none
[INFO] web.xml file = file:/E:/eGovFrameDev-2.0.0-FullVer/workspace/jetty8/src/main/webapp/WEB-INF/web.xml
[INFO] Webapp directory = E:\eGovFrameDev-2.0.0-FullVer\workspace\jetty8\src\main\webapp
2011-12-23 15:39:43.244:INFO:oejpw.PlusConfiguration:No Transaction manager found - if your webapp requires one, please configure one.
2011-12-23 15:39:45.531:INFO:oejsh.ContextHandler:started o.m.j.p.JettyWebAppContext{/,file:/E:/eGovFrameDev-2.0.0-FullVer/workspace/jetty8/src/main/webapp/},file:/E:/eGovFrameDev-2.0.0-FullVer/workspace/jetty8/src/main/webapp/PocWebSocketServletContextListener has received a servlet context event.

2011-12-23 15:39:45.531:INFO:oejsh.ContextHandler:started o.m.j.p.JettyWebAppContext{/,file:/E:/eGovFrameDev-2.0.0-FullVer/workspace/jetty8/src/main/webapp/},file:/E:/eGovFrameDev-2.0.0-FullVer/workspace/jetty8/src/main/webapp/
2011-12-23 15:39:45.531:INFO:oejsh.ContextHandler:started o.m.j.p.JettyWebAppContext{/,file:/E:/eGovFrameDev-2.0.0-FullVer/workspace/jetty8/src/main/webapp/},file:/E:/eGovFrameDev-2.0.0-FullVer/workspace/jetty8/src/main/webapp/
PocWebSocketHandler is created.
2011-12-23 15:39:45.558:INFO:oejs.Server:jetty-8.1.0.RC1
2011-12-23 15:39:45.591:INFO:oejs.AbstractConnector:Started SelectChannelConnector@0.0.0.0:8081 STARTING
2011-12-23 15:39:45.616:INFO:oejsh.ContextHandler:started o.m.j.p.JettyWebAppContext{/,file:/E:/eGovFrameDev-2.0.0-FullVer/workspace/jetty8/src/main/webapp/},file:/E:/eGovFrameDev-2.0.0-FullVer/workspace/jetty8/src/main/webapp/
2011-12-23 15:39:45.653:INFO:oejs.AbstractConnector:Started SelectChannelConnector@0.0.0.0:8080 STARTING
[INFO] Started Jetty Server
PocWebSocket is created.
2011-12-23 15:40:49.537:WARN:oejs.HttpConnection:/
java.lang.NullPointerException
at org.eclipse.jetty.websocket.WebSocketFactory.upgrade(WebSocketFactory.java:201)
at org.eclipse.jetty.websocket.WebSocketFactory.acceptWebSocket(WebSocketFactory.java:326)
at org.eclipse.jetty.websocket.WebSocketHandler.handle(WebSocketHandler.java:38)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110)
at org.eclipse.jetty.server.Server.handle(Server.java:346)
at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:442)
at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:924)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:582)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:218)
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:51)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:586)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:44)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:598)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:533)
at java.lang.Thread.run(Thread.java:662)



-------------------------------------------------------------------------------------------------------------------------------------------

I made a WebSocketServletContextListener implementing ServletContextListener. 

And in this class, I started a jetty server which had a WebSocketHandler set DefaultHandler.

I register this class as a listener in web.xml.

Client ia a chrome 16.0.912.63 m. 


On client, 

var location = "ws://localhost:8081";
this._ws = new WebSocket(location);



Is this problem why client and server's websocket version is different ?

I don't know what jetty's websocket version is.

As I know chrome v.16 supports Hybi17.. 

I don't know what I would do....-.-;;


I wish you have an answer or hint..


Thank you all for reading.. 

and thank you so much for your answer in advance.. 


Happy Christmas ~ ^_____^




--

----------------------------------------------------------------------------------
Seonhong Ahn 
Director of Research and Development

Collabra Co.
960-6 Deachi-dong, Gangnam-gu, Seoul, Korea 135-280 
Tel. 82-70-8670-6929         Fax. 82-2-6280-4807
Mobile 82-10-8292-3923
E-mail seonhong.ahn@xxxxxxxxx / shahn@xxxxxxxxxxxxxx
www.collabra.co.kr
----------------------------------------------------------------------------------



Back to the top