NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Netbeans Unable To Load JDBC Driver

 
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users
View previous topic :: View next topic  
Author Message
DK



Joined: 28 Oct 2008
Posts: 1

PostPosted: Tue Oct 28, 2008 9:17 am    Post subject: Netbeans Unable To Load JDBC Driver Reply with quote

Hello,

I'm developing a system in which I have to connect to DBMS and for this I'm using MYSQL. I'm using IDE NetBeans4.1 for development purpose.

Now the problem is that my program is unable to find the J/connector driver for DB connectivity. However, I have installed MYSQL driver to the right directory of JRE. I have also tested to ensure that J/connector is Installed right. I have write a Second, simple program of DB connectivity and run it through Javac complier from command prompt, after compilation I run it through command prompt and it works fine.

But when I run my first program ( which I mentioned in first line ) of JDBC through NetBeans, it gives an execption of unable to load driver. The compilation of program is fine, Its gives error on run time.
I dont know why it is unable to load the driver, as my second program is running fine.

Is NetBean has its own JRE through which the Bytecode execute or it uses the JRE for bytecode execution which is Installed in other folder

Kindly tell me whats going wrong.

Regards,
Dansih Kamran. Question
Back to top
John Baker
Posted via mailing list.





PostPosted: Tue Nov 04, 2008 6:52 am    Post subject: Netbeans Unable To Load JDBC Driver Reply with quote

Your simple program's classpath does not include NetBeans classpath.

You could add the MySQL driver to your application's classpath by opening
the Properties
of your application and adding the MySQL driver library.

1) Right click on the main project node for your application and choose
Properties.
2) Select Libraries in the Properties dialog then click Add Library
3) Add the library for MySQL JDBC driver.

John


DK-22 wrote:
Quote:

Hello,



I'm developing a system in which I have to connect to DBMS and for this
I'm using MYSQL. I'm using IDE NetBeans4.1 for development purpose.



Now the problem is that my program is unable to find the J/connector
driver for DB connectivity. However, I have installed MYSQL driver to the
right directory of JRE. I have also tested to ensure that J/connector is
Installed right. I have write a Second, simple program of DB connectivity
and run it through Javac complier from command prompt, after compilation I
run it through command prompt and it works fine.



But when I run my first program ( which I mentioned in first line ) of
JDBC through NetBeans, it gives an execption of unable to load driver. The
compilation of program is fine, Its gives error on run time.

I dont know why it is unable to load the driver, as my second program is
running fine.



Is NetBean has its own JRE through which the Bytecode execute or it uses
the JRE for bytecode execution which is Installed in other folder



Kindly tell me whats going wrong.



Regards,

Dansih Kamran. [Question]








-----
http://blogs.sun.com/dashboy
--
View this message in context: http://www.nabble.com/Netbeans-Unable-To-Load-JDBC-Driver-tp20204129p20317044.html
Sent from the Netbeans - J2EE mailing list archive at Nabble.com.
Back to top
Jeff Rubinoff
Posted via mailing list.





PostPosted: Tue Nov 04, 2008 11:16 am    Post subject: Netbeans Unable To Load JDBC Driver Reply with quote

I'm also surprised Dansih is using NB 4.1. Is this absolutely necessary
in his situation? I believe that database support has greatly improved
in later versions of NetBeans.

Jeff

John Baker wrote:

Quote:
Your simple program's classpath does not include NetBeans classpath.

You could add the MySQL driver to your application's classpath by opening
the Properties
of your application and adding the MySQL driver library.

1) Right click on the main project node for your application and choose
Properties.
2) Select Libraries in the Properties dialog then click Add Library
3) Add the library for MySQL JDBC driver.

John


DK-22 wrote:


Quote:
Hello,



I'm developing a system in which I have to connect to DBMS and for this
I'm using MYSQL. I'm using IDE NetBeans4.1 for development purpose.



Now the problem is that my program is unable to find the J/connector
driver for DB connectivity. However, I have installed MYSQL driver to the
right directory of JRE. I have also tested to ensure that J/connector is
Installed right. I have write a Second, simple program of DB connectivity
and run it through Javac complier from command prompt, after compilation I
run it through command prompt and it works fine.



But when I run my first program ( which I mentioned in first line ) of
JDBC through NetBeans, it gives an execption of unable to load driver. The
compilation of program is fine, Its gives error on run time.

I dont know why it is unable to load the driver, as my second program is
running fine.



Is NetBean has its own JRE through which the Bytecode execute or it uses
the JRE for bytecode execution which is Installed in other folder



Kindly tell me whats going wrong.



Regards,

Dansih Kamran. [Question]










-----
http://blogs.sun.com/dashboy

Back to top
arpitabhadra



Joined: 01 Apr 2010
Posts: 1

PostPosted: Thu Apr 01, 2010 4:03 am    Post subject: help!! Reply with quote

I am also facing similar error.When I try to add the libraries as suggested above,I find that there are only 3 lib folders of the project,viz junit,junit_4,nblibraries.properties anda folder called a folder called CopyLibs (it also contains only 1 file namey:org-netbeans-modules-java-j2seproject-copylibstask.jar).The libraries which has to be actually added is not present at all.Kindly help.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo