Parse exceptions on DOCTYPE after upgrading digester jar file

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Parse exceptions on DOCTYPE after upgrading digester jar file

Rick Mann
I upgraded the digester in our project to the latest version (1.6,  
beanutils 1.7, and now when resin loads and attempts to parse our  
tiles definitions file, it gets the following error (unknown  
declaration `DOCTYPE'). The release notes don't say anything, and a  
quick Google search didn't turn up anything particularly useful. Any  
ideas? The file starts with:

<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE tiles-definitions PUBLIC
        "-//Apache Software Foundation//DTD Tiles Configuration//EN"
        "http://jakarta.apache.org/struts/dtds/tiles-config_1_1.dtd">
<tiles-definitions>


Our struts-config file seems to have no complaints:

<?xml version="1.0" encoding="ISO-8859-1" ?>

<!DOCTYPE struts-config PUBLIC
           "-//Apache Software Foundation//DTD Struts Configuration  
1.1//EN"
           "http://jakarta.apache.org/struts/dtds/struts- 
config_1_1.dtd">

TIA!

> 10:11:45.481 ERROR [          ] [resin-1487          ]  
> digester.Digester (Digester.java:1483) Parse Fatal Error at line 1  
> column 0: unknown declaration `DOCTYPE'
> org.xml.sax.SAXParseException: unknown declaration `DOCTYPE'
>         at com.caucho.xml.XmlParser.error(XmlParser.java:2814)
>         at com.caucho.xml.XmlParser.parseDoctypeDecl(XmlParser.java:
> 558)
>         at com.caucho.xml.XmlParser.parseDoctype(XmlParser.java:496)
>         at com.caucho.xml.XmlParser.parseNode(XmlParser.java:386)
>         at com.caucho.xml.XmlParser.parseInt(XmlParser.java:240)
>         at com.caucho.xml.AbstractParser.parse(AbstractParser.java:
> 633)
>         at org.apache.commons.digester.Digester.parse(Digester.java:
> 1591)
>         at org.apache.struts.tiles.xmlDefinition.XmlParser.parse
> (XmlParser.java:279)
>         at  
> org.apache.struts.tiles.xmlDefinition.I18nFactorySet.parseXmlFile
> (I18nFactorySet.java:526)
>         at  
> org.apache.struts.tiles.xmlDefinition.I18nFactorySet.parseXmlFiles
> (I18nFactorySet.java:467)
>         at  
> org.apache.struts.tiles.xmlDefinition.I18nFactorySet.createDefaultFact
> ory(I18nFactorySet.java:271)
>         at  
> org.apache.struts.tiles.xmlDefinition.I18nFactorySet.initFactory
> (I18nFactorySet.java:246)
>         at  
> org.apache.struts.tiles.xmlDefinition.I18nFactorySet.initFactory
> (I18nFactorySet.java:196)
>         at  
> org.apache.struts.tiles.definition.ComponentDefinitionsFactoryWrapper.
> init(ComponentDefinitionsFactoryWrapper.java:104)
>         at  
> org.apache.struts.tiles.TilesUtilImpl.createDefinitionsFactory
> (TilesUtilImpl.java:138)
>         at  
> org.apache.struts.tiles.TilesUtil.createDefinitionsFactory
> (TilesUtil.java:167)
>         at  
> org.apache.struts.tiles.TilesPlugin.initDefinitionsFactory
> (TilesPlugin.java:224)
>         at org.apache.struts.tiles.TilesPlugin.init
> (TilesPlugin.java:139)
>         at org.apache.struts.action.ActionServlet.initModulePlugIns
> (ActionServlet.java:839)
>         at org.apache.struts.action.ActionServlet.init
> (ActionServlet.java:332)
>         at javax.servlet.GenericServlet.init(GenericServlet.java:69)
>         at  
> com.caucho.server.dispatch.ServletConfigImpl.createServlet
> (ServletConfigImpl.java:599)
>         at com.caucho.server.dispatch.ServletManager.init
> (ServletManager.java:152)
>         at com.caucho.server.webapp.Application.start
> (Application.java:1697)
>         at com.caucho.server.deploy.Entry.startImpl(Entry.java:498)
>         at com.caucho.server.deploy.Entry.redeployIfModifiedImpl
> (Entry.java:452)
>         at com.caucho.server.deploy.Entry.handleAlarm(Entry.java:564)
>         at com.caucho.util.Alarm.handleAlarm(Alarm.java:310)
>         at com.caucho.util.Alarm.run(Alarm.java:280)
>         at com.caucho.util.ThreadPool.runTasks(ThreadPool.java:467)
>         at com.caucho.util.ThreadPool.run(ThreadPool.java:408)
>         at java.lang.Thread.run(Thread.java:552)
>


--
Rick


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Parse exceptions on DOCTYPE after upgrading digester jar file

Simon Kitching
On Thu, 2005-06-09 at 10:23 -0700, Rick Mann wrote:

> I upgraded the digester in our project to the latest version (1.6,  
> beanutils 1.7, and now when resin loads and attempts to parse our  
> tiles definitions file, it gets the following error (unknown  
> declaration `DOCTYPE'). The release notes don't say anything, and a  
> quick Google search didn't turn up anything particularly useful. Any  
> ideas? The file starts with:
>
> <?xml version="1.0" encoding="ISO-8859-1" ?>
> <!DOCTYPE tiles-definitions PUBLIC
>         "-//Apache Software Foundation//DTD Tiles Configuration//EN"
>         "http://jakarta.apache.org/struts/dtds/tiles-config_1_1.dtd">
> <tiles-definitions>

I can't think of *anything* in digester or beanutils that would (or even
could) cause this problem.

This is the xml parser complaining about the file, not digester or
beanutils.

Regards,

Simon


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Digester] Re: Parse exceptions on DOCTYPE after upgrading digester jar file

