MySQL Driver not found?

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

MySQL Driver not found?

Stephan.Schmidt
Hello, me again :-)

I've copied the mysql.jar to lib and it's copied to WEB-INF/lib.

But with

class ApplicationDataSource {
    @Property boolean pooled = true
    @Property String dbCreate = "create" // one of 'create', 'create-
drop','update'
    @Property String url = "jdbc:mysql://127.0.0.1/rDB"
    @Property String driverClassName = "com.mysql.jdbc.Driver"
    @Property String username = ""
    @Property String password = ""
}


I get

NestedException: Cannot load JDBC driver class 'com.mysql.jdbc.Driver'
    [groovy]  
org.springframework.jdbc.CannotGetJdbcConnectionException: Could not  
get JDBC Connection; nested exception is  
org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver  
class 'com.mysql.jdbc.Driver'
    [groovy] org.apache.commons.dbcp.SQLNestedException: Cannot load  
JDBC driver class 'com.mysql.jdbc.Driver'
    [groovy]     at  
org.apache.commons.dbcp.BasicDataSource.createDataSource
(BasicDataSource.java:766)

Any ideas?

bye
-stephan

--
   Stephan Schmidt
   [hidden email]

   PRESS ON. Nothing in the world can take the place of persistence.
   Talent will not; nothing in the world is more common than  
unsuccessful
   men with talent. Genius will not; unrewarded genius is almost a  
proverb.
   Education will not; the world is full of educated derelicts.  
Persistence
   and determination alone are omnipotent. - Calvin Coolidge


Reply | Threaded
Open this post in threaded view
|

Re: MySQL Driver not found?

graemer
Are you sure that is the mysql connector jar (ie the one with the
driver in), because i'm working with Grails and MySQL at the moment
with no problems

Graeme

On 3/22/06, Stephan J. Schmidt <[hidden email]> wrote:

> Hello, me again :-)
>
> I've copied the mysql.jar to lib and it's copied to WEB-INF/lib.
>
> But with
>
> class ApplicationDataSource {
>     @Property boolean pooled = true
>     @Property String dbCreate = "create" // one of 'create', 'create-
> drop','update'
>     @Property String url = "jdbc:mysql://127.0.0.1/rDB"
>     @Property String driverClassName = "com.mysql.jdbc.Driver"
>     @Property String username = ""
>     @Property String password = ""
> }
>
>
> I get
>
> NestedException: Cannot load JDBC driver class 'com.mysql.jdbc.Driver'
>     [groovy]
> org.springframework.jdbc.CannotGetJdbcConnectionException: Could not
> get JDBC Connection; nested exception is
> org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver
> class 'com.mysql.jdbc.Driver'
>     [groovy] org.apache.commons.dbcp.SQLNestedException: Cannot load
> JDBC driver class 'com.mysql.jdbc.Driver'
>     [groovy]     at
> org.apache.commons.dbcp.BasicDataSource.createDataSource
> (BasicDataSource.java:766)
>
> Any ideas?
>
> bye
> -stephan
>
> --
>    Stephan Schmidt
>    [hidden email]
>
>    PRESS ON. Nothing in the world can take the place of persistence.
>    Talent will not; nothing in the world is more common than
> unsuccessful
>    men with talent. Genius will not; unrewarded genius is almost a
> proverb.
>    Education will not; the world is full of educated derelicts.
> Persistence
>    and determination alone are omnipotent. - Calvin Coolidge
>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: MySQL Driver not found?

Stephan.Schmidt
Thought so

iBook:~/src/repo/trunk/repo$ jar tvf lib/mysql-3.1.12.jar  | grep  
driver -i
    648 Thu Dec 01 03:01:50 CET 2005 com/mysql/jdbc/Driver.class
13703 Thu Dec 01 03:01:50 CET 2005 com/mysql/jdbc/
NonRegisteringDriver.class
   3681 Thu Dec 01 03:01:52 CET 2005 com/mysql/jdbc/
NonRegisteringReplicationDriver.class
    687 Thu Dec 01 03:01:52 CET 2005 com/mysql/jdbc/
ReplicationDriver.class
    336 Thu Dec 01 03:01:50 CET 2005 org/gjt/mm/mysql/Driver.class



