This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | Unable to create Database entities from mysql datasource | ||
---|---|---|---|
Product: | db | Reporter: | pbuser |
Component: | MySQL | Assignee: | Libor Fischmeistr <lfischmeistr> |
Status: | NEW --- | ||
Severity: | normal | ||
Priority: | P3 | ||
Version: | 8.0.2 | ||
Hardware: | PC | ||
OS: | Windows 7 | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
pbuser
2015-09-20 17:25:21 UTC
This is not yet a solution, but it might help you: Netbeans does not use the DataSources of the application server to access the databases, but maps the connections to local Database connections. I recently fixed two bugs in that area, but in the end this is what you need to know. You need to modify the JDBC connection pool properties (Glassfish Webinterface: Resources -> JDBC -> JDBC Connection Pools -> <targetpool> -> Additional Properties. There you need to add these properties: User DriverClass URL Password [Optional] User and Password are self describing. URL must bean an JDBC Url, that points to the same database as the datasource and DriverClass must be the JDBC driver class that can be used to connect to the database. To be a bit clearer - lets asume I have a Derby connection Pool. That pool is established by the datasource implemenation org.apache.derby.jdbc.ClientDataSource (this is the glassfish sample pool): The properties that are defined are: PortNumber => 1527 Passwort => APP User => APP serverName => localhost DatabaseName => sun-appserv-samples connectionAttributes => ;create=true To make this compatible with the current netbeans "way" this needs to be added: DriverClass => org.apache.derby.jdbc.ClientDriver URL => jdbc:derby://localhost:1527/sun-appserv-samples;create=true There is right now a bug in the nightlies, that cause the username and password not to be pulled from the properties - I'm at it, but have to dig a bit, so please make sure, that when you create the db connection to enter the correct username. Thank you Mathias. After updating the URL in GF admin with host and db name I'm able to successfully use the data source to create entities. |