Re: WebMacro.properties & NullPointerException

Keats Kirsch <[email protected]> Sat, 25 Feb 2006 16:53:52 -0500
Newsgroups gmane.comp.java.webmacro.user
Message-ID <[email protected]>
viju wrote:

> I'm facing some issue with webmacro based webapp deployed in tomcat 
> 5.0.0.28. When ever try loading my welcome page from servlet I get the 
> following excpetion
>
>java.lang.NullPointerException   org.webmacro.servlet.WMServlet.doPost(WMServlet.java:230)   javax.servlet.http.HttpServlet.service(HttpServlet.java:709)   javax.servlet.http.HttpServlet.service(HttpServlet.java:802)   sun.reflect.GeneratedMethodAccessor99.invoke(Unknown Source)   sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)   java.lang.reflect.Method.invoke(Method.java:324)   org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:239)   java.security.AccessController.doPrivileged(Native Method)   javax.security.auth.Subject.doAsPrivileged(Subject.java:500)   org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:268)   org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:157)  
>
> < PRE>The tomcat log says the WebMacro.properties file must be 
> classpath. But I have copied this file into
>
>tomcat/shared/lib folder. I think the Classloader for the web application should find this property file 
>
The /lib directory is where Tomcat loads Jar files.  It is not part of 
the normal classpath. 

See: http://www.webmacro.org/WebMacroPropertiesFile
for details of where to put the WebMacro.properties file.  The best 
place is usually the /WEB-INF/ directory under your context root, or in 
the classpath, like /WEB-INF/classes/.  If you instantiate WM directly, 
instead of extending WMServlet, you can specify any location you want 
for the properties file.

Hope this helps.

Keats

>under this folder. 
>
>So can somebody help understand what could be the issue here?
>
> 
>
>thanks in advance
>
>Vijayendra 
>
> ------------------------------------------------------------------------





-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642