You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Birgit Kreß <kr...@gmx.de> on 2003/10/10 15:43:31 UTC
Cocoon and CLI
Hello,
I´m a new bie with Cocoon and command line interface. I already studied some
postings by Steve Kurzman from Fri, 18 Jul 2003 18:50:05, who had similar
problems but it couldn´t resolve my problem.
I downloaded cocoon-2.1.1 and use JDK 1.4.1. First I copied following three
files in \cocoon-2.1.2\lib\local then I started to build cocoon.
xercesImpl-2.5.0.jar
xercesImpl-2.5.0.jar
xml-apis.jar
I tried following command:
cocoon cli -x \cocoon-2.1.2\build\webapp\WEB-INF\cli.xconf
-C \cocoon-2.1.2\build\webapp\WEB-INF\cocoon.xconf
-k \cocoon-2.1.2\build\webapp\WEB-INF\logkit.xconf
-d \html_pdf
\html_pdf\pageOne.html
But I got this error-message:
cocoon.bat: using .\build\webapp as the webapp directory
-------------------- Loading --------------------
Processing repository: .\build\webapp\WEB-INF\lib
Adding jar: .\build\webapp\WEB-INF\lib\altrmi-common-0.9.2.jar
(.jar files)
Adding jar: .\build\webapp\WEB-INF\lib\xreporter-expression-20030725.jar
-------------------- Executing -----------------
Main Class: org.apache.cocoon.Main
ERROR: Unexpected children of <uri> node
------------------------------------------------------------------------
cocoon 2.1.2
Copyright (c) 1999-2003 Apache Software Foundation. All rights reserved.
------------------------------------------------------------------------
Cannot find CatalogManager.properties
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)server.properties not found, using c
ommand line or default properties
Opening database: C:\Programme\cocoonTest\cocoon-2.1.2\WEB-INF\db\cocoondb
HSQLDB server 1.7.1 is running
Use SHUTDOWN to close normally. Use [Ctrl]+[C] to abort abruptly
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(ExcaliburComponentSelector.java:404)
at
org.apache.avalon.framework.container.ContainerUtil.configure(ContainerUtil.java:239)
at
org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(DefaultComponentFactory.java:315)
at
org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.initialize(ThreadSafeComponentHandler.java:141)
at
org.apache.avalon.excalibur.component.ExcaliburComponentManager.initialize(ExcaliburComponentManager.java:554)
at
org.apache.cocoon.components.CocoonComponentManager.initialize(CocoonComponentManager.java:530)
at
org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil.java:282)
at org.apache.cocoon.Cocoon.initialize(Cocoon.java:327)
at
org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil.java:282)
at
org.apache.cocoon.bean.CocoonWrapper.initialize(CocoonWrapper.java:185)
at org.apache.cocoon.bean.CocoonBean.initialize(CocoonBean.java:119)
at org.apache.cocoon.Main.main(Main.java:400)
... 7 more
Fri Oct 10 14:19:18 CEST 2003 Listening for connections ...
What does Listening for connections mean?
This is my cli.xconf where I changed the uri file.
cli.xconf
<?xml version="1.0"?>
<cocoon verbose="true"
follow-links="true"
precompile-only="false"
confirm-extensions="false">
<broken-links type="xml"
file="brokenlinks.xml"
generate="false"
extension=".error"/>
<logging log-kit="WEB-INF/logkit.xconf" logger="cli" level="ERROR" />
<context-dir>.</context-dir>
<config-file>WEB-INF/cocoon.xconf</config-file>
<work-dir>work/docs</work-dir>
<dest-dir>dest</dest-dir>
<default-filename>index.html</default-filename>
<accept>*/*</accept>
<uri>favicon.ico</uri>
<!-- <uri type="append" src-prefix="documents/" src="index.html"
dest="docs/"/> -->
<uri type="append" src-prefix="html/" src="pageOne.html"
dest="html_pdf/"/>
</cocoon>
What I´m doing wrong?
Is that the right call to open the html-file via an xml-file which is
transformed with the .xmap and .xsl-file.
\html_pdf\pageOne.html
I hope someone can help me and thank you very much for any help.
Birgit
--
NEU FÜR ALLE - GMX MediaCenter - für Fotos, Musik, Dateien...
Fotoalbum, File Sharing, MMS, Multimedia-Gruß, GMX FotoService
Jetzt kostenlos anmelden unter http://www.gmx.net
+++ GMX - die erste Adresse für Mail, Message, More! +++
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Cocoon and CLI
Posted by Upayavira <uv...@upaya.co.uk>.
Birgit Kreß wrote:
>Hello,
>
>I´m a new bie with Cocoon and command line interface. I already studied some
>postings by Steve Kurzman from Fri, 18 Jul 2003 18:50:05, who had similar
>problems but it couldn´t resolve my problem.
>
>I downloaded cocoon-2.1.1 and use JDK 1.4.1. First I copied following three
>files in \cocoon-2.1.2\lib\local then I started to build cocoon.
>
>xercesImpl-2.5.0.jar
>xercesImpl-2.5.0.jar
>xml-apis.jar
>
>
You shouldn't need to do anything with these. I don't and it works for me.
>I tried following command:
>
>cocoon cli -x \cocoon-2.1.2\build\webapp\WEB-INF\cli.xconf
>-C \cocoon-2.1.2\build\webapp\WEB-INF\cocoon.xconf
>-k \cocoon-2.1.2\build\webapp\WEB-INF\logkit.xconf
>-d \html_pdf
>\html_pdf\pageOne.html
>
>
I'd recommend placing the details of the URIs you want to generate, etc,
directly into the cli.xconf (or a copy)
Can you try:
cd \cocoon-2.1.2\
cocoon cli -x cli.xconf
and see what happens?
Listening for connections is caused by the HSQL block being included in
your build.
The unexpected children of the <uri> node shouldn't be there. I cannot
understand why you should get that. Try what I've described and let me
know how that goes.
Regards, Upayavira
>But I got this error-message:
>
>cocoon.bat: using .\build\webapp as the webapp directory
>-------------------- Loading --------------------
>Processing repository: .\build\webapp\WEB-INF\lib
>Adding jar: .\build\webapp\WEB-INF\lib\altrmi-common-0.9.2.jar
> ……
> …… (.jar files)
> ……
>Adding jar: .\build\webapp\WEB-INF\lib\xreporter-expression-20030725.jar
>-------------------- Executing -----------------
>Main Class: org.apache.cocoon.Main
>ERROR: Unexpected children of <uri> node
>------------------------------------------------------------------------
>cocoon 2.1.2
>Copyright (c) 1999-2003 Apache Software Foundation. All rights reserved.
>------------------------------------------------------------------------
>
>
>Cannot find CatalogManager.properties
>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)server.properties not found, using c
>ommand line or default properties
>Opening database: C:\Programme\cocoonTest\cocoon-2.1.2\WEB-INF\db\cocoondb
>HSQLDB server 1.7.1 is running
>Use SHUTDOWN to close normally. Use [Ctrl]+[C] to abort abruptly
>
> 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(ExcaliburComponentSelector.java:404)
> at
>org.apache.avalon.framework.container.ContainerUtil.configure(ContainerUtil.java:239)
> at
>org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(DefaultComponentFactory.java:315)
> at
>org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.initialize(ThreadSafeComponentHandler.java:141)
> at
>org.apache.avalon.excalibur.component.ExcaliburComponentManager.initialize(ExcaliburComponentManager.java:554)
> at
>org.apache.cocoon.components.CocoonComponentManager.initialize(CocoonComponentManager.java:530)
> at
>org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil.java:282)
> at org.apache.cocoon.Cocoon.initialize(Cocoon.java:327)
> at
>org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil.java:282)
> at
>org.apache.cocoon.bean.CocoonWrapper.initialize(CocoonWrapper.java:185)
> at org.apache.cocoon.bean.CocoonBean.initialize(CocoonBean.java:119)
> at org.apache.cocoon.Main.main(Main.java:400)
> ... 7 more
>Fri Oct 10 14:19:18 CEST 2003 Listening for connections ...
>
>What does “Listening for connections” mean?
>
>This is my cli.xconf where I changed the uri file.
>
>cli.xconf
>
><?xml version="1.0"?>
>
><cocoon verbose="true"
> follow-links="true"
> precompile-only="false"
> confirm-extensions="false">
>
> <broken-links type="xml"
> file="brokenlinks.xml"
> generate="false"
> extension=".error"/>
>
><logging log-kit="WEB-INF/logkit.xconf" logger="cli" level="ERROR" />
>
> <context-dir>.</context-dir>
> <config-file>WEB-INF/cocoon.xconf</config-file>
> <work-dir>work/docs</work-dir>
> <dest-dir>dest</dest-dir>
>
> <default-filename>index.html</default-filename>
>
> <accept>*/*</accept>
>
> <uri>favicon.ico</uri>
> <!-- <uri type="append" src-prefix="documents/" src="index.html"
>dest="docs/"/> -->
> <uri type="append" src-prefix="html/" src="pageOne.html"
>dest="html_pdf/"/>
>
></cocoon>
>
>What I´m doing wrong?
>Is that the right call to open the html-file via an xml-file which is
>transformed with the .xmap and .xsl-file.
>
>\html_pdf\pageOne.html
>
>I hope someone can help me and thank you very much for any help.
>
>Birgit
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Cocoon and CLI
Posted by Upayavira <uv...@upaya.co.uk>.
Lars Huttar wrote:
>Hello Birgit,
>
>
>
>>But I got this error-message:
>>
>>
>...
>
>
>>-------------------- Executing -----------------
>>Main Class: org.apache.cocoon.Main
>>ERROR: Unexpected children of <uri> node
>>--------------------------------------------------------------
>>
>>
>
>
>
>>This is my cli.xconf where I changed the uri file.
>>
>>
>>
>...
>
>
>
>> <uri>favicon.ico</uri>
>> <!-- <uri type="append" src-prefix="documents/" src="index.html"
>>dest="docs/"/> -->
>> <uri type="append" src-prefix="html/" src="pageOne.html"
>>dest="html_pdf/"/>
>>
>>
>
>It looks to me like for the last <uri>, you have the URI in the src=""
>attribute, which is probably correct. But in the first <uri>, you have
>the URI ("favicon.ico") as the content of the <uri> element.
>Is that really what you want?
>If this is a mistake, that would explain the error message: "favicon.ico"
>is a text node child of <uri>, which is unexpected.
>
>I'm just guessing since I don't know anything about cli.xconf, but
>that seems like a reasonable possibility.
>
>
Lars, Birgit,
You are correct. I thought I had a <uri>favicon.ico</uri> line in my
cli.xconf, but I don't, which explains why I wasn't seeing this error.
Anyway, in 2.1 CVS, this is now fixed. To work around it without using
CVS version, remove the <uri>favicon.ico</uri>, and always use <uri>
nodes with attributes only, not text content.
Regards, Upayavira
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
RE: Cocoon and CLI
Posted by Lars Huttar <la...@sil.org>.
Hello Birgit,
> But I got this error-message:
...
> -------------------- Executing -----------------
> Main Class: org.apache.cocoon.Main
> ERROR: Unexpected children of <uri> node
> --------------------------------------------------------------
> This is my cli.xconf where I changed the uri file.
>
...
> <uri>favicon.ico</uri>
> <!-- <uri type="append" src-prefix="documents/" src="index.html"
> dest="docs/"/> -->
> <uri type="append" src-prefix="html/" src="pageOne.html"
> dest="html_pdf/"/>
It looks to me like for the last <uri>, you have the URI in the src=""
attribute, which is probably correct. But in the first <uri>, you have
the URI ("favicon.ico") as the content of the <uri> element.
Is that really what you want?
If this is a mistake, that would explain the error message: "favicon.ico"
is a text node child of <uri>, which is unexpected.
I'm just guessing since I don't know anything about cli.xconf, but
that seems like a reasonable possibility.
Lars
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org