[seam-issues] [JBoss JIRA] (JBSEAM-4178) Seam 2.1.1GA on Glassfish generates an exception depending on where the end-conversation is placed in a pages.xml
Marek Novotny (JIRA)
issues at jboss.org
Wed Apr 2 09:55:15 EDT 2014
[ https://issues.jboss.org/browse/JBSEAM-4178?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Marek Novotny closed JBSEAM-4178.
---------------------------------
Resolution: Out of Date
> Seam 2.1.1GA on Glassfish generates an exception depending on where the end-conversation is placed in a pages.xml
> -----------------------------------------------------------------------------------------------------------------
>
> Key: JBSEAM-4178
> URL: https://issues.jboss.org/browse/JBSEAM-4178
> Project: Seam 2
> Issue Type: Bug
> Components: Core
> Affects Versions: 2.1.1.GA
> Environment: JD 1.6 Seam 2.1.1.GA Glassfish 2.1
> Reporter: Arshad Mahmood
>
> I have an application with an edit page named edit.xhtml, it has a form and submit buttion which executes the following action #{currencyAction.save}. The currencyAction is an EJB Stateful session bean. I am coming across a weird error when the action is execute:-
> If my pages.xml is as follows, everything works as expected (i.e. the bean is saved and I get redirected to the view page).
> <!-- page parameters -->
> <param name="currencyId" value="#{currencyAction.currencyId}" />
>
> <!-- join the conversation -->
> <begin-conversation join="true" />
>
> <!-- action: persist -->
> <navigation from-action="#{currencyAction.save}">
> <end-conversation before-redirect="true" />
> <rule if-outcome="persisted">
> <redirect view-id="/settings/currencies/view.xhtml">
> <param name="currencyId" value="#{currencyAction.currencyId}" />
> </redirect>
> </rule>
> </navigation>
> ** BUT **, if I change the end-conversation to be within the if-outcome then I get an exception. I.e. if the pages,xml is changed to
> <!-- action: persist -->
> <navigation from-action="#{currencyAction.save}">
> <rule if-outcome="persisted">
> <end-conversation before-redirect="true" /> *** CHANGE HERE ****
> <redirect view-id="/settings/currencies/view.xhtml">
> <param name="currencyId" value="#{currencyAction.currencyId}" />
> </redirect>
> </rule>
> </navigation>
> The exception is as follows:-
> [#|2009-05-15T10:08:58.045+0100|INFO|sun-appserver2.1|javax.enterprise.system.container.ejb|_ThreadID=24;_ThreadName=TP-Processor12;|
> javax.ejb.TransactionRolledbackLocalException: Exception thrown from bean; nested exception is: java.lang.IllegalArgumentException: EntityManagerFactory not found in JNDI : java:comp/env/smartkidsBSEMF
> java.lang.IllegalArgumentException: EntityManagerFactory not found in JNDI : java:comp/env/smartkidsBSEMF
> at org.jboss.seam.persistence.ManagedPersistenceContext.getEntityManagerFactoryFromJndiOrValueBinding(ManagedPersistenceContext.java:245)
> at org.jboss.seam.persistence.ManagedPersistenceContext.initEntityManager(ManagedPersistenceContext.java:78)
> at org.jboss.seam.persistence.ManagedPersistenceContext.getEntityManager(ManagedPersistenceContext.java:107)
> at sun.reflect.GeneratedMethodAccessor423.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> The bean values are persisted to the database, but then this exception is raised.
--
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
More information about the seam-issues
mailing list