> Are you sure that is the mysql connector jar (ie the one with the
> driver in), because i'm working with Grails and MySQL at the moment
> with no problems
>
> Graeme
>
> On 3/22/06, Stephan J. Schmidt <[hidden email]> wrote:
>> Hello, me again :-)
>>
>> I've copied the mysql.jar to lib and it's copied to WEB-INF/lib.
>>
>> But with
>>
>> class ApplicationDataSource {
>>     @Property boolean pooled = true
>>     @Property String dbCreate = "create" // one of 'create', 'create-
>> drop','update'
>>     @Property String url = "jdbc:mysql://127.0.0.1/rDB"
>>     @Property String driverClassName = "com.mysql.jdbc.Driver"
>>     @Property String username = ""
>>     @Property String password = ""
>> }
>>
>>
>> I get
>>
>> NestedException: Cannot load JDBC driver class  
>> 'com.mysql.jdbc.Driver'
>>     [groovy]
>> org.springframework.jdbc.CannotGetJdbcConnectionException: Could not
>> get JDBC Connection; nested exception is
>> org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver
>> class 'com.mysql.jdbc.Driver'
>>     [groovy] org.apache.commons.dbcp.SQLNestedException: Cannot load
>> JDBC driver class 'com.mysql.jdbc.Driver'
>>     [groovy]     at
>> org.apache.commons.dbcp.BasicDataSource.createDataSource
>> (BasicDataSource.java:766)
>>
>> Any ideas?
>>
>> bye
>> -stephan
>>
>> --
>>    Stephan Schmidt
>>    [hidden email]
>>
>>    PRESS ON. Nothing in the world can take the place of persistence.
>>    Talent will not; nothing in the world is more common than
>> unsuccessful
>>    men with talent. Genius will not; unrewarded genius is almost a
>> proverb.
>>    Education will not; the world is full of educated derelicts.
>> Persistence
>>    and determination alone are omnipotent. - Calvin Coolidge
>>
>>
>>

--
   Stephan Schmidt
   [hidden email]

   PRESS ON. Nothing in the world can take the place of persistence.
   Talent will not; nothing in the world is more common than  
unsuccessful
   men with talent. Genius will not; unrewarded genius is almost a  
proverb.
   Education will not; the world is full of educated derelicts.  
Persistence
   and determination alone are omnipotent. - Calvin Coolidge


Reply | Threaded
Open this post in threaded view
|

Re: MySQL Driver not found?

Stephan.Schmidt
In reply to this post by graemer
Is there a working config for mysql somewhere in the documentation?
Perhaps I have another param wrong

bye
-stephan

On Mar 22, 2006, at 18:07 Uhr, Graeme Rocher wrote:

> Are you sure that is the mysql connector jar (ie the one with the
> driver in), because i'm working with Grails and MySQL at the moment
> with no problems
>
> Graeme
>
> On 3/22/06, Stephan J. Schmidt <[hidden email]> wrote:
>> Hello, me again :-)
>>
>> I've copied the mysql.jar to lib and it's copied to WEB-INF/lib.
>>
>> But with
>>
>> class ApplicationDataSource {
>>     @Property boolean pooled = true
>>     @Property String dbCreate = "create" // one of 'create', 'create-
>> drop','update'
>>     @Property String url = "jdbc:mysql://127.0.0.1/rDB"
>>     @Property String driverClassName = "com.mysql.jdbc.Driver"
>>     @Property String username = ""
>>     @Property String password = ""
>> }
>>
>>
>> I get
>>
>> NestedException: Cannot load JDBC driver class  
>> 'com.mysql.jdbc.Driver'
>>     [groovy]
>> org.springframework.jdbc.CannotGetJdbcConnectionException: Could not
>> get JDBC Connection; nested exception is
>> org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver
>> class 'com.mysql.jdbc.Driver'
>>     [groovy] org.apache.commons.dbcp.SQLNestedException: Cannot load
>> JDBC driver class 'com.mysql.jdbc.Driver'
>>     [groovy]     at
>> org.apache.commons.dbcp.BasicDataSource.createDataSource
>> (BasicDataSource.java:766)
>>
>> Any ideas?
>>
>> bye
>> -stephan
>>
>> --
>>    Stephan Schmidt
>>    [hidden email]
>>
>>    PRESS ON. Nothing in the world can take the place of persistence.
>>    Talent will not; nothing in the world is more common than
>> unsuccessful
>>    men with talent. Genius will not; unrewarded genius is almost a
>> proverb.
>>    Education will not; the world is full of educated derelicts.
>> Persistence
>>    and determination alone are omnipotent. - Calvin Coolidge
>>
>>
>>

--
   Stephan Schmidt
   [hidden email]

   PRESS ON. Nothing in the world can take the place of persistence.
   Talent will not; nothing in the world is more common than  
unsuccessful
   men with talent. Genius will not; unrewarded genius is almost a  
proverb.
   Education will not; the world is full of educated derelicts.  
