You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by montefin <mo...@finux.com> on 2000/02/04 02:13:00 UTC

Still no cocoon.jar, guys

First of all, thanks for your responses to my question. This is a good
group and I'd hate to belabor it with what seems utterly dumb on my
part, but here goes...

First, just in case it matters, I downloaded the Cocoon-1.6.1.jar file
into a Linux environment.

Originally, I did jar -xvf on the archive which supposedly works more or
less like tar -xvf on a tarball. I got an expanded directory called
cocoon-1.6.1 with a bin subdirectory that had a file called Cocoon.jar
in it.

Ok, I knew there was supposed to be a cocoon.jar file somewhere so I did
jar -xvf on that file also and got an expanded directory with a
subdirectory called org which began the standard path of
org/apache/cocoon that we're all familiar with.

I updatedb'd, which in unix updates the file system tracking data base,
and did a locate on the entire system for cocoon.jar and found nothing
except the cocoon.jar that exists on my Exeter installation on another
server which is ported differently.

I grep'ed, the entire cocoon-1.6.1 directory system for a cocoon.jar
file too with no success.

I also used ant in the cocoon-1.6.1 directory to build a dist of
Cocoon., The build seemed to go ok except for 2 deprecation warnings.
In any event there was no cocoon.jar file in that build either.

I applied the advice given here and went back and did the same things
using unzip and got the same results: no file labeled cocoon.jar, only
Cocoon.jar

Because of a section in the install documentation, I at first thought
the Cocoon.jar file could be used as a target. That section reads
(pasting here):

-------------------------------------------------------------
"Here is an example:


wrapper.classpath=/usr/local/java/lib/cocoon.jar

wrapper.classpath=/usr/local/java/lib/xerces.jar

wrapper.classpath=/usr/local/java/lib/xalan.jar

wrapper.classpath=/usr/local/java/lib/fop.jar

wrapper.classpath=/usr/local/java/lib/regexp.jar

wrapper.classpath=/usr/local/java/lib/jndi.jar


                        from this version of Cocoon the Cocoon.jar
package should be added to the servlet engine classpath as any other
required package (as shown above). "
-------------------------------------------------------------

But from comments I've seen posted here, it seems the lower case file,
cocoon.jar, is essential, and since I'm still having problems getting
Cocoon to parse it's own samples and examples, but not oddly enough
.class and .xml files created here, I suppose it is essential.

Just as a sidelight, the jar -xvf procedure did result in xerces.jar and
xalan.jar files, but now I'm concerned that though labeled correctly
those files too may not be operative or fully operative.

So, do I scrap the whole thing and start over...or look for an rpm from
Red Hat, or give up and let Exeter's Cocoon engine do what it does so
seamlessly on my other Apache server?

I'd really like to make this version of Cocoon work as I am evaluating
it for use in an enterprise E-commerce suite vis a vis Exeter. Zope and
php3 which I have working here just fine, each on its own server. Those
softwares had their own installation challenges, but nothing of this
magnitutde.

If anyone could help me just get over these inital roadblocks, I'd
really appreciate it.

Thanks,

montefin



Rick Tyler wrote:

> > Where is cocoon.jar? The one with the small "c".
>
> I too had the same problem when I first attempted
> to download and run Cocoon.
>
> The confusion stems from the fact a .jar file has
> essentially the same structure as a .zip file
> (which was unknown to me when I started playing
> around with this stuff) and someone at the Apache
> project thought it was clever to start naming
> the binary distributions with the .jar, instead
> of .zip, extension.
>
> The problem with this cleverness is that the
> natural assumption of a newcomer is to assume that
> the .jar found in the download directory is the same
> .jar needed by the class loader.
>
> So, to answer your question, use WinZip to extract
> the contents of the Cocoon.jar which you downloaded
> and you will find the cocoon.jar you are looking for.
>
> I would argue that this convention of naming binary
> distributions with the .zip extension, while quite
> clever, is inherently confusing and that .jar should
> only be used for files intended as targets for the
> Java class loader.
>
> Just my 2 cents - it would have saved me half a day
> of spinning my wheels and wasting the bandwidth of
> this mailing list.
>
> - RT
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org

--
In Life Timing is everything; in Linux Permissions is everything.
http://www.montefin.com/~montefin (up 24/7)
http://finux.com/ (our Linux/Apache served PHP3 site...evenings & weekends)
http://finux.com:8080 (our Zope portal...evenings & weekends)
http://finux.com:8085 (our XML adventures...evenings & weekends)



Re: Still no cocoon.jar, guys

