Entity classes from database wizard broken
- Dominant language
- Java
- Stars
- 3.1k
- Forks
- 935
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 17
Description
### Apache NetBeans version
Apache NetBeans 16
### What happened
The "Entity classes from database wizard" is poorly documented and when it fails there are useless error messages.
My setup is the following:
My setup:
Netbeans 16 on windows 11
Mysql server 8
mysql-connector-java-8.0.30.jar
OpenJDK 64-Bit Server VM Microsoft-40354 (build 17.0.4.1+1-LTS, mixed mode, sharing)
Payara server 5.2 configured in Netbeans
Entity classes from database wizard fails with useless error.
### How to reproduce
When Payara server is added in Netbeans the Datasource select box of the wizard is populated reading jdbc resources from **domain.xml** .
1- choosing "New datasource..." option is broken, it lets you enter some data but at the end of the process nothing change and data are lost.
2- choosing an existing jdbc resource the following error was reported:
> Unable to find driver com.mysql.cj.jdbc.MysqlDataSource. Register this driver in databases tab
I could restore correct functioning only after adding Url and driverClass properties to the connection pool linked to the selected jdbc resource. I didn't have these problems with previous versions of Netbeans (12) and Mysql (5.x)
When Payara server is removed from Netbeans the wizard works correctly with both "New datasource..." option and one of database connection created inside Netbeans.
### Did this work correctly in an earlier version?
Apache NetBeans 12.6 or earlier
### Operating System
windows 11
### JDK
OpenJDK 64-Bit Server VM Microsoft-40354
### Apache NetBeans packaging
Apache NetBeans provided installer
### Anything else
_No response_
### Are you willing to submit a pull request?
No
### Code of Conduct
Yes
Contributor guide
Research direction
Start with the Entity classes from database wizard and trace how its datasource choices are populated from domain.xml, reproducing both the New datasource path and the existing JDBC resource path on the reported Payara and MySQL setup. Done means newly entered datasource data is retained, valid existing resources work without the driver error, and failures provide useful diagnostics.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, mysql
- Domain
- database, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100