[jdom-interest] com.sun.java.util.collections.NoSuchElementException

Oliver Dill dillo at lethe.ch
Thu Sep 7 06:21:25 PDT 2000


Hello all

I've got a exception in the Java 1.1 environment that sounds strange
to me: I compiled a JDOM (todays cvs) build for Java 1.1 in my Java 1.2
environment and it works fine on my Win95 Box. I uploaded the build
to the webserver. My ISP runs Java 1.1.7 and has the collections.jar
installed. Now, the fellowing servlet gives a
com.sun.java.util.collections.NoSuchElementException:

<servlet>
[...]
Element root = new Element("return");
root.setText("no exception!");
Document doc = new Document(root);
XMLOutputter outputter = new XMLOutputter();
outputter.output(doc, out);
[...]
</servlet>


<Exception>
com.sun.java.util.collections.NoSuchElementException
at com.sun.java.util.collections.LinkedList.getLast(LinkedList.java:106)
at org.jdom.PartialList.addLast(PartialList.java:169)
at org.jdom.PartialList.add(PartialList.java:364)
at com.sun.java.util.collections.AbstractList.add(AbstractList.java:78)
at org.jdom.PartialList.addPartial(PartialList.java:411)
at org.jdom.PartialList.addAllPartial(PartialList.java:424)
at org.jdom.Element.getMixedContent(Element.java:621)
at org.jdom.output.XMLOutputter.printElement(XMLOutputter.java:519)
at org.jdom.output.XMLOutputter.printElement(XMLOutputter.java:502)
at org.jdom.output.XMLOutputter.output(XMLOutputter.java:329)
at helloxml.sendXMLFile(helloxml.java:172)
at helloxml.service(helloxml.java:40)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
at org.apache.jserv.JServConnection.processRequest(JServConnection.java:314)
at org.apache.jserv.JServConnection.run(JServConnection.java:188)
at java.lang.Thread.run(Thread.java)
</Exception>


Has anyone an idea what happend?

Oliver






More information about the jdom-interest mailing list