Posted by Toby Ferguson <to...@eloan.com>.
montefin wrote:

> First of all, thanks for your responses to my question. This is a good
> group and I'd hate to belabor it with what seems utterly dumb on my
> part, but here goes...
>
> First, just in case it matters, I downloaded the Cocoon-1.6.1.jar file
> into a Linux environment.
>
> Originally, I did jar -xvf on the archive which supposedly works more
> or less like tar -xvf on a tarball. I got an expanded directory called
> cocoon-1.6.1 with a bin subdirectory that had a file called Cocoon.jar
> in it.
>
> [snip snip]
>

Montefin,

frustrating as it must be for you (I know - I still haven't got Cocoon
1.6.1 to work after about 4 hours working on it!), the installation
instructions are WRONG!  (And, worse still, the ones on the web are
different from the ones in the installation! I think the web is the
least wrong!

Basically, file Cocoon-1.6.1.jar contains all the Cocoon bits.  When you
jar -xf Cocoon-1.6.1.jar one of the things that gets created is
bin/Cocoon.jar - its THAT jar file (the one in the bin directory) that
contains all the classes. Its also the one you should reference in your
"wrapper.classpath=[path to Cocoon]/Cocoon.jar"  Notice the Capitalized
'C'!!!

For what its worth, here're the notes I've made so far. They're similar
to whats on the web site What I did was to get Cocoon working OUTSIDE of
the JServ environment, then prove to myself that JServ was working
(using the IsItWorking servlet that comes with JServ), then installing
Cocoon in the same locatin (AKA "zone"). This way I'm only working on
one problem at a time. NOTE: it still doesn't work for me! But I have
made significant progress!

Toby Ferguson

Installing Cocoon on APache and JServ
-----------------
Get the correct versions of the following:

http://xml.apache.org/dist
Cocoon - 1.6.1 - Cocoon-1.6.1.jar
Xerces - 1.0.1 - xerces-J.1.0.1.jar
Xalan - 0.19.0 - xalan_dist_0.19.0.jar

into some temporary directory (lets call it TMP).

Decide where you're going to unpack all these into. I use /usr/java, but
lets call it SRC:

TMP: $
TMP: $ cd $SRC
SRC: $

# Make the directories for those jar files which don't include the top
directory
SRC: $ mkdir Cocoon-1.6.1
SRC: $ mkdir xalan_0.19.0

# Unpack
SRC: $ jar xf TMP/xerces-J.1.0.1.jar
SRC: $ (cd Cocoon-1.6.1; jar xf TMP/Cocoon-1.6.1.jar)
SRC: $ (cd xalan_0.19.0; jar xf TMP/xalan_dist_0.19.0.jar)

For testing purposes we'll run cocoon outside of the browser first. Make
sure that SRC/Cocoon-1.6.1 is writeable by you.

SRC: $ cd Cocoon-1.6.1; java -classpath
SRC/Cocoon-1.6.1/cocoon.jar:SRC/xalan_0.19.0/xalan.jar:SRC/xerces-1_0_1/xerces.jar
org.apache.cocoon.Cocoon -p conf/cocoon.properties
samples/hello/hello-page.xml samples/hello/hello-page.html

This should generate SRC/samples/hello/hello-page.html

Now we'll install it as a servlet.

ASSUMPTION:

You have Apache and JSERV running
You can run http://localhost/servlets/IsItWorking and you get a reply
saying it is!

If this is the case then we'll install into the same location as the
IsItWorking class. If you want to change this later that's great, but
first
lets get something up and running.

First, the 'C' side of jserv (mod_jserv) to use .xml as an action for
running the cocoon servlet.

Add the following line to your jserv.conf file. This will cause anything
with an xml suffix to be redirected to the Cocoon servlet located at the
/servlet
URL

ApJServAction .xml /servlets/org.apache.cocoon.Cocoon

Now we need to tell mod_jserv that the prefix /servlets is mapped to a
particular zone. I've used the zone root, but you can
choose what you like. Add the following:

ApJServMount /servlets /root

Next, configure the 'Java' side of JServ.

Firstly, you probably need to extend the amount of memory that java
uses. Add this line:
wrapper.bin.parameters=-Xms8m -Xmx64m

Secondly, you need to provide the classepath for your environment. Add
the following (replacing SRC with whatever directory you used above)

wrapper.classpath=SRC/Cocoon-1.6.1/bin/Cocoon.jar
wrapper.classpath=SRC/xerces-1_0_1/xerces.jar
wrapper.classpath=SRC/xalan_0_19_0/xalan.jar

Thirdly, we need to modify the zone "root" so that it has the class
org.apache.cocoon.Cocoon.
To do this, locate the line that says

root.properties=/etc/httpd/conf/jserv/root.properties

(note that your zone will likely have a different name, and the
properties file be located in a different location)

Edit the root.properties file to add the servlet
org.apache.cocoon.Cocoon by putting the following on a new line:

repositories=SRC/bin/Cocoon.jar

Restart your httpd and then try the URL:

http://localhost/SRC/samples/hello/hello-page.xml

Re: Still no cocoon.jar, guys

Posted by montefin <mo...@finux.com>.
Mike,

np. Mine too.

montefin

Mike Engelhart wrote:

> montefin wrote:
>
> > Thanks Mike.
> >
> > Perhaps the documentation ought to be amended to say that?
> >
> > I'be been using it. Just saw you mention specifically a
> > the small "c" cocoon.jar file several times. Had me concerned.
> >
> > And thanks, Toby. I'm about where you are with Cocoon and I'll try to put some
> > of your suggestions to work here.
> >
> > montefin
> No problem - I hope you get it working.  Sorry if I mislead you with the
> upper/lower case deal.  My typing with email is relatively hit or miss ;-)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org

