I'm trying to fill in the gaps in the documentation of the procedure for bringing up Cocoon. I'm doing this under a virgin installation of Red Hat 7.2 (enigma) with Apache 1.3, IBM Java2, and Tomcat4 (4.0.2). I'm sticking with RPMs as far as possible for the underlying support.
(I previously had Cocoon 1 running very happily under RH6.2/Apache/JServ/Xerces/Xalan for about a year, and I have brought up Cocoon 1 under W2K for a client on several machines, so I hadn't reckoned on this being as difficult as it turns out.) It's not clear if this is a tomcat or a cocoon problem, or a bit of both, but it's obviously fairly major, so I'm posting to both user lists. On Wed, 23 Jan 2002 18:21:21 -0800, Vadim Gritsenko wrote > Some more comments to follow Roger's email: > > I tried Cocoon binary download ... and it worked. Assuming that you > have: > > 1. Servlet engine - Tomcat 4.0, Tomcat 3.3, or Resin 2.0.4 > 2. Windows machine or *NIX with X running (it is the case for the > development machine, isn't it?) OK, both of these are fine, but the Tomcat default is port 8180 (undocumented). I installed (in order): IBMJava2-SDK-1.3-10.0 regexp-1.2-1 servletapi4-4.0.2-1 xerces-j-1.4.4-1 xerces-j-demo-1.4.4-1 tomcat4-4.0.2-1 tomcat4-webapps-4.0.2-1 and edited the /etc/tomcat4/conf/tomcat4.conf for the location of IBM's Java (didn't need changing). Also undocumented is the fact that the RPMs omit the startup.sh script and the tomcat4 binary by that name, and instead include /etc/rc.d/rc5.d/S80tomcat4 and /bin/dtomcat4. But it appears to start up without error, and the tomcat page appears at http://localhost:8180 just fine. So I unwrapped cocoon-2.0.1-bin.tar.gz and copied cocoon.war to /var/tomcat4/webapps, and stopped and restarted tomcat4. > You have to just drop pre-compiled cocoon.war, and it will work out of > the box as soon as container recognizes it (usually, restart is > required). This is the problem. It's unrecognised. Trying to access http://localhost:8180/cocoon gets me: Apache Tomcat/4.0.2 - HTTP Status 404 - /cocoon type Status report message /cocoon description The requested resource (/cocoon) is not available. Cocoon.war is still sitting there in /var/tomcat4/webapps and nothing I can find to do will persuade tomcat to recognise it or do anything with it. From what I can glean from the docs, something (tomcat?) is supposed to open up cocoon.war and compile something out of it the first time tomcat is restarted. Presumably this means the simple presence of cocoon.war in /var/tomcat4/webapps is supposed to be enough to trigger tomcat into doing something with it? If so, something looks to be broken or hasn't been adequately documented. > But: You may run into a problem if: > 1. You do not have X (or never heard of it ;) XFree86 is running. > 2. You do not have Xvfb (or never heard of it) I didn't have it, but I do now (XFree86-Xvfb-4.1.0-3). Stopped and restarted tomcat4 but cocoon still inactive as before. > 3. You never heard of PJA and you do not know how to install it. Certainly, but it gets no mention in the docs. But it seems to be for headless systems, and I'm running X. > 4. You run Cocoon 2-nd, 3-rd, n-th time and see exception thrown by > HSQLDB (which was not there at the first run) Can't run cocoon because tomcat says it doesn't know about it (as above). > 5. You want to remove SVG stuff completely SVG? What's SVG got to do with it? (Yes I know what SVG is, but I don't see its relevance here.) > 6. You upgraded Cocoon and it stopped working Nope, fresh install. > Some of these situations are covered in the installation doc and in the > FAQ, others I will try to cover here: > 3: PJA installation instructions (as it was reported by some users) have > flaws; it was recommended to use installation instructions provided on > PJA site. There are no installation instruction on http://www.eteks.com/pja/en/ but I'm assuming that I don't need it as I run X. > I hope I covered here 80 to 90% of the newbie problems here. Mine is obviously one of the 10-20% but it seems more critical. An earlier user (Roger?) wrote: > > how to use it, all in one huge example webapp (much beyond a > > typical "Hello World!" example). Your starting point is getting > > this one huge example web app to deploy once or twice on tomcat by > > placing the cocoon.war file in the webapps folder of tomcat. Once or twice? Getting it to run once would be nice :-) > > The "as is" Cocoon installation either works or it doesn't. There > > is nothing you can do right or wrong. This needs some expansion. If it's shipped wrongly configured, perhaps it would be better not to ship it at all, but make people build it. > > Just copy the cocoon.war to the %TOMCAT_HOME%\webapps yourself. > > Fire tomcat up. It either works or you got a bum revision or copy :-) Won't be the first time... > > of Cocoon.war. If it doesn't work the second time you fire it up, > > delete the generated ...tomcat/work/localhost/cocoon and the > > ...tomcat/webapps/cocoon folders so that it has to deploy from the > > cocoon.war file again. Ain't no such animal: # ls -l /var/tomcat4/work/localhost/ total 20 drwxr-xr-x 2 tomcat4 tomcat4 4096 Feb 15 14:57 _ drwxr-xr-x 3 tomcat4 tomcat4 4096 Feb 15 14:57 examples drwxr-xr-x 2 tomcat4 tomcat4 4096 Feb 15 14:57 manager drwxr-xr-x 2 tomcat4 tomcat4 4096 Feb 15 14:57 tomcat-docs drwxr-xr-x 2 tomcat4 tomcat4 4096 Feb 15 14:57 webdav # > > May have to do this repeatedly until you rebuild cocoon.war > > without hsqldb active or start making your own webapp project > > (deployed through your own *.war file). The problem is with the > > hsqldb database example has a bug while shutting down. The problem is that tomcat4 won't recognise the cocoon.war file. ================================================================ OK, so I grab the source and remake cocoon.war with the install option (who distributed build.sh without making it executable? :-) > > The sooner that you rebuild cocoon from its sources with > > <hsqldb-server class="org.apache.cocoon.components.hsqldb.ServerImpl" > > logger="core.hsqldb-server" > > pool-max="1" pool-min="1"> > > <parameter name="port" value="9002"/> > > <parameter name="silent" value="true"/> > > <parameter name="trace" value="false"/> > > </hsqldb-server> > > commented out in the src/webapp/cocoon.xconf file, the better. Not possible. This element does not occur in the distribution file src/webapp/cocoon.xconf. I don't know what HSQLDB is, although it's obviously something SQLly. No luck: the build went fine but the newly created cocoon.war in /var/tomcat/webapps is still ignored after tomcat restart. > > The important thing is to get past flopping around in this one > > huge example webapp and start your own serious webapp as soon as > > possible after you see Cocoon's one huge example webapp run once > > or twice. The problem is to get it running at all. This is currently not addressed in any documentation, but seems froma search of the archives to be a significant stumbling-block to Cocoon. > > Cocoon is not a typically installed software package and so to > > apply it to your own web app at first is not intuitive. Assuming you have one. I don't...I just want to serve XML files through XSLT, like I did with Cocoon 1. If Coocon 2 won't do this out of the box, it's a dead duck. It should also be documented that Cocoon 2 won't do this (if that is the case). > > The documentation has a long way to go to catch up; remember it is > > a work in progress and tends to assume that we know the small but > > totally baffling how-to-get-started stuff. Yep. I'm happy to contribute to the documentation, but right now there is a *major*, not small, gap in getting it recognised by tomcat. > > I finally discovered a cool way to do it and perhaps with editing > > from the Cocoon 2 Team we can put together a "How to apply Cocoon > > 2" for their web site. The most important thing is to set up your > > own webapp project build area. This is not meaningful for standard delivery of XML via XSLT. > Please check that your question has not already been answered in the > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html> I'll happily provide the updates if someone can point me at the solution for getting tomcat to do something with cocoon.war. ///Peter --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faqs.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>