From forge-users at lists.jboss.org Thu Aug 14 14:20:26 2014 From: forge-users at lists.jboss.org (forge-users at lists.jboss.org) Date: Thu, 14 Aug 2014 14:20:26 EDT Subject: [forge-users] connection-create-profile does not recognise hibernateDialect Message-ID: <1674285845.51408040498907.JavaMail.jive@jive-app01.app.mwc.hst.phx2.redhat.com> Hello. I'm trying to document working examples of the commands I would use to generate a complete forge webapp for an existing MySQL database. I am using forge 2.7.2.Final on a Windows 7 PC with Oracle Java 1.7.0_67 Using the man page for the command connection-create-profile I created the command I wanted to use: connection-create-profile - --name parConnection --driverClass com.mysql.jdbc.Driver --driverLocation C:/s/jclasses/drivers/mysql.jar --hibernateDialect org.hibernate.dialect.MySQL5InnoDBDialect --userName XXXXX --userPassword XXXXXXX --jdbcUrl jdbc:mysql:///par?characterEncoding=UTF-8&characterSetResults=UTF-8&autoReconnect=true&zeroDateTimeBehavior=convertToNull --verifyConnection true; Posted by forums Original post: https://community.jboss.org/message/884564#884564 From forge-users at lists.jboss.org Thu Aug 14 18:36:15 2014 From: forge-users at lists.jboss.org (forge-users at lists.jboss.org) Date: Thu, 14 Aug 2014 18:36:15 EDT Subject: [forge-users] connection-create-profile does not recognise hibernateDialect In-Reply-To: <1674285845.51408040498907.JavaMail.jive@jive-app01.app.mwc.hst.phx2.redhat.com> Message-ID: <1695324636.81408055806299.JavaMail.jive@jive-app01.app.mwc.hst.phx2.redhat.com> Ok - I found the solution by searching other reports of issues and deducing that this command requires an hibernateDialect specified in a very non intuitive way: MySQL5\ with\ InnoDB\ :\ org.hibernate.dialect.MySQL5InnoDBDialect The descriptive text before the hibernate class specification for the dialect mustbe present and the embedded blanks must be escaped with a backslash. Posted by forums Original post: https://community.jboss.org/message/884582#884582 From forge-users at lists.jboss.org Thu Aug 14 19:57:03 2014 From: forge-users at lists.jboss.org (forge-users at lists.jboss.org) Date: Thu, 14 Aug 2014 19:57:03 EDT Subject: [forge-users] How to use Forge 2 jpa-generate-entities-from-tables ? Message-ID: <817001688.91408060653525.JavaMail.jive@jive-app01.app.mwc.hst.phx2.redhat.com> I have been trying to develop a standard way to generate my webapps from a MySQL5 database schema using Forge 2.7.2.Final on Windows 7/Oracle Java 1.7.0_67. I am creating a text file that contains the commands needed to generate the webapp using Forge from a windows command line: project-new --named par --topLevelPackage ca.gerrymatte.par --type war --finalName par ; jpa-setup --provider Hibernate --dbType MYSQL5_INNODB --container JBOSS_AS7 --dataSourceName java:jboss/datasources/parDS ; jpa-generate-entities-from-tables - --targetPackage ca.gerrymatte.par.model --hibernateDialect MySQL5\ with\ InnoDB\ :\ org.hibernate.dialect.MySQL5InnoDBDialect --driverClass com.mysql.jdbc.Driver --driverLocation C:/s/jclasses/drivers/mysql.jar --userName root --userPassword **** --jdbcUrl jdbc:mysql:///par?characterEncoding=UTF-8&characterSetResults=UTF-8&autoReconnect=true&zeroDateTimeBehavior=convertToNull ; The third command fails with an uninfomative error: log4j:WARN No appenders could be found for logger (org.jboss.forge.addon.database.tools.generate.DatabaseTableSelectionStep$2). log4j:WARN Please initialize the log4j system properly. [par]$ Can anyone suggest how to resolve this ? Posted by forums Original post: https://community.jboss.org/message/884591#884591 From ozizka at redhat.com Fri Aug 15 00:01:34 2014 From: ozizka at redhat.com (Ondrej Zizka) Date: Fri, 15 Aug 2014 06:01:34 +0200 Subject: [forge-users] Resources loading - how to limit to an addon? Message-ID: <53ED861E.9020005@redhat.com> Hi, let's say I want to look for a class, but only in given Addon's scope. I.e. not in it's dependencies. How would I do that, in an effective way? addon.getClassLoader().loadClass() would give me (I suppose) transitive classloaders' results too. addon.getRepository().getAddonResources(addon.getId()) and traversing the results seems to be ugly solution. Anything better? Thanks, Ondra From forge-users at lists.jboss.org Sat Aug 16 19:32:12 2014 From: forge-users at lists.jboss.org (forge-users at lists.jboss.org) Date: Sat, 16 Aug 2014 19:32:12 EDT Subject: [forge-users] How to use Forge 2 jpa-generate-entities-from-tables ? In-Reply-To: <817001688.91408060653525.JavaMail.jive@jive-app01.app.mwc.hst.phx2.redhat.com> Message-ID: <527190556.111408231962182.JavaMail.jive@jive-app01.app.mwc.hst.phx2.redhat.com> Or post an example of using this command with any type of database server ? Posted by forums Original post: https://community.jboss.org/message/884713#884713 From lincolnbaxter at gmail.com Mon Aug 18 14:16:21 2014 From: lincolnbaxter at gmail.com (Lincoln Baxter, III) Date: Mon, 18 Aug 2014 14:16:21 -0400 Subject: [forge-users] [windup-dev] Resources loading - how to limit to an addon? In-Reply-To: <53ED861E.9020005@redhat.com> References: <53ED861E.9020005@redhat.com> Message-ID: Use ClassLoaders.ownsClass(loader, targetClass) to identify which ClassLoader owns a given class. Basically compare MyClass.class.getClassLoader() to addon.getClassLoader(). On Fri, Aug 15, 2014 at 12:01 AM, Ondrej Zizka wrote: > Hi, > > let's say I want to look for a class, but only in given Addon's scope. > I.e. not in it's dependencies. > How would I do that, in an effective way? > > addon.getClassLoader().loadClass() would give me (I suppose) transitive > classloaders' results too. > > addon.getRepository().getAddonResources(addon.getId()) and traversing > the results seems to be ugly solution. > > Anything better? > > Thanks, > Ondra > _______________________________________________ > windup-dev mailing list > windup-dev at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/windup-dev > -- Lincoln Baxter, III http://ocpsoft.org "Simpler is better." -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/forge-users/attachments/20140818/aec77976/attachment.html From forge-users at lists.jboss.org Wed Aug 20 14:50:35 2014 From: forge-users at lists.jboss.org (forge-users at lists.jboss.org) Date: Wed, 20 Aug 2014 14:50:35 EDT Subject: [forge-users] How to use Forge 2 jpa-generate-entities-from-tables ? In-Reply-To: <817001688.91408060653525.JavaMail.jive@jive-app01.app.mwc.hst.phx2.redhat.com> Message-ID: <699841680.01408560665550.JavaMail.jive@jive-app01.app.mwc.hst.phx2.redhat.com> The problem has been fixed with version 2.8.0.Final. Using the above commands now generates a loop allowing me to select from a list of tables.? Once selected, the table is removed from the list and the list redisplays until I enter nothing (hit return only).? The entities are then generated.? The man page for? jpa-generate-entities-from-tables only documents the targetPackage parameter (I guessed the remaining parameters from other commands). Is there a parameter that will automatically select all tables from the specified database schema ? Below is an example of the output of jpa-generate-entities-from-tables: jpa-generate-entities-from-tables - --targetPackage ca.gerrymatte.par.model --hibernateDialect MySQL5\ with\ InnoDB\ :\ org.hibernate.dialect.MySQL5InnoDBDialect --driverC lass com.mysql.jdbc.Driver --driverLocation C:/s/jclasses/drivers/mysql.jar --userName root --userPassword matteg --jdbcUrl jdbc:mysql:///par?characterEncoding=UTF-8&characterSetResults= UTF-8&autoReconnect=true&zeroDateTimeBehavior=convertToNull ; log4j:WARN No appenders could be found for logger (org.hibernate.cfg.reveng.dialect.MySQLMetaDataDialect). log4j:WARN Please initialize the log4j system properly. [0] - activities [1] - clients [2] - companies [3] - daybook [4] - loglines [5] - logsessions [6] - people [7] - roles [8] - staff [9] - timeservices [10] - timesheetofficeonly Database Tables (The database tables for which to generate entities): [0-10] 6 [0] - activities [1] - clients [2] - companies [3] - daybook [4] - loglines [5] - logsessions [6] - roles [7] - staff [8] - timeservices [9] - timesheetofficeonly Database Tables (The database tables for which to generate entities): [0-9] 6 [0] - activities [1] - clients [2] - companies [3] - daybook [4] - loglines [5] - logsessions [6] - staff [7] - timeservices [8] - timesheetofficeonly Database Tables (The database tables for which to generate entities): [0-8] ***SUCCESS*** 2 entities were generated in ca.gerrymatte.par.model [persistence.xml]$ Posted by forums Original post: https://community.jboss.org/message/901463#901463 From ggastald at redhat.com Wed Aug 20 15:13:46 2014 From: ggastald at redhat.com (George Gastaldi) Date: Wed, 20 Aug 2014 15:13:46 -0400 (EDT) Subject: [forge-users] How to use Forge 2 jpa-generate-entities-from-tables ? In-Reply-To: <699841680.01408560665550.JavaMail.jive@jive-app01.app.mwc.hst.phx2.redhat.com> References: <699841680.01408560665550.JavaMail.jive@jive-app01.app.mwc.hst.phx2.redhat.com> Message-ID: <6F35FE3C-A1D4-46A7-9A6F-44CB53BA8F3B@redhat.com> Hi Gerry, I am glad it works for you know. Have you tried using "*"? If that still doean't work, please open a JIRA and we'll have a look at it asap. > Em 20/08/2014, ?s 15:51, forge-users at lists.jboss.org escreveu: > > The problem has been fixed with version 2.8.0.Final. > Using the above commands now generates a loop allowing me to select from a list of tables. Once selected, the table is removed from the list and the list redisplays until I enter nothing (hit return only). The entities are then generated. The man page for jpa-generate-entities-from-tables only documents the targetPackage parameter (I guessed the remaining parameters from other commands). > > Is there a parameter that will automatically select all tables from the specified database schema ? > > Below is an example of the output of jpa-generate-entities-from-tables: > jpa-generate-entities-from-tables - --targetPackage ca.gerrymatte.par.model --hibernateDialect MySQL5\ with\ InnoDB\ :\ org.hibernate.dialect.MySQL5InnoDBDialect --driverC lass com.mysql.jdbc.Driver --driverLocation C:/s/jclasses/drivers/mysql.jar --userName root --userPassword matteg --jdbcUrl jdbc:mysql:///par?characterEncoding=UTF-8&characterSetResults= UTF-8&autoReconnect=true&zeroDateTimeBehavior=convertToNull ; log4j:WARN No appenders could be found for logger (org.hibernate.cfg.reveng.dialect.MySQLMetaDataDialect). log4j:WARN Please initialize the log4j system properly. [0] - activities [1] - clients [2] - companies [3] - daybook [4] - loglines [5] - logsessions [6] - people [7] - roles [8] - staff [9] - timeservices [10] - timesheetofficeonly Database Tables (The database tables for which to generate entities): [0-10] 6 [0] - activities [1] - clients [2] - companies [3] - daybook [4] - loglines [5] - logsessions [6] - roles [7] - staff [8] - timeservices [9] - timesheetofficeonly Database Tables (The database tables for which to generate entities): [0-9] 6 [0] - activities [1] - clients [2] - companies [3] - daybook [4] - loglines [5] - logsessions [6] - staff [7] - timeservices [8] - timesheetofficeonly Database Tables (The database tables for which to generate entities): [0-8] ***SUCCESS*** 2 entities were generated in ca.gerrymatte.par.model [persistence.xml]$ > > Posted by forums > Original post: https://community.jboss.org/message/901463#901463 > > _______________________________________________ > forge-users mailing list > forge-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/forge-users From forge-users at lists.jboss.org Thu Aug 28 12:42:40 2014 From: forge-users at lists.jboss.org (forge-users at lists.jboss.org) Date: Thu, 28 Aug 2014 12:42:40 EDT Subject: [forge-users] connection-create-profile does not recognise hibernateDialect Message-ID: <2103036386.21409244190982.JavaMail.jive@jive-app01.app.mwc.hst.phx2.redhat.com> Created [FORGE-1989] Connection-create-profile shouldn't need to add the descriptive text in the hibernateDialect parameter - JB? (https://issues.jboss.org/browse/FORGE-1989) to fix this. This change will break current scripts Posted by forums Original post: https://developer.jboss.org/message/902299#902299 From forge-users at lists.jboss.org Thu Aug 28 13:34:58 2014 From: forge-users at lists.jboss.org (forge-users at lists.jboss.org) Date: Thu, 28 Aug 2014 13:34:58 EDT Subject: [forge-users] connection-create-profile does not recognise hibernateDialect Message-ID: <1232621394.31409247328981.JavaMail.jive@jive-app01.app.mwc.hst.phx2.redhat.com> I was using the command line windows version of Forge 2.8.0.Final. I prefer to generate my webapps that way because I can retain the command text for each step so that I can regenerate my webapp later without having to remember each step or any of their parameters. Also, if removing the descriptive text for the hibernateDialect is implemented for the connection-create-profile command, it should also be removed for the jpa-generate-entities-from-tables command. See my related post Thanks Posted by forums Original post: https://developer.jboss.org/message/902304#902304 From ggastald at redhat.com Thu Aug 28 13:50:49 2014 From: ggastald at redhat.com (George Gastaldi) Date: Thu, 28 Aug 2014 13:50:49 -0400 (EDT) Subject: [forge-users] connection-create-profile does not recognise hibernateDialect In-Reply-To: <1232621394.31409247328981.JavaMail.jive@jive-app01.app.mwc.hst.phx2.redhat.com> References: <1232621394.31409247328981.JavaMail.jive@jive-app01.app.mwc.hst.phx2.redhat.com> Message-ID: <9B988D8E-8425-4BB5-A218-2C1C8179D35E@redhat.com> Hi Gerry, Yes, that is fixed also. Thanks for pointing that out. > Em 28/08/2014, ?s 14:40, forge-users at lists.jboss.org escreveu: > > I was using the command line windows version of Forge 2.8.0.Final. > I prefer to generate my webapps that way because I can retain the command text for each step so that I can regenerate my webapp later without having to remember each step or any of their parameters. > > Also, if removing the descriptive text for the hibernateDialect is implemented for the connection-create-profile command, it should also be removed for the jpa-generate-entities-from-tables command. > > See my related post > > Thanks > > Posted by forums > Original post: https://developer.jboss.org/message/902304#902304 > _______________________________________________ > forge-users mailing list > forge-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/forge-users From forge-users at lists.jboss.org Thu Aug 28 15:34:51 2014 From: forge-users at lists.jboss.org (forge-users at lists.jboss.org) Date: Thu, 28 Aug 2014 15:34:51 EDT Subject: [forge-users] connection-create-profile fails to retain the database connection password Message-ID: <799507383.41409254521450.JavaMail.jive@jive-app01.app.mwc.hst.phx2.redhat.com> I am using forge 2.8.0.Final on a Windows 7 PC with Oracle Java 1.7.0_67.? I am using forge as a command line utility in a windows command window. The database I am connecting to is MySQL with InnoDB. I am now able to generate JPA entities from the database using the jpa-generate-entities-from-tables if I specify all of the database connection parameters as part of the jpa-generate-entities-from-tables command. I would like to use the connection-create-profile command followed by a jpa-generate-entities-from-tables that references the connection and does not include all of the database connection info stored in the forge connection. My connection is created without error: [$code]$ project-new --named par --topLevelPackage ca.gerrymatte.par --type war --finalName par ; ***SUCCESS*** Project named 'par' has been created. [par]$ jpa-setup --provider Hibernate --dbType MYSQL5_INNODB --container JBOSS_AS7 --dataSourceName java:jboss/datasources/parDS ; ***SUCCESS*** Persistence (JPA) is installed. [persistence.xml]$ connection-create-profile - --name parConnection --hibernateDialect MySQL5\ with\ InnoDB\ :\ org.hibernate.dialect.MySQL5InnoDBDialect --driverClass com.mysql.jdbc.Driver --driverLocation C:/s/jclasses/drivers/mysql.jar --userName root --userPassword xxxxxx --jdbcUrl jdbc:mysql:///par?characterEncoding=UTF-8&characterSetResults=UTF-8&autoReconnect=tru e&zeroDateTimeBehavior=convertToNull --verifyConnection true; ***SUCCESS*** Connection profile parConnection has been saved successfully [persistence.xml]$ But when I try use the connection with a jpa-generate-entities-from-tables it appears that the database password was not saved in the connection: [persistence.xml]$ jpa-generate-entities-from-tables - --databaseTables * --connectionProfile parConnection --targetPackage ca.gerrymatte.par.model ; org.hibernate.exception.GenericJDBCException: Getting database metadata ??????? at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:140) ??????? at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:128) ??????? at org.hibernate.cfg.reveng.dialect.AbstractMetaDataDialect.getMetaData(AbstractMetaDataDialect.java:63) ??????? at org.hibernate.cfg.reveng.dialect.AbstractMetaDataDialect.caseForSearch(AbstractMetaDataDialect.java:163) ??????? at org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect.getTables(JDBCMetaDataDialect.java:22) ??????? at org.hibernate.cfg.reveng.JDBCReader.processTables(JDBCReader.java:476) ??????? at org.hibernate.cfg.reveng.JDBCReader.readDatabaseSchema(JDBCReader.java:74) ??????? at org.hibernate.cfg.reveng.JDBCReader.readDatabaseSchema(JDBCReader.java:860) ??????? at org.hibernate.cfg.JDBCBinder.readDatabaseSchema(JDBCBinder.java:120) ??????? at org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder.java:93) ??????? at org.hibernate.cfg.JDBCMetaDataConfiguration.readFromJDBC(JDBCMetaDataConfiguration.java:43) ??????? at org.jboss.forge.addon.database.tools.util.HibernateToolsHelper$1.run(HibernateToolsHelper.java:27) ??????? at org.jboss.forge.addon.database.tools.util.UrlClassLoaderExecutor.execute(UrlClassLoaderExecutor.java:15) ??????? at org.jboss.forge.addon.database.tools.util.HibernateToolsHelper.buildMappings(HibernateToolsHelper.java:17) ??????? at org.jboss.forge.addon.database.tools.generate.DatabaseTableSelectionStep$1.call(DatabaseTableSelectionStep.java:96) ??????? at org.jboss.forge.addon.database.tools.generate.DatabaseTableSelectionStep$1.call(DatabaseTableSelectionStep.java:86) ??????? at org.jboss.forge.furnace.util.Callables.call(Callables.java:43) ??????? at org.jboss.forge.addon.ui.impl.input.AbstractUISelectInputComponent.getValueChoices(AbstractUISelectInputComponent.java:55) ??????? at sun.reflect.GeneratedMethodAccessor54.invoke(Unknown Source) ??????? at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ??????? at java.lang.reflect.Method.invoke(Method.java:606) ??????? at org.jboss.forge.furnace.proxy.ClassLoaderInterceptor$1.call(ClassLoaderInterceptor.java:87) ??????? at org.jboss.forge.furnace.util.ClassLoaders.executeIn(ClassLoaders.java:40) ??????? at org.jboss.forge.furnace.proxy.ClassLoaderInterceptor.invoke(ClassLoaderInterceptor.java:103) ??????? at org.jboss.forge.addon.facets.AbstractFaceted_$$_javassist_4b59101b-4f6a-4fb6-9e4d-7267a243a3dd.getValueChoices(AbstractFaceted_$$_javassist_4b59101b-4f6a-4fb6-9e4d-7267a243a3dd.ja va) ??????? at org.jboss.forge.addon.shell.aesh.CommandLineUtil.resolveWildcardSelectOptionValues(CommandLineUtil.java:208) ??????? at org.jboss.forge.addon.shell.aesh.CommandLineUtil.populateUIInputs(CommandLineUtil.java:183) ??????? at org.jboss.forge.addon.shell.aesh.ShellWizard.populate(ShellWizard.java:57) ??????? at org.jboss.forge.addon.shell.aesh.ShellWizard.populate(ShellWizard.java:81) ??????? at org.jboss.forge.addon.shell.aesh.ShellWizard.getParser(ShellWizard.java:44) ??????? at org.jboss.forge.addon.shell.aesh.ForgeCommandRegistry.getForgeCommand(ForgeCommandRegistry.java:110) ??????? at org.jboss.forge.addon.shell.aesh.ForgeCommandRegistry.getCommand(ForgeCommandRegistry.java:77) ??????? at org.jboss.aesh.console.AeshConsoleImpl.getCommand(AeshConsoleImpl.java:242) ??????? at org.jboss.aesh.console.AeshConsoleImpl.access$100(AeshConsoleImpl.java:51) ??????? at org.jboss.aesh.console.AeshConsoleImpl$AeshConsoleCallbackImpl.execute(AeshConsoleImpl.java:304) ??????? at org.jboss.aesh.console.AeshProcess.run(AeshProcess.java:40) ??????? at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) ??????? at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) ??????? at java.lang.Thread.run(Thread.java:745) Caused by: java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: NO) ??????? at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1084) ??????? at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4232) ??????? at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4164) ??????? at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:926) ??????? at com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1748) ??????? at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1288) ??????? at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2506) ??????? at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2539) ??????? at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2321) ??????? at com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:832) ??????? at com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:46) ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) ??????? at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:526) ??????? at com.mysql.jdbc.Util.handleNewInstance(Util.java:409) ??????? at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:417) ??????? at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:344) ??????? at org.jboss.forge.addon.database.tools.util.DelegatingDriver.connect(DelegatingDriver.java:25) ??????? at java.sql.DriverManager.getConnection(DriverManager.java:571) ??????? at java.sql.DriverManager.getConnection(DriverManager.java:187) ??????? at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:133) ??????? at org.hibernate.cfg.reveng.dialect.AbstractMetaDataDialect.getConnection(AbstractMetaDataDialect.java:121) ??????? at org.hibernate.cfg.reveng.dialect.AbstractMetaDataDialect.getMetaData(AbstractMetaDataDialect.java:60) ??????? ... 36 more ***ERROR*** Database Tables must be specified. If I repeat the command and I insert the password at the end with? --userPassword matteg the same error occurs. I am currently able to generate my entities without using a forge connection profile but if the connection info is persistent within the project, or is globally persistent across multiple projects, it would be much more desirable to use connection profiles for each of my database schema. Posted by forums Original post: https://developer.jboss.org/message/902315#902315 From ggastald at redhat.com Thu Aug 28 15:57:15 2014 From: ggastald at redhat.com (George Gastaldi) Date: Thu, 28 Aug 2014 16:57:15 -0300 Subject: [forge-users] connection-create-profile fails to retain the database connection password In-Reply-To: <799507383.41409254521450.JavaMail.jive@jive-app01.app.mwc.hst.phx2.redhat.com> References: <799507383.41409254521450.JavaMail.jive@jive-app01.app.mwc.hst.phx2.redhat.com> Message-ID: <53FF899B.7030103@redhat.com> Could you please open a JIRA with these steps and then we can have a look at it? Thanks On 08/28/2014 04:34 PM, forge-users at lists.jboss.org wrote: > I am using forge 2.8.0.Final on a Windows 7 PC with Oracle Java 1.7.0_67. I am using forge as a command line utility in a windows command window. > The database I am connecting to is MySQL with InnoDB. > > I am now able to generate JPA entities from the database using the jpa-generate-entities-from-tables if I specify all of the database connection parameters as part of the jpa-generate-entities-from-tables command. > I would like to use the connection-create-profile command followed by a jpa-generate-entities-from-tables that references the connection and does not include all of the database connection info stored in the forge connection. > > My connection is created without error: > [$code]$ project-new --named par --topLevelPackage ca.gerrymatte.par --type war --finalName par ; > ***SUCCESS*** Project named 'par' has been created. > [par]$ jpa-setup --provider Hibernate --dbType MYSQL5_INNODB --container JBOSS_AS7 --dataSourceName java:jboss/datasources/parDS ; > ***SUCCESS*** Persistence (JPA) is installed. > [persistence.xml]$ connection-create-profile - --name parConnection --hibernateDialect MySQL5\ with\ InnoDB\ :\ org.hibernate.dialect.MySQL5InnoDBDialect --driverClass com.mysql.jdbc.Driver > --driverLocation C:/s/jclasses/drivers/mysql.jar --userName root --userPassword xxxxxx --jdbcUrl jdbc:mysql:///par?characterEncoding=UTF-8&characterSetResults=UTF-8&autoReconnect=tru > e&zeroDateTimeBehavior=convertToNull --verifyConnection true; > ***SUCCESS*** Connection profile parConnection has been saved successfully > [persistence.xml]$ > > But when I try use the connection with a jpa-generate-entities-from-tables it appears that the database password was not saved in the connection: > [persistence.xml]$ jpa-generate-entities-from-tables - --databaseTables * --connectionProfile parConnection --targetPackage ca.gerrymatte.par.model ; > org.hibernate.exception.GenericJDBCException: Getting database metadata > at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:140) > at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:128) > at org.hibernate.cfg.reveng.dialect.AbstractMetaDataDialect.getMetaData(AbstractMetaDataDialect.java:63) > at org.hibernate.cfg.reveng.dialect.AbstractMetaDataDialect.caseForSearch(AbstractMetaDataDialect.java:163) > at org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect.getTables(JDBCMetaDataDialect.java:22) > at org.hibernate.cfg.reveng.JDBCReader.processTables(JDBCReader.java:476) > at org.hibernate.cfg.reveng.JDBCReader.readDatabaseSchema(JDBCReader.java:74) > at org.hibernate.cfg.reveng.JDBCReader.readDatabaseSchema(JDBCReader.java:860) > at org.hibernate.cfg.JDBCBinder.readDatabaseSchema(JDBCBinder.java:120) > at org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder.java:93) > at org.hibernate.cfg.JDBCMetaDataConfiguration.readFromJDBC(JDBCMetaDataConfiguration.java:43) > at org.jboss.forge.addon.database.tools.util.HibernateToolsHelper$1.run(HibernateToolsHelper.java:27) > at org.jboss.forge.addon.database.tools.util.UrlClassLoaderExecutor.execute(UrlClassLoaderExecutor.java:15) > at org.jboss.forge.addon.database.tools.util.HibernateToolsHelper.buildMappings(HibernateToolsHelper.java:17) > at org.jboss.forge.addon.database.tools.generate.DatabaseTableSelectionStep$1.call(DatabaseTableSelectionStep.java:96) > at org.jboss.forge.addon.database.tools.generate.DatabaseTableSelectionStep$1.call(DatabaseTableSelectionStep.java:86) > at org.jboss.forge.furnace.util.Callables.call(Callables.java:43) > at org.jboss.forge.addon.ui.impl.input.AbstractUISelectInputComponent.getValueChoices(AbstractUISelectInputComponent.java:55) > at sun.reflect.GeneratedMethodAccessor54.invoke(Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:606) > at org.jboss.forge.furnace.proxy.ClassLoaderInterceptor$1.call(ClassLoaderInterceptor.java:87) > at org.jboss.forge.furnace.util.ClassLoaders.executeIn(ClassLoaders.java:40) > at org.jboss.forge.furnace.proxy.ClassLoaderInterceptor.invoke(ClassLoaderInterceptor.java:103) > at org.jboss.forge.addon.facets.AbstractFaceted_$$_javassist_4b59101b-4f6a-4fb6-9e4d-7267a243a3dd.getValueChoices(AbstractFaceted_$$_javassist_4b59101b-4f6a-4fb6-9e4d-7267a243a3dd.ja > va) > at org.jboss.forge.addon.shell.aesh.CommandLineUtil.resolveWildcardSelectOptionValues(CommandLineUtil.java:208) > at org.jboss.forge.addon.shell.aesh.CommandLineUtil.populateUIInputs(CommandLineUtil.java:183) > at org.jboss.forge.addon.shell.aesh.ShellWizard.populate(ShellWizard.java:57) > at org.jboss.forge.addon.shell.aesh.ShellWizard.populate(ShellWizard.java:81) > at org.jboss.forge.addon.shell.aesh.ShellWizard.getParser(ShellWizard.java:44) > at org.jboss.forge.addon.shell.aesh.ForgeCommandRegistry.getForgeCommand(ForgeCommandRegistry.java:110) > at org.jboss.forge.addon.shell.aesh.ForgeCommandRegistry.getCommand(ForgeCommandRegistry.java:77) > at org.jboss.aesh.console.AeshConsoleImpl.getCommand(AeshConsoleImpl.java:242) > at org.jboss.aesh.console.AeshConsoleImpl.access$100(AeshConsoleImpl.java:51) > at org.jboss.aesh.console.AeshConsoleImpl$AeshConsoleCallbackImpl.execute(AeshConsoleImpl.java:304) > at org.jboss.aesh.console.AeshProcess.run(AeshProcess.java:40) > at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) > at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) > at java.lang.Thread.run(Thread.java:745) > Caused by: java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: NO) > at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1084) > at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4232) > at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4164) > at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:926) > at com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1748) > at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1288) > at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2506) > at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2539) > at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2321) > at com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:832) > at com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:46) > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) > at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) > at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) > at java.lang.reflect.Constructor.newInstance(Constructor.java:526) > at com.mysql.jdbc.Util.handleNewInstance(Util.java:409) > at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:417) > at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:344) > at org.jboss.forge.addon.database.tools.util.DelegatingDriver.connect(DelegatingDriver.java:25) > at java.sql.DriverManager.getConnection(DriverManager.java:571) > at java.sql.DriverManager.getConnection(DriverManager.java:187) > at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:133) > at org.hibernate.cfg.reveng.dialect.AbstractMetaDataDialect.getConnection(AbstractMetaDataDialect.java:121) > at org.hibernate.cfg.reveng.dialect.AbstractMetaDataDialect.getMetaData(AbstractMetaDataDialect.java:60) > ... 36 more > ***ERROR*** Database Tables must be specified. > > > If I repeat the command and I insert the password at the end with --userPassword matteg the same error occurs. > > I am currently able to generate my entities without using a forge connection profile but if the connection info is persistent within the project, or is globally persistent across multiple projects, it would be much more desirable to use connection profiles for each of my database schema. > > Posted by forums > Original post: https://developer.jboss.org/message/902315#902315 > > _______________________________________________ > forge-users mailing list > forge-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/forge-users From forge-users at lists.jboss.org Thu Aug 28 16:21:12 2014 From: forge-users at lists.jboss.org (forge-users at lists.jboss.org) Date: Thu, 28 Aug 2014 16:21:12 EDT Subject: [forge-users] connection-create-profile fails to retain the In-Reply-To: <53FF899B.7030103@redhat.com> Message-ID: <435329907.51409257302353.JavaMail.jive@jive-app01.app.mwc.hst.phx2.redhat.com> database connection password MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Done. See [FORGE-1990] connection-create-profile fails to retain the database connection password - JBoss Issue Tracker (https://issues.jboss.org/browse/FORGE-1990) Posted by forums Original post: https://developer.jboss.org/message/902321#902321 From forge-users at lists.jboss.org Fri Aug 29 13:33:59 2014 From: forge-users at lists.jboss.org (forge-users at lists.jboss.org) Date: Fri, 29 Aug 2014 13:33:59 EDT Subject: [forge-users] connection-create-profile fails to retain the database connection password In-Reply-To: <435329907.51409257302353.JavaMail.jive@jive-app01.app.mwc.hst.phx2.redhat.com> Message-ID: <343230996.71409333690882.JavaMail.jive@jive-app01.app.mwc.hst.phx2.redhat.com> Hi Gerry, I just fixed your issue. It should be available in the next released version (1.8.2.Final), which is due in Sept, 15th. You can build from the master branch if you like. Best Regards, George Gastaldi Posted by forums Original post: https://developer.jboss.org/message/902448#902448 From forge-users at lists.jboss.org Fri Aug 29 16:46:15 2014 From: forge-users at lists.jboss.org (forge-users at lists.jboss.org) Date: Fri, 29 Aug 2014 16:46:15 EDT Subject: [forge-users] connection-create-profile fails to retain the database connection password In-Reply-To: <343230996.71409333690882.JavaMail.jive@jive-app01.app.mwc.hst.phx2.redhat.com> Message-ID: <1706180995.91409345205732.JavaMail.jive@jive-app01.app.mwc.hst.phx2.redhat.com> I believe you meant version 2.8.2 contains the fix. Thank you . Posted by forums Original post: https://developer.jboss.org/message/902490#902490 From ggastald at redhat.com Fri Aug 29 17:04:35 2014 From: ggastald at redhat.com (George Gastaldi) Date: Fri, 29 Aug 2014 17:04:35 -0400 (EDT) Subject: [forge-users] connection-create-profile fails to retain the database connection password In-Reply-To: <1706180995.91409345205732.JavaMail.jive@jive-app01.app.mwc.hst.phx2.redhat.com> References: <1706180995.91409345205732.JavaMail.jive@jive-app01.app.mwc.hst.phx2.redhat.com> Message-ID: Ah yes, sorry, got distracted while writing the post :) > Em 29/08/2014, ?s 17:47, forge-users at lists.jboss.org escreveu: > > I believe you meant version 2.8.2 contains the fix. > Thank you . > > Posted by forums > Original post: https://developer.jboss.org/message/902490#902490 > _______________________________________________ > forge-users mailing list > forge-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/forge-users From forge-users at lists.jboss.org Sun Aug 31 22:43:34 2014 From: forge-users at lists.jboss.org (forge-users at lists.jboss.org) Date: Sun, 31 Aug 2014 22:43:34 EDT Subject: [forge-users] Switchyard Addon Message-ID: <1399228406.101409539444620.JavaMail.jive@jive-app01.app.mwc.hst.phx2.redhat.com> When will Switchyard Addon in Forge 2.x be available? Posted by forums Original post: https://developer.jboss.org/message/902532#902532 From ggastald at redhat.com Sun Aug 31 23:04:17 2014 From: ggastald at redhat.com (George Gastaldi) Date: Sun, 31 Aug 2014 23:04:17 -0400 (EDT) Subject: [forge-users] Switchyard Addon In-Reply-To: <1399228406.101409539444620.JavaMail.jive@jive-app01.app.mwc.hst.phx2.redhat.com> References: <1399228406.101409539444620.JavaMail.jive@jive-app01.app.mwc.hst.phx2.redhat.com> Message-ID: <0200853A-CAF3-495F-BD78-7D27528578F8@redhat.com> There is already some progress in https://github.com/forge/plugin-switchyard/tree/2.x, however it needs to be updated to the latest version (2.8.1.Final) > Em 31/08/2014, ?s 23:44, forge-users at lists.jboss.org escreveu: > > When will Switchyard Addon in Forge 2.x be available? > > Posted by forums > Original post: https://developer.jboss.org/message/902532#902532 > _______________________________________________ > forge-users mailing list > forge-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/forge-users