Java Restlet错误。无法运行以下服务器端任务httpserver.serverimpl

Java Restlet错误。无法运行以下服务器端任务httpserver.serverimpl,java,restlet,httpserver,Java,Restlet,Httpserver,我的智能手机收集GPS、蓝牙日志,然后定期将数据发送到服务器。 我的服务器使用Restlet连续接收数据。 然而,我遇到了一个我从未见过的错误,谷歌没有给出任何解决方案或提示。(我的服务器在过去几天运行良好。) 下面的消息是我遇到的错误 无法运行以下服务器端任务:sun-net.httpserver.ServerImpl$Exchange@81a5dc 无法运行以下服务器端任务:sun net.httpserver.ServerImpl$Exchange@~~~~~~ 无法运行以下服务器端任务:

我的智能手机收集GPS、蓝牙日志,然后定期将数据发送到服务器。 我的服务器使用Restlet连续接收数据。 然而,我遇到了一个我从未见过的错误,谷歌没有给出任何解决方案或提示。(我的服务器在过去几天运行良好。)

下面的消息是我遇到的错误

无法运行以下服务器端任务:sun-net.httpserver.ServerImpl$Exchange@81a5dc 无法运行以下服务器端任务:sun net.httpserver.ServerImpl$Exchange@~~~~~~ 无法运行以下服务器端任务:sun net.httpserver.ServerImpl$Exchange@~~~~~~

下面是我的代码

RestletServerMain.java

public void restServer(){
  try{
    Component component = new Component();
    component.getServers().add(Protocol.HTTP, Integer.parseInt(Common.SERVER_PORT));
    component.getDefaultHost().attach(new ServerApplication());
    component.start();
  }catch(Exception e){
    e.printStackTrace();
  }

}
ServerApplication.java

public class ServerApplication extends Application {
  public Restlet createInboundRoot() {
  Router router = new Router(getContext());

  router.attach("/dataprocessing1", xxx.class);
  router.attach("/dataprocessing2", yyy.class);

  return router;
}

尝试restlet的jetty扩展(
org.restlet.extends.jetty
)可能会很有趣(而不是默认的扩展)

只需在类路径中添加相应的jar文件,Jetty将用作应用程序的底层服务器

希望它能解决你的问题。
Thierry

尝试restlet的jetty扩展(
org.restlet.extends.jetty
)可能会很有趣(而不是默认的扩展)

只需在类路径中添加相应的jar文件,Jetty将用作应用程序的底层服务器

希望它能解决你的问题。 蒂埃里