After the debug, I got the code to throw the exception.
As I expected before, The class Server.java is the key class to start the server service. I set a break point on the method setServerState() of the class Server.java. When I debug it, the following picture is what I got the last line of the code without any exception.
As we can see, there is aproblem in the publisher function of ServerBehaviorDelegate.java
publishServer(kind, ProgressUtil.getSubMonitorFor(monitor, 1000));
I must investigate which value is supposed to be for the variables “kind” and “monitor”. Then I can fingure out when and where to produce such mistakes.