Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

NetBeans and MySQL

 
Rick Bos
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Rick Bos
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic