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: | Generate entities from table broken for WildFly | ||
---|---|---|---|
Product: | serverplugins | Reporter: | pggeldenhuys |
Component: | WildFly | Assignee: | ehsavoie <ehsavoie> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | axelf, joordaz, pjiricka |
Priority: | P1 | ||
Version: | 8.0 | ||
Hardware: | Macintosh | ||
OS: | Mac OS X | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: |
IDE log
After completing connection wizard Netbeans message log After creating new connection -- No tables show Database is present |
Description
pggeldenhuys
2014-02-19 09:04:58 UTC
Created attachment 145390 [details]
IDE log
Created attachment 145391 [details]
After completing connection wizard
I am experiencing the same issue using Netbeans 8 RC1 - WildFLy 8.Final - and a MySQL database. It is set up as a Maven project and I have the Wildfly plugin installed. I have tried on both a Windows 7 machine and Windows 8.1. SAME results each time. Doesn't someone have an answer to this ??? Thank you. To have this to 'work' you 'll have to define the driver in the netbeans database explorer and have the datasource dfined in Wildfly. I try to 'guess' the driver since most of the time wildfly will use a datasource and not the 'pure' jbdc driver so the defined class name might be wrong. Could you share your configuration so I could try to reproduce this ? Using this page as reference: http://wildfly.org/news/2014/02/06/GlassFish-to-WildFly-migration/ I first tried deploying the mysql driver to Wildfly. I was able to add the datasource, and it was visible in Netbeans, but when you try to select it in the "Create entity classes from database" -- it would come up and say driver was missing. So.... I tried the second method instead: I created the folder: WILDFLY_HOME/modules/system/layers/base/com/mysql/main and placed the mysql-connector-java-5.1.23-bin.jar file there. I created module.xml: <?xml version="1.0" encoding="UTF-8"?> <module xmlns="urn:jboss:module:1.1" name="com.mysql"> <resources> <resource-root path="mysql-connector-java-5.1.23-bin.jar"/> </resources> <dependencies> <module name="javax.api"/> <module name="javax.transaction.api"/> </dependencies> </module> And executed this command via the Wildfly CLI: [standalone@localhost:9990 /] /subsystem=datasources/jdbc-driver=mysql:add( driver-name=mysql, driver-module-name=com.mysql, driver-class-name=com.mysql.jdbc.Driver ) It was successful. THEN, Using Wildfly management, I was then able to add the JDBC datasource: java:/jdbc/rdcapp20 This is now visible in Netbeans as a datasource. When I try to add "Entity classes from database": it does not automatically select any datasources, so I select (java:/jdbc/rdcapp20) and it immediately pops up with new connection wizard. It does not have the password present, so I add that. Next page -- Mysql doesn't have schemas, so that option is greyed out. And I can create the new connection. BUT --- It still does not populate with any available tables. ALSO: Just to be clear I am using: Netbeans 8.0 RC1 Wildfly plugin 1.0.10 Wildfly 8.0.0.Final Server MySQL Community version 5.6.16 ( I have already created a sample database in MySql called rdcapp20 ) Is the driver also installed in netbeans database explorer ? Under Services, Databases, Drivers: MySQL (Connector / J Driver) already shows there as standard. Do I have to add the driver in again ? I'm not sure as I tried with postgresql and h2 but not mysql. Could you attach your log file ? Created attachment 146118 [details]
Netbeans message log
I attached the message log... BUT, there aren't any errors that pop up. I simply do not get any tables from the database showing up. Created attachment 146120 [details]
After creating new connection -- No tables show
Created attachment 146122 [details]
Database is present
The database IS present. If I choose CONNECT on the MySql server -- rdcapp20. I can browse the database tables.
But, I believe this connection is DIRECT to MySQL, where I NEED it to be through the Wildfly Server connection pool, correct ????
I tried with a PostGreSQL database, I get the same issue.... I must be missing something. *** Bug 242916 has been marked as a duplicate of this bug. *** *** Bug 243101 has been marked as a duplicate of this bug. *** The XML parsing of the wildfly datasource missed the username thus preventing the correct working of this wizard. Integrated into 'main-silver', will be available in build *201403240001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/2a82bebb044b User: Emmanuel Hugonnet <ehsavoie@netbeans.org> Log: Fixing issue #242081 where not having the username blocks the JNDI datasource usge for generating Entities from schema. |