You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Roberto <rm...@montefiore.ch> on 2004/11/16 08:45:05 UTC

MySQL Failed Connection...

Dear sirs,
Im going to be crazy over this.

Since I installed Cocoon I never could connect to MySQL db. I did everything properly in the cocoon.xconf & in the web.xml trust me, I added the mysql-connector-java-3.0.6-stable-bin.jar under the ../WEB-INF/lib, but I got always the same error from error.log & sitemap.log:

ERROR   (2004-11-16) 08:33.34:464   [sitemap.transformer.sql] (/montefiore/hellococoon) PoolThread-4/SQLTransformer.Query: Caught a SQLException
java.sql.SQLException: Failed to obtain connection. Made 5 attempts with 5000ms interval
(....)

I can connect to this source via other sistem. The MySQL service is started (got Windows 2000). I thought was the firewall that dosn't let me connect so I unistalled it but the problem is still the same.

Please can somebody help me I mean I guessIm not the only one that want to use MySQL as db... and another question how can I connect via JDBC-ODBC?

Thanx in advance for any suggestion

Ciao
Roberto

Re: MySQL Failed Connection...

Posted by Roberto <rm...@montefiore.ch>.
Yes via PHP & it works...

Hei you know what, in the same time Im writing this e-mail I discovered right now that it works!!!!! Can't belive :-D, Im still using the mysql-connector-java-3.0.14-production-bin.jar & it works!!!!!

After I changed the connector & checked the MySQL I never rebooted the system.... Before reply to ur e-mail I rebooted & now it works!!! 

So wanna 2say thanx to all people helped me. Appriciate, for real :-D

Ciao
ROb
  ----- Original Message ----- 
  From: beya! 
  To: users@cocoon.apache.org 
  Sent: Tuesday, November 16, 2004 4:51 PM
  Subject: Re: MySQL Failed Connection...


  Roberto,
  have you tried to connect to mySQL using another application?

  regards


  Andrew
  On 16 Nov 2004, at 15:43, Roberto wrote:


    MySQL version is 4.1 & is working properly I the user already had permission on all the database... I really don't know :-(
     
    regards
    ROb
    ----- Original Message -----
    From: beya! 
    To: users@cocoon.apache.org 
    Sent: Tuesday, November 16, 2004 4:38 PM
    Subject: Re: MySQL Failed Connection...

    Roberto, for real, I changed the database to postgreSQL. I spent days trying to connect to mySQL and in the end nearly ended up throwing my computer into the river..... What version of mySQL are you using? By the way, were you able to find out whether mySQL was started or not?

    regards

    Andrew
    On 16 Nov 2004, at 15:33, Roberto wrote:


    Andrew,
    thanx for the support. But for real did you change your database? I cant do that... I mean I got my actually db in MySQL & I need to use it.
     
    I made the check you suggested me, but the problem is still the same #@#@@##!! As you right said is a nightmare, but I have to solve it!!
     
    Ciao
    ROb
    ----- Original Message -----
    From: beya!
    To: users@cocoon.apache.org
    Sent: Tuesday, November 16, 2004 10:31 AM
    Subject: Re: MySQL Failed Connection...

    Roberto,
    I had the same problem with mySQL 4.1 last week which was a complete nightmare. I could not connect to it at all. In the end I discovered that mySQL was not started even though I gave it the command to start and in the terminal window it said that the mySQL service had started.

    Check to see whether mySQL has really started:

    /bin/mysqladmin version

    If the service is started, the next thing to do is check the user privileges. If that doesn't work, use postgreSQL which is what I ended up doing ;-)


    regards


    Andrew
    On 16 Nov 2004, at 09:18, Roberto wrote:


    Salue Francois and merci,
    well I did exactely as you wrote, same stuff. You know what I send everything to a friend that have the same configuration as mine & he told me that on his computer works fine.
     
    So the problems seems on my one... but I don't know what I have to check because I got the same problem on my notebook at home.
     
    Roberto




    <image.tiff>
     +The home of urban music
    + http://www.beyarecords.com



    ---------------------------------------------------------------------
    To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
    For additional commands, e-mail: users-help@cocoon.apache.org




------------------------------------------------------------------------------






------------------------------------------------------------------------------



   +The home of urban music
  + http://www.beyarecords.com




------------------------------------------------------------------------------


  ---------------------------------------------------------------------
  To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
  For additional commands, e-mail: users-help@cocoon.apache.org

Re: MySQL Failed Connection...

Posted by beya! <an...@jibeya.com>.
Roberto,
have you tried to connect to mySQL using another application?

regards


Andrew
On 16 Nov 2004, at 15:43, Roberto wrote:

> MySQL version is 4.1 & is working properly I the user already had 
> permission on all the database... I really don't know :-(
>  
> regards
> ROb
> ----- Original Message -----
>  From: beya!
> To: users@cocoon.apache.org
> Sent: Tuesday, November 16, 2004 4:38 PM
> Subject: Re: MySQL Failed Connection...
>
> Roberto, for real, I changed the database to postgreSQL. I spent days 
> trying to connect to mySQL and in the end nearly ended up throwing my 
> computer into the river..... What version of mySQL are you using? By 
> the way, were you able to find out whether mySQL was started or not?
>
> regards
>
> Andrew
> On 16 Nov 2004, at 15:33, Roberto wrote:
>
>
> Andrew,
> thanx for the support. But for real did you change your database? I 
> cant do that... I mean I got my actually db in MySQL & I need to use 
> it.
>  
> I made the check you suggested me, but the problem is still the same 
> #@#@@##!! As you right said is a nightmare, but I have to solve it!!
>  
> Ciao
> ROb
> ----- Original Message -----
> From: beya!
>  To: users@cocoon.apache.org
>  Sent: Tuesday, November 16, 2004 10:31 AM
> Subject: Re: MySQL Failed Connection...
>
> Roberto,
> I had the same problem with mySQL 4.1 last week which was a complete 
> nightmare. I could not connect to it at all. In the end I discovered 
> that mySQL was not started even though I gave it the command to start 
> and in the terminal window it said that the mySQL service had started.
>
> Check to see whether mySQL has really started:
>
> /bin/mysqladmin version
>
> If the service is started, the next thing to do is check the user 
> privileges. If that doesn't work, use postgreSQL which is what I ended 
> up doing ;-)
>
>
> regards
>
>
> Andrew
> On 16 Nov 2004, at 09:18, Roberto wrote:
>
>
> Salue Francois and merci,
> well I did exactely as you wrote, same stuff. You know what I send 
> everything to a friend that have the same configuration as mine & he 
> told me that on his computer works fine.
>  
> So the problems seems on my one... but I don't know what I have to 
> check because I got the same problem on my notebook at home.
>  
> Roberto
>
>
>
>
> <image.tiff>
>  +The home of urban music
> + http://www.beyarecords.com
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>

Re: MySQL Failed Connection...

Posted by Roberto <rm...@montefiore.ch>.
MySQL version is 4.1 & is working properly I the user already had permission on all the database... I really don't know :-(

regards
ROb
  ----- Original Message ----- 
  From: beya! 
  To: users@cocoon.apache.org 
  Sent: Tuesday, November 16, 2004 4:38 PM
  Subject: Re: MySQL Failed Connection...


  Roberto, for real, I changed the database to postgreSQL. I spent days trying to connect to mySQL and in the end nearly ended up throwing my computer into the river..... What version of mySQL are you using? By the way, were you able to find out whether mySQL was started or not?

  regards

  Andrew
  On 16 Nov 2004, at 15:33, Roberto wrote:


    Andrew,
    thanx for the support. But for real did you change your database? I cant do that... I mean I got my actually db in MySQL & I need to use it.
     
    I made the check you suggested me, but the problem is still the same #@#@@##!! As you right said is a nightmare, but I have to solve it!!
     
    Ciao
    ROb
    ----- Original Message -----
    From: beya! 
    To: users@cocoon.apache.org 
    Sent: Tuesday, November 16, 2004 10:31 AM
    Subject: Re: MySQL Failed Connection...

    Roberto,
    I had the same problem with mySQL 4.1 last week which was a complete nightmare. I could not connect to it at all. In the end I discovered that mySQL was not started even though I gave it the command to start and in the terminal window it said that the mySQL service had started.

    Check to see whether mySQL has really started:

    /bin/mysqladmin version

    If the service is started, the next thing to do is check the user privileges. If that doesn't work, use postgreSQL which is what I ended up doing ;-)


    regards


    Andrew
    On 16 Nov 2004, at 09:18, Roberto wrote:


    Salue Francois and merci,
    well I did exactely as you wrote, same stuff. You know what I send everything to a friend that have the same configuration as mine & he told me that on his computer works fine.
     
    So the problems seems on my one... but I don't know what I have to check because I got the same problem on my notebook at home.
     
    Roberto






------------------------------------------------------------------------------






------------------------------------------------------------------------------



   +The home of urban music
  + http://www.beyarecords.com




------------------------------------------------------------------------------


  ---------------------------------------------------------------------
  To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
  For additional commands, e-mail: users-help@cocoon.apache.org

Re: MySQL Failed Connection...

Posted by beya! <an...@jibeya.com>.
Roberto, for real, I changed the database to postgreSQL. I spent days 
trying to connect to mySQL and in the end nearly ended up throwing my 
computer into the river..... What version of mySQL are you using? By 
the way, were you able to find out whether mySQL was started or not?

regards

Andrew
On 16 Nov 2004, at 15:33, Roberto wrote:

> Andrew,
> thanx for the support. But for real did you change your database? I 
> cant do that... I mean I got my actually db in MySQL & I need to use 
> it.
>  
> I made the check you suggested me, but the problem is still the same 
> #@#@@##!! As you right said is a nightmare, but I have to solve it!!
>  
> Ciao
> ROb
> ----- Original Message -----
>  From: beya!
> To: users@cocoon.apache.org
> Sent: Tuesday, November 16, 2004 10:31 AM
> Subject: Re: MySQL Failed Connection...
>
> Roberto,
> I had the same problem with mySQL 4.1 last week which was a complete 
> nightmare. I could not connect to it at all. In the end I discovered 
> that mySQL was not started even though I gave it the command to start 
> and in the terminal window it said that the mySQL service had started.
>
> Check to see whether mySQL has really started:
>
> /bin/mysqladmin version
>
> If the service is started, the next thing to do is check the user 
> privileges. If that doesn't work, use postgreSQL which is what I ended 
> up doing ;-)
>
>
> regards
>
>
> Andrew
> On 16 Nov 2004, at 09:18, Roberto wrote:
>
>
> Salue Francois and merci,
> well I did exactely as you wrote, same stuff. You know what I send 
> everything to a friend that have the same configuration as mine & he 
> told me that on his computer works fine.
>  
> So the problems seems on my one... but I don't know what I have to 
> check because I got the same problem on my notebook at home.
>  
> Roberto
>
>
>

Re: MySQL Failed Connection...

Posted by Roberto <rm...@montefiore.ch>.
Andrew,
thanx for the support. But for real did you change your database? I cant do that... I mean I got my actually db in MySQL & I need to use it.

I made the check you suggested me, but the problem is still the same #@#@@##!! As you right said is a nightmare, but I have to solve it!!

Ciao
ROb
  ----- Original Message ----- 
  From: beya! 
  To: users@cocoon.apache.org 
  Sent: Tuesday, November 16, 2004 10:31 AM
  Subject: Re: MySQL Failed Connection...


  Roberto,
  I had the same problem with mySQL 4.1 last week which was a complete nightmare. I could not connect to it at all. In the end I discovered that mySQL was not started even though I gave it the command to start and in the terminal window it said that the mySQL service had started.

  Check to see whether mySQL has really started:

  /bin/mysqladmin version

  If the service is started, the next thing to do is check the user privileges. If that doesn't work, use postgreSQL which is what I ended up doing ;-)


  regards


  Andrew
  On 16 Nov 2004, at 09:18, Roberto wrote:


    Salue Francois and merci,
    well I did exactely as you wrote, same stuff. You know what I send everything to a friend that have the same configuration as mine & he told me that on his computer works fine.
     
    So the problems seems on my one... but I don't know what I have to check because I got the same problem on my notebook at home.
     
    Roberto




Re: MySQL Failed Connection...

Posted by beya! <an...@jibeya.com>.
Roberto,
I had the same problem with mySQL 4.1 last week which was a complete 
nightmare. I could not connect to it at all. In the end  I discovered 
that mySQL was not started even though I gave it the command to start 
and in the terminal window it said that the mySQL service had started.

Check to see whether mySQL has really started:

/bin/mysqladmin version

If the service is started, the next thing to do is check the user 
privileges. If that doesn't work, use postgreSQL which is what I ended 
up doing ;-)


regards


Andrew
On 16 Nov 2004, at 09:18, Roberto wrote:

