cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Robins <>
Subject Re: Another database connection problem and cocoon hang!
Date Sun, 07 Apr 2002 10:44:24 GMT
silly question, but is your MySQL server actually running on port 9002 and 
not the usual 3306? Can you access it using the standard mysql client? Have 
you tried the mm.mysql test suite to access it via the Java routines? When 
it's working properly there, then try with Tomcat/Cocoon. Database connection 
problems are unlikely to have anything to do with Cocoon.

On Saturday 06 Apr 2002 21:12, James Harris wrote:
> Hi
> I'm a bit of a newbie as far as cocoon is concerned but I am hoping someone
> can shed some light on my perplexing problem.
> I have been trying to get cocoon to connect to a database.  I have cocoon
> serving static content and xsp pages which are transformed using
> stylesheets into html for display.  I now want to drag some content for
> these xsp pages from a mysql database.  I have followed some of the
> previous email discussions on this list and think I have the bases covered
> as far as configuration goes.  Unfortunately, upon adding the following to
> my configuration, Tomcat seems to halt halfway through loading.  This is
> cured by commenting out the "" line from web.xml.  I
> don't know what the problem is when loading this driver.  My cocoon.xconf
> looks like this (please don't judge me by the passwords):
> <datasources>
> 	<jdbc name="mypool" logger="core.datasources.mypool">
> 		<pool-controller min="5" max="10"/>
> 		<dburl>jdbc:mysql://localhost:9002/pms</dburl>
> 		<user>jim</user>
> 		<password>jim</password>
> 	</jdbc>
> </datasources>
> My web.xml in WEBINF looks like this:
> <init-param>
> 	<param-name>load-class</param-name>
> 	<param-value>
> 		<!--For mySQL:-->
> 	</param-value>
> </init-param>
> I have put the jar driver file containing the driver in my jdk\jre\lib\ext
> directory and even tried unjaring it and putting the org... directory tree
> in the classpath.  Nothing seems to work.  Following some previous threads
> on the subject and can answer YES to the following that were posted by
> Andrey Demchenko (but I do not really understand what the relevance of 3)
> is):
> 1) You must have jdbc driver file in classpath
> 2) Check your cocoon.xconf
> for <datasources>...</datasources> for pool configuration
> 3) See access.log for message like this
>  DEBUG   (2002-03-26) 17:04.45:713   [access] (Unknown-URI)
> Unknown-thread/Cocoon
> Servlet: Trying to load class:
> One extra point to note is that I have cocoon serving pages from
> http://localhost:8080/mydir/ rather than from the cocoon directory.  I
> achieved this by following the directions of Leigh Dodds tutorial on
> and creating a directory structure as follows:
> Tomcat\WebApps\cocoon...(all the usual stuff in here)
>               \mydir\mycontent
>                     \WEB-INF
>                     \cocoon.xconf
> If you have read the tutorial you will know what I have done but basically
> I created my on directory to hold my web app in the WebApps directory of
> Tomcat and just coppied the WEB-INF directory and cocoon.xconf from the
> cocoon directory to the one I created.  This allowed cocoon to work fine
> until now.  Could it be that by doing this I am having problems with tomcat
> trying to read in drivers twice from both web.xml files or something?  I
> have tried many combinations of where to put the driver files and tried the
> in both web.xml files (in the cocoon dir and mydir)
> but still tomcat seems to hang half way through loading.  It wont even
> serve its own homepage!
> Can anybody help - this is desperate.  I am writing an app for my
> dissertation and if I cant connect to a database then there goes any chance
> of a decent degree!!!
> Many thanks
> Jim Harris
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <>
> To unsubscribe, e-mail: <>
> For additional commands, e-mail: <>

Please check that your question has not already been answered in the
FAQ before posting. <>

To unsubscribe, e-mail: <>
For additional commands, e-mail: <>

View raw message