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.
I have a maven based ejb JavaEE7 project with WildFly 8.0-Final registered as the app server. I am unable to generate enitities from tables. I have tried derby and postgres. I can generate entities from tables on my glassfish non maven based project for both db's. Also note, in the wildfly maven project when I click on generate entities from tables, select one of the configured jndi datasources retrieved from wildfly (both derby and postgres), the new connection wizard pops up even if the connection exists already in the ide. The ide log throws the following error when I add the postgresql from the connection wizard: WARNING [org.openide.filesystems.FileUtil]: Parameter file was not normalized. Was C:/Program Files/MySQL(class java.io.File) instead of /C:/Program Files/MySQL(class java.io.File) INFO [org.openide.filesystems.FileUtil]: Parameter file was not normalized. Was C:/Program Files/MySQL(class java.io.File) instead of /C:/Program Files/MySQL(class java.io.File) java.lang.IllegalArgumentException: Parameter file was not normalized. Was C:/Program Files/MySQL(class java.io.File) instead of /C:/Program Files/MySQL(class java.io.File) at org.openide.filesystems.FileUtil.toFileObject(FileUtil.java:869) at org.netbeans.modules.db.mysql.installations.WindowsStandaloneMultiInstallation.getInstallations(WindowsStandaloneMultiInstallation.java:70) at org.netbeans.modules.db.mysql.impl.InstallationManager.detectAllInstallations(InstallationManager.java:126) at org.netbeans.modules.db.mysql.impl.InstallationManager.detectInstallation(InstallationManager.java:154) at org.netbeans.modules.db.mysql.impl.ServerNodeProvider.findAndRegisterInstallation(ServerNodeProvider.java:156) at org.netbeans.modules.db.mysql.impl.ServerNodeProvider.findAndRegisterMySQL(ServerNodeProvider.java:145) at org.netbeans.modules.db.mysql.impl.ServerNodeProvider.initialize(ServerNodeProvider.java:105) at org.netbeans.api.db.explorer.node.NodeProvider.getNodes(NodeProvider.java:107) at org.netbeans.modules.db.explorer.node.NodeRegistry.getNodes(NodeRegistry.java:171) at org.netbeans.api.db.explorer.node.ChildNodeFactory.createKeys(ChildNodeFactory.java:108) at org.openide.nodes.AsynchChildren.run(AsynchChildren.java:209) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1423) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033) Weird, since im on osx, looking at the windows based file paths and not registering a mysql driver/connection. And this when I add the derby connection: INFO [org.netbeans.modules.db.explorer.DatabaseConnection]: Unable to execute command: set schema Syntax error: Encountered "<EOF>" at line 1, column 10. org.netbeans.lib.ddl.DDLException: Unable to execute command: set schema Syntax error: Encountered "<EOF>" at line 1, column 10. at org.netbeans.lib.ddl.impl.AbstractCommand.execute(AbstractCommand.java:244) at org.netbeans.modules.db.explorer.node.DDLHelper.setDefaultSchema(DDLHelper.java:62) at org.netbeans.modules.db.explorer.DatabaseConnection.setDefaultSchema(DatabaseConnection.java:647) [catch] at org.netbeans.modules.db.explorer.DatabaseConnection.doConnect(DatabaseConnection.java:903) at org.netbeans.modules.db.explorer.DatabaseConnection.access$200(DatabaseConnection.java:103) at org.netbeans.modules.db.explorer.DatabaseConnection$3.run(DatabaseConnection.java:961) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1423) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033) INFO [org.netbeans.modules.db.explorer.DatabaseConnection]: Unable to execute command: set schema Syntax error: Encountered "<EOF>" at line 1, column 10. org.netbeans.lib.ddl.DDLException: Unable to execute command: set schema Syntax error: Encountered "<EOF>" at line 1, column 10. at org.netbeans.lib.ddl.impl.AbstractCommand.execute(AbstractCommand.java:244) at org.netbeans.modules.db.explorer.node.DDLHelper.setDefaultSchema(DDLHelper.java:62) at org.netbeans.modules.db.explorer.DatabaseConnection.setDefaultSchema(DatabaseConnection.java:647) [catch] at org.netbeans.modules.db.explorer.DatabaseConnection.doConnect(DatabaseConnection.java:903) at org.netbeans.modules.db.explorer.DatabaseConnection.access$200(DatabaseConnection.java:103) at org.netbeans.modules.db.explorer.DatabaseConnection$3.run(DatabaseConnection.java:961) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1423) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033) INFO [glassfish]: Requested Entity: public id = -//GlassFish.org//DTD GlassFish Application Server 3.1 Resource Definitions//EN, system id = http://glassfish.org/dtds/glassfish-resources_1_5.dtd Product Version = NetBeans IDE 8.0 Beta (Build 201401141042) Operating System = Mac OS X version 10.9.1 running on x86_64 Java; VM; Vendor = 1.7.0_45 Runtime = Java HotSpot(TM) 64-Bit Server VM 24.45-b08
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.