Hi!

I have an application that works perfectly in deveopment (kubuntu + tomcat 
6.0.32 + MySQL) but fails with strange error in produnction (AmazonEC2 
Linux + tomcat 6.0.32 + Amazon MySQL). The error is:

java.lang.IllegalStateException: Work already begun on this thread. Looks like 
you have called UnitOfWork.begin() twice without a balancing call to end() in 
between.   
com.google.inject.internal.guava.base.$Preconditions.checkState(Preconditions.java:145)
 
com.google.inject.persist.jpa.JpaPersistService.begin(JpaPersistService.java:72)
        com.google.inject.persist.PersistFilter.doFilter(PersistFilter.java:89) 
com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:164)  
com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:68)
 com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:169) 
 
com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:68)
 com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:169) 
 
com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:68)
 com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:169) 
 
com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:68)
 com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:169) 
 
com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:68)
 com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:169) 
 
com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:68)
 
com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:120)
        com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:126)


Servlets, that render html pages always work fine, but some JS/CSS resources 
that are included in HTML pages randomly fall with the error.


I use PersistFilter for all resources in my app:

        filter("/*").through(PersistFilter.class);


Guice version is 3.0-SNAPSHOT from 
https://repository.sonatype.org/content/groups/forge/


How can I fix this error? And why I can't reproduce it in development 
environment?

-- 
You received this message because you are subscribed to the Google Groups 
"google-guice" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-guice/-/2Wm9C4OFssoJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-guice?hl=en.

Reply via email to