DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 4 of 4
  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 10: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, 11:13 AM
  2. connecting mysql with vb6
    By gsreejit_79 in forum VB Classic
    Replies: 5
    Last Post: 12-20-2005, 02:45 AM
  3. MySql help Request
    By airrazor in forum Database
    Replies: 6
    Last Post: 10-04-2005, 04:00 PM
  4. Connecting to a MySQL server on LAN
    By vradhkar in forum VB Classic
    Replies: 2
    Last Post: 08-07-2005, 02:30 PM
  5. Connecting Java to MySQL
    By snowstorm in forum Java
    Replies: 3
    Last Post: 05-04-2005, 01:01 PM

Bookmarks

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


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links