This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
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


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "NetBeans and MySQL" Watch "NetBeans and MySQL" New topic
Author

NetBeans and MySQL

Rick Bos
Greenhorn

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.

Thanks.
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

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.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Rick Bos
Greenhorn

Joined: Feb 27, 2004
Posts: 12
Hi.

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.
 
Don't get me started about those stupid light bulbs.
 
subject: NetBeans and MySQL
 
Similar Threads
Entity Problem
Problem with configuring EJB with MySQL
using Hibernate with Session Bean
How to send a J2EE web application linked to mysql database to others?
Problem when trying to use mysql and adding adding ds.xml file to \server\default\lib