I found it but also I don't know why it works. I removed the set visible from the class with main method and put it in the constructor so, it is now before the call to the run server method and it worked. any one has an explanation for this.
Villains always have antidotes. They're funny that way. Here's an antidote disguised as a tiny ad: