Re: Database connection problems

2008-05-12 Thread Andy Stevens
2008/5/8 Derek Hohls [EMAIL PROTECTED]:
 Andy

 Also, there does
 not appear to be ant errors.log or handled-errors.log files
 in the cocoon/WEB-INF/logs directory ... should there be?

Maybe the default configuration (in logkit.xconf) is different in
2.1.8, but that's where it created them for me until I changed the
file to put them elsewhere.  Check the cocoon targets to make sure
it has some defined for those files, and the categories to make sure
there are log-target references for those target IDs.

 The app and DB are running on the same machine (though
 in future they may be on different machines).

Is the application connecting using localhost or your machine's
hostname?  Which does the MySQL Query Browser use?  Is the database
listening on the network or loopback interfaces (or both), and are
both your app and the MySQL tool connecting on the same name/IP
address or might they be trying to connect on different interfaces?
For that matter, does the MySQL Query Browser connect via JDBC or some
other native driver library that defines connection settings
differently? (I've not used it myself)


Andy
-- 
http://pseudoq.sourceforge.net/  Open source java Sudoku solver

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



Re: Database connection problems

2008-05-08 Thread Derek Hohls
Jeroen
 
1. AFAIK there is no firewall - at least, the app has been working on
an internal server (port 8080) which has been accessible up to now.
 
2.  I thought of this one too - and realized I was not sure (a) how to
check if it is actually full and (b) what/how it gets full (c) how to ensure
it does NOT get full in the first place - I had thought that each user who 
logs on to the system gets one connection, but now I am thinking that it
might be each single SQL request that adds to the pool ... in which case 
I will need substantially more than the present limit of 50.
 
3. The log level is at INFO - shows all requests including WARNING and 
ERROR.
 
4. The MySQL JDBC connector.
 
5. I have been waiting for the restart by the server admin... but I was 
concerned because I do not know _why_ this happened (this type of 
problem has never shown up in 8 or so years of using Cocoon!)
 
Thanks
Derek

 On 2008/05/07 at 03:39, in message [EMAIL PROTECTED], Jeroen Reijn 
 [EMAIL PROTECTED] wrote:
Hi Derek,

a few things come to mind:

- Might there be a firewall in between of which the settings changed?
- You JDBC connection pool is full?
- Did you try to put the log level a bit higher to see what the database 
connection is doing?
- What cocoon component are you using to connect to the database?
- Are you able to restart the application, to do some testing?

Regards,

Jeroen Reijn

Derek Hohls wrote:
 Using Cocoon 2.1.8
  
 I have an app which has been working fine... up to now.
 I am now in a situation where:
 * the plain pages on the website (ie. not accessing the
 database) display just fine
 * I can access the database from a 3rd party tool (the
 MySQL Query Browser) without any problems
  
 BUT I am unable to retrieve any database data via the
 interface... the browser simply shows me its hourglass
 and there is no further response.  I have looked at the
 Cocoon log and the Tomcat log but even the URLs do
 not show up in these.
  
 Any ideas on where the bottleneck might be occurring
 and how to overcome it?
  
 Any help is much appreciated!
  
 Thanks
 Derek
  
 
 -- 
 This message is subject to the CSIR's copyright terms and conditions, 
 e-mail legal notice, and implemented Open Document Format (ODF) standard.
 The full disclaimer details can be found at 
 http://www.csir.co.za/disclaimer.html.
 
 
 This message has been scanned for viruses and dangerous content by 
 *MailScanner* http://www.mailscanner.info/,
 and is believed to be clean. MailScanner thanks Transtec Computers 
 http://www.transtec.co.uk/ for their support.
 

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


-- 
This message is subject to the CSIR's copyright terms and conditions, e-mail 
legal notice, and implemented Open Document Format (ODF) standard. 
The full disclaimer details can be found at 
http://www.csir.co.za/disclaimer.html.

This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.  MailScanner thanks Transtec Computers for their 
support.



-- 
This message is subject to the CSIR's copyright terms and conditions, e-mail 
legal notice, and implemented Open Document Format (ODF) standard. 
The full disclaimer details can be found at 
http://www.csir.co.za/disclaimer.html.

This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.  MailScanner thanks Transtec Computers for their 
support.


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



Re: Database connection problems

2008-05-08 Thread Derek Hohls
Andy

I am assuming that Cocoon cannot connect to the DB;
the issue is why.  The browser hangs indefinitely, and
there is no message in the cocoon.log.  Also, there does
not appear to be ant errors.log or handled-errors.log files
in the cocoon/WEB-INF/logs directory ... should there be?
The app and DB are running on the same machine (though
in future they may be on different machines).

PS See also my reply to Jeroen.

 On 2008/05/07 at 06:05, in message [EMAIL PROTECTED], Andy Stevens 
 [EMAIL PROTECTED] wrote:
2008/5/7 Derek Hohls [EMAIL PROTECTED]:
 Using Cocoon 2.1.8

 I have an app which has been working fine... up to now.
 I am now in a situation where:
 * the plain pages on the website (ie. not accessing the
 database) display just fine
 * I can access the database from a 3rd party tool (the
 MySQL Query Browser) without any problems

 BUT I am unable to retrieve any database data via the
 interface... the browser simply shows me its hourglass
 and there is no further response.  I have looked at the
 Cocoon log and the Tomcat log but even the URLs do
 not show up in these.

Are you sure Cocoon is actually managing to connect to the database?
You say there is no further response - how long are you waiting?
I'm not sure about the other database components, but certainly in the
case of the SQLTransformer if it can't get a connection it will (by
default) retry 5 times at 5 second intervals, so it could be 30
seconds before you actually get an error message returned.  And if
it's waiting on a TCP-level timout ConnectException (e.g. because the
port is blocked by a firewall and the packets are being dropped rather
than actually rejecting the connection) that could involve a 20 second
timeout in itself...
I'd have thought you'd still see something in Cocoon's errors.log or
handled-errors.log, though.
You say you can access the database okay yourself; is the application
running locally on the same machine, or is it deployed on some other
server?


Andy
-- 
http://pseudoq.sourceforge.net/  Open source java Sudoku solver

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


-- 
This message is subject to the CSIR's copyright terms and conditions, e-mail 
legal notice, and implemented Open Document Format (ODF) standard. 
The full disclaimer details can be found at 
http://www.csir.co.za/disclaimer.html.

This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.  MailScanner thanks Transtec Computers for their 
support.



-- 
This message is subject to the CSIR's copyright terms and conditions, e-mail 
legal notice, and implemented Open Document Format (ODF) standard. 
The full disclaimer details can be found at 
http://www.csir.co.za/disclaimer.html.

This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.  MailScanner thanks Transtec Computers for their 
support.


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



Re: Database connection problems

2008-05-07 Thread Jeroen Reijn

Hi Derek,

a few things come to mind:

- Might there be a firewall in between of which the settings changed?
- You JDBC connection pool is full?
- Did you try to put the log level a bit higher to see what the database 
connection is doing?

- What cocoon component are you using to connect to the database?
- Are you able to restart the application, to do some testing?

Regards,

Jeroen Reijn

Derek Hohls wrote:

Using Cocoon 2.1.8
 
I have an app which has been working fine... up to now.

I am now in a situation where:
* the plain pages on the website (ie. not accessing the
database) display just fine
* I can access the database from a 3rd party tool (the
MySQL Query Browser) without any problems
 
BUT I am unable to retrieve any database data via the

interface... the browser simply shows me its hourglass
and there is no further response.  I have looked at the
Cocoon log and the Tomcat log but even the URLs do
not show up in these.
 
Any ideas on where the bottleneck might be occurring

and how to overcome it?
 
Any help is much appreciated!
 
Thanks

Derek
 


--
This message is subject to the CSIR's copyright terms and conditions, 
e-mail legal notice, and implemented Open Document Format (ODF) standard.
The full disclaimer details can be found at 
http://www.csir.co.za/disclaimer.html.



This message has been scanned for viruses and dangerous content by 
*MailScanner* http://www.mailscanner.info/,
and is believed to be clean. MailScanner thanks Transtec Computers 
http://www.transtec.co.uk/ for their support.




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



Re: Database connection problems

2008-05-07 Thread Andy Stevens
2008/5/7 Derek Hohls [EMAIL PROTECTED]:
 Using Cocoon 2.1.8

 I have an app which has been working fine... up to now.
 I am now in a situation where:
 * the plain pages on the website (ie. not accessing the
 database) display just fine
 * I can access the database from a 3rd party tool (the
 MySQL Query Browser) without any problems

 BUT I am unable to retrieve any database data via the
 interface... the browser simply shows me its hourglass
 and there is no further response.  I have looked at the
 Cocoon log and the Tomcat log but even the URLs do
 not show up in these.

Are you sure Cocoon is actually managing to connect to the database?
You say there is no further response - how long are you waiting?
I'm not sure about the other database components, but certainly in the
case of the SQLTransformer if it can't get a connection it will (by
default) retry 5 times at 5 second intervals, so it could be 30
seconds before you actually get an error message returned.  And if
it's waiting on a TCP-level timout ConnectException (e.g. because the
port is blocked by a firewall and the packets are being dropped rather
than actually rejecting the connection) that could involve a 20 second
timeout in itself...
I'd have thought you'd still see something in Cocoon's errors.log or
handled-errors.log, though.
You say you can access the database okay yourself; is the application
running locally on the same machine, or is it deployed on some other
server?


Andy
-- 
http://pseudoq.sourceforge.net/  Open source java Sudoku solver

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



Re: Database connection problems during upgrade

2007-08-07 Thread Derek Hohls
Actually, both were right.   
 
