Re: Newbie: yet ANOTHER problem: db access (NoValidConnectionException)

2003-04-06 Thread Perry Molendijk




Try "com.mysql.jdbc.Driver" instead of "org.gjt.mm.mysql.Driver".
I have had a similar error message like that before and the above seem to fix 
it.
 
Perry

  - Original Message - 
  From: 
  Phil 
  Coultard 
  To: [EMAIL PROTECTED] 
  
  Sent: Saturday, April 05, 2003 1:52 
  AM
  Subject: 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 
  getover...This time I am trying to connect èz}üØx}Øx} 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 notget the 
  datasourceorg.apache.avalon.excalibur.datasource.NoValidConnectionException: 
  No validJdbcConnection class availablein 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 dØx}üÈv}Èv}alled coultard) and made 
  sure MySQL is running (it works finesolo)-put the MySQL db jar file 
  (mysql-connector-java-3.0.6-stable-bin.jar) inC:\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 belowI just 
  spits out the title of the page and the session user value (which Ihave 
  set via a login script) which would be consistent with their being 
  noresults except the same sql statement returns rÈv}ü¸t}¸t}ts if run 
  directly inMySQL and the error message suggests to me it's not even 
  getting that far.I am using:Win 98JDK 1.3.1Tomcat 
  4.1.24Cocoon 2.0.4MySQL 4.0.12Winjar file from: 
  mysql-connector-java-3.0.6-stableWhat confuses me is that my book 
  (Cocoon developers handbook) assures methat any errors preloading the 
  driver or defining the connection pool willbe thrown up when they are 
  attempted (when the application starts) and shownin access.log and 
  core.log respectfully. My ent¸t}ü¨r}¨r} in these two logs 
  lookfine:DEBUG   
  (2003-04-04) 16:14.22:850   [access] 
  (Unknown-URI)Unknown-thread/CocoonServlet: Trying to load class: 
  org.gjt.mm.mysql.DriverDEBUG   
  (2003-04-04) 16:14.24:010   [core.manager] 
  (Unknown-URI)Unknown-thread/De¨r}ü˜p}˜p}tComponentFactory: logger 
  attribute iscore.datasources.coultardDEBUG   (2003-04-04) 
  16:14.24:390   [core.manager] 
  (Unknown-URI)Unknown-thread/ThreadSafeComponentHandler: ComponentHandler 
  initialized 
  for:org.apache.avalon.excalibur.datasource.ResourceLimitingJdbcDataSourceDEBUG   
  (2003-04-04) 16:14.24:390   [core.manager] 
  (Unknown-URI)Unknown-thread/ExcaliburComponentSelector: 
  Addingorg.apache.avalon.excalibur.datasource.ResourceLimitingJdbcDataSource 
  forhint [coultard]DEBUG   
  (2003-04-˜p}üˆn}ˆn}16:14.24:390   [core.manager] 
  (Unknown-URI)Unknown-thread/ThreadSafeComponentHandler: ComponentHandler 
  initialized 
  for:org.apache.avalon.excalibur.component.ExcaliburComponentSelectorAnd 
  yet the error thrown when I try to load the page rather suggests to methat 
  it can't find, or hasn't 'installed' the jar file properly...On the 
  assumption that the preload and connection pool substantiations areworking 
  I hˆn}üxl}xl}two theories (which I'm sure are probably wrong!)1. That 
  the org.gjt.mm.mysql.Driver is incorrect. I got 
  thisvalue from my book  but it is sadly for an older MySQL driver. I 
  notice thefirst line of the README which comes with the jar file reads 
  "MySQLConnector/J 3.0.6 Stable (formerly MM.MySQL)" and was wondering if 
  thischange in naming convention is mirrored somehow in it. I have been 
  unable tofind a reference for the correct string for this value (MySQL 
  referring to"read youxl}ühj}hj}rvlet engine or application server 
  vendor's documentation";Cocoon seemingly not making a reference to what 
  these strings should beexcept for the commented WebSphere, Oracle and 
  IBMWebshpere). Furtherattempts to substantiate this theory and attempts at 
  guessing its value havebeen unfruitful.2. That my reference to the 
  dburl is incorrect. My db is physically locatedin C:\mysql\data\ and not 
  under the tomcat/webapps dir so I was wondering ifthis had any influence 
  on the 
  matter.Thankfuhj}üXh}Xh}Phil-

RE: Newbie: yet ANOTHER problem: db access (NoValidConnectionException)

2003-04-06 Thread Andrew Savory

Hi Phil,

On Sun, 6 Apr 2003, Phil Coultard wrote:

