Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 364036

Summary: Eclipse help not showing on Tomcat 7
Product: [Eclipse Project] Equinox Reporter: Tillmann Seidel <tseidel>
Component: Server-SideAssignee: Simon Archer <sja.eclipse>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: digga1404, sja.eclipse, tjwatson
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: stalebug

Description Tillmann Seidel CLA 2011-11-17 09:31:39 EST
Build Identifier: Juno M3

We develop a RAP application which uses the Eclipse help system With Bug 341643 fixed in Juno M3, I tried to get the help running on a Tomcat 7. However when the start page index.jsp is called, I get an error 

   java.lang.IllegalStateException: No org.apache.tomcat.InstanceManager set in ServletContext

from Jasper.

Jasper expects an attribute "org.apache.tomcat.InstanceManager" set in the current servlet context. This 
call is delegated to the org.eclipse.equinox.http.servlet.internal.ServletContextAdaptor, which in turn delegates the getAttribute call to its field "proxyContext". When debugging I noticed that the attribute is not set on the ProxyContext but on the ServletContext in field "servletContext". Maybe the method getAttribute(String) is accessing the wrong context?

When I change getAttribute to delegate to the servletContext instead of proxyContext, the online help is displayed.



Reproducible: Always
Comment 1 Thomas Watson CLA 2011-11-17 10:14:49 EST
Simon, please investigate.
Comment 2 Simon Archer CLA 2011-11-17 10:19:18 EST
OK, thanks Tom.
Comment 3 Simon Archer CLA 2011-11-17 17:30:20 EST
Having looked at this problem I am not convinced that the solution proposed in the description is appropriate. I am concerned that it just happens to work for your scenario and is not a general purpose solution, or even a legitimate problem.

Thanks to Simon Kaegi for suggesting this link:
  http://www.eclipse.org/forums/index.php/m/665694/

Tillmann, will you please review this forum posting and comment on whether you believe that it's related to this bug report.

Please provide a stack trace so that we can compare the two scenarios. Thanks.
Comment 4 Tillmann Seidel CLA 2011-11-18 04:58:39 EST
The workaround I described was not intended to be a real proposal for a solution - just a hint for you to locate the problem.

As for the referenced forum post: it don't think it is related. I am not aware that we have deployed libraries with our webapp which should be served by the container. We currently import 

org.apache.jasper, org.apache.jasper.servlet, javax.servlet.jsp, javax.servlet.annotation, javax.servlet.descriptor

from the container (using extended framework exports in the web.xml). 




Here's the full stack trace:

java.lang.IllegalStateException: No org.apache.tomcat.InstanceManager set in ServletContext
	org.apache.jasper.runtime.InstanceManagerFactory.getInstanceManager(InstanceManagerFactory.java:35)
	org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:171)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:370)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:389)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:333)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
	org.eclipse.equinox.jsp.jasper.JspServlet.service(JspServlet.java:155)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
	org.eclipse.equinox.http.registry.internal.ServletManager$ServletWrapper.service(ServletManager.java:180)
	org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)
	org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128)
	org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:60)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
	org.eclipse.equinox.servletbridge.BridgeServlet.service(BridgeServlet.java:120)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:722)




And I found another log entry which might be related:
17.11.2011 14:49:13 org.apache.jasper.compiler.WebXml <init>
WARNUNG: Internal Error: File /WEB-INF/web.xml not found
Comment 5 Tillmann Seidel CLA 2011-12-12 04:28:42 EST
I found a way to reproduce the problem with bundles from 3.8 M3 only.

To reproduce the problem, download help.war from http://download.eclipsesource.com/~tseidel/ and deploy it on Tomcat 6 or 7. When calling localhost:8080/help/index.jsp, the help start page shows on Tomcat 6. On Tomcat 7, the exception mentioned above is displayed.
Comment 6 Eclipse Genie CLA 2018-10-03 09:12:28 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 7 Lars Vogel CLA 2019-09-04 01:52:09 EDT
This bug was marked as stalebug a while ago. Marking as worksforme.

If this report is still relevant for the current release, please reopen and remove the stalebug whiteboard tag.