You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by pr...@acterna.com on 2003/09/12 23:01:57 UTC

Tomcat 4.1 -> 5.0 Web-app Porting

Hi,
I am trying to port a web-application originally written with Tomcat 4.1 to
Tomcat 5.0. The application uses struts and throws the following exception
when launched:

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
The server encountered an internal error () that prevented it from
fulfilling this request.


exception
java.lang.NullPointerException

org.apache.jasper.runtime.TagHandlerPool.reuse(TagHandlerPool.java:176)
             com.acterna.cable.rda.index_jsp.
_jspx_meth_bean_message_0(index_jsp.java:119)
             com.acterna.cable.rda.index_jsp._jspService(index_jsp.java:67)

org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
             javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>



Relevant Index.jsp and index_jsp code is as follows:


>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
index.jsp
----------
<%@page contentType="text/html"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>

<html:html> <!-- this is where it crashes -->


index_jsp.java (line 67)
---------------
      org.apache.struts.taglib.html.HtmlTag _jspx_th_html_html_0
= (org.apache.struts.taglib.html.HtmlTag)
_jspx_tagPool_html_html.get(org.apache.struts.taglib.html.HtmlTag.class);

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>


I am not using any actions at this time. I copied new strut libraries
shipped with Tomcat 5.0 to the application's WEB-IN/lib folder and my
struts-config.xml looks like this:


>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
struts-config.xml
-----------------
<struts-config>

    <!-- ========== Form Bean Definitions
=================================== -->
    <form-beans>
    </form-beans>
    <!-- ========== Global Forward Definitions
============================== -->
    <global-forwards>
        <forward name="success" path="/HomePage.jsp"/>
        <forward name="noLicense" path="/ErrorPage.jsp?code=noLicense"/>
    </global-forwards>
    <!-- ========== Action Mapping Definitions
============================== -->
    <action-mappings>

    </action-mappings>
</struts-config>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>


Am I missing anything? Any help would be greatly appreciated.

Thanks,
-Prashant



Re: Tomcat 4.1 -> 5.0 Web-app Porting

Posted by "Craig R. McClanahan" <cr...@apache.org>.
On Fri, 12 Sep 2003 prashant.budhale@acterna.com wrote:

> Date: Fri, 12 Sep 2003 16:01:57 -0500
> From: prashant.budhale@acterna.com
> Reply-To: Struts Users Mailing List <st...@jakarta.apache.org>
> To: tomcat-user@jakarta.apache.org
> Cc: struts-user@jakarta.apache.org
> Subject: Tomcat 4.1 -> 5.0 Web-app Porting
>
> Hi,
> I am trying to port a web-application originally written with Tomcat 4.1 to
> Tomcat 5.0. The application uses struts and throws the following exception
> when launched:
>
> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> The server encountered an internal error () that prevented it from
> fulfilling this request.
>
>
> exception
> java.lang.NullPointerException
>
> org.apache.jasper.runtime.TagHandlerPool.reuse(TagHandlerPool.java:176)
>              com.acterna.cable.rda.index_jsp.
> _jspx_meth_bean_message_0(index_jsp.java:119)
>              com.acterna.cable.rda.index_jsp._jspService(index_jsp.java:67)
>
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
>              javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>

Which specific version of Tomcat 5.0.x are you trying?  I seem to recall
that there were a couple of bugs in the tag pooling code that could bite
you in a page with lots of tags (typical of Struts apps), but that these
bugs were fixed in 5.0.9.

If that doesn't fix the problem, you can also turn off tag pooling with a
servlet init parameter -- read the docs in "$CATALINA_HOME/conf/web.xml"
for which one needs to be set.

Craig