[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-3821) seam-gen - entity is not mapped in war project on AS5

Preston (JIRA) jira-events at lists.jboss.org
Thu Mar 5 09:37:23 EST 2009


    [ https://jira.jboss.org/jira/browse/JBSEAM-3821?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12455602#action_12455602 ] 

Preston commented on JBSEAM-3821:
---------------------------------

The comments in the components.xml and persistence.xml files of the JPA Example generated for JBoss 5 show the correct way to handle this. Although it would be nice if SeamGen handled this correctly.


--components.xml
    <persistence:entity-manager-factory name="bookingDatabase" installed="false"/>

    <!-- If Seam loads the persistence unit (JBoss 4.x), the EntityManagerFactory will be resolved from #{bookingDatabase}.
         On JBoss AS 5, the EntityManagerFactory is retrieved from JNDI (the binding occurs during application deployment). -->
    <persistence:managed-persistence-context name="em" auto-create="true"
       entity-manager-factory="#{bookingDatabase}" persistence-unit-jndi-name="java:/bookingEntityManagerFactory"/>

--persistence.xml
 <!-- Binds the EntityManagerFactory to JNDI where Seam can look it up.
              This is only relevant when the container automatically loads the persistence unit, as is the case in JBoss AS 5. -->
         <property name="jboss.entity.manager.factory.jndi.name" value="java:/bookingEntityManagerFactory"/>


> seam-gen - entity is not mapped in war project on AS5
> -----------------------------------------------------
>
>                 Key: JBSEAM-3821
>                 URL: https://jira.jboss.org/jira/browse/JBSEAM-3821
>             Project: Seam
>          Issue Type: Bug
>          Components: Tools
>    Affects Versions: 2.1.1.CR2
>         Environment: JDK5
> JBoss AS 5.0.0.GA
>            Reporter: Jozef Hartinger
>             Fix For: 2.1.2.CR1
>
>         Attachments: genWarRich.txt
>
>
> When accessing generated entity page the application is failing on "org.hibernate.hql.ast.QuerySyntaxException: Vehicle is not mapped [select vehicle from Vehicle vehicle]" . I am using standard release-process.txt database tables. To reproduce the issue: 
> 1.) Create new war project and generate entities. 
> 2.) Log into the application and click PersonList or VehicleList

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the seam-issues mailing list