[forge-users] How to use Forge 2 jpa-generate-entities-from-tables ?

forge-users at lists.jboss.org forge-users at lists.jboss.org
Thu Aug 14 19:57:03 EDT 2014


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


More information about the forge-users mailing list