set 26, 2014 5:13:00 PM org.glassfish.tyrus.core.AnnotatedEndpoint callMethod
INFO: Exception thrown from onError method public void main.scala.SocksEndpoint2.onError(javax.websocket.Session,java.lang.Throwable).
javax.websocket.DeploymentException: Component provider threw exception when providing instance of class main.scala.SocksEndpoint2.
什么会导致这种情况?我正在使用一个几乎完全空的端点:
@ServerEndpoint("/websocks")
class SocksEndpoint2(system: ActorSystem) {
@OnMessage
def onMessage(mess: String, session: Session) {
}
@OnClose
def onClose(session: Session) {
}
@OnError
def onError(session: Session , t: Throwable) {
}
}
并通过 javascript 发送
var exampleSocket = new WebSocket("ws://localhost:8025/websocks")
exampleSocket.send("{}")
它返回上面的错误。