-
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
-
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.
-
The problem occurs because you set a class path for another classloader.
-
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
-
Replies: 0
Last Post: 05-22-2006, 11:13 AM
-
By gsreejit_79 in forum VB Classic
Replies: 5
Last Post: 12-20-2005, 02:45 AM
-
By airrazor in forum Database
Replies: 6
Last Post: 10-04-2005, 04:00 PM
-
By vradhkar in forum VB Classic
Replies: 2
Last Post: 08-07-2005, 02:30 PM
-
By snowstorm in forum Java
Replies: 3
Last Post: 05-04-2005, 01: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
Forum Rules
|
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
|
Bookmarks