Bug 4788 - latest xtags still not working
Summary: latest xtags still not working
Status: CLOSED WORKSFORME
Alias: None
Product: Taglibs
Classification: Unclassified
Component: XTags Taglib (show other bugs)
Version: 1.0
Hardware: PC All
: P3 blocker (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-11-10 08:08 UTC by rasand
Modified: 2005-03-20 17:06 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description rasand 2001-11-10 08:08:11 UTC
When I use the latest xtag library with dom4j-full v1.1, it seems that the 
library does not function properly.  I find that code that used to work no 
longer does.  I am trying to select from my xml document the one topic 
specified from the query string, but my forEach statement is no longer finding 
anything and the select is staying at the root.  The code is:

<xtags:parse uri="help.xml"/>
<xtags:forEach select="/help/topic[topic-key=$topic][1]">
    <h2><xtags:valueOf select="//topic-key"/></h2>
    <xtags:forEach select="//description">
        <p><xtags:valueOf select="."/></p>
    </xtags:forEach>
</xtags:forEach>

And the xml file is:

<help>
     <topic>
        <topic-key>nohelp</topic-key>
        <topic-title>No Help Available</topic-title>
    </topic>
    <topic>
        <topic-key>managesite</topic-key>
        <topic-title>Manage Site</topic-title>
etc.

When this executes, it stays at the root, displaying the first topic only 
instead of the one I specified.

I uncompressed the examples and are running them unmodified on tomcat 3.3 with
jdk 1.3.01 and the only classes in my application classpath are dom4j-full.jar 
and xtags.jar.  Some of the examples work, for example, the simple rss example 
and the stock quote example.  However, the periodic_table and much_ado examples 
both give an exception, and periodic_table2 shows every element as having 112 
atoms. 

Location: /docs/xtags/examples/much_ado.jsp
Internal Servlet Error:

javax.servlet.ServletException: no more input Nested exception: no more input
at org.apache.jasper.runtime.PageContextImpl.handlePageException(Unknown Source)
at docs.xtags.examples.much_ado_1._jspService(much_ado_1.java:874)
at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at org.apache.tomcat.facade.ServletHandler.doService(Unknown Source)
at org.apache.tomcat.core.Handler.invoke(Unknown Source)
at org.apache.tomcat.core.Handler.service(Unknown Source)
at org.apache.tomcat.facade.ServletHandler.service(Unknown Source)
at org.apache.tomcat.core.ContextManager.internalService(Unknown Source)
at org.apache.tomcat.core.ContextManager.service(Unknown Source)
at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Unknown 
Source)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown Source)
at java.lang.Thread.run(Thread.java:484)
Root cause:
org.dom4j.DocumentException: no more input Nested exception: no more input
at org.dom4j.io.SAXReader.read(SAXReader.java:333)
at org.dom4j.io.SAXReader.read(SAXReader.java:249)
at org.apache.taglibs.xtags.xpath.ParseTag.doAfterBody(ParseTag.java:138)
at docs.xtags.examples.much_ado_1._jspService(much_ado_1.java:187)
at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at org.apache.tomcat.facade.ServletHandler.doService(Unknown Source)
at org.apache.tomcat.core.Handler.invoke(Unknown Source)
at org.apache.tomcat.core.Handler.service(Unknown Source)
at org.apache.tomcat.facade.ServletHandler.service(Unknown Source)
at org.apache.tomcat.core.ContextManager.internalService(Unknown Source)
at org.apache.tomcat.core.ContextManager.service(Unknown Source)
at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Unknown 
Source)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown Source)
at java.lang.Thread.run(Thread.java:484)
Nested exception:
java.io.EOFException: no more input
at org.dom4j.io.aelfred.XmlParser.popInput(XmlParser.java:3983)
at org.dom4j.io.aelfred.XmlParser.readCh(XmlParser.java:3376)
at org.dom4j.io.aelfred.XmlParser.tryRead(XmlParser.java:4060)
at org.dom4j.io.aelfred.XmlParser.tryEncodingDecl(XmlParser.java:3665)
at org.dom4j.io.aelfred.XmlParser.pushURL(XmlParser.java:3560)
at org.dom4j.io.aelfred.XmlParser.doParse(XmlParser.java:147)
at org.dom4j.io.aelfred.SAXDriver.parse(SAXDriver.java:315)
at org.dom4j.io.SAXReader.read(SAXReader.java:314)
at org.dom4j.io.SAXReader.read(SAXReader.java:249)
at org.apache.taglibs.xtags.xpath.ParseTag.doAfterBody(ParseTag.java:138)
at docs.xtags.examples.much_ado_1._jspService(much_ado_1.java:187)
at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at org.apache.tomcat.facade.ServletHandler.doService(Unknown Source)
at org.apache.tomcat.core.Handler.invoke(Unknown Source)
at org.apache.tomcat.core.Handler.service(Unknown Source)
at org.apache.tomcat.facade.ServletHandler.service(Unknown Source)
at org.apache.tomcat.core.ContextManager.internalService(Unknown Source)
at org.apache.tomcat.core.ContextManager.service(Unknown Source)
at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Unknown 
Source)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown Source)
at java.lang.Thread.run(Thread.java:484)

Lastly, I tried the much_ado example again with the jar files that ship with the
xtags distribution and it doesn't work either, but the exception is different:

javax.servlet.ServletException: Error on line 1 of document  : 
org.apache.crimson.parser/P-067 Nested exception: org.apache.crimson.parser/P-
067
at org.apache.jasper.runtime.PageContextImpl.handlePageException(Unknown Source)
at docs.xtags.examples.much_ado_1._jspService(much_ado_1.java:874)
at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at org.apache.tomcat.facade.ServletHandler.doService(Unknown Source)
at org.apache.tomcat.core.Handler.invoke(Unknown Source)
at org.apache.tomcat.core.Handler.service(Unknown Source)
at org.apache.tomcat.facade.ServletHandler.service(Unknown Source)
at org.apache.tomcat.core.ContextManager.internalService(Unknown Source)
at org.apache.tomcat.core.ContextManager.service(Unknown Source)
at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Unknown 
Source)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown Source)
at java.lang.Thread.run(Thread.java:484)
Root cause:
org.dom4j.DocumentException: Error on line 1 of document  : 
org.apache.crimson.parser/P-067 Nested exception: org.apache.crimson.parser/P-
067
at org.dom4j.io.SAXReader.read(SAXReader.java:330)
at org.dom4j.io.SAXReader.read(SAXReader.java:249)
at org.apache.taglibs.xtags.xpath.ParseTag.doAfterBody(ParseTag.java:138)
at docs.xtags.examples.much_ado_1._jspService(much_ado_1.java:187)
at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at org.apache.tomcat.facade.ServletHandler.doService(Unknown Source)
at org.apache.tomcat.core.Handler.invoke(Unknown Source)
at org.apache.tomcat.core.Handler.service(Unknown Source)
at org.apache.tomcat.facade.ServletHandler.service(Unknown Source)
at org.apache.tomcat.core.ContextManager.internalService(Unknown Source)
at org.apache.tomcat.core.ContextManager.service(Unknown Source)
at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Unknown
Source)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown Source)
at java.lang.Thread.run(Thread.java:484)
Nested exception:
org.xml.sax.SAXParseException: org.apache.crimson.parser/P-067
at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3035)
at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3023)
at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:500)
at org.apache.crimson.parser.Parser2.parse(Parser2.java:304)
at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:433)
at org.dom4j.io.SAXReader.read(SAXReader.java:314)
at org.dom4j.io.SAXReader.read(SAXReader.java:249)
at org.apache.taglibs.xtags.xpath.ParseTag.doAfterBody(ParseTag.java:138)
at docs.xtags.examples.much_ado_1._jspService(much_ado_1.java:187)
at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at org.apache.tomcat.facade.ServletHandler.doService(Unknown Source)
at org.apache.tomcat.core.Handler.invoke(Unknown Source)
at org.apache.tomcat.core.Handler.service(Unknown Source)
at org.apache.tomcat.facade.ServletHandler.service(Unknown Source)
at org.apache.tomcat.core.ContextManager.internalService(Unknown Source)
at org.apache.tomcat.core.ContextManager.service(Unknown Source)
at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Unknown
Source)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown Source)
at java.lang.Thread.run(Thread.java:484)
Comment 1 James Strachan 2001-11-11 02:07:46 UTC
I've added your test case to the XTags distribution. In the examples web 
application its here:-

test/test_richard.jsp

And it works for me perfectly in Tomcat 4.0.

Could you try it on Tomcat 4.0 and see if its just an issue with Tomcat 3.x or 
its something to do with your platform or machine setup?
Comment 2 Glenn Nielsen 2002-04-06 16:17:31 UTC
No feedback on problem for a while, closing.