opendolphin ClientInitializationException错误

时间:2016-05-20 18:56:58

标签: javafx-8 opendolphin dolphin-platform

我正在测试OpenDolphin,我设法简单地创建了服务器端,共享端模型。

OpenDolphin版本: 0.8.4

对于客户端,我有JavaFX应用程序。 我用:

制作了登录面板
  • 从本地文件加载可用服务器的ChoiceBox
  • 用户名字段
  • 密码字段
  • 按钮

ClientConfiguration的参数是:

  • String urlEndpoint
  • UiThreadHandler(uiThreadHandler ui线程处理程序)

//为Dolphin平台创建配置。 // urlendpoint取自ChoiceBox,如(" http://localhost:8080/dolphin")

ClientConfiguration config = new ClientConfiguration(urlEndpoint,Runnable::run); ClientContextFactory.connect(config).get();

如果我使用Runnable::run,则客户端会连接,但如果我使用Platform::runLaterJavaFXConfiguration(urlEndpoint)实现它的方式) 我收到错误:

Exception in thread "pool-2-thread-1" com.canoo.dolphin.client.ClientInitializationException: com.canoo.dolphin.client.ClientInitializationException: Can not connect to server!

任何线索为什么会发生这种情况?

1 个答案:

答案 0 :(得分:0)

直到现在我还没有找到这个问题,因为缺少“Dolphin Platform”标签。

在当前版本的Dolphin平台中,您只需使用“DolphinPlatformApplication”类即可创建应用程序。

你可以在这里找到一个例子: https://github.com/canoo/dolphin-platform/tree/master/platform-examples/todo-example

主要班级:https://github.com/canoo/dolphin-platform/blob/master/platform-examples/todo-example/todo-client/src/main/java/com/canoo/dolphin/todo/client/ToDoClient.java