--
In Life Timing is everything; in Linux Permissions is everything.
http://www.montefin.com/~montefin (up 24/7)
http://finux.com/ (our Linux/Apache served PHP3 site...evenings & weekends)
http://finux.com:8080 (our Zope portal...evenings & weekends)
http://finux.com:8085 (our XML adventures...evenings & weekends)



Re: Still no cocoon.jar, guys

Posted by Mike Engelhart <me...@earthtrip.com>.
montefin wrote:

> Thanks Mike.
> 
> Perhaps the documentation ought to be amended to say that?
> 
> I'be been using it. Just saw you mention specifically a
> the small "c" cocoon.jar file several times. Had me concerned.
> 
> And thanks, Toby. I'm about where you are with Cocoon and I'll try to put some
> of your suggestions to work here.
> 
> montefin
No problem - I hope you get it working.  Sorry if I mislead you with the
upper/lower case deal.  My typing with email is relatively hit or miss ;-)


Re: Still no cocoon.jar, guys

Posted by montefin <mo...@finux.com>.
Thanks Mike.

Perhaps the documentation ought to be amended to say that?

I'be been using it. Just saw you mention specifically a
the small "c" cocoon.jar file several times. Had me concerned.

And thanks, Toby. I'm about where you are with Cocoon and I'll try to put some
of your suggestions to work here.

montefin


Mike Engelhart wrote:

> montefin wrote:
>
> > First of all, thanks for your responses to my question. This is a good
> > group and I'd hate to belabor it with what seems utterly dumb on my
> > part, but here goes...
> >
> > First, just in case it matters, I downloaded the Cocoon-1.6.1.jar file
> > into a Linux environment.
> >
> > Originally, I did jar -xvf on the archive which supposedly works more or
> > less like tar -xvf on a tarball. I got an expanded directory called
> > cocoon-1.6.1 with a bin subdirectory that had a file called Cocoon.jar
> > in it.
>
> The Cocoon.jar file is the correct one.                      ^^^^^^^^^^^^

>
> Just move it from the bin directory to whereever your jserv.conf is pointing
> and all should be fine.  Just make sure if it's uppercase the jserv.conf is
> uppercase.
>
> Mike
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org

--
In Life Timing is everything; in Linux Permissions is everything.
http://www.montefin.com/~montefin (up 24/7)
http://finux.com/ (our Linux/Apache served PHP3 site...evenings & weekends)
http://finux.com:8080 (our Zope portal...evenings & weekends)
http://finux.com:8085 (our XML adventures...evenings & weekends)



Re: Still no cocoon.jar, guys

Posted by Mike Engelhart <me...@earthtrip.com>.
montefin wrote:

> First of all, thanks for your responses to my question. This is a good
> group and I'd hate to belabor it with what seems utterly dumb on my
> part, but here goes...
> 
> First, just in case it matters, I downloaded the Cocoon-1.6.1.jar file
> into a Linux environment.
> 
> Originally, I did jar -xvf on the archive which supposedly works more or
> less like tar -xvf on a tarball. I got an expanded directory called
> cocoon-1.6.1 with a bin subdirectory that had a file called Cocoon.jar
> in it.

The Cocoon.jar file is the correct one.                       ^^^^^^^^^^^^

Just move it from the bin directory to whereever your jserv.conf is pointing
and all should be fine.  Just make sure if it's uppercase the jserv.conf is
uppercase.

Mike