| Summary: | Server 500 error running hosted site | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | John Arthorne <john.arthorne> | ||||
| Component: | Server | Assignee: | Mark Macdonald <mamacdon> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | major | ||||||
| Priority: | P3 | CC: | mamacdon, simon_kaegi | ||||
| Version: | unspecified | Flags: | john.arthorne:
review+
simon_kaegi: review+ |
||||
| Target Milestone: | 0.5 RC3 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows 7 | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
Created attachment 217441 [details]
Complete server log
The problem is when the site definition has a trailing slash.. like this: Mappings Path Mounted at: /hello/ / The root of the problem was the path-translation logic not handling a trailing slash correctly, and translating it into "/". I will fix that. Will also add a null check to avoid causing the NPE in equinox's getMimeType() implementation when the translated path is "/". This prevents the following (very unlikely) site setup from causing a 500 error: Path Mounted at: / / |
1709 on orion.eclipse.org 1) Create the "Sample HTML5 site" 2) Create a Site, mapping that project to the root ... '/' 3) Attempt to launch the site. It reports a 500 error from the server. Here is what I see in the server log: java.lang.NullPointerException: null at org.eclipse.equinox.http.registry.internal.DefaultRegistryHttpContext.getMimeType(DefaultRegistryHttpContext.java:46) ~[na:na] at org.eclipse.equinox.http.servlet.internal.ServletContextAdaptor.getMimeType(ServletContextAdaptor.java:126) ~[na:na] ... 98 common frames omitted 2012-06-15 11:32:32.123 [qtp551428318-44282] WARN o.e.jetty.servlet.ServletHandler - / java.lang.reflect.UndeclaredThrowableException: null at $Proxy0.getMimeType(Unknown Source) ~[na:na] at org.eclipse.orion.internal.server.hosting.HostedSiteServlet.addContentTypeHeader(HostedSiteServlet.java:287) ~[na:na] at org.eclipse.orion.internal.server.hosting.HostedSiteServlet.serveOrionFile(HostedSiteServlet.java:272) ~[na:na] at org.eclipse.orion.internal.server.hosting.HostedSiteServlet.serve(HostedSiteServlet.java:225) ~[na:na] at org.eclipse.orion.internal.server.hosting.HostedSiteServlet.service(HostedSiteServlet.java:166) ~[na:na] at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) ~[javax.servlet_3.0.0.v201112011016.jar:na] at org.eclipse.equinox.http.registry.internal.ServletManager$ServletWrapper.service(ServletManager.java:180) ~[na:na] at org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61) ~[na:na] at org.eclipse.equinox.http.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:38) ~[na:na] at org.eclipse.orion.internal.server.hosting.HostedSiteRequestFilter.doFilter(HostedSiteRequestFilter.java:50) ~[na:na] admin@orion:~/current/eclipse>