This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Netbeans 6.5: Populating JTable with MySQL database

 
Rudolf Meerkotter
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,

I'm trying to populate a JTable with data from an online MySQL database. Here's what I've done so far:

1) Add the table to the form
2) Right click on table, select Table Contents, select bound, Import data to form (the connection works and the respective table can be viewed in the services window)
3) Right click on table again, select Bind, select Elements, shift Available to Selected

When I run the project, I get a load of errors with this being at the top:

SEVERE: Application class tabletesting.TableTestingApp failed to launch
Local Exception Stack:
Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.DatabaseException
Internal Exception: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

The above procedure works fine on the sample databases (on localhost) that come with NetBeans.

Any ideas where the problem is with the remote connection?

Thanks,
Rudolf
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic