struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "uma.k" <um...@net-kraft.com>
Subject RE: NullPointerException
Date Thu, 16 Dec 2004 14:06:54 GMT
Hi Jay,
Thanks for reply but a similar kind of app works fine in other context. Same
file name and context and same structure. What could be wrong?

Uma

-----Original Message-----
From: Jay Chandran [mailto:jay.chandran@iqss.co.in]
Sent: Thursday, December 16, 2004 7:38 PM
To: Struts Users Mailing List
Subject: Re: NullPointerException


i am not a fundu in struts .... but still ..:)

please go through the below link and check whether it make sense. Null
pointer exception usually arises when we are trying to extract some values
from variables which are "null". Please check whether the variables u r
calling when the action is performed  <html:link page="/articleForm.do">Add
An Article</html:link> is taking null values. make sure that variables are
not null.

http://www.junlu.com/msg/127812.html


----- Original Message -----
From: "uma.k" <uma.k@net-kraft.com>
To: "'Struts Users Mailing List'" <user@struts.apache.org>
Sent: Thursday, December 16, 2004 6:16 PM
Subject: NullPointerException


> I get NullPointerException when I access this index.jsp page. I also have
> ApplicationResources.properties file in web-inf/classes folder
>
> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
> <html>
> <head>
> <title><bean:message key="title.employeeApp"/></title>
> </head>
> <body>
> <h1><bean:message key="title.employeeApp"/></h1>
> <br>
> <html:link page="/articleForm.do">Add An Article</html:link>
> </body>
> </html>
>
> This is my struts-config.xml file
>
> <?xml version="1.0" encoding="ISO-8859-1" ?>
>
> <!DOCTYPE struts-config PUBLIC
>           "-//Apache Software Foundation//DTD Struts Configuration
1.2//EN"
>           "http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd">
>
>
> <struts-config>
>
> <form-beans>
>     <form-bean name="articleForm" type="articles.ArticleForm"/>
> </form-beans>
>
> <action-mappings>
>
> <action path="/articleForm"
> forward="/articles/Template.jsp" />
>
>     <action
>     path="/InsertArticle"
>     type="articles.ArticleAction"
>     name="articleForm"
>     scope="request"
>     validate="false"
>     input="/Template.jsp">
> <forward name="success" path="/articles/preview.jsp"/>
> <forward name="failure" path="/articles/Template.jsp"/>
> </action>
>
> </action-mappings>
>
> <message-resources
> parameter="ApplicationResources"
> null="false" />
>
>
> </struts-config>
>
>
> This is my complete exception
>
> java.lang.NullPointerException
> at
>
org.apache.struts.taglib.TagUtils.retrieveMessageResources(TagUtils.java:121
> 9)
> at org.apache.struts.taglib.TagUtils.message(TagUtils.java:1082)
> at
org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:226)
> at org.apache.jsp.index$jsp._jspService(index$jsp.java:68)
> at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> 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:856)
> 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
> )
> at
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 66)
> at
>
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
> java:170)
> at
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 64)
> at
>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170
> )
> at
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 64)
> at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
> 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.StandardEngineValve.invoke(StandardEngineValve.java
> :174)
> 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.connector.http.HttpProcessor.process(HttpProcessor.java:
> 1027)
> at
>
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125
> )
> at java.lang.Thread.run(Thread.java:595)
>
>
> What could be wrong?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message