Lars Huttar wrote:

From: Alexander Schatten Sent: Wednesday, November 05, 2003 12:34 PM
To: [EMAIL PROTECTED]
Subject: Impossible CLI??



So, I am playing around for hours now, to get the CLI running to produce an example for a demonstration... seems to be, that I am far too stupid to understand the documentation:


(1) I tried using a config file; then I detected, that there seem to be various modifications of the syntax: the example on the cocoon 2.1 website does not work with my Cocoon 2.1 version, e.g. <uris> is not known... on the wiki there is an older documentation, which "works" without exception about not knowing certain elements.



I also had problems with <uri>foo.html</uri>. Instead I found that <uri attributes ... /> worked (i.e. no text content in the <uri> element).

I believe this (<uri>) is now fixed in CVS. <uris> is a new feature that allows you to process groups of uris, having independant options with each group, e.g. one that follows links, and one that doesn't. You can also describe a link with name="xxx" and then do cocoon cli -xconf cli.xconf -n xxx (I think it's -n) which will only process URIs in your <uris name="xxx"> set.

I think I've updated the docs in CVS, so if you're using CVS cocoon, but looking at the online docs, you'll not see these doc changes.

(2) I also tried to use only command line options, however; I hardly understand what the uri concept and parameters...?!


Can you say more about what you don't understand? If you don't understand it, maybe others don't and thus we need to improve the docs.

(3) I came so far with e.g. the code below the line (and the same result with commanline options), that cocoon cli starts, but with the exceptions:

"Cannot find CatalogManager.properties"


Fixed in CVS I believe.

??? and

"server.properties not found, using command line or default properties"


Not sure about that one. It isn't a problem though.

then comes:


"Opening database: /usr/java/jakarta-tomcat-5.0.9/webapps/cocoon/WEB-INF/db/cocoondb
HSQLDB server 1.7.1 is running
Use SHUTDOWN to close normally. Use [Ctrl]+[C] to abort abruptly"


That's because your Cocoon has the HSQLDB block compiled in. I use the CLI with only minimal blocks compiled, which is advisable.

and thats it; it does nothing but create two files in the work directory and waits until I terminate hsqldb with Ctrl C.


to be honest, I have no more ideas what to do?


What version of Cocoon are you running?

Are you able to rebuild with less blocks?

If not, are you able to run Cocoon in an IDE (just a Java application) and step through the code in CocoonBean to see what happens?

thank you for help!



You're welcome.

Sorry, I don't know much more than you do, but I can tell you
that your errors



"Cannot find CatalogManager.properties"

??? and

"server.properties not found, using command line or default properties"



are typical, perhaps we could say "normal", and don't indicate a problem.


Below are some notes I wrote up while trying to get CLI to
work on my machine. I did get it to work at least rudimentarily.
I hope these are of help to you.


Lars, this list is really useful. Would you be willing to add it to the CommandLine wiki page? Really, I think the web site docs should be the formal "this is what the <uris> node means" docs, but there is a really big place for this kind of "this works for me" docs too, on the Wiki.

Regards, Upayavira

Lars


- Follow directions at http://wiki.cocoondev.org/Wiki.jsp?page=CommandLine on getting CLI working. My details: - I'm using cli.xconf to specify cli configuration, rather than the command line. In the supplied cli.xconf, I changed context-dir to: <context-dir>C:\Program Files\Apache Group\Tomcat 4.1\webapps\cocoon</context-dir> and added a uri element: <uri src="test/1"/> - In the Tomcat 4.1\webapps\cocoon directory, I up test\sitemap.xmap with the following matcher: <map:match pattern="1"> <map:read src="test1.html" mime-type="text/html" /> </map:match> And added the file test\test1.html with some simple HTML in it. - Run the CLI as follows: ./cocoon.bat cli -x cli.xconf - You can apparently disregard the following errors: - Cannot find CatalogManager.properties - server.properties not found, using command line or default properties - java.sql.SQLException: The database is already in use by another process at org.hsqldb.Trace.getError(Unknown Source) ... - If there's an error with missing class ServletConfig, (in my case the process would seem to become a server and start waiting for connections), the fix is to copy lib/optional/servlet_2_2.jar to build/webapp/WEB-INF/lib/ - You can tell it worked if it reports a "Total time" and creates files in build/dest.




--------------------------------------------------------------------- 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