Lars,

It seems that it is failing at the point where it tries to find if you've got an href attribute present in your site. Although I cannot see why it should do that.

If you're able, switch to 2.1, as it has a lot more functionality. For example, changing one option can double the speed of CLI generation. Also, I'll be more in a position to support its use, as I know it far better.

Try it, and see whether you can get your site to work.

If you're unable, are you comfortable working in a debugger? Try loading Cocoon in an IDE such as Eclipse and set a breakpoint at line 81 in ExtendedXLinkPipe, and see if you can work out what is going on there. If you do find a bug, I'll happily commit a patch.

HTH.

Regards, Upayavira

Lars Huttar wrote:

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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]







--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to