> Salue Francois and merci,
> well I did exactely as you wrote, same stuff. You know what I send 
> everything to a friend that have the same configuration as mine & he 
> told me that on his computer works fine.
>  
> So the problems seems on my one... but I don't know what I have to 
> check because I got the same problem on my notebook at home.
>  
> Roberto
>


Re: MySQL Failed Connection...

Posted by Roberto <rm...@montefiore.ch>.
Salue Francois and merci,
well I did exactely as you wrote, same stuff. You know what I send everything to a friend that have the same configuration as mine & he told me that on his computer works fine.

So the problems seems on my one... but I don't know what I have to check because I got the same problem on my notebook at home.

Roberto

AW: MySQL Failed Connection...

Posted by Oliver Neumann <on...@theaterwelt.de>.
you need an update of the mysql driver for mysql version 4.1

Current ODBC and jar drivers can be found on mysql.com

(solved my issues with it)

Oliver


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: MySQL Failed Connection...

Posted by Francois Jannin <f....@free.fr>.
Roberto wrote:

> Dear sirs,
> Im going to be crazy over this.
>  
> Since I installed Cocoon I never could connect to MySQL db. I did 
> everything properly in the cocoon.xconf & in the web.xml trust me, I 
> added the mysql-connector-java-3.0.6-stable-bin.jar under the 
> ../WEB-INF/lib, but I got always the same error from error.log & 
> sitemap.log:
>  
> ERROR   (2004-11-16) 08:33.34:464   [sitemap.transformer.sql] 
> (/montefiore/hellococoon) PoolThread-4/SQLTransformer.Query: Caught a 
> SQLException
> java.sql.SQLException: Failed to obtain connection. Made 5 attempts 
> with 5000ms interval
> (....)
>  
> I can connect to this source via other sistem. The MySQL service is 
> started (got Windows 2000). I thought was the firewall that dosn't let 
> me connect so I unistalled it but the problem is still the same.
>  

Personnaly, doing just the following works fine  :
in cocoon.xconf, under <datasources> :
<jdbc logger="core.datasources.anouncement" name="Myconnection">
<pool-controller max="10" min="5"/>

<auto-commit>true</auto-commit>

<dburl>jdbc:mysql://localhost:3306/mybase</dburl>

<user>mylogin</user>

<password>mypassword</password>

</jdbc>


In web.xml :

<init-param>

<param-name>load-class</param-name>

<param-value>

<!-- For parent ComponentManager sample:

org.apache.cocoon.samples.parentcm.Configurator -->

<!-- For IBM WebSphere:

com.ibm.servlet.classloader.Handler -->

<!-- For Database Driver: -->

org.hsqldb.jdbcDriver

<!-- For Mysql Database: -->

com.mysql.jdbc.Driver

</param-value>

</init-param>

And in your sitemap :

map:match pattern="DrawMyBase" >

<map:generate src="MyBase_sql.xml" />

<map:transform type="sql">

<map:parameter name="use-connection" value="Myconnection"/>

</map:transform>

<map:serialize/>

</map:match>

And as sample, this sql query (MyBase_sql.xml):

<?xml version="1.0"?>

<anouncement xmlns:sql="http://apache.org/cocoon/SQL/2.0">

<execute-query xmlns="http://apache.org/cocoon/SQL/2.0">

<query>

select TITLE, DESCRIPTION from books limit 5

</query>

</execute-query>

</anouncement>


> Please can somebody help me I mean I guessIm not the only one that 
> want to use MySQL as db... and another question how can I connect via 
> JDBC-ODBC?
>  

Only in the case there is no jdbc driver for your DB, you can use 
JDBC-ODBC bridge to connect to it with JDBC.
Go to 
http://java.sun.com/j2se/1.3/docs/guide/jdbc/getstart/bridge.doc.html 
for further details.
Once you've created an ODBC datasource , (find administrative tools -> 
Datasources(ODBC) , choose your ODBC driver and configure the connection 
parameters), you can connect to it thru JDBC-ODBC driver bridge the same 
way as any JDBC driver, by providing datasourcename :
   
    - add sun.jdbc.odbc.JdbcOdbcDriver in web.xml
    - define connection in cocoon.xconf with :
   <dburl>jdbc:odbc://[ODBCDataSourceName]</dburl>
    

> Thanx in advance for any suggestion
>  
> Ciao
> Roberto
>  

Good luck

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org