opendolphin ClientInitializationException error

71 Views Asked by At

I'm testing OpenDolphin and i managed to simple create server side, shared side model.

OpenDolphin version: 0.8.4

For client side i have JavaFX application. I made login panel with :

  • ChoiceBox that loads available servers from local file
  • username field
  • password field
  • button

Parameters for ClientConfiguration are:

  • String urlEndpoint
  • UiThreadHandler(uiThreadHandler the ui thread handler)

//Creates a configuration for the Dolphin Platform. //urlendpoint is taken from ChoiceBox like ("http://localhost:8080/dolphin")

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

if I use Runnable::run then client connects, but if I use Platform::runLater (the way JavaFXConfiguration(urlEndpoint) implements it) I get error:

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

Any clue why is this happening?

1

There are 1 best solutions below

1
On BEST ANSWER

I have not found this question until now since the "Dolphin Platform" tag was missing.

In the current version of the Dolphin Platform you can simply use the "DolphinPlatformApplication" class to create your application.

You can find an example here: https://github.com/canoo/dolphin-platform/tree/master/platform-examples/todo-example

Main Class: https://github.com/canoo/dolphin-platform/blob/master/platform-examples/todo-example/todo-client/src/main/java/com/canoo/dolphin/todo/client/ToDoClient.java