> Nope. That didn't work either... still getting the same message:
>
> "ERROR   (2003-04-06) 00:50.36:940   [sitemap.generator.serverpages]
> (/ltd_coultard/tickets.xsp) Thread-11/tickets_xsp: Could not get the
> datasource
> org.apache.avalon.excalibur.datasource.NoValidConnectionException: No valid
> JdbcConnection class available"

Presumably all the other steps (eg connecting with command-line mysql
client) worked?

Can you just confirm for us which version of Cocoon and which mysql jar
you're using?

Cocoon: http://xml.apache.org/cocoon/dist/cocoon-2.0.4-bin.zip for
JDK1.3.1

Mysql: from http://www.mysql.com/downloads/api-jdbc-stable.html

Copy mysql-connector-java-3.0.6-stable-bin.jar from the zip/tar file into
cocoon/WEB-INF/lib/

- Restart tomcat

> This is one mild mannered Englishman who is off out to buy a baseball bat
> soon ;-)

I have a few lying around if you want to buy one second hand (in generally
good condition, a few bits of keyboard still attached).

If none of the above works, it may be worth trying to compile your own
copy of Cocoon. If you do this, drop the mysql jar into lib/local/ and
then follow the rest of the instructions for building.


Andrew.

-- 
Andrew SavoryEmail: [EMAIL PROTECTED]
Managing Director  Tel:  +44 (0)870 741 6658
Luminas Internet Applications  Fax:  +44 (0)700 598 1135
This is not an official statement or order.Web:www.luminas.co.uk

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



RE: Newbie: yet ANOTHER problem: db access (NoValidConnectionException)

2003-04-05 Thread Phil Coultard
> From: Faron Dutton [mailto:[EMAIL PROTECTED]
> Sent: 06 April 2003 02:52

> I was having the same problem with Phoenix. It turns out that the
> excalibur-datasource-1.0.jar is missing
> org.apache.avalon.excalibur.datasource.JdbcConnection. Must have been a
> build problem :( After adding it everything works fine.

Nope - afraid that idea wasn't valid either I appear to have
org.apache.avalon.excalibur.datasource.JdbcConnection in my jar:
META-INF/
META-INF/MANIFEST.MF
org/
org/apache/
org/apache/avalon/
org/apache/avalon/excalibur/
org/apache/avalon/excalibur/datasource/
org/apache/avalon/excalibur/datasource/AbstractJdbcConnection.class
org/apache/avalon/excalibur/datasource/DataSourceComponent$1.class
org/apache/avalon/excalibur/datasource/DataSourceComponent.class
org/apache/avalon/excalibur/datasource/InformixDataSource.class
org/apache/avalon/excalibur/datasource/J2eeDataSource.class
org/apache/avalon/excalibur/datasource/JdbcConnection.class
org/apache/avalon/excalibur/datasource/JdbcConnectionFactory.class
org/apache/avalon/excalibur/datasource/JdbcConnectionPool.class
org/apache/avalon/excalibur/datasource/JdbcDataSource.class
org/apache/avalon/excalibur/datasource/NoAvailableConnectionException.class
org/apache/avalon/excalibur/datasource/NoValidConnectionException.class
org/apache/avalon/excalibur/datasource/ResourceLimitingJdbcConnectionPool.cl
ass
org/apache/avalon/excalibur/datasource/ResourceLimitingJdbcDataSource.class
META-INF/LICENSE.txt

> > From: Andrew Savory
> > Sent: 05 April 2003 22:29
>
> > On Sat, 5 Apr 2003, Geoff Howard wrote:
> >
> > > 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:
> > > %.
> >
> > Also, try explicitly adding localhost - MySQL regards localhost as
> > different to the wildcard "every host", for goodness knows what reason.
> > (Although that will throw a connection error with the
> command-line client
> > as well as Cocoon.)
>
> Nope. That didn't work either... still getting the same message:
>
> "ERROR   (2003-04-06) 00:50.36:940   [sitemap.generator.serverpages]
> (/ltd_coultard/tickets.xsp) Thread-11/tickets_xsp: Could not get the
> datasource
> org.apache.avalon.excalibur.datasource.NoValidConnectionException:
>  No valid
> JdbcConnection class available"
---
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]



RE: Newbie: yet ANOTHER problem: db access (NoValidConnectionException)

2003-04-05 Thread Faron Dutton
Hi All,

I was having the same problem with Phoenix. It turns out that the
excalibur-datasource-1.0.jar is missing
org.apache.avalon.excalibur.datasource.JdbcConnection. Must have been a
build problem :( After adding it everything works fine.

Faron

-Original Message-
From: Phil Coultard [mailto:[EMAIL PROTECTED]
Sent: Saturday, April 05, 2003 6:55 PM
To: [EMAIL PROTECTED]
Subject: RE: Newbie: yet ANOTHER problem: db access
(NoValidConnectionException)


> From: Andrew Savory
> Sent: 05 April 2003 22:29

> On Sat, 5 Apr 2003, Geoff Howard wrote:
>
> > 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:
> > %.
>
> Also, try explicitly adding localhost - MySQL regards localhost as
> different to the wildcard "every host", for goodness knows what reason.
> (Although that will throw a connection error with the command-line client
> as well as Cocoon.)

Nope. That didn't work either... still getting the same message:

"ERROR   (2003-04-06) 00:50.36:940   [sitemap.generator.serverpages]
(/ltd_coultard/tickets.xsp) Thread-11/tickets_xsp: Could not get the
datasource
org.apache.avalon.excalibur.datasource.NoValidConnectionException: No valid
JdbcConnection class available"

This is one mild mannered Englishman who is off out to buy a baseball bat
soon ;-)

Phil
---
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: 24/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]



RE: Newbie: yet ANOTHER problem: db access (NoValidConnectionException)

2003-04-05 Thread Phil Coultard
> From: Andrew Savory
> Sent: 05 April 2003 22:29

> On Sat, 5 Apr 2003, Geoff Howard wrote:
>
> > 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:
> > %.
>
> Also, try explicitly adding localhost - MySQL regards localhost as
> different to the wildcard "every host", for goodness knows what reason.
> (Although that will throw a connection error with the command-line client
> as well as Cocoon.)

Nope. That didn't work either... still getting the same message:

"ERROR   (2003-04-06) 00:50.36:940   [sitemap.generator.serverpages]
(/ltd_coultard/tickets.xsp) Thread-11/tickets_xsp: Could not get the
datasource
org.apache.avalon.excalibur.datasource.NoValidConnectionException: No valid
JdbcConnection class available"

This is one mild mannered Englishman who is off out to buy a baseball bat
soon ;-)

