[
https://issues.jboss.org/browse/FORGE-2162?page=com.atlassian.jira.plugin...
]
Gerry Matte commented on FORGE-2162:
------------------------------------
Sorry for the delay - Christmas holidays ....
No change when I deleted the config.xml file (in windows located at
%USERPROFILE%\.forge\config.xml)
Below is the DOS execution log with the error message.
I followed it with the newly recreated config.xml because there seem to be some unusual
enteries that utilise ampersand lt and & gt and I see that the password was not saved
with the connection profile.
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\Gerry\Documents\$develop\$code>forge
_____
| ___|__ _ __ __ _ ___
| |_ / _ \| `__/ _` |/ _ \ \\
| _| (_) | | | (_| | __/ //
|_| \___/|_| \__, |\___|
|__/
JBoss Forge, version [ 2.13.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/jclas
ses/drivers/mysql.jar --userName root --connectionProfilePassword xxxxxx
--saveUserPassword --jdbcUrl
jdbc:mysql:///par?characterEncoding=UTF-8&characterSetResults=UTF-8&autoReconnec
t=true&zeroDateTimeBehavior=convertToNull --verifyConnection ;
***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]$
.forge/Config.xml
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<configuration>
<connection-profiles><?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<connection-profiles>
<connection-profile dialect="org.hibernate.dialect.MySQL5InnoDBDialect"
driver="com.mysql.jdbc.Driver" name="parConnection"
path-to-driver="C:\s\jclasses\drivers\mysql.jar" save-password="true"
url="jdbc:mysql:///par?characterEncoding=UTF-8"
user="root"/>
</connection-profiles>
</connection-profiles>
</configuration>
Two previous JIRA changes have been undone FORGE-1984 and FORGE-1990
--------------------------------------------------------------------
Key: FORGE-2162
URL:
https://issues.jboss.org/browse/FORGE-2162
Project: Forge
Issue Type: Bug
Components: Database Tools
Affects Versions: 2.12.0.Final, 2.12.3.Final
Environment: Windows 7, JDK7, Jboss AS7 and Wildfly 8.1
Reporter: Gerry Matte
Fix For: 2.x Future
The following two JIRA requests have now returned as bugs.
FORGE-1984 : jpa-generate-entities-from-tables add parameter to select all tables without
prompting (fixed in version 2.8.1)
FORGE-1990 : connection-create-profile fails to retain the database connection password
(fixed in version 2.9.2.Final)
As noted in
https://developer.jboss.org/message/912189#912189 forum posting, the
successful commands to create a connectionProfile and generate jpa entities from a mysql
databse worked without problems in version 2.10.0.Final
On Dec 2, Bruce Link reported problems implementing commands identical to mine but using
forge 2.12.0.Final.
Repeating my own commands that were previously successful, I now encountered the same two
errors that were previously fixed by the above two JIRAs.
I tested with both 2.12.0.Final and with 2.12.3.Final. Both versions failed to retain
the database user password and also failed select all database tables (although the
connection failure may have triggered the second error message)
Please reimplement the changes made with FORGE-1984 and FORGE-1990. I am happy to retest
when you are ready.
Gerry Matte
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)