[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-1188) Using the Seam exception filter without JTA throws exception

David Turner (JIRA) jira-events at lists.jboss.org
Tue May 29 01:02:10 EDT 2007


    [ http://jira.jboss.com/jira/browse/JBSEAM-1188?page=comments#action_12363337 ] 
            
David Turner commented on JBSEAM-1188:
--------------------------------------

I'm experiencing the same problem.
A quick workaround is to override the default ExceptionFilter with your own at a higher precedence...

<code> 
@Startup
@Scope(APPLICATION)
@Name("org.jboss.seam.servlet.exceptionFilter")
@Install(precedence = APPLICATION)
@Intercept(NEVER)
public class ExceptionFilter extends org.jboss.seam.web.ExceptionFilter {

	@Override
	protected void rollbackTransactionIfNecessary() {
		// do nothing. we don't use SEAMs transactions.
	}
}
</code>

> Using the Seam exception filter without JTA throws exception
> ------------------------------------------------------------
>
>                 Key: JBSEAM-1188
>                 URL: http://jira.jboss.com/jira/browse/JBSEAM-1188
>             Project: JBoss Seam
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.2.1.GA
>         Environment: Tomcat 6, no microcontainer
>            Reporter: Mike Quilleash
>
> Upgraded to Seam 1.2.1 and the following exception gets printed to the logs when there is an exception.
> ERROR [org.jboss.seam.web.ExceptionFilter] [http-56000-1] (ExceptionFilter.java:136) - could not roll back transaction
> javax.naming.NamingException: Cannot create resource instance
> 	at org.apache.naming.factory.TransactionFactory.getObjectInstance(TransactionFactory.java:113)
> 	at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
> 	at org.apache.naming.NamingContext.lookup(NamingContext.java:793)
> 	at org.apache.naming.NamingContext.lookup(NamingContext.java:140)
> 	at org.apache.naming.NamingContext.lookup(NamingContext.java:781)
> 	at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
> 	at org.apache.naming.SelectorContext.lookup(SelectorContext.java:137)
> 	at javax.naming.InitialContext.lookup(InitialContext.java:351)
> 	at org.jboss.seam.util.Transactions.getUserTransaction(Transactions.java:153)
> 	at org.jboss.seam.util.Transactions.isUTTransactionActiveOrMarkedRollback(Transactions.java:122)
> 	at org.jboss.seam.util.Transactions.isTransactionActiveOrMarkedRollback(Transactions.java:50)
> 	at org.jboss.seam.web.ExceptionFilter.rollbackTransactionIfNecessary(ExceptionFilter.java:128)
> 	at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:63)
> 	at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
> 	at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79)
> 	at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
> 	at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84)
> I don't have JTA/microcontainer installed as I just want to use the exception filter for redirecting on error, rolling back transactions should be disabled/skipped in a non JTA configuration.

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

        



More information about the seam-issues mailing list