[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
Thu Sep 25 12:17:51 EDT 2014

I'm using jboss developer studio 8 and trying to generate entities with forge 2.10.1.Final  and got the following error:

***ERROR*** Unable to make JDBC Connection [jdbc:mysql://localhost:3306/database]

The url is the same as I have in the datasource for another project, I think I'm doing something wrong, these are the commands:

project-new --named example_2

jpa-setup --provider Hibernate --dbType MYSQL5 --container WILDFLY --dataSourceName java:jboss/datasources/database 

jpa-generate-entities-from-tables --jdbcUrl jdbc:mysql://localhost:3306/database?characterEncoding=UTF-8 --userName user --userPassword password --driverLocation /home/user/mysql-connector-java-5.1.30-bin.jar

In my datasource I have the following:

 <datasource jta="true" jndi-name="java:jboss/datasources/database" pool-name="database" enabled="true" use-java-context="true" use-ccm="true">
                    <new-connection-sql>SELECT 1</new-connection-sql>
                        <check-valid-connection-sql>select 1</check-valid-connection-sql>

Try downloading the zip for GNU / Linux (Fedora 20) and gave the same error.
And even when I pass as parameter --hibernateDialect gives me the menu to choose the dialect(org.hibernate.dialect.MySQL5Dialect , option zero).
Any ideas?

Excuse my English is bad.

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

More information about the forge-users mailing list