Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Cannot generate entities from existing MySQL db using JPA Tools
Cannot generate entities from existing MySQL db using JPA Tools [message #1817352] Wed, 20 November 2019 23:21 Go to next message
Russell Longo is currently offline Russell LongoFriend
Messages: 6
Registered: November 2019
Junior Member
Fairly new to Java, Eclipse and JPA. I was steered toward using JPA for CRUD database application development. As i have seen posted in earlier messages (more than 5 years old) I also am not able to create entities from an existing database using the JPA tool, because a list of schemas, and their corresponding tables, do not show up in the dropdown list box in the Entity Creation dialog under JPA tools. They also do not show up in the Data Source Explorer.

I read in older posts that you have to explicitly name the database/schema in your URL string for the Dali JPA tools to actually work. I attempted that, here are the Connection details below related to a schema (database) called game_world in a MySQL database.

Eclipse: Version: 2019-03 (4.11.0)
Build id: 20190314-1200

JPA: 2.1
Configuration: Basic JPA Configuration

CONNECTION CONFIGURATION
Database: game_world (tried this and mysql)
URL: jdbc:mysql://localhost:3306/game_world (also tried it without game_world)

driver class in Driver Definition: I tried the following classes com.mysql.jdbc.Driver
com.mysql.cj.jdbc.Driver
driver version: 8.0.16

Note: I can ping the database successfully from the Connection Dialog Box, and both my and the default schemas that came with MySQL show up in Data Source Explorer, but they are devoid of any tables, views, etc. And as mentioned, nothing gets populated in the schema dropdown in the RPA Tool window.

I also installed DBeaver after this, just to see if another interface tool could see the DB tables, and it had no issues listing all the tables. DBeaver used the above Connection to do that.

Based on recommendations, it would seem that object mapping is the best route for the type of application I want to write. But having to code every entity by hand from the current DB or future database really doesn't make it attractive without a tool to facilitate the entity creation.

Appreciate any help I can get!!

Re: Cannot generate entities from existing MySQL db using JPA Tools [message #1817413 is a reply to message #1817352] Thu, 21 November 2019 19:22 Go to previous messageGo to next message
Stephan Herrmann is currently offline Stephan HerrmannFriend
Messages: 1853
Registered: July 2009
Senior Member
As you mention Dali JPA tools your best chances to get an answer would be in their forum at https://www.eclipse.org/forums/index.php/f/113/
Re: Cannot generate entities from existing MySQL db using JPA Tools [message #1817431 is a reply to message #1817413] Fri, 22 November 2019 05:52 Go to previous message
Russell Longo is currently offline Russell LongoFriend
Messages: 6
Registered: November 2019
Junior Member
Thank you, I have posted it in the Project: Dali forum.

However, after reviewing the forum posts response rate, I guess I'm not confident I'll get an answer. I noticed that many forum posts have hundreds, sometimes thousands, of 'views' with no answers replied to on the post.

Maybe there was a private message sent? But that would defeat the purpose of the forum learning from the troubleshooting.

Oh well...
Previous Topic:Mixing JDT with non Java JVM language
Next Topic:Cannot resolve binding of Custom ParameterizedType's attributes
Goto Forum:
  


Current Time: Thu Apr 25 13:25:05 GMT 2024

Powered by FUDForum. Page generated in 0.02789 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top