Phil
---
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: 24/03/03


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



RE: Newbie: yet ANOTHER problem: db access (NoValidConnectionException)

2003-04-05 Thread Andrew Savory
On Sat, 5 Apr 2003, Geoff Howard wrote:

> 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:
> %.

Also, try explicitly adding localhost - MySQL regards localhost as
different to the wildcard "every host", for goodness knows what reason.
(Although that will throw a connection error with the command-line client
as well as Cocoon.)

Andrew.

-- 
Andrew SavoryEmail: [EMAIL PROTECTED]
Managing Director  Tel:  +44 (0)870 741 6658
Luminas Internet Applications  Fax:  +44 (0)700 598 1135
This is not an official statement or order.Web:www.luminas.co.uk

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



RE: Newbie: yet ANOTHER problem: db access (NoValidConnectionException)

2003-04-05 Thread Geoff Howard
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-

RE: Newbie: yet ANOTHER problem: db access (NoValidConnectionException)

2003-04-05 Thread Andrew Savory

Hi Phil,

On Sat, 5 Apr 2003, Phil Coultard wrote:

> Frustrated and feeling rather thick,

Don't worry, I've spent many hours on db connection problems, it's always
a sticking point and a nightmare to get sorted out.

Here's some step-by-step checks (worth repeating, as typos are often the
problem!):

1) Is the mysql server running and accepting connections?

- Test this using the mysql command-line client:

  mysql -D your_db_name -h localhost -P 3306 -pyour_password -u your_user

  Make sure you can select the information you want to use in the XSP (to
  ensure the user you're connecting as has rights to the db and the
  table):

  SELECT foo FROM bar;

- Test connections with telnet:

  telnet localhost 3306
  (you should see something like "3.23.56-log$8,u+r}>" which shows you
  can at least connect to localhost)

2) Is the (right) mysql jar available?

- Check that you downloaded the correct jar for your JDK, as jdbc
connectors are java version-specific.

- Check in $TOMCAT_HOME/webapps/cocoon/WEB-INF/lib/ for the presence of
mysql-connector-java-3.0.6-bin.jar or similar.

- Check that it is correctly referenced in WEB-INF/web.xml:


  load-class
  

com.mysql.jdbc.Driver
  


3) Is the Cocoon database connection pool configured?

- Check that it's correctly configured in WEB-INF/cocoon.xconf:

  

  
  jdbc:mysql://localhost:3306/your_db_name
  your_user
  your_password

  

4) Is the XSP written correctly?

- Try the simplest possible XSP that could work, first:



http://apache.org/xsp"; 
xmlns:esql="http://apache.org/cocoon/SQL/v2";>

  


  your_db_name
  