Persistence
   and determination alone are omnipotent. - Calvin Coolidge


Reply | Threaded
Open this post in threaded view
|

Re: MySQL Driver not found?

graemer
Hi Stephan,

I'm working on a CMS written in grails at the moment and I'm using
MySQL as the database. Below is my config:

class ApplicationDataSource {
   @Property boolean pooled = true
   @Property String dbCreate = "create-drop" // one of 'create',
'create-drop','update'
   @Property String url = "jdbc:mysql://localhost/gcms"
   @Property String driverClassName = "com.mysql.jdbc.Driver"
   @Property String username = "root"
   @Property String password = "admin"
}

If you want I can send you the driver I'm using?

Cheers
Graeme

On 3/22/06, Stephan J. Schmidt <[hidden email]> wrote:

> Is there a working config for mysql somewhere in the documentation?
> Perhaps I have another param wrong
>
> bye
> -stephan
>
> On Mar 22, 2006, at 18:07 Uhr, Graeme Rocher wrote:
>
> > Are you sure that is the mysql connector jar (ie the one with the
> > driver in), because i'm working with Grails and MySQL at the moment
> > with no problems
> >
> > Graeme
> >
> > On 3/22/06, Stephan J. Schmidt <[hidden email]> wrote:
> >> Hello, me again :-)
> >>
> >> I've copied the mysql.jar to lib and it's copied to WEB-INF/lib.
> >>
> >> But with
> >>
> >> class ApplicationDataSource {
> >>     @Property boolean pooled = true
> >>     @Property String dbCreate = "create" // one of 'create', 'create-
> >> drop','update'
> >>     @Property String url = "jdbc:mysql://127.0.0.1/rDB"
> >>     @Property String driverClassName = "com.mysql.jdbc.Driver"
> >>     @Property String username = ""
> >>     @Property String password = ""
> >> }
> >>
> >>
> >> I get
> >>
> >> NestedException: Cannot load JDBC driver class
> >> 'com.mysql.jdbc.Driver'
> >>     [groovy]
> >> org.springframework.jdbc.CannotGetJdbcConnectionException: Could not
> >> get JDBC Connection; nested exception is
> >> org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver
> >> class 'com.mysql.jdbc.Driver'
> >>     [groovy] org.apache.commons.dbcp.SQLNestedException: Cannot load
> >> JDBC driver class 'com.mysql.jdbc.Driver'
> >>     [groovy]     at
> >> org.apache.commons.dbcp.BasicDataSource.createDataSource
> >> (BasicDataSource.java:766)
> >>
> >> Any ideas?
> >>
> >> bye
> >> -stephan
> >>
> >> --
> >>    Stephan Schmidt
> >>    [hidden email]
> >>
> >>    PRESS ON. Nothing in the world can take the place of persistence.
> >>    Talent will not; nothing in the world is more common than
> >> unsuccessful
> >>    men with talent. Genius will not; unrewarded genius is almost a
> >> proverb.
> >>    Education will not; the world is full of educated derelicts.
> >> Persistence
> >>    and determination alone are omnipotent. - Calvin Coolidge
> >>
> >>
> >>
>
> --
>    Stephan Schmidt
>    [hidden email]
>
>    PRESS ON. Nothing in the world can take the place of persistence.
>    Talent will not; nothing in the world is more common than
> unsuccessful
>    men with talent. Genius will not; unrewarded genius is almost a
> proverb.
>    Education will not; the world is full of educated derelicts.
> Persistence
>    and determination alone are omnipotent. - Calvin Coolidge
>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: MySQL Driver not found?

Stephan.Schmidt
Yes that would be great too

thanks
bye
-stephan

