You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by Andrej Trifkovic <an...@yahoo.com> on 2008/12/11 19:29:47 UTC

OpenEJB with MySQL problem

Hello. 
I was try to use OpenEJB plugin for Tomcat with MySQL database, but when I deploy my war file, I get exception and message like this " Cannot load JDBC driver class 'com.mysql.jdbc.Driver' ", although I was include driver for MySQL in WEB-INF folder.
Can you tell me what is the problem?
 
I have used: Apache Tomcat 6.0.14 and Apache OpenEJB 3.0
Also, I was using MySQL database with embedded OpenEJB and I didn't have any problem.
 
These are values which I have used in openejb.xml file:

<Resource id="MySQL Database" type="DataSource">   
    JdbcDriver  com.mysql.jdbc.Driver
    JdbcUrl     jdbc:mysql://localhost/test
    UserName    root
    Password    sa
    JtaManaged true
</Resource>
 
P.S.
In addition I send you Tomcat log file.
 


      

Re: OpenEJB with MySQL problem

Posted by Rainer Pröbster <rp...@vr-web.de>.
Hello,

you included the MySQL driver (mysql-connector-java-5.x.y-bin) in
WEB-INF/lib (!) folder, yes?




Andrej Trifkovic schrieb:
> Hello.
> I was try to use OpenEJB plugin for Tomcat with MySQL database, but when
> I deploy my war file, I get exception and message like this " Cannot
> load JDBC driver class 'com.mysql.jdbc.Driver' ", although I was include
> driver for MySQL in WEB-INF folder.
> Can you tell me what is the problem?
>  
> I have used: Apache Tomcat 6.0.14 and Apache OpenEJB 3.0
> Also, I was using MySQL database with embedded OpenEJB and I didn't have
> any problem.
>  
> These are values which I have used in openejb.xml file:
> 
> <Resource id="MySQL Database" type="DataSource">  
>     JdbcDriver  com.mysql.jdbc.Driver
>     JdbcUrl     jdbc:mysql://localhost/test
>     UserName    root
>     Password    sa
>     JtaManaged true
> </Resource>
>  
> P.S.
> In addition I send you Tomcat log file.
>  
> 
> 

Re: OpenEJB with MySQL problem

Posted by Andrej Trifkovic <an...@yahoo.com>.
I also put mysql-connector.jar under
\apache-tomcat-6.0.18\webapps\openejb\lib
directory and it works fine now.
Thanks for your help!



Jazon wrote:
> 
> I put mysql-connector.jar under \apache-tomcat-6.0.18\webapps\openejb\lib
> directory and it works
> 
> 
> On Thu, Dec 11, 2008 at 12:29 PM, Andrej Trifkovic
> <an...@yahoo.com>wrote:
> 
>> Hello.
>> I was try to use OpenEJB plugin for Tomcat with MySQL database, but when
>> I
>> deploy my war file, I get exception and message like this " Cannot load
>> JDBC
>> driver class 'com.mysql.jdbc.Driver' ", although I was include driver for
>> MySQL in WEB-INF folder.
>> Can you tell me what is the problem?
>>
>> I have used: Apache Tomcat 6.0.14 and Apache OpenEJB 3.0
>> Also, I was using MySQL database with embedded OpenEJB and I didn't have
>> any problem.
>>
>> These are values which I have used in openejb.xml file:
>>
>> <Resource id="MySQL Database" type="DataSource">
>>     JdbcDriver  com.mysql.jdbc.Driver
>>     JdbcUrl     jdbc:mysql://localhost/test
>>     UserName    root
>>     Password    sa
>>     JtaManaged true
>> </Resource>
>>
>> P.S.
>> In addition I send you Tomcat log file.
>>
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/OpenEJB-with-MySQL-problem-tp20962078p20981206.html
Sent from the OpenEJB User mailing list archive at Nabble.com.


Re: OpenEJB with MySQL problem

Posted by Jazon <re...@gmail.com>.
I put mysql-connector.jar under \apache-tomcat-6.0.18\webapps\openejb\lib
directory and it works


On Thu, Dec 11, 2008 at 12:29 PM, Andrej Trifkovic <an...@yahoo.com>wrote:

> Hello.
> I was try to use OpenEJB plugin for Tomcat with MySQL database, but when I
> deploy my war file, I get exception and message like this " Cannot load JDBC
> driver class 'com.mysql.jdbc.Driver' ", although I was include driver for
> MySQL in WEB-INF folder.
> Can you tell me what is the problem?
>
> I have used: Apache Tomcat 6.0.14 and Apache OpenEJB 3.0
> Also, I was using MySQL database with embedded OpenEJB and I didn't have
> any problem.
>
> These are values which I have used in openejb.xml file:
>
> <Resource id="MySQL Database" type="DataSource">
>     JdbcDriver  com.mysql.jdbc.Driver
>     JdbcUrl     jdbc:mysql://localhost/test
>     UserName    root
>     Password    sa
>     JtaManaged true
> </Resource>
>
> P.S.
> In addition I send you Tomcat log file.
>
>
>