[
https://issues.apache.org/jira/browse/SLING-310?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Bertrand Delacretaz updated SLING-310:
--------------------------------------
Attachment: SLING-310.log
This log excerpt shows what happens: with the startup sequence below, the
SlingMainServlet is activated, deactivated and activated again.
For some reason, the HttpContext which was registered on the first activate()
call is still used for requests that come after the second activate() call.
I have modified the SlingMainServlet code to detect this and report an
IllegalStateException. Not sure if that's a bug in the HttpService that we're
using, or if we're doing something wrong.
Startup commands to reproduce:
cd launchpad/webapp
mvn clean package jetty:run
Here's the log excerpt:
o.a.s.core: Service [org.apache.sling.core.impl.SlingMainServlet,59]
ServiceEvent REGISTERED
o.a.s.c.i.SlingMainServlet: ApacheSling/2.0 (Java HotSpot(TM) Client VM
1.5.0_13; Mac OS X 10.4.11 i386) ready to serve requests
o.a.s.c.i.SlingMainServlet: ApacheSling/2.0 (Java HotSpot(TM) Client VM
1.5.0_13; Mac OS X 10.4.11 i386) shut down
o.a.s.core: [org.apache.sling.core.impl.SlingMainServlet] Dependency Manager:
Service Filter registered, trying to activate
o.a.s.core: [org.apache.sling.core.impl.SlingMainServlet] Dependency Manager:
Service Filter registered, trying to activate
o.a.s.c.i.SlingMainServlet: ApacheSling/2.0 (Java HotSpot(TM) Client VM
1.5.0_13; Mac OS X 10.4.11 i386) ready to serve requests
06.03.2008 10:15:00 *ERROR* o.a.s.c.i.SlingMainServlet: service: Uncaught
Throwable
java.lang.IllegalStateException: SlingMainServlet is inactive
at
org.apache.sling.core.impl.SlingMainServlet.ensureActivated(SlingMainServlet.java:764)
at
org.apache.sling.core.impl.SlingMainServlet.getMimeType(SlingMainServlet.java:740)
at
org.apache.sling.core.impl.SlingMainServlet.processRequest(SlingMainServlet.java:419)
at
org.apache.sling.core.impl.SlingMainServlet.service(SlingMainServlet.java:284)
at
org.apache.sling.core.impl.SlingMainServlet.service(SlingMainServlet.java:170)
> SlingMainServlet: null mimeTypeService in HttpContext, but not in main class
> ----------------------------------------------------------------------------
>
> Key: SLING-310
> URL: https://issues.apache.org/jira/browse/SLING-310
> Project: Sling
> Issue Type: Bug
> Reporter: Bertrand Delacretaz
> Priority: Minor
> Attachments: SLING-310.log
>
>
> In revision 633868, with this build/start sequence:
> cd launchpad/webapp
> cd ../app ; mvn clean install ; cd - ; mvn clean integration-test
> -Dintegration.test.wait=true
> Some integration tests fail, like for example
> PropertyRenderingTest.testTextNoExt
> The problem is that mimeTypeService is null here:
> HttpContext httpContext = new HttpContext() {
> public String getMimeType(String name) {
> return mimeTypeService.getMimeType(name);
> }
> event though the mimeTypeService of the enclosing class is set.
> Not sure what's happening, maybe there are several instances of this
> HttpContext around.
> To simplify, I'll change SlingMainServlet to implement HttpContext
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.