You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Brugge, John" <jb...@Kraft.com> on 2001/06/13 18:00:05 UTC

WebSphere, Jasper and Struts 1.0b3

We're trying to deploy our Struts application to WebSphere 3.5.4, and are
running into problems with what appears to be an outdated version of Jasper
shipping with WebSphere. I'm wondering if others have seen similar problems.

[Note: we've been doing development using Tomcat 3.2.1, with no problems.]

The first problem came when we tried deploying the app on WebSphere 3.5.3
(NT) with the Struts 1.0b2 release. We got the following stack trace
(snippet included) that I traced to an old version of the PageContextImpl
class

java.lang.IllegalArgumentException: cant remove Attributes from request
scope 
	at java.lang.RuntimeException.(RuntimeException.java:49) 
	at
java.lang.IllegalArgumentException.IllegalArgumentException.java:45) 
	at
org.apache.jasper.runtime.PageContextImpl.removeAttribute(PageContextImpl.ja
va:236) 
	at org.apache.struts.taglib.html.FormTag.doEndTag(FormTag.java:591) 

A change in the Struts FormTag that was just introduced with b2 makes the
removeAttribute(Constants.BEAN_KEY, PageContext.REQUEST_SCOPE) call, a call
which should be legal for Jasper. The Jakarta CVS log for
org.apache.jasper.runtime.PageContextImpl shows that the bug above was fixed
w/ v1.13.2.3 last November, and included in Tomcat 3.2.1 but apparently
completely ignored by IBM. The only reasonable(?) short term remedy we see
is to back off to Struts 1.0b1 until IBM gets its act together. We applied
the WebSphere 3.5.4 patch and found it still has the bug.

The second problem came once we'd recompiled with the Struts 1.0b1
libraries, and redeployed to WebSphere. This time our home page came up
successfully (a JSP, invoked through an Action and doing database I/O), but
the next page threw another Jasper exception:
org.apache.jasper.JasperException: Unable to compile class for JSP
"/WEB-INF/jsp/searchShipments.jsp"
C:\WebSphere\AppServer\temp\default_host\SHIPS_Web\WEB_2D_INF\jsp\_searchShi
pments_jsp_0.java:21: Branch is too large, Internal restriction. public
class _searchShipments_jsp_0 extends HttpJspBase { ^ 1 error 
	at javax.servlet.ServletException.(ServletException.java:107) 
	at org.apache.jasper.JasperException.(JasperException.java:73) 
	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:298) 
	at org.apache.jasper.runtime.JspServlet.loadJSP(JspServlet.java:943)


Once again, I don't know for sure which version of Jasper IBM is using, but
from looking at the Jakarta CVS logs again, there's indirect evidence that
the code is pretty old, since JspServlet (last line of the stack trace) was
moved from the runtime package to a 'servlet' package back in June, 2000. 

This error is tougher to track, since WebSphere doesn't appear to be saving
the java file for the JSP to disk, so I can't look at the actual generated
code (if anyone knows a WebSphere setting that tells it to save these .java
files, I'd appreciate it!)

I can't see anything on the upcoming WebSphere 4.0 release that lists bugs
fixed/changes incorporated, and our release date is going to come sooner
than the internal operations group is going to be comfortable moving to 4.0.
Any suggestions or insights into the problem appreciated! (except "Just run
Tomcat!" We've tried that one, believe me...)

Thanks,
John