> Hi Stephan,
>
> I'm working on a CMS written in grails at the moment and I'm using
> MySQL as the database. Below is my config:
>
> class ApplicationDataSource {
>    @Property boolean pooled = true
>    @Property String dbCreate = "create-drop" // one of 'create',
> 'create-drop','update'
>    @Property String url = "jdbc:mysql://localhost/gcms"
>    @Property String driverClassName = "com.mysql.jdbc.Driver"
>    @Property String username = "root"
>    @Property String password = "admin"
> }
>
> If you want I can send you the driver I'm using?
>
> Cheers
> Graeme
>
> On 3/22/06, Stephan J. Schmidt <[hidden email]> wrote:
>> Is there a working config for mysql somewhere in the documentation?
>> Perhaps I have another param wrong
>>
>> bye
>> -stephan
>>
>> On Mar 22, 2006, at 18:07 Uhr, Graeme Rocher wrote:
>>
>>> Are you sure that is the mysql connector jar (ie the one with the
>>> driver in), because i'm working with Grails and MySQL at the moment
>>> with no problems
>>>
>>> Graeme
>>>
>>> On 3/22/06, Stephan J. Schmidt <[hidden email]> wrote:
>>>> Hello, me again :-)
>>>>
>>>> I've copied the mysql.jar to lib and it's copied to WEB-INF/lib.
>>>>
>>>> But with
>>>>
>>>> class ApplicationDataSource {
>>>>     @Property boolean pooled = true
>>>>     @Property String dbCreate = "create" // one of 'create',  
>>>> 'create-
>>>> drop','update'
>>>>     @Property String url = "jdbc:mysql://127.0.0.1/rDB"
>>>>     @Property String driverClassName = "com.mysql.jdbc.Driver"
>>>>     @Property String username = ""
>>>>     @Property String password = ""
>>>> }
>>>>
>>>>
>>>> I get
>>>>
>>>> NestedException: Cannot load JDBC driver class
>>>> 'com.mysql.jdbc.Driver'
>>>>     [groovy]
>>>> org.springframework.jdbc.CannotGetJdbcConnectionException: Could  
>>>> not
>>>> get JDBC Connection; nested exception is
>>>> org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver
>>>> class 'com.mysql.jdbc.Driver'
>>>>     [groovy] org.apache.commons.dbcp.SQLNestedException: Cannot  
>>>> load
>>>> JDBC driver class 'com.mysql.jdbc.Driver'
>>>>     [groovy]     at
>>>> org.apache.commons.dbcp.BasicDataSource.createDataSource
>>>> (BasicDataSource.java:766)
>>>>
>>>> Any ideas?
>>>>
>>>> bye
>>>> -stephan
>>>>
>>>> --
>>>>    Stephan Schmidt
>>>>    [hidden email]
>>>>
>>>>    PRESS ON. Nothing in the world can take the place of  
>>>> persistence.
>>>>    Talent will not; nothing in the world is more common than
>>>> unsuccessful
>>>>    men with talent. Genius will not; unrewarded genius is almost a
>>>> proverb.
>>>>    Education will not; the world is full of educated derelicts.
>>>> Persistence
>>>>    and determination alone are omnipotent. - Calvin Coolidge
>>>>
>>>>
>>>>
>>
>> --
>>    Stephan Schmidt
>>    [hidden email]
>>
>>    PRESS ON. Nothing in the world can take the place of persistence.
>>    Talent will not; nothing in the world is more common than
>> unsuccessful
>>    men with talent. Genius will not; unrewarded genius is almost a
>> proverb.
>>    Education will not; the world is full of educated derelicts.
>> Persistence
>>    and determination alone are omnipotent. - Calvin Coolidge
>>
>>
>>

Reply | Threaded
Open this post in threaded view
|

Re: MySQL Driver not found?

jtwoee
In reply to this post by Stephan.Schmidt
Gentle reminder. By default mysql will use the port 3306, so please use this property instead
....
   @Property String url = "jdbc:mysql://localhost:3306/grails"
....
 

 
On 3/23/06, Stephan J. Schmidt <[hidden email]> wrote:
Hello, me again :-)

I've copied the mysql.jar to lib and it's copied to WEB-INF/lib.

But with

class ApplicationDataSource {
   @Property boolean pooled = true
   @Property String dbCreate = "create" // one of 'create', 'create-
drop','update'
   @Property String url = "jdbc:mysql://127.0.0.1/rDB"
   @Property String driverClassName = "com.mysql.jdbc.Driver"
   @Property String username = ""
   @Property String password = ""
}


I get

NestedException: Cannot load JDBC driver class ' com.mysql.jdbc.Driver'
   [groovy]
org.springframework.jdbc.CannotGetJdbcConnectionException: Could not
get JDBC Connection; nested exception is
org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver
class 'com.mysql.jdbc.Driver'
   [groovy] org.apache.commons.dbcp.SQLNestedException: Cannot load
JDBC driver class 'com.mysql.jdbc.Driver'
   [groovy]     at
org.apache.commons.dbcp.BasicDataSource.createDataSource
(BasicDataSource.java:766)

Any ideas?

bye
-stephan

--
  Stephan Schmidt
  [hidden email]

  PRESS ON. Nothing in the world can take the place of persistence.
  Talent will not; nothing in the world is more common than
unsuccessful
  men with talent. Genius will not; unrewarded genius is almost a
proverb.
  Education will not; the world is full of educated derelicts.
Persistence
  and determination alone are omnipotent. - Calvin Coolidge