SELECT foo FROM bar

  

  

  


  



That said, from looking at what you've done so far, you've got everything
correct :-/


Andrew.

-- 
Andrew SavoryEmail: [EMAIL PROTECTED]
Managing Director  Tel:  +44 (0)870 741 6658
Luminas Internet Applications  Fax:  +44 (0)700 598 1135
This is not an official statement or order.Web:www.luminas.co.uk

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



RE: Newbie: yet ANOTHER problem: db access (NoValidConnectionException)

2003-04-04 Thread Phil Coultard
Hi Marco,

Thanks for your help in pointing me to the right section of the README

I have replaced the driver ref with the right string but I'm still getting
the same error message when I try to run the xsp.

Jens,

Thanks for your suggestion too of including the port number in the .xconf
dburl in the form jdbc:mysql://localhost:8080/dbname but that just
makes the server startup procedure hang half way through. I don't really
understand why this is.

Frustrated and feeling rather thick,

Phil

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 04 April 2003 23:01
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: AW: Newbie: yet ANOTHER problem: db access
(NoValidConnectionException)


first, HTH = Hope That Helps ;-), my first name is marco,

my mysql driver jar's name is 'mysql-connector-java-2.0.14-bin.jar' (which
is in WEB-INF/lib).

within the jar I have a file README. a snip from the section 'USAGE AND
INSTALLATION':

...
If you are going to use the driver with the JDBC DriverManager, you would
use
"com.mysql.jdbc.Driver" as the class that implements java.sql.Driver.

You might use this name in a Class.forName() call to load the driver:

Class.forName("com.mysql.jdbc.Driver").newInstance();

To connect to the database, you need to use a JDBC url with the following
format ([xxx] denotes optional url components):


jdbc:mysql://[hostname][:port]/[dbname][?param1=value1][¶m2=value2].

URL Parameters (can be passed as properties in
DriverManager.getConnection() as well):
...

so the driver class to load at startup in my case is com.mysql.jdbc.Driver.

the README also lists URL parameters that can be supplied in the driver url.

> -Ursprüngliche Nachricht-
> Von: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
> Auftrag von Phil Coultard
> Gesendet: Freitag, 4. April 2003 22:40
> An: [EMAIL PROTECTED]
> Betreff: 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 erro

AW: Newbie: yet ANOTHER problem: db access (NoValidConnectionException)

2003-04-04 Thread Marco Rolappe
first, HTH = Hope That Helps ;-), my first name is marco,

my mysql driver jar's name is 'mysql-connector-java-2.0.14-bin.jar' (which
is in WEB-INF/lib).

within the jar I have a file README. a snip from the section 'USAGE AND
INSTALLATION':

...
If you are going to use the driver with the JDBC DriverManager, you would
use
"com.mysql.jdbc.Driver" as the class that implements java.sql.Driver.

You might use this name in a Class.forName() call to load the driver:

Class.forName("com.mysql.jdbc.Driver").newInstance();

To connect to the database, you need to use a JDBC url with the following
format ([xxx] denotes optional url components):


jdbc:mysql://[hostname][:port]/[dbname][?param1=value1][¶m2=value2].

URL Parameters (can be passed as properties in
DriverManager.getConnection() as well):
...

so the driver class to load at startup in my case is com.mysql.jdbc.Driver.

the README also lists URL parameters that can be supplied in the driver url.

> -Ursprüngliche Nachricht-
> Von: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
> Auftrag von Phil Coultard
> Gesendet: Freitag, 4. April 2003 22:40
> An: [EMAIL PROTECTED]
> Betreff: 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:
> >
> > -

Re[2]: Newbie: yet ANOTHER problem: db access (NoValidConnectionException)

2003-04-04 Thread Jens Maukisch
Hi,

maybe you should include the port in your dburl
jdbc:mysql://localhost:3306/coultard

-- 
* best regards
* Jens Maukisch 


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



RE: Newbie: yet ANOTHER problem: db access (NoValidConnectionException)

2003-04-04 Thread Phil Coultard
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 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
>

AW: Newbie: yet ANOTHER problem: db access (NoValidConnectionException)

2003-04-04 Thread Marco Rolappe
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 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
> ex

Newbie: yet ANOTHER problem: db access (NoValidConnectionException)

2003-04-04 Thread Phil Coultard
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 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



  load-class
  
org.gjt.mm.mysql.Driver
  




extract from tomcat/webapps/applicationname/WEB-INF/cocoon.xconf


  
  

  
  false
  jdbc:mysql://localhost/coultard
  root
  

  



tickets.xsp