Ticket #17 (closed Defect: fixed)

Opened 9 years ago

Last modified 9 years ago

Webclient HTTP ERROR 404 / 503 after fresh build from source

Reported by: JuergeN Owned by: jri
Priority: Blocker Milestone: Release 4.1
Component: DeepaMehta Standard Distribution Version: 4.0
Keywords: Cc:
Complexity: 3 Area: Runtime



Problem accessing /de.deepamehta.webclient/index.html. Reason:

    java.lang.IllegalStateException: Can only add listeners while bundle is active or activating.

Caused by:

javax.servlet.UnavailableException: java.lang.IllegalStateException: Can only add listeners while bundle is active or activating.
	at org.mortbay.jetty.servlet.ServletHolder.makeUnavailable(ServletHolder.java:415)
	at org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:458)
	at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:263)
	at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
	at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:685)
	at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
	at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
	at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
	at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
	at org.mortbay.jetty.Server.doStart(Server.java:224)
	at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
	at org.apache.felix.http.jetty.internal.JettyService.initializeJetty(JettyService.java:164)
	at org.apache.felix.http.jetty.internal.JettyService.startJetty(JettyService.java:115)
	at org.apache.felix.http.jetty.internal.JettyService.run(JettyService.java:290)
	at java.lang.Thread.run(Thread.java:636)

Powered by Jetty://

Change History

comment:1 Changed 9 years ago by JuergeN

If the browser shows 404 while this exception appears in the terminal ...

com.sun.jersey.api.container.ContainerException?: No WebApplication? provider is present

... then refresh the HTTP Jetty Bundle by typing "refresh 1" in the terminal (checkout the proper bundle ID before by using the "lb" command).

solves the problem for now.

comment:2 Changed 9 years ago by jri

  • Version set to 4.0
  • Milestone changed from Release 4.0 to Release 4.1

comment:3 Changed 9 years ago by jri

  • Status changed from new to accepted

comment:4 Changed 9 years ago by JuergeN

  • Complexity set to 1
  • Summary changed from Webclient HTTP ERROR 503 after fresh build from source to Webclient HTTP ERROR 404 / 503 after fresh build from source

comment:5 Changed 9 years ago by JuergeN

This is a jetty / osgi / jersey issue. Other people are reporting similar problems. Needs further exploration. Known possible solutions:

  1. working with osgi run levels
  2. copy service manifests from jetty/jersey? to user application

comment:6 Changed 9 years ago by jri

  • Complexity changed from 1 to 3
  • Area set to Runtime

comment:7 Changed 9 years ago by Jörg Richter

  • Status changed from accepted to closed
  • Resolution set to fixed

Fix 404/503 after start (#17).

The error occured only in development environment (hot deployment via Felix File Install), that is when build from source. The solution is to have Jersey *before* Felix File Install in the bundle list. This is simply achieved by swapping the 2 provisions in the global POM:




Furthermore, setting <felix.fileinstall.noInitialDelay> back to false (the deafult) avoids a premature client start.

Close ticket 17.

Note: See TracTickets for help on using tickets.