[forge-issues] [JBoss JIRA] (FORGE-2636) No specified tables error

John Spencer (JIRA) issues at jboss.org
Tue Jun 21 09:54:00 EDT 2016


    [ https://issues.jboss.org/browse/FORGE-2636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13255153#comment-13255153 ] 

John Spencer commented on FORGE-2636:
-------------------------------------

I'm having trouble connecting to the db you provided, if I try:
cd ~/Downloads/sakila-h2-master
forge
project-new --named sample-project
jpa-setup
jpa-generate-entities-from-tables -jdbc-url jdbc:h2:tcp://localhost/~/sakila.h2.db --driver-location ~/sakila-h2-master/h2-1.4.192.jar --driver-class org.hibernate.dialect.H2Dialect

For some reason forge assumes ~/sakila-h2-master/h2-1.4.192.jar=/home/myUser/Downloads/sakila-h2-master/~/sakila-h2-master/h2-1.4.192.jar'
* Driver Location (The location of the jar file that contains the JDBC driver) [/home/myUser/Downloads/sakila-h2-master/~/sakila-h2-master/h2-1.4.192.jar]:

And I get:
***ERROR*** The location '/home/myUser/Downloads/sakila-h2-master/~/sakila-h2-master/h2-1.4.192.jar' does not exist
***ERROR*** Driver Class must be specified.

However if remove the ~ and just assume my working directory will be added to the path:
jpa-generate-entities-from-tables -jdbc-url sakila.h2.db --driver-location h2-1.4.192.jar --driver-class org.hibernate.dialect.H2Dialect

I get:

***ERROR*** Could not connect to database: JDBC URL [sakila.h2.db] is not compatible with the selected driver [org.h2.Driver].

So instead if I use:
jpa-generate-entities-from-tables -jdbc-url jdbc:h2:tcp://localhost/~/sakila.h2.db --driver-location h2-1.4.192.jar --driver-class org.hibernate.dialect.H2Dialect

I get:
***ERROR*** Could not connect to database: Connection refused

> No specified tables error
> -------------------------
>
>                 Key: FORGE-2636
>                 URL: https://issues.jboss.org/browse/FORGE-2636
>             Project: Forge
>          Issue Type: Bug
>          Components: Database Tools, UI - Shell
>    Affects Versions: 3.0.1.Final, 3.2.2.Final
>         Environment: Windows 10, x64, Fedora 23
>            Reporter: John Spencer
>            Assignee: George Gastaldi
>             Fix For: 3.x Future
>
>
> When I try to execute jpa-generate-entities-from-tables, using:
> Using windows 10 + mysql:
> {code:java}
> jpa-generate-entities-from-tables  --database-tables * --jdbc-url "jdbc:mysql://localhost:3306/validDB" --user-name root --user-password 1234 --driver-location "validpath\mysql-connector-java-5.1.6-bin.jar" --driver-class com.mysql.jdbc.Driver;
> {code}
> Using fedora 23 + postgres:
> {code}
> jpa-generate-entities-from-tables --database-tables * --user-name validuser --user-password validpassword --jdbc-url jdbc:postgresql://localhost:5432/validDB --driver-location validpath/postgresql-9.4-1201-jdbc4.jar --verify-connection y --save-user-password y --driver-class 0 --hibernate-dialect 9
> {code}
> Forge asks me again to enter all of information specified in the command, I do so, and then says "At least one database table must be specified".
> Also the "--database-tables" parameter does not show up in the list of available parameters when pressing tab after having specified a connection profile and/or specifying connection parameters. This might possibly be related to this [issue] (https://issues.jboss.org/projects/FORGE/issues/FORGE-2635?filter=allopenissues).



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the forge-issues mailing list