cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lars Huttar" <lars_hut...@sil.org>
Subject NullPointerException in JTidy or HTMLGenerator
Date Sat, 11 Oct 2003 01:27:40 GMT
Dear Cocooners,

I'm trying to get the CLI working to generate static web sites.
We're using Cocoon v. 2.0.5-dev (mistake?).
Things seem to fail in HTMLGenerator and/or jtidy; no static
content gets generated. Anybody know of a fix?

I've got a batch file running, run.bat, to start the CLI.

My command line is:
$ ./run.bat -c . -C WEB-INF/cocoon.xconf -d tmp -f urlfile.txt > CLI-out.txt

I get a java.sql.SQLException saying the database is already in use by
another process, but I assume I can ignore that since I'm not using any
database.

urlfile.txt contains one URL, "mount/gem/workbench/About/Home", which
works fine when I use it from a browser to connect to Cocoon.

Looking at the debug output in CLI.txt, it seems that the URL is getting
interpreted right by the sitemap, but at some point the process crashes
with a NullPointerException in org.apache.xml.utils.AttList.getValue(AttList.java:247)
which is being called by HTMLGenerator.  Here's the error message in context
(for the entire debug output, see http://www.huttar.net/lars-kathy/tmp/CLI-out.txt
[0.5MB]).

========================= excerpt from CLI-out.txt =======================
...
DEBUG   2003-10-10 19:29:08.472 [core.sou] (): Resolving 'about/Home.htm' in context
'file:/c:/Program Files/Apache Group/Tomcat 4.1/webapps/cocoon/mount/gem/'
DEBUG   2003-10-10 19:29:08.472 [core.sou] (): Resolved to 'file:/c:/Program Files/Apache
Group/Tomcat 4.1/webapps/cocoon/mount/gem/about/Home.htm'
DEBUG   2003-10-10 19:29:08.472 [        ] (): Resolved to 'cocoon://mount/gem/About/Home'
DEBUG   2003-10-10 19:29:08.472 [core.sto] (): NOT Found key: PK_G-html--1160095671642672732_
DEBUG   2003-10-10 19:29:08.472 [core.sto] (): NOT Found file: PK_G-html--1160095671642672732_
DEBUG   2003-10-10 19:29:08.472 [core.eve] (): Caching content for further requests of
'About/Home'.
DEBUG   2003-10-10 19:29:08.472 [manager ] (): Got a
org.apache.cocoon.components.sax.XMLByteStreamCompiler from the pool.
WARN    2003-10-10 19:29:08.713 [sitemap ] ():
Tidy (vers 4th August 2000) Parsing "InputStream"
line 2 column 1 - Warning: inserting missing 'title' element

InputStream: Document content looks like HTML 2.0
1 warnings/errors were found!

***********vvvv********** Here it is **********vvvv*******
ERROR   2003-10-10 19:29:08.723 [sitemap ] (): Could not setup jtidy
java.lang.NullPointerException
	at org.apache.xml.utils.AttList.getValue(AttList.java:247)
	at org.apache.cocoon.xml.xlink.ExtendedXLinkPipe.startElement(ExtendedXLinkPipe.java:81)
	at org.apache.cocoon.components.sax.XMLTeePipe.startElement(XMLTeePipe.java:118)
	at
org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1017
)
	at org.apache.xml.utils.TreeWalker.startNode(TreeWalker.java:346)
[...snip...]
	at org.apache.cocoon.xml.dom.DOMStreamer.stream(DOMStreamer.java:176)
	at org.apache.cocoon.generation.HTMLGenerator.generate(HTMLGenerator.java:284)
	at
org.apache.cocoon.components.pipeline.CachingEventPipeline.process(CachingEventPipeline.java:262)
[...snip...]
	at org.apache.cocoon.Main.processURI(Main.java:690)
	at org.apache.cocoon.Main.process(Main.java:566)
	at org.apache.cocoon.Main.main(Main.java:384)
DEBUG   2003-10-10 19:29:08.733 [manager ] (): Put a
org.apache.cocoon.components.sax.XMLByteStreamCompiler back into the pool.
DEBUG   2003-10-10 19:29:08.733 [core.eve] (): Recycling of CachingEventPipeline
...
============================== end of excerpt =========================


I checked the destination directory, ./tmp, and it was empty.
Nothing got generated.
Any ideas?

Surely the whole process isn't crashing just because my HTML lacks
a <title> element? (No, actually I went back just now and added a title
element to that web page, and got rid of the title element warning,
but still have the same jtidy error and NullPointerException.)

The relevant sitemap, mount/gem/sitemap.xmap, can be perused at
http://www.huttar.net/lars-kathy/tmp/sitemap.xmap
The HTML file being accessed, Home.htm, is in the same directory.

Thanks for any help!

Lars


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message