struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Lucia" <timlu...@yahoo.com>
Subject NullPointerException at ActionServlet.java:1003 using JRun4; work OK under Tomcat/JWSDP1.2
Date Tue, 06 Jan 2004 15:00:20 GMT
All,

I have a struts application using modules which deploys fine under
JWSDP1.2/Tomcat (5, I think), but when I deploy it under (trial edition
of) JRun4, I get 

java.lang.NullPointerException
	at
org.apache.struts.action.ACtionServlet.parseModuleConfigFile(ActionServl
et.java:1003)
.
.
.

Peeking at the source, it looks like it's trying to read a config file,
presumably for my module.

Anyone seen this before?  How did you overcome this problem?

Thanks,
Tim


    private void parseModuleConfigFile(
        String prefix,
        String paths,
        ModuleConfig config,
        Digester digester,
        String path)
        throws UnavailableException {

        InputStream input = null;
        try {
            URL url = getServletContext().getResource(path);
            InputSource is = new InputSource(url.toExternalForm()); //
########## 1003 ###
            input = getServletContext().getResourceAsStream(path);
            is.setByteStream(input);
            digester.parse(is);
            getServletContext().setAttribute(Globals.MODULE_KEY +
prefix, config);
            
        } catch (MalformedURLException e) {
            handleConfigException(paths, e);
        } catch (IOException e) {
            handleConfigException(paths, e);
        } catch (SAXException e) {
            handleConfigException(paths, e);
        } finally {
            if (input != null) {
                try {
                    input.close();
                } catch (IOException e) {
                    throw new UnavailableException(e.getMessage());
                }
            }
        }
    }



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


Mime
View raw message