Definitely go carefully through Andrew's list of checks first
but I don't think that's your problem.

Change your port back to 3306 or get rid of it from your connect
string.  8080 is the tomcat port, but not the mysql port (by
default at least - if you overrode that in configuring mysql
and set it to 8080 then you'll need to fix that!)

How did you get your version of cocoon?  I assume you downloaded
a distribution like cocoon-2.0.4-vm14-bin.zip.  If you still have
this around, or can reconstruct/remember which one you chose
make sure you did _NOT_ get the one above but instead got
cocoon-2.0.4-bin.zip.  The excalibur project classes that
handle the datasource pool had a version dependency on java
version.  Since you're using JDK 1.3, if you are trying to
use the cocoon release for JDK 1.4 you'll get this exception.

You should also be able to go to lib\ and look for the excalibur
datasource jar (don't remember if all excalibur classes were
bundled together or separate in 2.0.4 release) - it should have
some kind of version info on it, including the target JDK it was
compiled for.  If there is a conflict you have a couple of choices:
- Switch to JDK 1.4 OR
- Download the correct cocoon dist. OR
- Replace the excalibur datasource jar with the version from the other
distribution.  This may not work, but if you're on a slow dialup and
can find someone to send you the right version of just that jar, it's
worth a shot first.

For some reason I seem to remember this also being thrown with
a permissions problem in mysql.  I thought that root usually
got full access from all hosts and can't find any messages in
the archives along these lines so perhaps I'm wrong. But if
clearing up the jdk dependency doesn't work, try explicitly
giving root access to the database you're using for the wildcard
host: %.  I seem to remember that mysql does not think you're
coming from localhost when you connect via jdbc.  You'll need to
consult the mysql manual for the grant command.

I noticed your jar was in a tomcat lib directory.  You may want to
follow Andrew's advice and move it to the WEB-INF\lib\ directory.
Should work either place, but there are some classloader subtleties
that could be throwing things off.

Geoff

> -----Original Message-----
> From: Phil Coultard [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 04, 2003 3:40 PM
> To: [EMAIL PROTECTED]
> Subject: RE: Newbie: yet ANOTHER problem: db access
> (NoValidConnectionException)
>
>
> Hi HTH,
>
> Thanks for your suggestion but that didn't work - I'm still
> getting the same
> message (even after re-starting the server and deleting the work
> directory).
>
> I have read the readme enclosed with the jar but to my uneducated eye it
> does not seem to enclose a ref to what I should call the class.
>
> Kind Regards
>
> Phil
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: 04 April 2003 19:20
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: AW: Newbie: yet ANOTHER problem: db access
> (NoValidConnectionException)
>
>
> hi phil,
>
> please try com.mysql.jdbc.Driver as the driver class. that should
> work. your
> dburl seems to be correct.
>
> otherwise have a look into your mysql-connector jar. there should be a
> README inside.
>
> HTH
>
> > -----Ursprüngliche Nachricht-----
> > Von: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED]
> > Auftrag von Phil Coultard
> > Gesendet: Freitag, 4. April 2003 19:53
> > An: [EMAIL PROTECTED]
> > Betreff: Newbie: yet ANOTHER problem: db access
> > (NoValidConnectionException)
> >
> >
> > Geoff: Thanks for all your help, you are a star.
> >
> > Big apologies from a newbie struggling with the basics of Cocoon...
> >
> > I have run into yet another problem which I don't seem to be able to get
> > over...
> >
> > This time I am trying to connect to a MySQL db but get the message:
> >
> > ERROR   (2003-04-04) 16:18.09:150   [sitemap.generator.serverpages]
> > (/ltd_coultard/mount/com_coultard/tickets) Thread-10/tickets_xsp:
> > Could not
> > get the datasource
> > org.apache.avalon.excalibur.datasource.NoValidConnectionException:
> >  No valid
> > JdbcConnection class available
> >
> > in the error log file
> > (tomcat/webapps/applicationname/WEB-INF/logs/error.log) when I
> run my xsp
> > (enclosed below)
> >
> > I am also new to MySQL but am familiar with MSSQL so...
> >
> > I have:
> > -made the db (called coultard) and made sure MySQL is running (it
> > works fine
> > solo)
> > -put the MySQL db jar file
> (mysql-connector-java-3.0.6-stable-bin.jar) in
> > C:\tomcat\common\lib
> > -put the init-param for preloading the driver in web.xml as below.
> > -defined the connection pool as below
> > -attempted to run the xsp below
> >
> > I just spits out the title of the page and the session user
> value (which I
> > have set via a login script) which would be consistent with
> their being no
> > results except the same sql statement returns results if run directly in
> > MySQL and the error message suggests to me it's not even
> getting that far.
> >
> > I am using:
> > Win 98
> > JDK 1.3.1
> > Tomcat 4.1.24
> > Cocoon 2.0.4
> >
> > MySQL 4.0.12Win
> > jar file from: mysql-connector-java-3.0.6-stable
> >
> > What confuses me is that my book (Cocoon developers handbook) assures me
> > that any errors preloading the driver or defining the
> connection pool will
> > be thrown up when they are attempted (when the application
> > starts) and shown
> > in access.log and core.log respectfully. My entries in these
> two logs look
> > fine:
> >
> > ------------------------------------------------------------------
> > ----------
> > ----
> > DEBUG   (2003-04-04) 16:14.22:850   [access] (Unknown-URI)
> > Unknown-thread/CocoonServlet: Trying to load class:
> > org.gjt.mm.mysql.Driver
> > ------------------------------------------------------------------
> > ----------
> > ----
> >
> > ------------------------------------------------------------------
> > ----------
> > ----
> > DEBUG   (2003-04-04) 16:14.24:010   [core.manager] (Unknown-URI)
> > Unknown-thread/DefaultComponentFactory: logger attribute is
> > core.datasources.coultard
> > DEBUG   (2003-04-04) 16:14.24:390   [core.manager] (Unknown-URI)
> > Unknown-thread/ThreadSafeComponentHandler: ComponentHandler
> > initialized for:
> > org.apache.avalon.excalibur.datasource.ResourceLimitingJdbcDataSource
> > DEBUG   (2003-04-04) 16:14.24:390   [core.manager] (Unknown-URI)
> > Unknown-thread/ExcaliburComponentSelector: Adding
> >
> org.apache.avalon.excalibur.datasource.ResourceLimitingJdbcDataSource for
> > hint [coultard]
> > DEBUG   (2003-04-04) 16:14.24:390   [core.manager] (Unknown-URI)
> > Unknown-thread/ThreadSafeComponentHandler: ComponentHandler
> > initialized for:
> > org.apache.avalon.excalibur.component.ExcaliburComponentSelector
> > ------------------------------------------------------------------
> > ----------
> > ----
> >
> > And yet the error thrown when I try to load the page rather
> suggests to me
> > that it can't find, or hasn't 'installed' the jar file properly...
> >
> > On the assumption that the preload and connection pool
> substantiations are
> > working I have two theories (which I'm sure are probably wrong!)
> > 1. That the <param-value>org.gjt.mm.mysql.Driver is incorrect.
> I got this
> > value from my book  but it is sadly for an older MySQL driver. I
> > notice the
> > first line of the README which comes with the jar file reads "MySQL
> > Connector/J 3.0.6 Stable (formerly MM.MySQL)" and was wondering if this
> > change in naming convention is mirrored somehow in it. I have
> > been unable to
> > find a reference for the correct string for this value (MySQL
> referring to
> > "read your servlet engine or application server vendor's documentation";
> > Cocoon seemingly not making a reference to what these strings should be
> > except for the commented WebSphere, Oracle and IBMWebshpere). Further
> > attempts to substantiate this theory and attempts at guessing its
> > value have
> > been unfruitful.
> >
> > 2. That my reference to the dburl is incorrect. My db is
> > physically located
> > in C:\mysql\data\ and not under the tomcat/webapps dir so I was
> > wondering if
> > this had any influence on the matter.
> >
> >
> > Thankfully
> >
> > Phil
> >
> >
> > ------------------------------------------------------------------
> > ----------
> > ----
> > extract from tomcat/webapps/applicationname/WEB-INF/web.xml
> > ------------------------------------------------------------------
> > ----------
> > ----
> >     <init-param>
> >       <param-name>load-class</param-name>
> >       <param-value>
> >         org.gjt.mm.mysql.Driver
> >       </param-value>
> >     </init-param>
> >
> > ------------------------------------------------------------------
> > ----------
> > ----
> > extract from tomcat/webapps/applicationname/WEB-INF/cocoon.xconf
> > ------------------------------------------------------------------
> > ----------
> > ----
> >   <!-- Datasources: -->
> >   <datasources>
> >     <jdbc name="coultard" logger="core.datasources.coultard">
> >       <pool-controller max="10" min="5"/>
> >       <auto-commit>false</auto-commit>
> >       <dburl>jdbc:mysql://localhost/coultard</dburl>
> >       <user>root</user>
> >       <password/>
> >     </jdbc>
> >   </datasources>
> >
> > ------------------------------------------------------------------
> > ----------
> > ----
> > tickets.xsp
> > ------------------------------------------------------------------
> > ----------
> > ----
> > <?xml version="1.0" encoding="ISO-8859-1"?>
> >
> > <xsp:page language="java"
> >   xmlns:xsp="http://apache.org/xsp";
> >   xmlns:esql="http://apache.org/cocoon/SQL/v2";
> >   xmlns:xsp-session="http://apache.org/xsp/session/2.0";
> > >
> >
> > <page>
> >
> >  <page-title>Trouble tickets for <xsp-session:get-attribute
> > name="user"/></page-title>
> >
> >  <content>
> >
> >   <esql:connection>
> >    <esql:pool>coultard</esql:pool>
> >    <esql:execute-query>
> >     <esql:query>
> >      select * from TroubleTickets where Customer =
> >      '<xsp-session:get-attribute name="user"/>'
> >      order by TicketOpened
> >     </esql:query>
> >     <esql:results>
> >      <tickets>
> >       <esql:row-results>
> >        <ticket>
> >         <esql:get-columns/>
> >        </ticket>
> >       </esql:row-results>
> >      </tickets>
> >     </esql:results>
> >    </esql:execute-query>
> >   </esql:connection>
> >
> >  </content>
> > </page>
> >
> > </xsp:page>
> >
> > ---
> > Outgoing mail is certified Virus Free.
> > Checked by AVG anti-virus system (http://www.grisoft.com).
> > Version: 6.0.465 / Virus Database: 263 - Release Date: 25/03/03
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.465 / Virus Database: 263 - Release Date: 25/03/03
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.465 / Virus Database: 263 - Release Date: 25/03/03
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to