Return-Path: Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: (qmail 21930 invoked from network); 16 Apr 2004 10:52:40 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 16 Apr 2004 10:52:40 -0000 Received: (qmail 62350 invoked by uid 500); 16 Apr 2004 10:52:28 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 62329 invoked by uid 500); 16 Apr 2004 10:52:28 -0000 Mailing-List: contact users-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: users@cocoon.apache.org Delivered-To: mailing list users@cocoon.apache.org Received: (qmail 62305 invoked from network); 16 Apr 2004 10:52:27 -0000 Received: from unknown (HELO filter.it.uts.edu.au) (138.25.8.31) by daedalus.apache.org with SMTP; 16 Apr 2004 10:52:27 -0000 Received: from webmail-staff.it.uts.edu.au (squirrelmail.it.uts.edu.au [138.25.8.36]) by filter.it.uts.edu.au (Postfix) with SMTP id AC0251D62BE for ; Fri, 16 Apr 2004 20:52:26 +1000 (EST) Received: from 138.25.8.1 (SquirrelMail authenticated user nvjuliad) by webmail-staff.it.uts.edu.au with HTTP; Fri, 16 Apr 2004 20:52:26 +1000 (EST) Message-ID: <37203.138.25.8.1.1082112746.squirrel@webmail-staff.it.uts.edu.au> In-Reply-To: <55384.138.25.8.1.1082110598.squirrel@webmail-staff.it.uts.edu.au> References: <20040416061100.77869.qmail@web41502.mail.yahoo.com> <55384.138.25.8.1.1082110598.squirrel@webmail-staff.it.uts.edu.au> Date: Fri, 16 Apr 2004 20:52:26 +1000 (EST) Subject: Re: Xindice 1.1b4 (dev-sorry), Cocoon 2.1.4 (dev - sorry), Tomcat 5.019 From: "Nina Juliadotter" To: users@cocoon.apache.org Reply-To: nvjuliad@it.uts.edu.au User-Agent: SquirrelMail/1.4.2 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 Importance: Normal X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N > Thank you so much for your extensive and step-by-step reply. > > Scroll down to read on... > > >> I have this combination working on both Fedora Core 1 >> and Windows/2000 Professional. A quick step by step >> guide is given below, along with some sample >> pipelines. >> >> 1. Grab cocoon-2.1.4 and build it with either >> ./build.sh war (Linux) or build war (Windows/2000). I >> do not exclude anything. >> >> 2. Deploy the resulting war in Tomcat. I usually >> browse to the war file via the Manager Application and >> load it that way. >> >> 3. Verify that cocoon works. >> >> 4. Download Xindice 1.1b4 >> >> 5. Run either ./build.sh (Linux) or build >> (Windows/2000) to build the jar and war. >> >> 6. Note that the the resulting war file in >> $XINDICE_HOME/dist is xindice-1.1b4-dev.war. Copy >> that to xindice.war. >> >> 7. Use the Tomcat Manager Application to load the >> xindice.war file. >> >> 8. Verify that it works by browsing to >> localhost:8080/xindice/. You should get the ugly >> debug tool. >> >> 9. Now, create a collection in the database running >> under Tomcat. You can do that by using the command >> line application. The "trick" is using the correct >> URL to talk to the Tomcat-supported Xindice database. >> >> For example: >> >> xindice \ >> ac -c xmldb:xindice://localhost:8080/db -n testcol >> >> will create a new collection called testcol >> >> 10. Verify that the collection is there with both the >> command line and the ugly debug tool. The command >> line would look like: >> >> xindice \ >> lc -c xmldb:xindice://localhost:8080/db >> >> 11. Add some documents so you'll have something to >> play with. I made an entire directory of xml >> documents by creating one, the writing a Perl script >> to change some information and create a new document. >> >> 12. Add the documents to your testcol collection with >> a command like the following >> >> xindice \ >> addmultiple -c \ >> xmldb:xindice://localhost:8080/db/testcol \ >> -f data -e xml >> >> (if your documents are in the directory data and they >> end with .xml) >> >> 13. Now check that the documents made it in via the >> command line and the ugly debug tool. The command >> line looks like: >> >> xindice \ >> ld -c xmldb:xindice://localhost:8080/db/testcol >> >> 14. Shut down Cocoon using the Tomcat Manager >> Application. >> >> Now you'll need to do several things: >> >> a) Update the Cocoon jars with the jars from Xindice >> b) Modify the sitemap.xmap to activate the "user >> directory" feature for Cocoon. This is handy for >> testing. >> c) Create the appropriate public_html directory >> d) Create an appropriate sitemap.xmap file. >> >> 1. In $XINDICE_HOME/java/lib there are a bunch of jar >> files. Copy the following jar files to >> $TOMCAT_HOME/webapps/cocoon/WEB-INF/lib >> >> xml-apis.jar >> xmldb-api-20030701.jar >> xmldb-common-20030701.jar >> xmldb-xupdate-20040205.jar >> xmlrpc-1.1.jar >> >> The versions should match between your Xindice servlet >> and Cocoon. >> >> 2. In $XINDICE_HOME/dist, you'll find a jar file. >> Mine has the -dev on it since I haven't upgraded yet. >> Copy xindice-1.1b4-dev.jar to >> $TOMCAT_HOME/webapps/cocoon/WEB-INF/lib >> >> 3. In $TOMCAT_HOME/webapps/cocoon/sitemap.xmap, >> uncomment the appropriate "user directory" feature. >> For example on Fedcora Core 1 I have: >> >> >> >> > src="/home/{1}/public_html/" uri-prefix="~{1}"/> >> >> >> 4. Start up the Cocoon application using the Tomcat >> Application Manager >> >> 5. Verify that >> http://localhost:8080/cocoon/samples/xmldb/welcome >> and samples work. >> >> 6. Create your public_html directory >> >> 7. In that directory, create an xsl subdirectory. >> >> 8. Copy >> >> $TOMCAT_HOME/webapps/cocoon/samples/xmldb/xmldb2samples.xsl >> >> and >> >> $TOMCAT_HOME/webapps/cocoon/samples/common/style/xsl/html/simple-samples2html.xsl >> >> to that new subdirectory. >> >> 9. In your public_html directory, create the following >> simple sitemap.xmap >> >> >> > xmlns:map="http://apache.org/cocoon/sitemap/1.0"> >> >> >> >> >> >> >> >> > pattern="xpath"> >> > src="xmldb:xindice://localhost:8080/db/{../1}#{1}"/> >> >> > src="xsl/simple-samples2html.xsl"> >> > value="{request:contextPath}"/> >> >> >> >> > src="xmldb:xindice://localhost:8080/db/{1}"/> >> >> > src="xsl/simple-samples2html.xsl"> >> > value="{request:contextPath}"/> >> >> >> >> >> >> >> >> >> > pattern="xpath"> >> > src="xmldb:xindice://localhost:8080/db/{../1}#{1}"/> >> >> >> > src="xmldb:xindice://localhost:8080/db/{1}"/> >> >> >> >> >> >> >> >> I apologize for the ugly formatting, but you should >> get the idea. >> >> Now, browse to: >> >> http://localhost:8080/cocoon/~user/styleremote/ >> > > I'm up to here now, but have some troubles with Windows 2000 and permissions. When I > go to my url: > > http://localhost:8080/cocoon/~nvjuliad/styleremote > > I get the following error: > > Resource not found. > > org.apache.cocoon.ResourceNotFoundException: Resource not found.: > org.apache.excalibur.source.SourceNotFoundException: file:/C:/Documents and > Settings/nvjuliad/My Documents/My Website/ doesn't exist. > > cause: java.io.FileNotFoundException: \Documents and Settings\nvjuliad\My > Documents\My Website (Access is denied) > > If I move it from this location, the "(Access is denied)" bit is changed to "(The > system cannot find the path specified)", so we know it finds it, but can't get > access to it. I've right-clicked on the My Website folder and under > Properties/Sharing chosen to "Share this folder", but that didn't make any > difference. Does anyone know how to get around this? > > I changed it so that I put the content of My Website in a folder called "nina" that I put just under cocoon. Which, should be possible to access through http://localhost:8080/cocoon/nina/remote/ or http://localhost:8080/cocoon/nina/styleremote/ right? I mean, shoudn't this work now finally? But no. Using the /remote/, I get The XML page cannot be displayed Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later. -------------------------------------------------------------------------------- XML document must have a top level element. Error processing resource 'http://localhost:8080/cocoon/nina/remote/'. and when I try /styleremote/ I get a blank page. I changed the sitemap to reflect the collection, "testcol", so the src="xmldb:xindice://localhost:8080/db/{1}" snippets are now src="xmldb:xindice://localhost:8080/db/testcol/{1}". But same result. And I tried the URL with valid queries, such as http://localhost:8080/cocoon/nina/styleremote/restaurant (restaurant is the root of all my documents in testcol). Seriously, what I am doing that is so wrong? I'm a bit suspisous at the fact that xindice can be accessed in embedded mode and standalone mode, could it be that embedded mode is the default and that that's why it doesn't connect properly? >> (where ~user should be your user id), and you should >> see the same type of page that you saw for the Cocoon >> xmldb sample. The differences will be that the >> collection list will show your remote >> (Tomcat-supported) collections and the Collection >> label should be: >> >> xmldb:xindice://localhost:8080/db/. >> >> >> Please change your port number to reflect where you're >> running Tomcat. I'm using the default 8080 port. >> >> If you wish to access the stand-alone Xindice server >> running under Jetty, do the following: >> >> 1. Start up xindice with xindice start >> >> 2. Change port references in your >> public_html/sitemap.xmap from 8080 to 8888, which is >> the new default port for Xindice running under Jetty. >> >> I am in the process of learning enough >> Woody/Flowscript so that I can bind a form to a >> verified XML document and then stuff that into >> Xindice. I haven't gotten that far yet, but I hope to >> get around to it again next week. >> >> I realize that this is a bit long, but I hope it >> helps. I have not addressed an embedded Xindice in >> this mail message. I have it working as well, but I >> am not happy with the way I have to do this. >> >> You actually have to set a -Dxindice.configuration in >> catalina.sh (or modify the Windows/2000 registry) in >> order to tell Tomcat and Cocoon where to find >> system.xml. I would hope that I could have multiple >> embedded Xindice databases specified by multiple >> system.xml files . . . but I'm not sure how to >> accomplish that. >> > > How do I actually do this? I mean, trying to execute -Dxindice.configuration in > Windows commandline doesn't work. I had a look at the registry ("regedit"), but > wouldn't know what to do where or how. I'm not very good with these things in > Windows. > >> Hope this helps. >> >> /mde/ >> just my two cents . . . . >> >> >> >> >> >> __________________________________ >> Do you Yahoo!? >> Yahoo! Tax Center - File online by April 15th >> http://taxes.yahoo.com/filing.html >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org >> For additional commands, e-mail: users-help@cocoon.apache.org >> > > Thanks so much for the help, > Nina > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org > For additional commands, e-mail: users-help@cocoon.apache.org > Cheers, Nina --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org For additional commands, e-mail: users-help@cocoon.apache.org