Ticket #17 (closed Defect: fixed)
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 |
Module: |
Description
HTTP ERROR 503 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:2 Changed 13 years ago by jri
- Version set to 4.0
- Milestone changed from Release 4.0 to Release 4.1
comment:4 Changed 13 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 13 years ago by JuergeN
This is a jetty / osgi / jersey issue. Other people are reporting similar problems. Needs further exploration. Known possible solutions:
- working with osgi run levels
- copy service manifests from jetty/jersey? to user application
comment:7 Changed 13 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:
<deployPoms>
deepamehta-provision/3rd-party-bundles/pom.xml,
deepamehta-provision/felix-bundles/pom.xml
</deployPoms>
Furthermore, setting <felix.fileinstall.noInitialDelay> back to false (the deafult) avoids a premature client start.
Close ticket 17.
Troubleshooting:
If the browser shows 404 while this exception appears in the terminal ...
... 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.