-
1. Re: Install Cocoon2 with JBoss3.0.0+Tomcat4.0.3
iris Jul 17, 2002 10:37 AM (in response to iris)He,
Finally I installed it successfully:
1- I had the error: could not load url handler for protocol
jndi.
It was caused by the classloader mechanism of JBoss
(this is true for embedded Catalina only).
I fix this problem with a patch (rc3-jndi_contextdir.patch) that I get in the mail archive xml-cocoon-users
(http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=102257393428531&w=2)
2- remove from JBOSS/lib/:
- crimson.jar
- jaxp.jar
3- a- copy from COCOON/lib/core/ to JBOSS/lib/:
- xml-apis.jar
- xercesImpl-2.0.0.jar
b- copy from COCOON/lib/core/ to JBOSS/server/default/lib/:
-xalan-2.3.1.jar
c- copy from COCOON/lib/optional/ to JBOSS/server/default/lib/:
- batik-all-1.5b1.jar
4- update the classpath in JBOSS/bin/run.sh:
JBOSS_CLASSPATH=$JBOSS_CLASSPATH:$JBOSS_HOME/lib/xml-apis.jar:$JBOSS_HOME/lib/xercesImpl-2.0.0.jar
5- a- remove from COCOON/lib/core/:
- xml-apis.jar
- xercesImp-2.0.0.jar
- xalan-2.3.1.jar
b- remove from COCOON/lib/optional/:
- batik-all-1.5b1.jar
- xt19991105.jar
6- update the extra-classpath in COCOON/src/webapp/WEB-INF/web.xml:
<init-param>
<param-name>extra-classpath</param-name>
<param-value>JBOSS/lib/xml-apis.jar:JBOSS/lib/xercesImpl-2.0.0.jar:
JBOSS/server/default/lib/xalan-2.3.1.jar:JBOSS/server/default/lib/batik-all-1.5b1.jar</param-value>
</init-param>
7- build cocoon:
a- build.sh clean
b- build.sh -Dinclude.webapp.libs=yes webapp
8- copy COCOON/build/cocoon/cocoon.war in JBOSS/server/default/deploy/
9- launch JBoss and try access http://localhost:8080/cocoon
Hope it can help somebody :-)
iris -
2. Re: Install Cocoon2 with JBoss3.0.0+Tomcat4.0.3
iris Jul 17, 2002 10:38 AM (in response to iris)He,
Finally I installed it successfully:
1- I had the error: could not load url handler for protocol
jndi.
It was caused by the classloader mechanism of JBoss
(this is true for embedded Catalina only).
I fix this problem with a patch (rc3-jndi_contextdir.patch) that I get in the mail archive xml-cocoon-users
(http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=102257393428531&w=2)
2- remove from JBOSS/lib/:
- crimson.jar
- jaxp.jar
3- a- copy from COCOON/lib/core/ to JBOSS/lib/:
- xml-apis.jar
- xercesImpl-2.0.0.jar
b- copy from COCOON/lib/core/ to JBOSS/server/default/lib/:
-xalan-2.3.1.jar
c- copy from COCOON/lib/optional/ to JBOSS/server/default/lib/:
- batik-all-1.5b1.jar
4- update the classpath in JBOSS/bin/run.sh:
JBOSS_CLASSPATH=$JBOSS_CLASSPATH:$JBOSS_HOME/lib/xml-apis.jar:$JBOSS_HOME/lib/xercesImpl-2.0.0.jar
5- a- remove from COCOON/lib/core/:
- xml-apis.jar
- xercesImp-2.0.0.jar
- xalan-2.3.1.jar
b- remove from COCOON/lib/optional/:
- batik-all-1.5b1.jar
- xt19991105.jar
6- update the extra-classpath in COCOON/src/webapp/WEB-INF/web.xml:
<init-param>
<param-name>extra-classpath</param-name>
<param-value>JBOSS/lib/xml-apis.jar:JBOSS/lib/xercesImpl-2.0.0.jar:
JBOSS/server/default/lib/xalan-2.3.1.jar:JBOSS/server/default/lib/batik-all-1.5b1.jar</param-value>
</init-param>
7- build cocoon:
a- build.sh clean
b- build.sh -Dinclude.webapp.libs=yes webapp
8- copy COCOON/build/cocoon/cocoon.war in JBOSS/server/default/deploy/
9- launch JBoss and try access http://localhost:8080/cocoon
Hope it can help somebody :-)
iris -
3. Re: Install Cocoon2 with JBoss3.0.0+Tomcat4.0.3
scharlau Sep 5, 2002 6:36 AM (in response to iris)Hi,
I did all of the above stuff and it still didn't work off of a build on the jboss-all HEAD, ie jboss4.0.1alpha.
Then I found some comments in an email list saying that jboss had problems loading jars in war files, so I put my cocoon.war in an ear file. Once this was loaded onto jboss, it all worked fine.
So here's what I did:
1. Use the above notes to make the changes to the cvs for jboss-catalina.
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"?>
<display-name>cocoon2</display-name>
<web-uri>cocoon.war</web-uri>
<context-root>/cocoon</context-root>
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:
-Dinclude.webapp.libs=yes webapp
5. Now add this new target to the end of your cocoon/build.xml file (ie just before the 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 -->
6. Now build the ear with the command: build ear
7. Copy the ear file across to the /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.
cheers
Bruce -
4. Re: Install Cocoon2 with JBoss3.0.0+Tomcat4.0.3
mbliz Mar 4, 2003 8:31 AM (in response to iris)I confirm that Cocoon 2.0.4 and Jboss-3.0.6-Tomcat.4.1.x
combination will solve cocoon.war deployment problems
out-of-the-box as Bruce has stated elsewhere.
Nevertheless I'm having weird problem while
repackaging this cocoon.war or actually cocoon.ear
as follows:
application.xml:
---------------
<?xml version="1.0" encoding="UTF-8"?>
<display-name>GB</display-name>
gb.jar
<web-uri>cocoon.war</web-uri>
<context-root>/cocoon</context-root>
The result is fatal language exception
from CocoonServlet with stack trace:
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
... etc ... >100 errors
I have not touched sitemap at all, just added
one jar-file to WEB-INF/lib and modified one
xsp-page and then made .war and .ear files out
of them.
I'm using Sun JDK 1.4.1 and Linux RedHat 7.3
Anyone?
Mike