Upayavira,
I think I'm getting closer ;). As you suggested, I downloaded Cocoon from
CVS. I figured I'd start just by seeing if I could generate the
webapp/welcome.xml page so I did
./cocoon.sh cli -x cli.xconf build/webapp/welcome.xml
I got "ERROR: Unexpected children of <logging> node" and then "Cannot find
CatalogManager.properties", though it did seem to load
WEB-INF/entities/catalog.
The brokenlinks.xml file contained "<link message="UnnamedSelector:
ComponentSelector could not find the component for hint [request] (key
[request])">build/webapp/welcome.xml</link>". Does this refer to
webapp/sitemap.xmap?
Here is my cli.xconf file below. Thank you for any corrections you (or
anyone experienced with the CLI) can offer.
Steve
<?xml version="1.0"?>
<!--+
| This is the Apache Cocoon command line configuration file.
| Here you give the command line interface details of where
| to find various aspects of your Cocoon installation.
|
| If you wish, you can also use this file to specify the URIs
| that you wish to generate.
|
| The current configuration information in this file is for
| building the Cocoon documentation. Therefore, all links here
| are relative to the build context dir, which, in the build.xml
| file, is set to ${build.context}
|
| Options:
| verbose: increase amount of information presented
| to standard output (default: false)
| follow-links: whether linked pages should also be
| generated (default: true)
| precompile-only: precompile sitemaps and XSP pages, but
| do not generate any pages (default: false)
| confirm-extensions: check the mime type for the generated page
| and adjust filename and links extensions
| to match the mime type
| (e.g. text/html->.html)
|
| CVS: $Id: cli.xconf,v 1.3 2003/06/07 23:13:35 vgritsenko Exp $
+-->
<cocoon verbose="true"
follow-links="true"
precompile-only="false"
confirm-extensions="false">
<!--+
| Broken link reporting options:
| Report into a text file, one link per line:
| <broken-links type="text" report="filename"/>
| Report into an XML file:
| <broken-links type="xml" report="filename"/>
| Ignore broken links (default):
| <broken-links type="none"/>
| When a page includes an error, should a page be generated?
|
| Two attributes to this node specify whether a page should
| be generated when an error occured. 'generate' specifies
| whether a page should be generated (default: true) and
| extension specifies an extension that should be appended
| to the generated page's filename (default: none)
| <broken-links generate="true" extension=".error.txt"/>
|
+-->
<broken-links type="xml"
file="build/webapp/temp/brokenlinks.xml"
generate="false"
extension=".error"/>
<!--+
| Load classes at startup. This is necessary for generating
| from sites that use SQL databases and JDBC.
| The <load-class> element can be repeated if multiple classes
| are needed.
+-->
<!--
<load-class>org.firebirdsql.jdbc.Driver</load-class>
-->
<!--+
|
+-->
<logging log-kit="build/webapp/WEB-INF/logkit.xconf" logger="cli"
level="ERROR" />
<!--+
| The context directory is usually the webapp directory
| containing the sitemap.xmap file.
|
| The config file is the cocoon.xconf file.
|
| The work directory is used by Cocoon to store temporary
| files and cache files.
|
| The destination directory is where generated pages will
| be written (assuming the 'simple' mapper is used)
+-->
<context-dir>build/webapp</context-dir>
<config-file>build/webapp/docs/cocoon.xconf</config-file>
<work-dir>build/webapp/temp</work-dir>
<dest-dir>build/webapp/done</dest-dir>
<!--+
| Specifies the filename to be appended to URIs that
| refer to a directory (i.e. end with a forward slash).
+-->
<default-filename>index.html</default-filename>
<!--+
| Specifies a user agent string to the sitemap when
| generating the site.
+-->
<!--
<user-agent>xxx</user-agent>
-->
<!--+
| Specifies an accept string to the sitemap when generating
| the site.
+-->
<accept>*/*</accept>
<!--+
| Specifies the URIs that should be generated (using <uri>
| elements, and (if necessary) what should be done with the
| generated pages.
|
| The old behaviour - appends uri to the specified destination
| directory (as specified in <dest-dir>):
|
| <uri>documents/index.html</uri>
|
| Append: append the generated page's URI to the end of the
| source URI:
|
| <uri type="append" src-prefix="documents/" src="index.html"
| dest="build/dest/"/>
|
| Replace: Completely ignore the generated page's URI - just
| use the destination URI:
|
| <uri type="replace" src-prefix="documents/" src="index.html"
| dest="build/dest/docs.html"/>
|
| Insert: Insert generated page's URI into the destination
| URI at the point marked with a * (example uses fictional
| zip protocol)
|
| <uri type="insert" src-prefix="documents/" src="index.html"
| dest="zip://*.zip/page.html"/>
|
+-->
<uri>build/webapp/welcome.xml</uri>
<!--+
| File containing URIs (plain text, one per
| line).
+-->
<!--
<uri-file></uri-file>
-->
</cocoon>
On 7/18/03 11:50 AM, "Upayavira" <[EMAIL PROTECTED]> wrote:
> Steven,
>
>> Hello Joerg,
>> Thank you for your response and help. I got the
>> cocoon-2.1_20030718045249
>> CVS and built it. But I am still having problems...
>
> Hmm. Is that late enough to catch Joerg's fix? (Thanks Joerg, I'd spotted
> that, but didn't know how to fix it).
>
> Alternatively, download Cocoon direct from CVS. Directions are at:
>
> http://cocoon.apache.org/community/contrib.html#CVS+Usage+Precis
>
>> I do ./cocoon.sh cli -x cli.xconf (I had mistyped this as -x cocoon.xconf
>> in my previous email)
>>
>> Now, after the .jars load, I get this error, "ERROR: Unexpected children
>> of <logging> node", followed by
>
> Can you post the contents of your cli.xconf file? Then we can have a look
> at what is going on there.
>
>> FATAL_E 2003-07-18 09:54:59.335 [ ] (): Please, specify at least
>> one
>> starting URI.
>
> You need to specify a page to start at, using a <uri> node.
>
> Regards, Upayavira
>
>> Exception in thread "main" java.lang.reflect.InvocationTargetException
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
>> )
>> at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
>> .java:25)
>> at java.lang.reflect.Method.invoke(Method.java:324)
>> at Loader.invokeMain(Unknown Source)
>> at Loader.run(Unknown Source)
>> at Loader.main(Unknown Source)
>> Caused by: org.apache.cocoon.ProcessingException: Please, specify at
>> least
>> one starting URI.
>> at
>> org.apache.cocoon.bean.CocoonBean.initialize(CocoonBean.java:179)
>> at org.apache.cocoon.Main.main(Main.java:374)
>> ... 7 more
>>
>> So I try specifying a URI on the command line by doing ./cocoon.sh cli
>> build/webapp/test/samples.xml -x cli.xconf
>>
>> After the .jars load, I now get this error, "ERROR: Unexpected children
>> of
>> <logging> node" with the following
>>
>> Cannot find CatalogManager.properties
>> server.properties not found, using command line or default properties
>> Opening database: /Users/steven/Library/Cocoon/WEB-INF/db/cocoondb
>> HSQLDB server 1.7.1 is running
>> Use SHUTDOWN to close normally. Use [Ctrl]+[C] to abort abruptly
>> Exception in thread "main" java.lang.reflect.InvocationTargetException
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
>> )
>> at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
>> .java:25)
>> at java.lang.reflect.Method.invoke(Method.java:324)
>> at Loader.invokeMain(Unknown Source)
>> at Loader.run(Unknown Source)
>> at Loader.main(Unknown Source)
>> Caused by: java.lang.NoClassDefFoundError:
>> javax/servlet/http/HttpSessionBindingListener
>> at java.lang.ClassLoader.defineClass0(Native Method)
>> at java.lang.ClassLoader.defineClass(ClassLoader.java:502)
>> at
>> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
>> at java.net.URLClassLoader.defineClass(URLClassLoader.java:250)
>> at java.net.URLClassLoader.access$100(URLClassLoader.java:54)
>> at java.net.URLClassLoader$1.run(URLClassLoader.java:193)
>> at java.security.AccessController.doPrivileged(Native Method)
>> at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
>> at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
>> at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
>> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
>> at java.lang.ClassLoader.defineClass0(Native Method)
>> at java.lang.ClassLoader.defineClass(ClassLoader.java:502)
>> at
>> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
>> at java.net.URLClassLoader.defineClass(URLClassLoader.java:250)
>> at java.net.URLClassLoader.access$100(URLClassLoader.java:54)
>> at java.net.URLClassLoader$1.run(URLClassLoader.java:193)
>> at java.security.AccessController.doPrivileged(Native Method)
>> at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
>> at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
>> at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
>> at
>> org.apache.avalon.excalibur.component.ExcaliburComponentSelector.configure(E
>> xcaliburComponentSelector.java:404)
>> at
>> org.apache.avalon.framework.container.ContainerUtil.configure(ContainerUtil.
>> java:239)
>> at
>> org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(De
>> faultComponentFactory.java:315)
>> at
>> org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.initialize(
>> ThreadSafeComponentHandler.java:141)
>> at
>> org.apache.avalon.excalibur.component.ExcaliburComponentManager.initialize(E
>> xcaliburComponentManager.java:554)
>> at
>> org.apache.cocoon.components.CocoonComponentManager.initialize(CocoonCompone
>> ntManager.java:530)
>> at
>> org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil
>> .java:282)
>> at org.apache.cocoon.Cocoon.initialize(Cocoon.java:321)
>> at
>> org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil
>> .java:282)
>> at
>> org.apache.cocoon.bean.CocoonBean.initialize(CocoonBean.java:237)
>> at org.apache.cocoon.Main.main(Main.java:374)
>> ... 7 more
>> Fri Jul 18 09:50:54 PDT 2003 Listening for connections ...
>>
>> I tend to assume the problem is with me because I am a newbie, but I
>> believe
>> I have the settings correct in my cli.xconf file (perhaps I should post
>> it?). Any ideas on what could be going wrong?
>>
>> Thank you,
>> Steve
>>
>>
>>
>>
>> On 7/17/03 10:03 PM, "Joerg Heinicke" <[EMAIL PROTECTED]> wrote:
>>
>>> Hello Steven,
>>>
>>> this was a bug in the CocoonBean. The logger was used before it was
>>> initialized. I have fixed it in the CVS.
>>>
>>> This happened only if you should get an error before initializing the
>>> logger. In your case (line 178) you should have seen this error:
>>> "Please, specify at least one starting URI."
>>>
>>> If you use current CVS, your won't get the NPE.
>>>
>>> Thanks for reporting.
>>>
>>> Joerg
>>>
>>> Steven Kurzman wrote:
>>>> Hello,
>>>> I'm having problems using the command line interface and hope somebody can
>>>> help me out. I don't know Java and am very new to Cocoon, using 2.1m3 and
>>>> Tomcat 4.1.24 on Mac OS 10.2.
>>>>
>>>> I read the instructions at wiki.cocoondev.org/Wiki.jsp?page=CommandLine
>>>> and,
>>>> from my /Cocoon/build/webapp directory containing both a cocoon.xconf and
>>>> sitemap.xmap, did
>>>>
>>>> ./cocoon.sh cli -x cocoon.xconf
>>>>
>>>> It loads all the .jar files from WEB-INF/lib but then gives me
>>>>
>>>> -------------------- Executing -----------------
>>>> Main Class: org.apache.cocoon.Main
>>>> ERROR: Unknown element: sitemap
>>>> ------------------------------------------------------------------------
>>>> cocoon 2.1m3
>>>> Copyright (c) 1999-2003 Apache Software Foundation. All rights reserved.
>>>> ------------------------------------------------------------------------
>>>>
>>>>
>>>> Exception in thread "main" java.lang.reflect.InvocationTargetException
>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>> at
>>>>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:3>>>>
9
>>>> )
>>>> at
>>>>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp>>>>
l
>>>> .java:25)
>>>> at java.lang.reflect.Method.invoke(Method.java:324)
>>>> at Loader.invokeMain(Unknown Source)
>>>> at Loader.run(Unknown Source)
>>>> at Loader.main(Unknown Source)
>>>> Caused by: java.lang.NullPointerException
>>>> at
>>>> org.apache.cocoon.bean.CocoonBean.initialize(CocoonBean.java:178)
>>>> at org.apache.cocoon.Main.main(Main.java:374)
>>>> ... 7 more
>>>>
>>>> I've tried variations on the ./cocoon.sh command, editing the cli.xconf
>>>> file, etc., but always get this exception.
>>>>
>>>> What does this mean? What am I doing wrong? How can I do it correctly?
>>>> Thank you very much for any help!
>>>>
>>>> Steve Kurzman
>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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]
>>
>>
>
> ---------------------------------------------------------------------
> 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]