Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP Server Autostart with JavaConfig fails with IllegalStateException: STARTED #179

karnis opened this Issue Dec 15, 2016 · 1 comment


None yet
2 participants
Copy link

karnis commented Dec 15, 2016

Enabling http server autostart when using javaconfig fails in 2.6.2:

public class HttpServerTestConfig  {  
  public HttpServer httpServer() {
    return CitrusEndpoints.http().server().autoStart(true).port(10001).build();
@ContextConfiguration(classes = { HttpServerTestConfig.class })
public class HttpServerTest extends JUnit4CitrusTestRunner {

  @CitrusEndpoint(name = "httpServer")
  HttpServer httpServer;

  public void sendGetStatusRequest(@CitrusResource TestContext context) {
    echo("hello world");
Caused by: java.lang.IllegalStateException: STARTED
	at org.eclipse.jetty.server.handler.HandlerWrapper.setServer(
	at org.eclipse.jetty.server.handler.HandlerWrapper.setHandler(
	at org.eclipse.jetty.servlet.ServletContextHandler.relinkHandlers(
	at org.eclipse.jetty.servlet.ServletContextHandler.setServletHandler(
	at com.consol.citrus.http.server.HttpServer.startup(
	at com.consol.citrus.server.AbstractServer.start(
	at com.consol.citrus.server.AbstractServer.afterPropertiesSet(

@christophd christophd added this to the v2.7 milestone Dec 16, 2016


This comment has been minimized.

Copy link

christophd commented Dec 16, 2016

Thanks for reporting. This issue has already been fixed with #177 and is included in 2.6.3-SNAPSHOT and 2.7-SNAPSHOT

@christophd christophd closed this Dec 20, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.