Mattias Jiderhamn-2
In reply to this post by Rick Mann
Even though I love Resin as a web container, I have had to report numerous
bugs in the XML parser. You might have hit yet another one. (Or make sure
you use the latest version of Resin).

You can use another XML parser by setting system properties in the web.xml
or resin.conf like this:
   <system-property
javax.xml.parsers.SAXParserFactory="org.apache.xerces.jaxp.SAXParserFactoryImpl"/>
   <system-property javax.xml.parsers.DocumentBuilderFactory
="org.apache.xerces.jaxp.DocumentBuilderFactoryImpl"/>

At 2005-06-09 19:23, you wrote:

>I upgraded the digester in our project to the latest version (1.6,
>beanutils 1.7, and now when resin loads and attempts to parse our
>tiles definitions file, it gets the following error (unknown
>declaration `DOCTYPE'). The release notes don't say anything, and a
>quick Google search didn't turn up anything particularly useful. Any
>ideas? The file starts with:
>
><?xml version="1.0" encoding="ISO-8859-1" ?>
><!DOCTYPE tiles-definitions PUBLIC
>        "-//Apache Software Foundation//DTD Tiles Configuration//EN"
>        "http://jakarta.apache.org/struts/dtds/tiles-config_1_1.dtd">
><tiles-definitions>
>
>
>Our struts-config file seems to have no complaints:
>
><?xml version="1.0" encoding="ISO-8859-1" ?>
>
><!DOCTYPE struts-config PUBLIC
>           "-//Apache Software Foundation//DTD Struts Configuration
>1.1//EN"
>           "http://jakarta.apache.org/struts/dtds/struts- config_1_1.dtd">
>
>TIA!
>
>>10:11:45.481 ERROR [          ] [resin-1487          ]
>>digester.Digester (Digester.java:1483) Parse Fatal Error at line 1
>>column 0: unknown declaration `DOCTYPE'
>>org.xml.sax.SAXParseException: unknown declaration `DOCTYPE'
>>         at com.caucho.xml.XmlParser.error(XmlParser.java:2814)
>>         at com.caucho.xml.XmlParser.parseDoctypeDecl(XmlParser.java: 558)
>>         at com.caucho.xml.XmlParser.parseDoctype(XmlParser.java:496)
>>         at com.caucho.xml.XmlParser.parseNode(XmlParser.java:386)
>>         at com.caucho.xml.XmlParser.parseInt(XmlParser.java:240)
>>         at com.caucho.xml.AbstractParser.parse(AbstractParser.java: 633)
>>         at org.apache.commons.digester.Digester.parse(Digester.java: 1591)
>>         at org.apache.struts.tiles.xmlDefinition.XmlParser.parse
>> (XmlParser.java:279)
>>         at
>>org.apache.struts.tiles.xmlDefinition.I18nFactorySet.parseXmlFile
>>(I18nFactorySet.java:526)
>>         at
>>org.apache.struts.tiles.xmlDefinition.I18nFactorySet.parseXmlFiles
>>(I18nFactorySet.java:467)
>>         at
>>org.apache.struts.tiles.xmlDefinition.I18nFactorySet.createDefaultFact
>>ory(I18nFactorySet.java:271)
>>         at
>>org.apache.struts.tiles.xmlDefinition.I18nFactorySet.initFactory
>>(I18nFactorySet.java:246)
>>         at
>>org.apache.struts.tiles.xmlDefinition.I18nFactorySet.initFactory
>>(I18nFactorySet.java:196)
>>         at
>>org.apache.struts.tiles.definition.ComponentDefinitionsFactoryWrapper.
>>init(ComponentDefinitionsFactoryWrapper.java:104)
>>         at
>>org.apache.struts.tiles.TilesUtilImpl.createDefinitionsFactory
>>(TilesUtilImpl.java:138)
>>         at
>>org.apache.struts.tiles.TilesUtil.createDefinitionsFactory
>>(TilesUtil.java:167)
>>         at
>>org.apache.struts.tiles.TilesPlugin.initDefinitionsFactory
>>(TilesPlugin.java:224)
>>         at org.apache.struts.tiles.TilesPlugin.init (TilesPlugin.java:139)
>>         at org.apache.struts.action.ActionServlet.initModulePlugIns
>> (ActionServlet.java:839)
>>         at org.apache.struts.action.ActionServlet.init
>> (ActionServlet.java:332)
>>         at javax.servlet.GenericServlet.init(GenericServlet.java:69)
>>         at
>>com.caucho.server.dispatch.ServletConfigImpl.createServlet
>>(ServletConfigImpl.java:599)
>>         at com.caucho.server.dispatch.ServletManager.init
>> (ServletManager.java:152)
>>         at com.caucho.server.webapp.Application.start
>> (Application.java:1697)
>>         at com.caucho.server.deploy.Entry.startImpl(Entry.java:498)
>>         at com.caucho.server.deploy.Entry.redeployIfModifiedImpl
>> (Entry.java:452)
>>         at com.caucho.server.deploy.Entry.handleAlarm(Entry.java:564)
>>         at com.caucho.util.Alarm.handleAlarm(Alarm.java:310)
>>         at com.caucho.util.Alarm.run(Alarm.java:280)
>>         at com.caucho.util.ThreadPool.runTasks(ThreadPool.java:467)
>>         at com.caucho.util.ThreadPool.run(ThreadPool.java:408)
>>         at java.lang.Thread.run(Thread.java:552)


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Parse exceptions on DOCTYPE after upgrading digester jar file

Reid Pinchback
In reply to this post by Rick Mann

Suggested experiment:  Put a copy of the tiles DTD on your
drive.  Edit the XML file you were digesting to change the
system id (the http url), and replace it with the path to
the file on your system. If the problem goes away then it
means you got a less-than-useful message disguising the real
problem: the parser wasn't able to retrieve the DTD.  Xerces
and Crimson log messages/errors are clear when this is
happening.  I don't know what the Resin parser does in
such situations.  This might not help, but is an easy
enough thing to try if you didn't want to change Resin
parsers for some reason.


--- Rick Mann <[hidden email]> wrote:

> I upgraded the digester in our project to the latest version (1.6,  
> beanutils 1.7, and now when resin loads and attempts to parse our  
> tiles definitions file, it gets the following error (unknown  
> declaration `DOCTYPE'). The release notes don't say anything, and a  
> quick Google search didn't turn up anything particularly useful. Any  
> ideas? The file starts with:
>
> <?xml version="1.0" encoding="ISO-8859-1" ?>
> <!DOCTYPE tiles-definitions PUBLIC
>         "-//Apache Software Foundation//DTD Tiles Configuration//EN"
>         "http://jakarta.apache.org/struts/dtds/tiles-config_1_1.dtd">
> <tiles-definitions>



               
__________________________________
Discover Yahoo!
Have fun online with music videos, cool games, IM and more. Check it out!
http://discover.yahoo.com/online.html

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]