tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jeff.guttada...@abbott.com
Subject Re: java.lang.NullPointerException
Date Wed, 23 Oct 2002 13:59:01 GMT

Just take a look at line 124 of the generated servlet (FamilyMain$jsp.java)
mentioned in the stack trace.  This file will be under the work directory.
Look for code calling a method on an object, which in this error condition
happens to be null.

HTH,
-Jeff



                                                                                         
                         
                    Eddie Liang                                                          
                         
                    <eliang@edge.        To:     "'Tomcat Users List'" <tomcat-user@jakarta.apache.org>
           
                    com>                 cc:                                          
                            
                                         Subject:     java.lang.NullPointerException     
                         
                    10/23/02                                                             
                         
                    08:49 AM                                                             
                         
                    Please                                                               
                         
                    respond to                                                           
                         
                    "Tomcat Users                                                        
                         
                    List"                                                                
                         
                                                                                         
                         
                                                                                         
                         




Hi,

   I  use the JSP, tomcat 4.0.4 to call a java bean class, I got the below
error. Does anybody know what is wrong?



Thank you very much.



java.lang.NullPointerException
        at
org.apache.jsp.FamilyMain$jsp._jspService(FamilyMain$jsp.java:124)
        at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:201)
        at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:243)
        at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:190)
        at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
        at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2
46)
        at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
        at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)



Here is my JSP source code:



<!-- Developed and Documented by Krishna Veeramachaneni -->

<html>



<head>

<title>IMEDGE Content Management Services Administrator</title>

<link href="/JSP/com/imedge/admin/style.css" rel="stylesheet"
type="text/css" >

</head>

<jsp:useBean id="dbbean" class="com.imedge.admin.IMDbFamilyBean"  >

</jsp:useBean>

<%



      /* Java code to retrieve family name and description if any */

      int i = 0;

      String familyName = "BRACView";

      String familyDesc = "The default text goes here";



      String[] AllFamilyName = (String[]) dbbean.getAllFamilyName();





%>

<body  link="#990000" vlink="#009999" alink="#009999"

ID="Bdy" leftmargin="0" rightmargin="0" topmargin="0" bgcolor="beige" >



<%@ include file="/JSP/com/imedge/admin/Banner.jsp" %>

<%@ include file="/JSP/com/imedge/admin/FamilyMenu.jsp"%>



<table  width="100%" height="100%" cellpadding="0" cellspacing="0">

      <tr >

            <td  class="leftFrame" bgcolor="beige" color="black"
valign="top" width=180 >



               <h4> &nbsp; <img align="absmiddle"
src="/JSP/com/imedge/admin/images/familysmall.gif" > &nbsp; Family </h4>



               <form name="add_form">

                  &nbsp;<input class="submitStyle" name="family_create"
type="reset" value="Add + "


onClick="self.location.href='/JSP/com/imedge/admin/CreateFamily.jsp';">

               </form>



               <div class="marginStyle" >

                  <% for (i=0; i< AllFamilyName.length; i++) {

                        if (AllFamilyName[i] !=  null ) {%>

                              <b> <font color=white> &nbsp;<a
href="/JSP/com/imedge/admin/EditFamily.jsp?familyname=<%= AllFamilyName[i]
%>"><%= AllFamilyName[i] %> </a> </font><BR> <BR>

                  <%    }

                     } %>

               </div>

            </td>

            <td valign="top" align="left" class="rightFrame" >



                  <table width="97%" >

                        <tr>

                              <td >

                                    <div class="mesg">

                                          Click Add to add a family. Click a
family name to edit or delete the family.



                                    </div>

                              </td>

                        </tr>

                  </table>

            </td>

      </tr>

</table>





</body>

</html>







Eddie Liang

Database Architect

Phone: 630-810-9669 x253








--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message