| Summary: | ExtensionsHookConfigurator breaks resource loading in Pax Web/Felix Webconsole | ||
|---|---|---|---|
| Product: | [RT] Virgo | Reporter: | Peter Gardfjäll <peter.gardfjall.work> |
| Component: | unknown | Assignee: | Chris Frost <eclipse> |
| Status: | CLOSED NOT_ECLIPSE | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | glyn.normington |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
|
Description
Peter Gardfjäll
For reference, see http://www.eclipse.org/forums/index.php?t=msg&th=201016&start=0&S=362c0777c2db38f6a008ae7172a269e0 Thanks for raising this Peter! Hi Peter, I have managed to recreate the problem and I am investigating the cause. I would like to point out the way to extend the server. Simply drop the bundles in the repository and then reference them with the 'initialArtifacts' property in the 'org.eclipse.virgo.kernel.userregion.properties' file. This is how I recreated the problem and will proceed with. The way you are using to start bundles should only be used for system bundles etc... (For anyone else trying this, the id/password is admin and admin) Chris. Well, the cause is that the css is sent back with a header of 'Content-Type: content/unknown' as such the browser doesn't know what to do with it. The actually content is correct. Will now focus on why this is happening. Should be 'text/css' (In reply to comment #5) > Should be 'text/css' I browsed the PAX-WEB mailing list and found the following thread http://lists.ops4j.org/pipermail/general/2011q1/005229.html which may be related to this problem, I can't say for sure. Maybe it's not only Virgo that is at fault here, although it appears like the ExtensionsHookConfigurator does cause some problems. Hi Peter, Thanks for the pointer, it seems to be the same problem but unfortunately no one has solved it over there either. The mime.properties file is correctly loaded but it seems when the request is made by the browser the MimeTypes object is not consulted (via org.eclipse.jetty.server.handler.ContextHandler) to get the header for the extension for some reason. After further investigation I have found that the interesting code is in org.ops4j.pax.web.service.jetty.internal.ResourceServlet.java. In this file the request comes in and is dealt with. The requested css file is found just fine but when it tries to figure out the mime type to set on the response it first consults org.apache.felix.webconsole.internal.servlet.OsgiManagerHttpContext which returns null so then it opens a url connection to the css file and attempts to get a mime type from that, this returns with 'content/unknown' which is set on the response. I can't find any possible code path between the ResoureServlet in pax web and Jettys ContextHandler which is set up and ready to determine the content type from the '.css' extension. This might be because the OsgiManagerHttpContext is an OSGi HttpService provided by the Felix webconsole itself. All around the code where this HttpService is provide it is also setting up a String called 'webManagerRoot'. The post you sent me to talks about this problem 'It might be possible this happened when the patch for the webroot path came in something got screwed.' I don't think the Jetty guys can help as they seem to be keeping up their side of things. I will get some second opinions at this point and comment back here on what I find out but it looks likely to be a problem with the Felix Web console itself. I'm not sure how but it is possible that unplugging our ExtensionsHookConfigurator could cause things to work but finding out the connection would require further debugging of the Felix Web consoles 'OsgiManagerHttpContext' Chris. (In reply to comment #7) Chris, sounds like you've been doing some serious digging. :) Just thought I'd let you know that I just tried out the latest Pax-Web (1.0.0) and Felix Web Console (3.1.6) release on a Virgo kernel and the web console now renders properly. Probably not a problem with Virgo but rather a problem with Pax-Web and/or Felix Web Console. Anyhow, thanks a lot for your efforts! ...and sorry for (perhaps?) wasting your time! =) best regards, Peter (In reply to comment #8) > (In reply to comment #7) > Chris, > > sounds like you've been doing some serious digging. :) > Just thought I'd let you know that I just tried out the latest Pax-Web (1.0.0) > and Felix Web Console (3.1.6) release on a Virgo kernel and the web console now > renders properly. > > Probably not a problem with Virgo but rather a problem with Pax-Web and/or > Felix Web Console. > > Anyhow, thanks a lot for your efforts! ...and sorry for (perhaps?) wasting your > time! =) > > > best regards, Peter Hi, I'm just glad it's all working on Virgo now, I guess we will never know why removing our extension hooks made it work. I'm going to close the issue off now. It wasn't a total waste as it's good for me to learn more about Jetty and web stuff in General. Just out of interest, what is your requirement for running the Felix admin console on Virgo? Chris. Working in the latest Pax-Web 1.0.0 I guess the Virgo Web Server would be an alternative (with its admin console). However, we have a legacy "platform" of shared library bundles, including Apache CXF and the org.apache.servicemix.cxf.transport.osgi which require the OSGi HttpService to be available. The Tomcat server delivered with the Virgo Web Server does not publish a HttpService so we had to go with Pax-Web. I can't remember if we ever tried using the Virgo admin console with Pax-Web, but Felix Web Console worked right out of the box so we decided to go for it. /Peter (In reply to comment #9) > (In reply to comment #8) > > (In reply to comment #7) > > Chris, > > > > sounds like you've been doing some serious digging. :) > > Just thought I'd let you know that I just tried out the latest Pax-Web (1.0.0) > > and Felix Web Console (3.1.6) release on a Virgo kernel and the web console now > > renders properly. > > > > Probably not a problem with Virgo but rather a problem with Pax-Web and/or > > Felix Web Console. > > > > Anyhow, thanks a lot for your efforts! ...and sorry for (perhaps?) wasting your > > time! =) > > > > > > best regards, Peter > > Hi, > > I'm just glad it's all working on Virgo now, I guess we will never know why > removing our extension hooks made it work. I'm going to close the issue off > now. It wasn't a total waste as it's good for me to learn more about Jetty and > web stuff in General. > > Just out of interest, what is your requirement for running the Felix admin > console on Virgo? > > Chris. Hi, Thanks for the feedback, it is useful to have. Chris. |