connecting mysql from eclipse


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: connecting mysql from eclipse

Hybrid View

  1. #1
    Join Date
    Mar 2005
    Location
    Istanbul
    Posts
    10

    connecting mysql from eclipse

    I am using;
    eclipse wtp 3.2
    mysql 5.0
    mysql-connector-java-3.1.13

    I added the connectorj to classpath and I can connect mysql from command line, but I can't connect from eclipse. there is only one thing to do; to add the driver to library within eclipse. I did it, I added as an external archieve file to the project but surprisingly it didn't work.

    the only java code in jsp:
    Class.forName("com.mysql.jdbc.Driver").newInstance();

    and the error:
    java.lang.ClassNotFoundException: com.mysql.jdbc.Driver

    would it be about a problem between eclipse and the version of mysql
    Last edited by elix; 10-01-2006 at 11:29 AM. Reason: additional info

  2. #2
    Join Date
    Mar 2005
    Location
    Istanbul
    Posts
    10
    I tried something else, I can connect from a normal java file. but I can't connect from a jsp or servlet. There is something with running on tomcat.

  3. #3
    Join Date
    Sep 2006
    Posts
    68
    The problem occurs because you set a class path for another classloader.

  4. #4
    Join Date
    Mar 2005
    Location
    Istanbul
    Posts
    10
    problem solved, connectorj must be copied under tomcat/common/lib

    thx for your attention

    I wanna cry, problem solved so easily, but I spend my whole day
    thanks God at the end it is solved..

Similar Threads

  1. MyEclipse 5.0 Supports Eclipse 3.2
    By jense in forum Java
    Replies: 0
    Last Post: 05-22-2006, 12:13 PM
  2. connecting mysql with vb6
    By gsreejit_79 in forum VB Classic
    Replies: 5
    Last Post: 12-20-2005, 03:45 AM
  3. MySql help Request
    By airrazor in forum Database
    Replies: 6
    Last Post: 10-04-2005, 05:00 PM
  4. Connecting to a MySQL server on LAN
    By vradhkar in forum VB Classic
    Replies: 2
    Last Post: 08-07-2005, 03:30 PM
  5. Connecting Java to MySQL
    By snowstorm in forum Java
    Replies: 3
    Last Post: 05-04-2005, 02:01 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center