[JBoss JIRA] (FORGE-1687) Create and View pages have a wrong Bean name
by Vineet Reynolds (JIRA)
[ https://issues.jboss.org/browse/FORGE-1687?page=com.atlassian.jira.plugin... ]
Vineet Reynolds resolved FORGE-1687.
------------------------------------
Fix Version/s: 2.2.1.Final
(was: 2.x Future)
Resolution: Done
Merged: https://github.com/forge/core/commit/61cbe42c8
> Create and View pages have a wrong Bean name
> --------------------------------------------
>
> Key: FORGE-1687
> URL: https://issues.jboss.org/browse/FORGE-1687
> Project: Forge
> Issue Type: Bug
> Components: Scaffold
> Affects Versions: 2.2.0.Final
> Reporter: Antonio Goncalves
> Assignee: Vineet Reynolds
> Priority: Blocker
> Fix For: 2.2.1.Final
>
>
> Create a project with an entity and scaffold a JSF UI :
> {code}
> [Forge]$ project-new --named demoforge --topLevelPackage fr.girc.dsn
> [demoforge]$ jpa-setup --provider Hibernate
> [demoforge]$ jpa-new-entity --named Individu
> [Individu.java]$ jpa-new-field --named firstname
> [Individu.java]$ jpa-new-field --named lastname
> [Individu.java]$ jpa-new-field --named age --type int
> [Individu.java]$ scaffold-setup
> [Individu.java]$ scaffold-generate --targets fr.girc.dsn.model.Individu
> {code}
> The generated search page because it referes the right bean name {{individuBean}}:
> {code}
> <h:panelGroup>
> <h:inputText id="individuBeanExampleFirstname" value="#{individuBean.example.firstname}"/>
> <h:message for="individuBeanExampleFirstname" styleClass="error"/>
> </h:panelGroup>
> {code}
> But the create and view have a wrong name {{individuBeanindividu}} :
> {code}
> <h:panelGroup>
> <h:inputText id="individuBeanindividuLastname" value="#{individuBeanindividu.lastname}"/>
> <h:message for="individuBeanindividuLastname" styleClass="error"/>
> </h:panelGroup>
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years
[JBoss JIRA] (FORGE-1686) Not setting up a provider in JPA doesn't add properties in persistence.xml
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-1686?page=com.atlassian.jira.plugin... ]
George Gastaldi closed FORGE-1686.
----------------------------------
Assignee: George Gastaldi
Fix Version/s: 2.2.1.Final
(was: 2.x Future)
Resolution: Done
Hibernate is now the default provider
> Not setting up a provider in JPA doesn't add properties in persistence.xml
> --------------------------------------------------------------------------
>
> Key: FORGE-1686
> URL: https://issues.jboss.org/browse/FORGE-1686
> Project: Forge
> Issue Type: Bug
> Components: Java EE
> Affects Versions: 2.2.0.Final
> Reporter: Antonio Goncalves
> Assignee: George Gastaldi
> Priority: Critical
> Fix For: 2.2.1.Final
>
>
> If you create a project with a few entities and then scaffold a JSF front end without setting up jpa (command {{jpa-setup}}), the generated {{persistence.xml}} looks like this :
> {code}
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
> <persistence-unit name="test-persistence-unit" transaction-type="JTA">
> <description>Forge Persistence Unit</description>
> <jta-data-source>java:jboss/datasources/ExampleDS</jta-data-source>
> <exclude-unlisted-classes>false</exclude-unlisted-classes>
> </persistence-unit>
> </persistence>
> {code}
> In the {{pom.xml}}, the Hibernate dependency has been added, so it's like Hibernate is the default.... but not Hibernate properties... so, unfortunattelly, the webapp doesn't work. Once deployed on JBoss it cannot create the tables... because there are some properties missing. If you run {{jpa-setup --provider Hibernate}}, then you have what you need :
> {code}
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
> <persistence-unit name="test-persistence-unit" transaction-type="JTA">
> <description>Forge Persistence Unit</description>
> <provider>org.hibernate.ejb.HibernatePersistence</provider>
> <jta-data-source>java:jboss/datasources/ExampleDS</jta-data-source>
> <exclude-unlisted-classes>false</exclude-unlisted-classes>
> <properties>
> <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
> <property name="hibernate.show_sql" value="true"/>
> <property name="hibernate.format_sql" value="true"/>
> <property name="hibernate.transaction.flush_before_completion" value="true"/>
> <property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/>
> </properties>
> </persistence-unit>
> </persistence>
> {code}
> On one hand, Hibernate has been added to the pom, and on the other hand it hasn't beed added in the persistence.xml... So, by default, not executing {{jpa-setup}} should be equivalent as executing {{jpa-setup --provider Hibernate}}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years
[JBoss JIRA] (FORGE-1686) Not setting up a provider in JPA doesn't add properties in persistence.xml
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-1686?page=com.atlassian.jira.plugin... ]
George Gastaldi commented on FORGE-1686:
----------------------------------------
I'm fine with that.
> Not setting up a provider in JPA doesn't add properties in persistence.xml
> --------------------------------------------------------------------------
>
> Key: FORGE-1686
> URL: https://issues.jboss.org/browse/FORGE-1686
> Project: Forge
> Issue Type: Bug
> Components: Java EE
> Affects Versions: 2.2.0.Final
> Reporter: Antonio Goncalves
> Priority: Critical
> Fix For: 2.x Future
>
>
> If you create a project with a few entities and then scaffold a JSF front end without setting up jpa (command {{jpa-setup}}), the generated {{persistence.xml}} looks like this :
> {code}
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
> <persistence-unit name="test-persistence-unit" transaction-type="JTA">
> <description>Forge Persistence Unit</description>
> <jta-data-source>java:jboss/datasources/ExampleDS</jta-data-source>
> <exclude-unlisted-classes>false</exclude-unlisted-classes>
> </persistence-unit>
> </persistence>
> {code}
> In the {{pom.xml}}, the Hibernate dependency has been added, so it's like Hibernate is the default.... but not Hibernate properties... so, unfortunattelly, the webapp doesn't work. Once deployed on JBoss it cannot create the tables... because there are some properties missing. If you run {{jpa-setup --provider Hibernate}}, then you have what you need :
> {code}
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
> <persistence-unit name="test-persistence-unit" transaction-type="JTA">
> <description>Forge Persistence Unit</description>
> <provider>org.hibernate.ejb.HibernatePersistence</provider>
> <jta-data-source>java:jboss/datasources/ExampleDS</jta-data-source>
> <exclude-unlisted-classes>false</exclude-unlisted-classes>
> <properties>
> <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
> <property name="hibernate.show_sql" value="true"/>
> <property name="hibernate.format_sql" value="true"/>
> <property name="hibernate.transaction.flush_before_completion" value="true"/>
> <property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/>
> </properties>
> </persistence-unit>
> </persistence>
> {code}
> On one hand, Hibernate has been added to the pom, and on the other hand it hasn't beed added in the persistence.xml... So, by default, not executing {{jpa-setup}} should be equivalent as executing {{jpa-setup --provider Hibernate}}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years
[JBoss JIRA] (FORGE-1686) Not setting up a provider in JPA doesn't add properties in persistence.xml
by Antonio Goncalves (JIRA)
[ https://issues.jboss.org/browse/FORGE-1686?page=com.atlassian.jira.plugin... ]
Antonio Goncalves commented on FORGE-1686:
------------------------------------------
Yes but that means that without a {{jpa-setup}} the code doesn't work anymore. Should it be "by default the app runs on JBoss/Hibernate and if you are not happy about it, then set it up" ?
> Not setting up a provider in JPA doesn't add properties in persistence.xml
> --------------------------------------------------------------------------
>
> Key: FORGE-1686
> URL: https://issues.jboss.org/browse/FORGE-1686
> Project: Forge
> Issue Type: Bug
> Components: Java EE
> Affects Versions: 2.2.0.Final
> Reporter: Antonio Goncalves
> Priority: Critical
> Fix For: 2.x Future
>
>
> If you create a project with a few entities and then scaffold a JSF front end without setting up jpa (command {{jpa-setup}}), the generated {{persistence.xml}} looks like this :
> {code}
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
> <persistence-unit name="test-persistence-unit" transaction-type="JTA">
> <description>Forge Persistence Unit</description>
> <jta-data-source>java:jboss/datasources/ExampleDS</jta-data-source>
> <exclude-unlisted-classes>false</exclude-unlisted-classes>
> </persistence-unit>
> </persistence>
> {code}
> In the {{pom.xml}}, the Hibernate dependency has been added, so it's like Hibernate is the default.... but not Hibernate properties... so, unfortunattelly, the webapp doesn't work. Once deployed on JBoss it cannot create the tables... because there are some properties missing. If you run {{jpa-setup --provider Hibernate}}, then you have what you need :
> {code}
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
> <persistence-unit name="test-persistence-unit" transaction-type="JTA">
> <description>Forge Persistence Unit</description>
> <provider>org.hibernate.ejb.HibernatePersistence</provider>
> <jta-data-source>java:jboss/datasources/ExampleDS</jta-data-source>
> <exclude-unlisted-classes>false</exclude-unlisted-classes>
> <properties>
> <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
> <property name="hibernate.show_sql" value="true"/>
> <property name="hibernate.format_sql" value="true"/>
> <property name="hibernate.transaction.flush_before_completion" value="true"/>
> <property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/>
> </properties>
> </persistence-unit>
> </persistence>
> {code}
> On one hand, Hibernate has been added to the pom, and on the other hand it hasn't beed added in the persistence.xml... So, by default, not executing {{jpa-setup}} should be equivalent as executing {{jpa-setup --provider Hibernate}}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years
[JBoss JIRA] (FORGE-1687) Create and View pages have a wrong Bean name
by Vineet Reynolds (JIRA)
[ https://issues.jboss.org/browse/FORGE-1687?page=com.atlassian.jira.plugin... ]
Vineet Reynolds reassigned FORGE-1687:
--------------------------------------
Assignee: Vineet Reynolds
> Create and View pages have a wrong Bean name
> --------------------------------------------
>
> Key: FORGE-1687
> URL: https://issues.jboss.org/browse/FORGE-1687
> Project: Forge
> Issue Type: Bug
> Components: Scaffold
> Affects Versions: 2.2.0.Final
> Reporter: Antonio Goncalves
> Assignee: Vineet Reynolds
> Priority: Blocker
> Fix For: 2.x Future
>
>
> Create a project with an entity and scaffold a JSF UI :
> {code}
> [Forge]$ project-new --named demoforge --topLevelPackage fr.girc.dsn
> [demoforge]$ jpa-setup --provider Hibernate
> [demoforge]$ jpa-new-entity --named Individu
> [Individu.java]$ jpa-new-field --named firstname
> [Individu.java]$ jpa-new-field --named lastname
> [Individu.java]$ jpa-new-field --named age --type int
> [Individu.java]$ scaffold-setup
> [Individu.java]$ scaffold-generate --targets fr.girc.dsn.model.Individu
> {code}
> The generated search page because it referes the right bean name {{individuBean}}:
> {code}
> <h:panelGroup>
> <h:inputText id="individuBeanExampleFirstname" value="#{individuBean.example.firstname}"/>
> <h:message for="individuBeanExampleFirstname" styleClass="error"/>
> </h:panelGroup>
> {code}
> But the create and view have a wrong name {{individuBeanindividu}} :
> {code}
> <h:panelGroup>
> <h:inputText id="individuBeanindividuLastname" value="#{individuBeanindividu.lastname}"/>
> <h:message for="individuBeanindividuLastname" styleClass="error"/>
> </h:panelGroup>
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years
[JBoss JIRA] (FORGE-1687) Create and View pages have a wrong Bean name
by Antonio Goncalves (JIRA)
Antonio Goncalves created FORGE-1687:
----------------------------------------
Summary: Create and View pages have a wrong Bean name
Key: FORGE-1687
URL: https://issues.jboss.org/browse/FORGE-1687
Project: Forge
Issue Type: Bug
Components: Scaffold
Affects Versions: 2.2.0.Final
Reporter: Antonio Goncalves
Priority: Blocker
Fix For: 2.x Future
Create a project with an entity and scaffold a JSF UI :
{code}
[Forge]$ project-new --named demoforge --topLevelPackage fr.girc.dsn
[demoforge]$ jpa-setup --provider Hibernate
[demoforge]$ jpa-new-entity --named Individu
[Individu.java]$ jpa-new-field --named firstname
[Individu.java]$ jpa-new-field --named lastname
[Individu.java]$ jpa-new-field --named age --type int
[Individu.java]$ scaffold-setup
[Individu.java]$ scaffold-generate --targets fr.girc.dsn.model.Individu
{code}
The generated search page because it referes the right bean name {{individuBean}}:
{code}
<h:panelGroup>
<h:inputText id="individuBeanExampleFirstname" value="#{individuBean.example.firstname}"/>
<h:message for="individuBeanExampleFirstname" styleClass="error"/>
</h:panelGroup>
{code}
But the create and view have a wrong name {{individuBeanindividu}} :
{code}
<h:panelGroup>
<h:inputText id="individuBeanindividuLastname" value="#{individuBeanindividu.lastname}"/>
<h:message for="individuBeanindividuLastname" styleClass="error"/>
</h:panelGroup>
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years
[JBoss JIRA] (FORGE-1686) Not setting up a provider in JPA doesn't add properties in persistence.xml
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-1686?page=com.atlassian.jira.plugin... ]
George Gastaldi commented on FORGE-1686:
----------------------------------------
This is because the default persistence provider is {{Java EE}}, and since the default JPA version is 2.0, there is no standard property to generate tables.
> Not setting up a provider in JPA doesn't add properties in persistence.xml
> --------------------------------------------------------------------------
>
> Key: FORGE-1686
> URL: https://issues.jboss.org/browse/FORGE-1686
> Project: Forge
> Issue Type: Bug
> Components: Java EE
> Affects Versions: 2.2.0.Final
> Reporter: Antonio Goncalves
> Priority: Critical
> Fix For: 2.x Future
>
>
> If you create a project with a few entities and then scaffold a JSF front end without setting up jpa (command {{jpa-setup}}), the generated {{persistence.xml}} looks like this :
> {code}
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
> <persistence-unit name="test-persistence-unit" transaction-type="JTA">
> <description>Forge Persistence Unit</description>
> <jta-data-source>java:jboss/datasources/ExampleDS</jta-data-source>
> <exclude-unlisted-classes>false</exclude-unlisted-classes>
> </persistence-unit>
> </persistence>
> {code}
> In the {{pom.xml}}, the Hibernate dependency has been added, so it's like Hibernate is the default.... but not Hibernate properties... so, unfortunattelly, the webapp doesn't work. Once deployed on JBoss it cannot create the tables... because there are some properties missing. If you run {{jpa-setup --provider Hibernate}}, then you have what you need :
> {code}
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
> <persistence-unit name="test-persistence-unit" transaction-type="JTA">
> <description>Forge Persistence Unit</description>
> <provider>org.hibernate.ejb.HibernatePersistence</provider>
> <jta-data-source>java:jboss/datasources/ExampleDS</jta-data-source>
> <exclude-unlisted-classes>false</exclude-unlisted-classes>
> <properties>
> <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
> <property name="hibernate.show_sql" value="true"/>
> <property name="hibernate.format_sql" value="true"/>
> <property name="hibernate.transaction.flush_before_completion" value="true"/>
> <property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/>
> </properties>
> </persistence-unit>
> </persistence>
> {code}
> On one hand, Hibernate has been added to the pom, and on the other hand it hasn't beed added in the persistence.xml... So, by default, not executing {{jpa-setup}} should be equivalent as executing {{jpa-setup --provider Hibernate}}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years
[JBoss JIRA] (FORGE-1686) Not setting up a provider in JPA doesn't add properties in persistence.xml
by Antonio Goncalves (JIRA)
Antonio Goncalves created FORGE-1686:
----------------------------------------
Summary: Not setting up a provider in JPA doesn't add properties in persistence.xml
Key: FORGE-1686
URL: https://issues.jboss.org/browse/FORGE-1686
Project: Forge
Issue Type: Bug
Components: Java EE
Affects Versions: 2.2.0.Final
Reporter: Antonio Goncalves
Priority: Critical
Fix For: 2.x Future
If you create a project with a few entities and then scaffold a JSF front end without setting up jpa (command {{jpa-setup}}), the generated {{persistence.xml}} looks like this :
{code}
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
<persistence-unit name="test-persistence-unit" transaction-type="JTA">
<description>Forge Persistence Unit</description>
<jta-data-source>java:jboss/datasources/ExampleDS</jta-data-source>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
</persistence-unit>
</persistence>
{code}
In the {{pom.xml}}, the Hibernate dependency has been added, so it's like Hibernate is the default.... but not Hibernate properties... so, unfortunattelly, the webapp doesn't work. Once deployed on JBoss it cannot create the tables... because there are some properties missing. If you run {{jpa-setup --provider Hibernate}}, then you have what you need :
{code}
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
<persistence-unit name="test-persistence-unit" transaction-type="JTA">
<description>Forge Persistence Unit</description>
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>java:jboss/datasources/ExampleDS</jta-data-source>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
<property name="hibernate.hbm2ddl.auto" value="create-drop"/>
<property name="hibernate.show_sql" value="true"/>
<property name="hibernate.format_sql" value="true"/>
<property name="hibernate.transaction.flush_before_completion" value="true"/>
<property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/>
</properties>
</persistence-unit>
</persistence>
{code}
On one hand, Hibernate has been added to the pom, and on the other hand it hasn't beed added in the persistence.xml... So, by default, not executing {{jpa-setup}} should be equivalent as executing {{jpa-setup --provider Hibernate}}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years
[JBoss JIRA] (FORGE-1685) Move the utility classes from the scaffold-api project to a scaffold-services project
by Vineet Reynolds (JIRA)
Vineet Reynolds created FORGE-1685:
--------------------------------------
Summary: Move the utility classes from the scaffold-api project to a scaffold-services project
Key: FORGE-1685
URL: https://issues.jboss.org/browse/FORGE-1685
Project: Forge
Issue Type: Enhancement
Components: Scaffold
Affects Versions: 2.2.0.Final
Reporter: Vineet Reynolds
Assignee: Vineet Reynolds
Scaffold providers should not depend on the scaffold-api for accessing utility classes. A new scaffold-services project should be created to house these classes so that they could be used in scaffold providers through a simple compile-time dependency.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years