You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Coetmeur, Alain" <al...@caissedesdepots.fr> on 2001/11/07 12:21:00 UTC

Installing Cocoon2.0rc1a on jboss2.4.3 with embeded tomcat 4.0, a nd HSQLDB : it works



Just a solution for jboss users,
maybe should it be added to the install section of cocoon.
Ther are also some problems with XML support between
jboss and cocoon, that may be avoided by some changes
in jboss (eg: using xerces jaxp by default)

to install cocoon here is what worked for me



for cocoon the only thing you need is:
- generate the webapp including cocoon and associated libraries
  - all cocoon2/lib/*.jar except ant*.jar and servlet*.jar and hsql*.jar
  -  with jasper-compiler.jar (for JSP samples),  from the embeded tomcat,
  - servlet*.jar (not sure it is usefull) from the embeded tomcat,
  - with jboss included hsql*.jar drivers from jboss/lib/ext
  - and with a few changes in cocoon.xconf about HSQL support (explained
later)
- change the JAXP configuration to use xerces :
   - remove the jaxp.jar in jboss/lib and replace it with xerces jar from
cocoon,
   - change the launch script ( jboss/bin/run.bat )so that 
     the jaxp provider is not set by default to crimson 
    (remove the set JAXP= -Djavax.xml.parsers.DocumentBuilderFactory=...
     -Djavax.xml.parsers.SAXParserFactory=...
      )
     eg: set JAXP=
   - and change the classpath in this script to include xerces:
     eg: set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;../lib/xerces_1_4_3.jar

- execute the SQL script that create the samples databases
  (explained later)

the HSQL samples configuration is the 
most tricky (not so anyway):

to make the sql samples work on jboss,
you have to use the HSQL server embeded in jboss.

as told before,
by precaution replace the hsql*.jar in the WEB-INF/lib of 
the webapp (in build/cocoon/webapp )
with the one from jboss... probably not usefull , but it works anyway.

comment out the 
<hsqldb-server/> section  of cocoon.xconf,
so the hsql server does not run...
(you already have one running in jboss ! )
moreover port9002 seems in conflict (with what ? dunno!)

replace in WEB-INF\cocoon.xconf, in the datasources jdbc section
the 9002 port in the dbURL with port 1476 (the one used in jboss.jcml)
      <dburl>jdbc:hsqldb:hsql://localhost:1476</dburl>


run
build webapp

and deploy the war...

now the simple SQL should produce an error message
telling that the tables are not created ...

if you ge this message, that is that
all you need is to execute the DB creation SQL script 
WEB-INF\db\cocoondb.script

I suppose it is executed automagically by cocoon dbserver,
but since now jboss manage the HSQLdb, you have to do it yourself...

you may try to use ant to connect to the HSQLDB, and execute the sql script,
but the easiest way for me was to use
the "visualsql" tool
http://www.sdv.fr/pages/casa/html/vsql.en.html
with the proper classpath including hsqldb.jar

launch the tool,
set the driver to
org.hsqldb.jdbcDriver
the db url to
jdbc:hsqldb:hsql://localhost:1476
the user to "sa"
password to nothing (ie "" ! not "nothing" 8> )

then I have copy/paste'ed the content of the script
 and run it...

try a few select to check that the DB is properly updated...

test the DB samples !!!


hope this helps...


--
Alain Coetmeur

---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>