The only problem I had was trying to find a suitable mysql-***.jar 
version.  Despite the fact that both the server and my PC are running 
Java 1.4 and Cocoon 1.8 :-
  mysql-connector-java-5.1.2-beta-bin.jar works on the server, and
  mysql-connector-java-3.1.7-bin.jar works on my PC
but not the other way around.  
 
Sigh.  But thanks again for the speedy help!

 Johannes Textor [EMAIL PROTECTED] 2007/08/06 12:42 PM 


  this is probably because you have not included com.mysql.jdbc.Driver
  (not sure if this is the exact class name) in web.xml.
 
 Or maybe he didn't copy the actual driver class.
 
 For example, mine is:
 WEB-INF/lib/mysql-connector-java-5.0.6-bin.jar
 
 
 Tobia

That might also be, although I'd think this would throw a class not found 
exception instead of a no suitable driver one (just guessing though) 

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




-- 
This message is subject to the CSIR's copyright, terms and conditions and
e-mail legal notice. Views expressed herein do not necessarily represent the
views of the CSIR.
 
CSIR E-mail Legal Notice
http://mail.csir.co.za/CSIR_eMail_Legal_Notice.html 
 
CSIR Copyright, Terms and Conditions
http://mail.csir.co.za/CSIR_Copyright.html 
 
For electronic copies of the CSIR Copyright, Terms and Conditions and the CSIR
Legal Notice send a blank message with REQUEST LEGAL in the subject line to
[EMAIL PROTECTED]


This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.


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



Re: Database connection problems during upgrade

2007-08-06 Thread Johannes Textor
Hi Derek,

this is probably because you have not included com.mysql.jdbc.Driver (not sure 
if this is the exact class name) in web.xml. 

Cheers,
Johannes

 Original-Nachricht 
Datum: Mon, 06 Aug 2007 11:05:17 +0200
Von: Derek Hohls [EMAIL PROTECTED]
An: users@cocoon.apache.org
Betreff: Database connection problems during upgrade

 I am in the process of upgrading to Cocoon 2.1.8 on the server.
 At present , I am testing with Jetty (port ).  I have copied all the 
 database connection settings to the new cocoon.xconf file, from my
 local (test) PC (where everything works fine) e.g. all the XML 
 snippets that take the form:
  
 jdbc name=db_user
   pool-controller min=5 max=20/
   auto-committrue/auto-commit
   dburljdbc:mysql://localhost:3306/test/dburl
   usertest/user
   passwordtest/password
  /jdbc  
  
 The Jetty container was restarted, but it seems the database cannot
 be connected.  The error.log file shows these messages:
  
 INFO  (2007-08-06) 09:22.14:029 [sitemap.transformer.sql] (/test/do-login)
 PoolThread-3/SQLTransformer: Unable to get connection; waiting 5000ms to
 try again.
 WARN  (2007-08-06) 09:22.19:031 [core.manager] (/test/do-login)
 PoolThread-3/ResourceLimitingJdbcDataSource: Could not return Connection
 java.sql.SQLException: No suitable driver
  
 What are the possible causes of / solutions to  this problem?
  
 Thanks
 Derek
  
 PS The same database connections work OK under the older Cocoon
 version running under Tomcat, on the same server.
 
 
 -- 
 This message is subject to the CSIR's copyright, terms and conditions and
 e-mail legal notice. Views expressed herein do not necessarily represent
 the
 views of the CSIR.
  
 CSIR E-mail Legal Notice
 http://mail.csir.co.za/CSIR_eMail_Legal_Notice.html 
  
 CSIR Copyright, Terms and Conditions
 http://mail.csir.co.za/CSIR_Copyright.html 
  
 For electronic copies of the CSIR Copyright, Terms and Conditions and the
 CSIR
 Legal Notice send a blank message with REQUEST LEGAL in the subject line
 to
 [EMAIL PROTECTED]
 
 
 This message has been scanned for viruses and dangerous content by
 MailScanner, 
 and is believed to be clean.
 
 
 -
 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: Database connection problems during upgrade

2007-08-06 Thread Tobia Conforto
Johannes Textor wrote:
 this is probably because you have not included com.mysql.jdbc.Driver
 (not sure if this is the exact class name) in web.xml.

Or maybe he didn't copy the actual driver class.

For example, mine is:
WEB-INF/lib/mysql-connector-java-5.0.6-bin.jar


Tobia

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



Re: Database connection problems during upgrade

2007-08-06 Thread Johannes Textor

  this is probably because you have not included com.mysql.jdbc.Driver
  (not sure if this is the exact class name) in web.xml.
 
 Or maybe he didn't copy the actual driver class.
 
 For example, mine is:
 WEB-INF/lib/mysql-connector-java-5.0.6-bin.jar
 
 
 Tobia

That might also be, although I'd think this would throw a class not found 
exception instead of a no suitable driver one (just guessing though) 

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