[forge-users] How to use Forge 2.10.1.Final jpa-generate-entities-from-tables ?

forge-users at lists.jboss.org forge-users at lists.jboss.org
Wed Dec 3 02:08:55 EST 2014


Ok.  It appears that one of the recent releases undid the fixup that was implemented in 2.10.0.Final.  I will file a JIRA for this issue.

I repeated my commands with version 2.12.0.Final and I encountered the same errors as you did.
Below are the results of my forge session using the exact same statements that suceeded in version 2.10.0.Final.

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\Gerry\Documents\$develop\$code>forge

    _____
  |  ___|__  _ __ __ _  ___
  | |_ / _ \| `__/ _` |/ _ \  \\
  |  _| (_) | | | (_| |  __/  //
  |_|  \___/|_|  \__, |\___|
                  |__/

<code>
JBoss Forge, version [ 2.12.0.Final ] - JBoss, by Red Hat, Inc. [ http://forge.jboss.org ]

[$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 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&amp;characterSetResults=UTF-8&amp;autoReconnect=true&amp;zeroDateTimeBehavior=convertToNull --verifyConnection true;
***SUCCESS*** Connection profile parConnection has been saved successfully
[persistence.xml]$ jpa-generate-entities-from-tables - --databaseTables * --connectionProfile parConnection --targetPackage ca.gerrymatte.par.model ;
***ERROR*** Access denied for user 'root'@'localhost' (using password: NO)
***ERROR*** At least one database table must be specified
[persistence.xml]$
</code>

==== Second test ==============================================================================================================
Oddly, when I tested again using the most recent production version 2.12.3.Final, I discovered that the message that a Connection profile has been saved no longer appears and the same errors occur when attempting to generate entities from tables:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\Gerry\Documents\$develop\$code>forge

    _____
  |  ___|__  _ __ __ _  ___
  | |_ / _ \| `__/ _` |/ _ \  \\
  |  _| (_) | | | (_| |  __/  //
  |_|  \___/|_|  \__, |\___|
                  |__/
<code>
JBoss Forge, version [ 2.12.3.Final ] - JBoss, by Red Hat, Inc. [ http://forge.jboss.org ]

[$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]$ [persistence.xml]$ connection-create-profile - --name parConnection --hibernateDialect org.hibernate.dialect.MySQL5InnoDBDialect --driverClass com.mysql.jdbc.Driver --driv
erLocation C:/s/jclasses/drivers/mysql.jar --userName root --userPassword xxxxxx --jdbcUrl jdbc:mysql:///par?characterEncoding=UTF-8&amp;characterSetResults=UTF-8&amp;autoReconnect=true&amp;
zeroDateTimeBehavior=convertToNull --verifyConnection true;
[persistence.xml]$ jpa-generate-entities-from-tables - --databaseTables * --connectionProfile parConnection --targetPackage ca.gerrymatte.par.model ;
***ERROR*** Access denied for user 'root'@'localhost' (using password: NO)
***ERROR*** At least one database table must be specified
[persistence.xml]$
</code>

Posted by forums
Original post: https://developer.jboss.org/message/912189#912189



More information about the forge-users mailing list