This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 64783 - java.lang.NoClassDefFoundError: com.mysql.jdbc.Driver
Summary: java.lang.NoClassDefFoundError: com.mysql.jdbc.Driver
Status: RESOLVED INVALID
Alias: None
Product: db
Classification: Unclassified
Component: Code (show other bugs)
Version: 4.x
Hardware: All All
: P3 blocker (vote)
Assignee: Andrei Badea
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-21 06:02 UTC by bati09
Modified: 2005-10-17 17:47 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description bati09 2005-09-21 06:02:05 UTC
i am getting this eeror while connecting with mysql

java.lang.NoClassDefFoundError: com.mysql.jdbc.Driver
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:141)
	at org.netbeans.modules.db.explorer.infos.DatabaseNodeInfo.getIconBase
(DatabaseNodeInfo.java:583)
	at org.netbeans.modules.db.explorer.nodes.DatabaseNode.setInfo
(DatabaseNode.java:87)
	at org.netbeans.modules.db.explorer.nodes.DriverNode.setInfo
(DriverNode.java:27)
	at org.netbeans.modules.db.explorer.DatabaseNodeChildren.createNode
(DatabaseNodeChildren.java:129)
	at org.netbeans.modules.db.explorer.DatabaseNodeChildren.initCollection
(DatabaseNodeChildren.java:56)
	at org.openide.nodes.Children$Array.getCollection(Children.java:1268)
	at org.openide.nodes.Children$Array$AE.nodes(Children.java:1313)
	at org.openide.nodes.ChildrenArray.nodesFor(ChildrenArray.java:109)
	at org.openide.nodes.Children$Info.nodes(Children.java:1077)
	at org.openide.nodes.Children.justComputeNodes(Children.java:583)
	at org.openide.nodes.ChildrenArray.nodes(ChildrenArray.java:54)
	at org.openide.nodes.Children.getNodes(Children.java:325)
	at org.openide.nodes.Children.findChild(Children.java:265)
	at org.openide.nodes.Children.getNodes(Children.java:381)
	at org.openide.nodes.FilterNode$Children.getNodes(FilterNode.java:1139)
	at org.openide.explorer.view.TreeView$3.run(TreeView.java:707)
	at org.openide.util.Task.run(Task.java:136)
	at org.openide.util.RequestProcessor$Task.run
(RequestProcessor.java:328)
[catch] at org.openide.util.RequestProcessor$Processor.run
(RequestProcessor.java:670)
Comment 1 Andrei Badea 2005-09-21 08:26:52 UTC
Works for me, trying with Connector/J 3.1.10. Could you please post steps to
reproduce the issue, including the driver name and class?
Comment 2 zikmund 2005-09-21 09:34:11 UTC
To reporter: please attach stack traces and logs as attachment, do not paste
them into comment/description (it is much better for searching through
IssueZilla). Thanks!
Comment 3 bati09 2005-09-21 10:25:09 UTC
my class path is
.;
C:\javamail-1_3_2-upd\javamail-1.3.2\mail.jar;
C:\jaf-1_0_2-upd2\jaf-1.0.2\activation.jar;
C:\Program Files\j2sdk_nb\j2sdk1.4.2\lib\tools.jar;
C:\Program Files\j2sdk_nb\j2sdk1.4.2\lib;
C:\Program Files\j2sdk_nb\j2sdk1.4.2\jre\lib\ext;
C:\mysql-connector-java-3.1.10\mysql-connector-java-3.1.10-bin.jar;
D:\Program Files\Apache Software Foundation\Tomcat 5.5\server\lib\catalina.jar;
D:\Program Files\Apache Software Foundation\Tomcat 5.5\server\lib\servlets-
default.jar;
D:\Program Files\Apache Software Foundation\Tomcat 5.5\common\lib\servlet-
api.jar;
D:\Program Files\Apache Software Foundation\Tomcat 5.5\conf\web.xml;
D:\Program Files\Apache Software Foundation\Tomcat 5.5\server\lib\servlets-
invoker.jar;
D:\Program Files\Apache Software Foundation\Tomcat 5.5\common\lib\servlet-
api.jar;

 the coding part is


    try
	 {
      	Class.forName("com.mysql.jdbc.Driver").newInstance();
		con = DriverManager.getConnection
("jdbc:mysql://localhost:3306:test","root","");
      		if(!con.isClosed())
        	System.out.println("Successfully connected to " + "MySQL 
server using TCP/IP...");

    	} 
Comment 4 Andrei Badea 2005-10-03 15:03:01 UTC
Sorry, this didn't help very much. It seems you got the exception you initially
attached when expanding some node under Databases in the Runtime tab. I need to
know if you can reproduce the issue at any time (with the same stack trace), and
I need exact steps. If I can't reproduce the issue on my computer, I can't fix it.

Also, could you please try to reproduce this in version 5.0 beta?
Comment 5 Andrei Badea 2005-10-17 17:47:40 UTC
No further information from reporter, closing. Reopen with more information
(e.g., steps to reproduce).