struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <Craig.McClana...@eng.sun.com>
Subject Re: problem with struts-config_1_0.dtd
Date Thu, 21 Sep 2000 01:52:31 GMT
Irene Hernandez wrote:

> Hi
>
> I have downloaded the latest struts 9/20 and I'm getting the following error
> when parsing struts-config.xml:
>
> Wed Sep 20 13:06:11 PDT 2000:<I> <WebAppServletContext-lomm> action:
> Initializin
> g configuration from resource path /WEB-INF/struts-config.xml
> register('-//Apache Software Foundation//DTD Struts Configuration 1.0//EN',
> 'zip
> :./myserver/lib/struts.jar#org/apache/struts/resources/struts-config_1_0.dtd
>

The second argument here is the URL that WebLogic's classloader returns to a
Class.getResource() call.  It's the responsibility of their implementation to be
able to actually retrieve such a resource, and I've heard other reports that
this doesn't work well in their app server.

> '
> resolveEntity('-//Apache Software Foundation//DTD Struts Configuration
> 1.0//EN',
>  'http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd')
>  Resolving to alternate DTD
> 'zip:./myserver/lib/struts.jar#org/apache/struts/res
> ources/struts-config_1_0.dtd'
> Wed Sep 20 13:06:11 PDT 2000:<E> <WebAppServletContext-lomm> Root cause of
> Servl
> etException
> org.xml.sax.SAXException: error in opening zip file
>         at
> org.apache.struts.digester.Digester.resolveEntity(Digester.java:619)
>         at
> com.sun.xml.parser.ExternalEntity.getInputSource(ExternalEntity.java:
> 46)
>         at com.sun.xml.parser.Parser.pushReader(Parser.java:2748)
>         at
> com.sun.xml.parser.Parser.externalParameterEntity(Parser.java:2500)
>         at com.sun.xml.parser.Parser.maybeDoctypeDecl(Parser.java:1136)
>         at com.sun.xml.parser.Parser.parseInternal(Parser.java:480)
>         at com.sun.xml.parser.Parser.parse(Parser.java:283)
>         at javax.xml.parsers.SAXParser.parse(SAXParser.java:155)
>         at javax.xml.parsers.SAXParser.parse(SAXParser.java:77)
>         at org.apache.struts.digester.Digester.parse(Digester.java:754)
>         at
> org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java
> :847)
>         at
> org.apache.struts.action.ActionServlet.init(ActionServlet.java:324)
>         at javax.servlet.GenericServlet.init(GenericServlet.java:258)
>         at
> weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubIm
> pl.java:474)
>         at
> weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStub
> Impl.java:433)
>         at
> weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubI
> mpl.java:422)
>         at
> weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.
> java:187)
>         at
> weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
> pl.java:118)
>         at
> weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon
> textImpl.java:760)
>         at
> weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon
> textImpl.java:707)
>         at
> weblogic.servlet.internal.ServletContextManager.invokeServlet(Servlet
> ContextManager.java:251)
>         at
> weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.jav
> a:369)
>         at
> weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:269)
>
>         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:135)
>
> It seems that there's something wrong with the dtd because when trying to
> see it with the browser I got this error:
>
> Cannot have a DTD declaration outside of a DTD. Line 26, Position 12
>
> <!ENTITY % BeanName "CDATA">
> -----------^

Could you do me a favor and try something?

In the Struts example application, take the "struts.jar" file from
"struts-example/WEB-INF/lib/struts.jar" and expand it into
"struts-example/WEB-INF/classes", and then remove it from the lib directory.
Then, try to run the app again.

What we're trying to do is determine whether the classloader works correctly for
un-JAR'd resources versus ones in a JAR file.

>
> Irene Hernandez

Craig McClanahan

====================
See you at ApacheCon Europe <http://www.apachecon.com>!
Session VS01 (23-Oct 13h00-17h00):  Sun Technical Briefing
Session T06  (24-Oct 14h00-15h00):  Migrating Apache JServ
                                    Applications to Tomcat



Mime
View raw message