At 11:03 03/09/2002 +0100, you wrote:
>Hi all,
>
>thanks for the help with eclipse! Now, on to the next problem: cocoon2 
>with tomcat/catalina.
>
>Per some of the posts in the forum, jetty works with cocoon2, but doesn't 
>with the embedded tomcat configuration.
>
>I found a posting on the xml-cocoon-users list at 
>http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=102257393428531&w=2 
>which goes through adding some hacks to the cvs for jboss-all/catalina 
>eliminate the jndi error, which otherwise catches you out.
>
>However, this doesn't seem to solve the problem, as now I get other 
>errors, which seem to indicate that the cocoon-2.0.3.jar is not being 
>found within the cocoon.war file. Here's part of the error I get when I 
>load cocoon:
>
>org.apache.cocoon.ProcessingException: Language Exception: 
>org.apache.cocoon.components.language.LanguageException: Error compiling 
>sitemap_xmap: Line 22, column 49: cannot access class Component; file 
>org\apache\avalon\framework\component\Component.class not found Line 23, 
>column 53: cannot access class Configurable; file 
>org\apache\avalon\framework\configuration\Configurable.class not found 
>Line 24, column 53: cannot access class Configuration; file 
>org\apache\avalon\framework\configuration\Configuration.class not found 
>Line 25, column 53: cannot access class ConfigurationException; file 
>org\apache\avalon\framework\configuration\ConfigurationException.class not 
>found Line 26, column 53: cannot access class DefaultConfiguration; file 
>org\apache\avalon\framework\configuration\DefaultConfiguration.class not 
>found Line 27, column 50: cannot access class Parameters; file 
>org\apache\avalon\framework\parameters\Parameters.class not found Line 29, 
>column 29: cannot access class Constants; file 
>org\apache\cocoon\Constants.class not found
>
>Any help appreciated.
>
>cheers,
>
>Bruce
>

I sorted out the problem and am posting this in case anyone else comes 
across the problem, and needs a solution.

1. Use the notes at 
http://www.jboss.org/forums/thread.jsp?nav=false&forum=61&thread=17813&start=0&msRange=15
 
to make the changes to the cvs for jboss-catalina. These will also lead you 
to the actual code patch (already submitted as a patch on sourceforge) at 
http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=102257393428531&w=2  You 
don't need to reorganise the jar files, add items to your run.bat 
classpath, etc. Just make the cvs file changes and movde on to step two.

2. Download the source (you'll need the build.xml file later) for cocoon 
from http://xml.apache.org/cocoon/.

3. Create a new directory called META-INF under cocoon-2.0.3\src\webapp, 
and place this application.xml file in there.

<?xml version="1.0" encoding="ISO-8859-1"?>

<application>
<display-name>cocoon2</display-name>

<module>
<web>
<web-uri>cocoon.war</web-uri>
<context-root>/cocoon</context-root>
</web>
</module>

</application>

This file will be picked up and added to the build directory.

4. Follow the instructions to build cocoon. Note the changes to your jre 
lib directory. Make sure you build a copy with the webapp libs using the 
command:

build -Dinclude.webapp.libs=yes webapp

5. Now add this new target to the end of your cocoon/build.xml file (ie 
just before the </project> tag. It will copy the cocoon.war file to useful 
place and then add in the application.xml file when it builds the ear file.

<!-- now build the ear file -->
<target name="ear">
<copy file = "./build/cocoon/cocoon.war" todir="./build/cocoon/webapp"/>
<jar jarfile="./build/cocoon/cocoon.ear"
basedir="./build/cocoon/webapp">
<include name="META-INF/application.xml" />
<include name="cocoon.war" />
</jar>
</target>

6. Now build the ear with the command: build ear

7. Copy the ear file across to the <jboss>/server/default/deploy directory, 
start jboss, watch for any problems in the console window, and then 
navigate to http://localhost:8080/cocoon where you should see the welcome 
screen.

Just for the record, I tried this on a jboss-tomcat distro without doing 
the patch to the cvs, and it throws up the jndi error mentioned in the forum.


cheers,

Bruce

Dr. Bruce Scharlau
Dept. of Computing Science
University of Aberdeen
Aberdeen AB24 3UE
01224 272193
http://www.csd.abdn.ac.uk/~bscharla
mailto:[EMAIL PROTECTED]



-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to