File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes IDEs, Version Control and other tools and the fly likes NetBeans and MySQL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "NetBeans and MySQL" Watch "NetBeans and MySQL" New topic

NetBeans and MySQL

Rick Bos

Joined: Feb 27, 2004
Posts: 12
I have two questions:

I am using NetBeans 5.5 and am trying to generate Entity Classes from a MySQL database. The database works on the Runtime tab, and I am able to see the tables there. I created a new J2EE project. I try to create entity beans from database on the EJB project. When I choose the data source connected to MySQL, it says Unable to find driver.

I am trying to learn EJB 3.0 using MySQL and an application server ( I have not decided whether to use JBoss or Glassfish ) . Since I am having the above problem with NetBeans, which IDE would you suggest.

Mark Spritzler

Joined: Feb 05, 2001
Posts: 17276

Actually, your issue is dealing with a project and the projects classpath in an IDE and not related to J2EE.

Meaning if you were using log4j, you need to have the jar file in the projects classpath too.

Moving this to the IDE forum. But basically you need to add the MySQL driver to your new project's classpath.


Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
Rick Bos

Joined: Feb 27, 2004
Posts: 12

The MySQL driver jar file is in the library for the EJB project.

Note that I followed the same process for the DB2 driver, and it works
correctly when I generate Entity beans from a datasource.

Also if I go to the Runtime tab, I can see the tables on the MySQL database.
I agree. Here's the link:
subject: NetBeans and MySQL
It's not a secret anymore!