cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sonny Sukumar" <ahimsad...@hotmail.com>
Subject RE: Quick question...
Date Sat, 26 Apr 2003 23:45:30 GMT

Hi Geoff, thank you so much for your reply.  I will try to be as specific as 
possible below....

>
>I assume that since you're talking about compiled sitemap, that you're 
>using
>2.0.x?  You'll have to provide a few more details to figure out what is
>going
>on, but for now it sure looks like something worse than your action is 
>wrong
>since it can't find o.a.c.acting.Action.  How did you get cocoon?

Ahh, my apologies...here's my software/version info:

--Cocoon 2.0.4 (downloaded yesterdy in ready-to-use binary format to upgrade 
my 2.0.3 installation, which was giving the same problem)
--Tomcat 4.1.12 (I tried installing 4.1.24, the newest one, but I got the 
same problem with that as well)
--RedHat Linux 7.2

>Did it work
>before you attempted this custom action?

Good question.  Yes, upon initial installation of Cocoon afresh (i.e. 
deleting my cocoon directory, placing cocoon.war in $TOMCAT_HOME/webapps, 
and restarting Tomcat), I can connect to localhost:8080/cocoon with no 
problems and surf around.

The problem only comes when I declare *any* one of my actions in the sitemap 
again, even the simplest of them.  For instance, this line will cause 
problems:

<map:action name="create-session" 
src="com.mydomain.acting.CreateSessionAction"/>

(Note that I set $CLASSPATH in $TOMCAT_HOME/bin/setclasspath.sh to include a 
directory where com.mydomain.acting.CreateSessionAction will be found.  It 
*is* finding it, but not some of the Avalon/Cocoon classes it tries to 
import.)

  If you remove all references to
>your
>action from the sitemap, do things work again?

This is puzzling as well.  It goes like this:

1.) When I *initially* start Tomcat with the totally default Cocoon 
installation (and unmodified sitemap) I can connect fine.
2.) I then add the line that declares my action and try to connect.  I get 
the ProcessingException saying it can't find said classes.
3.) So I totally delete that line declaring the action, and try to 
reconnect.  I get the exact same error as before.  Somehow it's not 
recompiling the sitemap. (Note here that synchron is set to true in 
MCAT_HOME/webapps/cocoon/WEB-INF/cocoon.xconf, the default setting).
4.) Cocoon will *not* recompile the sitemap until I manually go into 
$TOMCAT_HOME/work/Standalone/localhost/cocoon/cocoon-files/org/apache/cocoon/www/ 
and delete sitemap_xmap.class AND THEN shutdown and restart Tomcat.  After 
doing this I can again connect to localhost:8080/cocoon.

>
>The answer to your immediate question about where Cocoon looks for .class
>files
>is the same as for any java webapp - it looks in the jars in WEB-INF/lib
>(where
>you seem to have them) and in un-jar'd .class files in WEB-INF/classes...
>where ... must represent the proper package hierarchy replicated as a
>directory
>sub-tree.  It gives preference to classes found in WEB-INF/classes.

Thank you for the explanation.. I appreciate the insight.

>
>So, I'd say that you either have incorrectly created jar files (not likely
>unless you did something to them in the process of making your action), or
>they are not there (not likely unless you did a non-standard install), or
>something related to a piece of evidence not yet given.
>

All the JAR files in WEB-INF/lib are the unmodified ones that came with 
Cocoon.  That is, they were all unpacked there when Tomcat unzipped 
cocoon.war to the cocoon directory.

Again, I got Cocoon as a zip file from xml.apache.org/cocoon and used it as 
is.

All of this was working a few weeks ago, and then I came back to it, and now 
the problems.  I'm puzzled as to what I might have done to affect it in that 
time, since I thought I didn't touch it. :-/

I definitely appreciate your help though! :-)

Sonny

>HTH,
>Geoff Howard
>
> > -----Original Message-----
> > From: Sonny Sukumar [mailto:ahimsadesi@hotmail.com]
> > Sent: Saturday, April 26, 2003 3:44 PM
> > To: cocoon-users@xml.apache.org
> > Subject: Quick question...
> >
> >
> >
> > Where does Cocoon look for Java .class files?
> >
> > Because I wrote an action that compiles just fine, and I declare
> > it in the
> > sitemap and Cocoon finds it, but then Cocoon throws a 
>ProcessingException
> > because it says it can't find
> > org.apache.avalon.framework.logger.AbstractLogEnabled (which my action
> > imports).
> >
> > So I commented out that class in my action source code and now it
> > can't find
> > org.apache.cocoon.acting.Action.
> >
> > The ProcessingException is thrown when trying to connect to
> > localhost:8080/cocoon, at which time Cocoon tries to compile the sitemap
> > unsuccessfully.
> >
> > All these .class files it can't find are contained in JARs in
> > $TOMCAT_HOME/webapps/cocoon/WEB-INF/lib.
> >
> > I'd really appreciate *any* help this, as I am totally stuck on it. :-(
> >
> > Thanks!
> >
> > _________________________________________________________________
> > Add photos to your messages with MSN 8. Get 2 months FREE*.
> > http://join.msn.com/?page=features/featuredemail
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> > For additional commands, e-mail: cocoon-users-help@xml.apache.org
> >
> >
> >
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
>For additional commands, e-mail: cocoon-users-help@xml.apache.org
>


_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*.  
http://join.msn.com/?page=features/featuredemail


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Mime
View raw message