You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Jonathan Asbell <ja...@i-2000.com> on 2001/06/22 04:40:42 UTC

javax.servlet.UnavailableException: Input/output error reading configuration from resource path /WEB-INF/struts-config.xml

Any one know why I am getting this Exception in Weblogic 6?

I have gotten this Exception before, erased the tmp war files, and all was ok.  Now erasing the tmp war doesnt help.  It happens inside the Digester in the below method, on the line "getParser().parse(input, this);"
--------------------------------------------------------------------------------------------------------------
public Object parse(InputStream input) throws IOException, SAXException {
    getParser().parse(input, this);
    return (root);
}
--------------------------------------------------------------------------------------------------------------

I have verified that the input stream is not null and is in fact valid, pointing to the correct file "/WEB-INF/struts-config.xml".  I have also verified that the Digester is not null and is valid.

THIS IS THE EXCEPTION-----------------------------------------------------------------------------
resolveEntity('-//Apache Software Foundation//DTD Struts Configuration 1.0//EN', 'http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd')
 Not registered, use system identifier
resolveEntity('-//Apache Software Foundation//DTD Struts Configuration 1.0//EN', 'http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd')
 Not registered, use system identifier
javax.servlet.UnavailableException: Input/output error reading configuration from resource path /WEB-INF/struts-config.xml
        at org.apache.struts.action.ActionServlet.init(ActionServlet.java:416)
        at javax.servlet.GenericServlet.init(GenericServlet.java:258)

Re: javax.servlet.UnavailableException: Input/output error reading configuration from resource path /WEB-INF/struts-config.xml

Posted by zhaoj <zh...@sunjapan.com.cn>.
This is a common problem when configuring struts on weblogic. Reason is that
the parser could not fetch the
file(http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd) from the
web.
The easiest way is to alter the request to your local file.
For example:
    FROM:
    <!DOCTYPE struts-config PUBLIC
          "-//Apache Software Foundation//DTD Struts Configuration 1.0//EN"
          "http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd>

    TO:
    <!DOCTYPE struts-config PUBLIC
          "-//Apache Software Foundation//DTD Struts Configuration 1.0//EN"

"file:///c:/bea/wlserver6.0/config/Wcom/applications/mydomain/WEB-INF/struts
-config_1_0.dtd>

-Zhao

  ----- Original Message -----
  From: Jonathan Asbell
  To: struts-dev@jakarta.apache.org
  Sent: Friday, June 22, 2001 10:40 AM
  Subject: javax.servlet.UnavailableException: Input/output error reading
configuration from resource path /WEB-INF/struts-config.xml


  Any one know why I am getting this Exception in Weblogic 6?

  I have gotten this Exception before, erased the tmp war files, and all was
ok.  Now erasing the tmp war doesnt help.  It happens inside the Digester in
the below method, on the line "getParser().parse(input, this);"
  --------------------------------------------------------------------------
------------------------------------
  public Object parse(InputStream input) throws IOException, SAXException {
      getParser().parse(input, this);
      return (root);
  }
  --------------------------------------------------------------------------
------------------------------------

  I have verified that the input stream is not null and is in fact valid,
pointing to the correct file "/WEB-INF/struts-config.xml".  I have also
verified that the Digester is not null and is valid.

  THIS IS THE
EXCEPTION-------------------------------------------------------------------
----------
  resolveEntity('-//Apache Software Foundation//DTD Struts Configuration
1.0//EN', 'http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd')
   Not registered, use system identifier
  resolveEntity('-//Apache Software Foundation//DTD Struts Configuration
1.0//EN', 'http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd')
   Not registered, use system identifier
  javax.servlet.UnavailableException: Input/output error reading
configuration from resource path /WEB-INF/struts-config.xml
          at
org.apache.struts.action.ActionServlet.init(ActionServlet.java:416)
          at javax.servlet.GenericServlet.init(GenericServlet.java:258)