2 Replies Latest reply on Sep 17, 2007 2:49 PM by Miloslav Vlach

    Exception: Could not register transaction ....

    Miloslav Vlach Novice

      I dont know what happen, but my application doesn't works.

      Know somebody where is the problem ?

      Thanks Mila

      I get this exception:

      20:43:52,828 ERROR [LazyInitializationException] failed to lazily initialize a collection of role: cz.bpsolutions.ims.model.Request.history, no session or sessi
      on was closed
      org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: cz.bpsolutions.ims.model.Request.history, no session or session was
       closed
       at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:358)
       at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationExceptionIfNotConnected(AbstractPersistentCollection.java:350)
       at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:343)
       at org.hibernate.collection.AbstractPersistentCollection.write(AbstractPersistentCollection.java:183)
       at org.hibernate.collection.PersistentBag.add(PersistentBag.java:271)
       at cz.bpsolutions.ims.actions.historyservice.HistoryService.addToHistory(HistoryService.java:40)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
       at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
       at cz.bpsolutions.seam.validation.method.ValidatorInterceptor.validateMethodCall(ValidatorInterceptor.java:78)
       at sun.reflect.GeneratedMethodAccessor87.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
       at org.jboss.seam.intercept.EJBInvocationContext.proceed(EJBInvocationContext.java:37)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:57)
       at org.jboss.seam.interceptors.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:47)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
       at org.jboss.seam.interceptors.ManagedEntityIdentityInterceptor.aroundInvoke(ManagedEntityIdentityInterceptor.java:37)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
       at org.jboss.seam.interceptors.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:27)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
       at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:103)
       at org.jboss.seam.intercept.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:53)
       at sun.reflect.GeneratedMethodAccessor86.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
       at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor.invoke(ExtendedPersistenceContextPropagationInterceptor.java:71)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
       at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:201)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:81)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:78)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.stateful.StatefulContainer.localInvoke(StatefulContainer.java:189)
       at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:98)
       at $Proxy72.addToHistory(Unknown Source)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.jboss.seam.util.Reflections.invoke(Reflections.java:20)
       at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
       at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:72)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:57)
       at org.jboss.seam.interceptors.RemoveInterceptor.aroundInvoke(RemoveInterceptor.java:40)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
       at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:103)
       at org.jboss.seam.intercept.ClientSideInterceptor.invoke(ClientSideInterceptor.java:50)
       at org.javassist.tmp.java.lang.Object_$$_javassist_13.addToHistory(Object_$$_javassist_13.java)
       at cz.bpsolutions.ims.actions.request.RequestService.solvAcceptAssignment(RequestService.java:210)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
       at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
       at cz.bpsolutions.seam.validation.method.ValidatorInterceptor.validateMethodCall(ValidatorInterceptor.java:78)
       at sun.reflect.GeneratedMethodAccessor87.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
       at org.jboss.seam.intercept.EJBInvocationContext.proceed(EJBInvocationContext.java:37)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:57)
       at org.jboss.seam.interceptors.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:47)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
       at org.jboss.seam.interceptors.ManagedEntityIdentityInterceptor.aroundInvoke(ManagedEntityIdentityInterceptor.java:37)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
       at org.jboss.seam.interceptors.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:27)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
       at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:103)
       at org.jboss.seam.intercept.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:53)
       at sun.reflect.GeneratedMethodAccessor86.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
       at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor.invoke(ExtendedPersistenceContextPropagationInterceptor.java:71)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
       at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:201)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:81)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:78)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.stateful.StatefulContainer.localInvoke(StatefulContainer.java:189)
       at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:98)
       at $Proxy74.solvAcceptAssignment(Unknown Source)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.jboss.seam.util.Reflections.invoke(Reflections.java:20)
       at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
       at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:72)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:57)
       at org.jboss.seam.interceptors.RemoveInterceptor.aroundInvoke(RemoveInterceptor.java:40)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
       at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:103)
       at org.jboss.seam.intercept.ClientSideInterceptor.invoke(ClientSideInterceptor.java:50)
       at org.javassist.tmp.java.lang.Object_$$_javassist_6.solvAcceptAssignment(Object_$$_javassist_6.java)
       at cz.bpsolutions.mis.request.RequestAction.solvAcceptAssignment(RequestAction.java:582)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
       at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
       at cz.bpsolutions.seam.validation.method.ValidatorInterceptor.validateMethodCall(ValidatorInterceptor.java:78)
       at sun.reflect.GeneratedMethodAccessor87.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
       at org.jboss.seam.intercept.EJBInvocationContext.proceed(EJBInvocationContext.java:37)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:57)
       at org.jboss.seam.interceptors.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:47)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
       at org.jboss.seam.interceptors.ManagedEntityIdentityInterceptor.aroundInvoke(ManagedEntityIdentityInterceptor.java:37)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
       at org.jboss.seam.interceptors.ConversationInterceptor.aroundInvoke(ConversationInterceptor.java:54)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
       at org.jboss.seam.interceptors.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:27)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
       at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:103)
       at org.jboss.seam.intercept.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:53)
       at sun.reflect.GeneratedMethodAccessor86.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
       at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor.invoke(ExtendedPersistenceContextPropagationInterceptor.java:71)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
       at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:197)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:81)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:78)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.stateful.StatefulContainer.localInvoke(StatefulContainer.java:189)
       at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:98)
       at $Proxy0.solvAcceptAssignment(Unknown Source)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.jboss.seam.util.Reflections.invoke(Reflections.java:20)
       at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
       at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:72)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:57)
       at org.jboss.seam.interceptors.SecurityInterceptor.aroundInvoke(SecurityInterceptor.java:37)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
       at org.jboss.seam.interceptors.RemoveInterceptor.aroundInvoke(RemoveInterceptor.java:40)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
       at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:103)
       at org.jboss.seam.intercept.ClientSideInterceptor.invoke(ClientSideInterceptor.java:50)
       at org.javassist.tmp.java.lang.Object_$$_javassist_4.solvAcceptAssignment(Object_$$_javassist_4.java)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at com.sun.el.parser.AstValue.invoke(AstValue.java:174)
       at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:286)
       at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
       at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:69)
       at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:63)
       at javax.faces.component.UICommand.broadcast(UICommand.java:106)
       at javax.faces.component.UIData.broadcast(UIData.java:513)
       at org.ajax4jsf.framework.ajax.AjaxViewRoot.processEvents(AjaxViewRoot.java:180)
       at org.ajax4jsf.framework.ajax.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:158)
       at org.ajax4jsf.framework.ajax.AjaxViewRoot.processApplication(AjaxViewRoot.java:329)
       at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:343)
       at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
       at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
       at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63)
       at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:53)
       at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
       at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
       at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:60)
       at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
       at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
       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)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
       at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:96)
       at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:220)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
       at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
       at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
       at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
       at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
       at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
       at java.lang.Thread.run(Thread.java:619)
      20:43:53,046 ERROR [ExceptionFilter] uncaught exception
      javax.servlet.ServletException: Error calling action method of component with id _id63:_id65:3:_id113
       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:152)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
       at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
       at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63)
       at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:53)
       at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
       at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
       at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:60)
       at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
       at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
       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)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
       at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:96)
       at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:220)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
       at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
       at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
       at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
       at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
       at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
       at java.lang.Thread.run(Thread.java:619)
      20:43:53,062 ERROR [ExceptionFilter] exception root cause
      javax.faces.FacesException: Error calling action method of component with id _id63:_id65:3:_id113
       at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:74)
       at javax.faces.component.UICommand.broadcast(UICommand.java:106)
       at javax.faces.component.UIData.broadcast(UIData.java:513)
       at org.ajax4jsf.framework.ajax.AjaxViewRoot.processEvents(AjaxViewRoot.java:180)
       at org.ajax4jsf.framework.ajax.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:158)
       at org.ajax4jsf.framework.ajax.AjaxViewRoot.processApplication(AjaxViewRoot.java:329)
       at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:343)
       at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
       at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
       at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63)
       at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:53)
       at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
       at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
       at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:60)
       at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
       at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
       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)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
       at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:96)
       at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:220)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
       at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
       at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
       at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
       at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
       at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
       at java.lang.Thread.run(Thread.java:619)
      Caused by: javax.faces.el.EvaluationException: /actions/request/flow_actions.inc @41,131 action="#{requestAction.solvAcceptAssignment}": javax.ejb.EJBException:
       java.lang.RuntimeException: org.hibernate.TransactionException: Could not register synchronization
       at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:73)
       at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:63)
       ... 43 more
      Caused by: javax.ejb.EJBException: java.lang.RuntimeException: org.hibernate.TransactionException: Could not register synchronization
       at org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.java:69)
       at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:83)
       at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:197)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:81)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:78)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.stateful.StatefulContainer.localInvoke(StatefulContainer.java:189)
       at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:98)
       at $Proxy0.solvAcceptAssignment(Unknown Source)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.jboss.seam.util.Reflections.invoke(Reflections.java:20)
       at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
       at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:72)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:57)
       at org.jboss.seam.interceptors.SecurityInterceptor.aroundInvoke(SecurityInterceptor.java:37)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
       at org.jboss.seam.interceptors.RemoveInterceptor.aroundInvoke(RemoveInterceptor.java:40)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
       at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:103)
       at org.jboss.seam.intercept.ClientSideInterceptor.invoke(ClientSideInterceptor.java:50)
       at org.javassist.tmp.java.lang.Object_$$_javassist_4.solvAcceptAssignment(Object_$$_javassist_4.java)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at com.sun.el.parser.AstValue.invoke(AstValue.java:174)
       at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:286)
       at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
       at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:69)
       ... 44 more
      Caused by: java.lang.RuntimeException: org.hibernate.TransactionException: Could not register synchronization
       at org.jboss.ejb3.stateful.StatefulBeanContext.remove(StatefulBeanContext.java:274)
       at org.jboss.ejb3.AbstractPool.remove(AbstractPool.java:171)
       at org.jboss.ejb3.cache.NoPassivationCache.remove(NoPassivationCache.java:143)
       at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:89)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:78)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.stateful.StatefulContainer.localInvoke(StatefulContainer.java:189)
       at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:98)
       at $Proxy74.solvAcceptAssignment(Unknown Source)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.jboss.seam.util.Reflections.invoke(Reflections.java:20)
       at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
       at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:72)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:57)
       at org.jboss.seam.interceptors.RemoveInterceptor.aroundInvoke(RemoveInterceptor.java:40)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
       at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:103)
       at org.jboss.seam.intercept.ClientSideInterceptor.invoke(ClientSideInterceptor.java:50)
       at org.javassist.tmp.java.lang.Object_$$_javassist_6.solvAcceptAssignment(Object_$$_javassist_6.java)
       at cz.bpsolutions.mis.request.RequestAction.solvAcceptAssignment(RequestAction.java:582)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
       at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
       at cz.bpsolutions.seam.validation.method.ValidatorInterceptor.validateMethodCall(ValidatorInterceptor.java:78)
       at sun.reflect.GeneratedMethodAccessor87.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
       at org.jboss.seam.intercept.EJBInvocationContext.proceed(EJBInvocationContext.java:37)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:57)
       at org.jboss.seam.interceptors.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:47)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
       at org.jboss.seam.interceptors.ManagedEntityIdentityInterceptor.aroundInvoke(ManagedEntityIdentityInterceptor.java:37)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
       at org.jboss.seam.interceptors.ConversationInterceptor.aroundInvoke(ConversationInterceptor.java:54)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
       at org.jboss.seam.interceptors.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:27)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
       at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:103)
       at org.jboss.seam.intercept.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:53)
       at sun.reflect.GeneratedMethodAccessor86.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
       at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor.invoke(ExtendedPersistenceContextPropagationInterceptor.java:71)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
       ... 82 more
      Caused by: org.hibernate.TransactionException: Could not register synchronization
       at org.hibernate.transaction.CMTTransaction.registerSynchronization(CMTTransaction.java:159)
       at org.hibernate.ejb.EntityManagerImpl.close(EntityManagerImpl.java:59)
       at org.jboss.ejb3.stateful.StatefulBeanContext.closeExtendedPCs(StatefulBeanContext.java:285)
       at org.jboss.ejb3.stateful.StatefulBeanContext.remove(StatefulBeanContext.java:269)
       ... 145 more
      Caused by: javax.transaction.RollbackException: Already marked for rollback, tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=null:1190054605765/27, BranchQual
      =null:1190054605765, localId=0:27]
       at org.jboss.tm.TransactionImpl.checkStatus(TransactionImpl.java:2753)
       at org.jboss.tm.TransactionImpl.registerSynchronization(TransactionImpl.java:1531)
       at org.hibernate.transaction.CMTTransaction.registerSynchronization(CMTTransaction.java:156)
       ... 148 more
      20:43:53,218 ERROR [DebugPageHandler] redirecting to debug page
      javax.transaction.RollbackException: Already marked for rollback, tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=null:1190054605765/27, BranchQual=null:11900
      54605765, localId=0:27]
       at org.jboss.tm.TransactionImpl.checkStatus(TransactionImpl.java:2753)
       at org.jboss.tm.TransactionImpl.registerSynchronization(TransactionImpl.java:1531)
       at org.hibernate.transaction.CMTTransaction.registerSynchronization(CMTTransaction.java:156)
       at org.hibernate.ejb.EntityManagerImpl.close(EntityManagerImpl.java:59)
       at org.jboss.ejb3.stateful.StatefulBeanContext.closeExtendedPCs(StatefulBeanContext.java:285)
       at org.jboss.ejb3.stateful.StatefulBeanContext.remove(StatefulBeanContext.java:269)
       at org.jboss.ejb3.AbstractPool.remove(AbstractPool.java:171)
       at org.jboss.ejb3.cache.NoPassivationCache.remove(NoPassivationCache.java:143)
       at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:89)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:78)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.stateful.StatefulContainer.localInvoke(StatefulContainer.java:189)
       at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:98)
       at $Proxy74.solvAcceptAssignment(Unknown Source)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.jboss.seam.util.Reflections.invoke(Reflections.java:20)
       at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
       at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:72)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:57)
       at org.jboss.seam.interceptors.RemoveInterceptor.aroundInvoke(RemoveInterceptor.java:40)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
       at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:103)
       at org.jboss.seam.intercept.ClientSideInterceptor.invoke(ClientSideInterceptor.java:50)
       at org.javassist.tmp.java.lang.Object_$$_javassist_6.solvAcceptAssignment(Object_$$_javassist_6.java)
       at cz.bpsolutions.mis.request.RequestAction.solvAcceptAssignment(RequestAction.java:582)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
       at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
       at cz.bpsolutions.seam.validation.method.ValidatorInterceptor.validateMethodCall(ValidatorInterceptor.java:78)
       at sun.reflect.GeneratedMethodAccessor87.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
       at org.jboss.seam.intercept.EJBInvocationContext.proceed(EJBInvocationContext.java:37)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:57)
       at org.jboss.seam.interceptors.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:47)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
       at org.jboss.seam.interceptors.ManagedEntityIdentityInterceptor.aroundInvoke(ManagedEntityIdentityInterceptor.java:37)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
       at org.jboss.seam.interceptors.ConversationInterceptor.aroundInvoke(ConversationInterceptor.java:54)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
       at org.jboss.seam.interceptors.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:27)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
       at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:103)
       at org.jboss.seam.intercept.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:53)
       at sun.reflect.GeneratedMethodAccessor86.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
       at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor.invoke(ExtendedPersistenceContextPropagationInterceptor.java:71)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
       at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:197)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:81)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:78)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.stateful.StatefulContainer.localInvoke(StatefulContainer.java:189)
       at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:98)
       at $Proxy0.solvAcceptAssignment(Unknown Source)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.jboss.seam.util.Reflections.invoke(Reflections.java:20)
       at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
       at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:72)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:57)
       at org.jboss.seam.interceptors.SecurityInterceptor.aroundInvoke(SecurityInterceptor.java:37)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
       at org.jboss.seam.interceptors.RemoveInterceptor.aroundInvoke(RemoveInterceptor.java:40)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
       at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:103)
       at org.jboss.seam.intercept.ClientSideInterceptor.invoke(ClientSideInterceptor.java:50)
       at org.javassist.tmp.java.lang.Object_$$_javassist_4.solvAcceptAssignment(Object_$$_javassist_4.java)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at com.sun.el.parser.AstValue.invoke(AstValue.java:174)
       at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:286)
       at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
       at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:69)
       at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:63)
       at javax.faces.component.UICommand.broadcast(UICommand.java:106)
       at javax.faces.component.UIData.broadcast(UIData.java:513)
       at org.ajax4jsf.framework.ajax.AjaxViewRoot.processEvents(AjaxViewRoot.java:180)
       at org.ajax4jsf.framework.ajax.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:158)
       at org.ajax4jsf.framework.ajax.AjaxViewRoot.processApplication(AjaxViewRoot.java:329)
       at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:343)
       at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
       at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
       at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63)
       at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:53)
       at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
       at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
       at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:60)
       at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
       at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
       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)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
       at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:96)
       at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:220)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
       at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
       at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
       at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
       at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
       at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
       at java.lang.Thread.run(Thread.java:619)
      


      RequestAction code:
      package cz.bpsolutions.mis.request;
      
      import java.io.Serializable;
      import java.util.ArrayList;
      import java.util.Calendar;
      import java.util.Collection;
      import java.util.Date;
      import java.util.List;
      
      import javax.ejb.Remove;
      import javax.ejb.Stateful;
      import javax.persistence.EntityManager;
      import javax.persistence.PersistenceContext;
      import javax.persistence.PersistenceContextType;
      
      import org.hibernate.Criteria;
      import org.hibernate.criterion.Disjunction;
      import org.hibernate.criterion.MatchMode;
      import org.hibernate.criterion.Restrictions;
      import org.hibernate.ejb.EntityManagerImpl;
      import org.jboss.annotation.ejb.cache.simple.CacheConfig;
      import org.jboss.seam.ScopeType;
      import org.jboss.seam.annotations.Begin;
      import org.jboss.seam.annotations.Destroy;
      import org.jboss.seam.annotations.End;
      import org.jboss.seam.annotations.Factory;
      import org.jboss.seam.annotations.FlushModeType;
      import org.jboss.seam.annotations.In;
      import org.jboss.seam.annotations.Logger;
      import org.jboss.seam.annotations.Name;
      import org.jboss.seam.annotations.Out;
      import org.jboss.seam.annotations.datamodel.DataModel;
      import org.jboss.seam.annotations.datamodel.DataModelSelection;
      import org.jboss.seam.annotations.security.Restrict;
      import org.jboss.seam.log.Log;
      import org.jboss.seam.security.Identity;
      
      import cz.bpsolutions.ims.actions.request.RequestServiceLocal;
      import cz.bpsolutions.ims.beans.Reason;
      import cz.bpsolutions.ims.beans.Solution;
      import cz.bpsolutions.ims.beans.UploadedFile;
      import cz.bpsolutions.ims.model.Account;
      import cz.bpsolutions.ims.model.Attachement;
      import cz.bpsolutions.ims.model.Category;
      import cz.bpsolutions.ims.model.Request;
      import cz.bpsolutions.ims.model.RequestFilter;
      import cz.bpsolutions.ims.model.RequestType;
      import cz.bpsolutions.ims.service.request.RequestSearchParams;
      import cz.bpsolutions.ims.workflow.RequestState;
      import cz.bpsolutions.seam.validation.method.annotation.CustomValidator;
      import cz.bpsolutions.seam.validation.method.annotation.ValidatedMethod;
      import cz.bpsolutions.tools.StringTools;
      
      @Name("requestAction")
      @Stateful
      @Restrict("#{identity.loggedIn}")
      public class RequestAction implements RequestActionLocal, Serializable {
      
       private static final long serialVersionUID = -5653139064486044176L;
      
       @PersistenceContext(type = PersistenceContextType.EXTENDED)
       EntityManager em;
      
       @Logger
       Log log;
      
       @DataModelSelection(value = "requestActionList")
       @In(required = false)
       @Out(required = false, scope = ScopeType.CONVERSATION)
       private Request request;
      
       @DataModelSelection(value = "requestAction_attachements")
       private Attachement attachement;
      
       @DataModel(scope = ScopeType.PAGE)
       private Collection<Request> requestActionList;
      
       @In(create = true)
       private RequestServiceLocal requestService;
      
       @DataModel()
       private Collection<Attachement> requestAction_attachements;
      
       @In(required = false)
       private UploadedFile uploadedFile;
      
       @In(required = false)
       private Category category;
      
       @In(required = false)
       @Out(required = false)
       private Reason reason;
      
       @In(scope = ScopeType.SESSION, value = "loggedUser")
       Account loggedUser;
      
       @In(required = false)
       private RequestType requestType;
      
       @In(required = false)
       private RequestSearchParams requestSearchParams;
      
       @In(required = false)
       @Out(required = false)
       Solution solution;
      
       @DataModel
       List<Account> requestAction_solvers;
      
       @DataModelSelection("requestAction_solvers")
       Account selectedUser;
      
       @DataModel()
       List<RequestFilter> requestAction_filters;
      
       @DataModelSelection("requestAction_filters")
       @In(required = false)
       @Out(required = false)
       RequestFilter requestFilter;
      
       @In(required = false)
       String parReqId;
      
       @In(required = false, scope = ScopeType.SESSION)
       @Out(required = false, scope = ScopeType.SESSION)
       RequestFilter rf;
      
       @Factory("requestAction_solvers")
       public void initSolvers() {
       log.info("loading solvers for the request: #0", request);
       requestAction_solvers = ((EntityManagerImpl) (em.getDelegate()))
       .getSession().createCriteria(Account.class).list();
       }
      
       @Factory("requestAction_attachements")
       public void initAttachements() {
       log.info("loading the attachements");
       if (request != null) {
       requestAction_attachements = request.getAttachements();
       }
       }
      
       @Factory("requestActionList")
       public void init() {
       log.info("loading all requests, filter: #0", rf);
      
       Criteria cr = ((EntityManagerImpl) (em.getDelegate())).getSession()
       .createCriteria(Request.class);
      
       if (rf != null) {
      
       // restrikce autora
       if (!StringTools.isEmpty(rf.getAuthorName())) {
       log.info("finding author: #0", rf.getAuthorName());
       cr.createAlias("author", "a");
       cr.add(Restrictions.ilike("a.fullName", rf.getAuthorName(),
       MatchMode.ANYWHERE));
       }
       // restrikce resitele
       if (!StringTools.isEmpty(rf.getSolverName())) {
       log.info("finding solver: #0", rf.getSolverName());
       cr.createAlias("solver", "s");
       cr.add(Restrictions.ilike("s.fullName", rf.getSolverName(),
       MatchMode.ANYWHERE));
       }
       // restrikce operatora
       if (!StringTools.isEmpty(rf.getOperatorName())) {
       log.info("finding operator: #0", rf.getOperatorName());
       cr.createAlias("operator", "o");
       cr.add(Restrictions.ilike("o.fullName", rf.getOperatorName(),
       MatchMode.ANYWHERE));
       }
      
       // restrikce kategorii
       if (!StringTools.isEmpty(rf.getCategoriesString())) {
       log.info("finding category: #0", rf.getCategoriesString());
       cr.createAlias("category", "cat");
       Disjunction rs = Restrictions.disjunction();
       for (String catId : rf.getCategoriesString().split(",")) {
       Category cat = (Category) em.find(Category.class, Long
       .valueOf(catId));
       if (cat != null) {
       rs.add(Restrictions.ilike("cat.fullName", cat
       .getFullName(), MatchMode.ANYWHERE));
       }
       }
       cr.add(rs);
       }
      
       // restrikce stavu
       if (!StringTools.isEmpty(rf.getStatesString())) {
       log.info("finding states: #0", rf.getStatesString());
       Disjunction rs = Restrictions.disjunction();
      
       for (String state : rf.getStatesString().split(",")) {
       rs.add(Restrictions.eq("state", state));
       }
       cr.add(rs);
       }
      
       // restrikce nazvu a popisu
       if (!StringTools.isEmpty(rf.getKeyword())) {
       log.info("finding keyword: #0", rf.getKeyword());
       cr.add(Restrictions.disjunction().add(
       Restrictions.ilike("name", rf.getKeyword(),
       MatchMode.ANYWHERE)).add(
       Restrictions.ilike("description", rf.getKeyword(),
       MatchMode.ANYWHERE)));
       }
      
       // restrikce requestTypu
       if (!StringTools.isEmpty(rf.getRequestTypesString())) {
       log.info("finding requestType: #0", rf.getRequestTypesString());
       cr.createAlias("requestType", "rt");
       Disjunction dj = Restrictions.disjunction();
      
       for (String rt : rf.getRequestTypesString().split(",")) {
       dj.add(Restrictions.eq("rt.id", Long.valueOf(rt)));
       }
       cr.add(dj);
       }
       // restrikce priority
       if (!StringTools.isEmpty(rf.getPrioritiesString())) {
       log.info("finding priority: #0", rf.getPrioritiesString());
       Disjunction rs = Restrictions.disjunction();
      
       for (String priority : rf.getPrioritiesString().split(",")) {
       rs.add(Restrictions.eq("priority", Integer
       .valueOf(priority)));
       }
       cr.add(rs);
       }
      
       // restrikce datumu
       if (rf.getDateFilter() != null && !rf.getDateFilter().equals(0)) {
       if (rf.getDateFilter() == 1) {
       // dnes
       Date today = new Date();
      
       Calendar cal = Calendar.getInstance();
      
       cal.setTime(today);
      
       cal.set(Calendar.HOUR, 0);
       cal.set(Calendar.MINUTE, 0);
       cal.set(Calendar.SECOND, 0);
       cal.set(Calendar.MILLISECOND, 0);
      
       Date from = cal.getTime();
      
       cal.set(Calendar.HOUR, 23);
       cal.set(Calendar.MINUTE, 59);
       cal.set(Calendar.SECOND, 59);
      
       Date to = cal.getTime();
      
       cr.add(Restrictions.between("created", from, to));
       }
       if (rf.getDateFilter() == 2) {
       // 3 dny
       Date today = new Date();
      
       Calendar cal = Calendar.getInstance();
      
       cal.setTime(today);
      
       cal.set(Calendar.HOUR, 23);
      


        • 1. Re: Exception: Could not register transaction ....
          Miloslav Vlach Novice

          The requestaction again :)

          package cz.bpsolutions.mis.request;
          
          import java.io.Serializable;
          import java.util.ArrayList;
          import java.util.Calendar;
          import java.util.Collection;
          import java.util.Date;
          import java.util.List;
          
          import javax.ejb.Remove;
          import javax.ejb.Stateful;
          import javax.persistence.EntityManager;
          import javax.persistence.PersistenceContext;
          import javax.persistence.PersistenceContextType;
          
          import org.hibernate.Criteria;
          import org.hibernate.criterion.Disjunction;
          import org.hibernate.criterion.MatchMode;
          import org.hibernate.criterion.Restrictions;
          import org.hibernate.ejb.EntityManagerImpl;
          import org.jboss.annotation.ejb.cache.simple.CacheConfig;
          import org.jboss.seam.ScopeType;
          import org.jboss.seam.annotations.Begin;
          import org.jboss.seam.annotations.Destroy;
          import org.jboss.seam.annotations.End;
          import org.jboss.seam.annotations.Factory;
          import org.jboss.seam.annotations.FlushModeType;
          import org.jboss.seam.annotations.In;
          import org.jboss.seam.annotations.Logger;
          import org.jboss.seam.annotations.Name;
          import org.jboss.seam.annotations.Out;
          import org.jboss.seam.annotations.datamodel.DataModel;
          import org.jboss.seam.annotations.datamodel.DataModelSelection;
          import org.jboss.seam.annotations.security.Restrict;
          import org.jboss.seam.log.Log;
          import org.jboss.seam.security.Identity;
          
          import cz.bpsolutions.ims.actions.request.RequestServiceLocal;
          import cz.bpsolutions.ims.beans.Reason;
          import cz.bpsolutions.ims.beans.Solution;
          import cz.bpsolutions.ims.beans.UploadedFile;
          import cz.bpsolutions.ims.model.Account;
          import cz.bpsolutions.ims.model.Attachement;
          import cz.bpsolutions.ims.model.Category;
          import cz.bpsolutions.ims.model.Request;
          import cz.bpsolutions.ims.model.RequestFilter;
          import cz.bpsolutions.ims.model.RequestType;
          import cz.bpsolutions.ims.service.request.RequestSearchParams;
          import cz.bpsolutions.ims.workflow.RequestState;
          import cz.bpsolutions.seam.validation.method.annotation.CustomValidator;
          import cz.bpsolutions.seam.validation.method.annotation.ValidatedMethod;
          import cz.bpsolutions.tools.StringTools;
          
          @Name("requestAction")
          @Stateful
          @Restrict("#{identity.loggedIn}")
          public class RequestAction implements RequestActionLocal, Serializable {
          
           private static final long serialVersionUID = -5653139064486044176L;
          
           @PersistenceContext(type = PersistenceContextType.EXTENDED)
           EntityManager em;
          
           @Logger
           Log log;
          
           @DataModelSelection(value = "requestActionList")
           @In(required = false)
           @Out(required = false, scope = ScopeType.CONVERSATION)
           private Request request;
          
           @DataModelSelection(value = "requestAction_attachements")
           private Attachement attachement;
          
           @DataModel(scope = ScopeType.PAGE)
           private Collection<Request> requestActionList;
          
           @In(create = true)
           private RequestServiceLocal requestService;
          
           @DataModel()
           private Collection<Attachement> requestAction_attachements;
          
           @In(required = false)
           private UploadedFile uploadedFile;
          
           @In(required = false)
           private Category category;
          
           @In(required = false)
           @Out(required = false)
           private Reason reason;
          
           @In(scope = ScopeType.SESSION, value = "loggedUser")
           Account loggedUser;
          
           @In(required = false)
           private RequestType requestType;
          
           @In(required = false)
           private RequestSearchParams requestSearchParams;
          
           @In(required = false)
           @Out(required = false)
           Solution solution;
          
           @DataModel
           List<Account> requestAction_solvers;
          
           @DataModelSelection("requestAction_solvers")
           Account selectedUser;
          
           @DataModel()
           List<RequestFilter> requestAction_filters;
          
           @DataModelSelection("requestAction_filters")
           @In(required = false)
           @Out(required = false)
           RequestFilter requestFilter;
          
           @In(required = false)
           String parReqId;
          
           @In(required = false, scope = ScopeType.SESSION)
           @Out(required = false, scope = ScopeType.SESSION)
           RequestFilter rf;
          
           @Factory("requestAction_solvers")
           public void initSolvers() {
           log.info("loading solvers for the request: #0", request);
           requestAction_solvers = ((EntityManagerImpl) (em.getDelegate()))
           .getSession().createCriteria(Account.class).list();
           }
          
           @Factory("requestAction_attachements")
           public void initAttachements() {
           log.info("loading the attachements");
           if (request != null) {
           requestAction_attachements = request.getAttachements();
           }
           }
          
           @Factory("requestActionList")
           public void init() {
           log.info("loading all requests, filter: #0", rf);
          
           Criteria cr = ((EntityManagerImpl) (em.getDelegate())).getSession()
           .createCriteria(Request.class);
          
           if (rf != null) {
          
           // restrikce autora
           if (!StringTools.isEmpty(rf.getAuthorName())) {
           log.info("finding author: #0", rf.getAuthorName());
           cr.createAlias("author", "a");
           cr.add(Restrictions.ilike("a.fullName", rf.getAuthorName(),
           MatchMode.ANYWHERE));
           }
           // restrikce resitele
           if (!StringTools.isEmpty(rf.getSolverName())) {
           log.info("finding solver: #0", rf.getSolverName());
           cr.createAlias("solver", "s");
           cr.add(Restrictions.ilike("s.fullName", rf.getSolverName(),
           MatchMode.ANYWHERE));
           }
           // restrikce operatora
           if (!StringTools.isEmpty(rf.getOperatorName())) {
           log.info("finding operator: #0", rf.getOperatorName());
           cr.createAlias("operator", "o");
           cr.add(Restrictions.ilike("o.fullName", rf.getOperatorName(),
           MatchMode.ANYWHERE));
           }
          
           // restrikce kategorii
           if (!StringTools.isEmpty(rf.getCategoriesString())) {
           log.info("finding category: #0", rf.getCategoriesString());
           cr.createAlias("category", "cat");
           Disjunction rs = Restrictions.disjunction();
           for (String catId : rf.getCategoriesString().split(",")) {
           Category cat = (Category) em.find(Category.class, Long
           .valueOf(catId));
           if (cat != null) {
           rs.add(Restrictions.ilike("cat.fullName", cat
           .getFullName(), MatchMode.ANYWHERE));
           }
           }
           cr.add(rs);
           }
          
           // restrikce stavu
           if (!StringTools.isEmpty(rf.getStatesString())) {
           log.info("finding states: #0", rf.getStatesString());
           Disjunction rs = Restrictions.disjunction();
          
           for (String state : rf.getStatesString().split(",")) {
           rs.add(Restrictions.eq("state", state));
           }
           cr.add(rs);
           }
          
           // restrikce nazvu a popisu
           if (!StringTools.isEmpty(rf.getKeyword())) {
           log.info("finding keyword: #0", rf.getKeyword());
           cr.add(Restrictions.disjunction().add(
           Restrictions.ilike("name", rf.getKeyword(),
           MatchMode.ANYWHERE)).add(
           Restrictions.ilike("description", rf.getKeyword(),
           MatchMode.ANYWHERE)));
           }
          
           // restrikce requestTypu
           if (!StringTools.isEmpty(rf.getRequestTypesString())) {
           log.info("finding requestType: #0", rf.getRequestTypesString());
           cr.createAlias("requestType", "rt");
           Disjunction dj = Restrictions.disjunction();
          
           for (String rt : rf.getRequestTypesString().split(",")) {
           dj.add(Restrictions.eq("rt.id", Long.valueOf(rt)));
           }
           cr.add(dj);
           }
           // restrikce priority
           if (!StringTools.isEmpty(rf.getPrioritiesString())) {
           log.info("finding priority: #0", rf.getPrioritiesString());
           Disjunction rs = Restrictions.disjunction();
          
           for (String priority : rf.getPrioritiesString().split(",")) {
           rs.add(Restrictions.eq("priority", Integer
           .valueOf(priority)));
           }
           cr.add(rs);
           }
          
           // restrikce datumu
           if (rf.getDateFilter() != null && !rf.getDateFilter().equals(0)) {
           if (rf.getDateFilter() == 1) {
           // dnes
           Date today = new Date();
          
           Calendar cal = Calendar.getInstance();
          
           cal.setTime(today);
          
           cal.set(Calendar.HOUR, 0);
           cal.set(Calendar.MINUTE, 0);
           cal.set(Calendar.SECOND, 0);
           cal.set(Calendar.MILLISECOND, 0);
          
           Date from = cal.getTime();
          
           cal.set(Calendar.HOUR, 23);
           cal.set(Calendar.MINUTE, 59);
           cal.set(Calendar.SECOND, 59);
          
           Date to = cal.getTime();
          
           cr.add(Restrictions.between("created", from, to));
           }
           if (rf.getDateFilter() == 2) {
           // 3 dny
           Date today = new Date();
          
           Calendar cal = Calendar.getInstance();
          
           cal.setTime(today);
          
           cal.set(Calendar.HOUR, 23);
           cal.set(Calendar.MINUTE, 59);
           cal.set(Calendar.SECOND, 59);
           Date to = cal.getTime();
          
           cal.set(Calendar.HOUR, 0);
           cal.set(Calendar.MINUTE, 0);
           cal.set(Calendar.SECOND, 0);
           cal.set(Calendar.MILLISECOND, 0);
          
           cal.add(Calendar.HOUR, -24);
           cal.add(Calendar.HOUR, -24);
           cal.add(Calendar.HOUR, -24);
           Date from = cal.getTime();
          
           cr.add(Restrictions.between("created", from, to));
           }
           if (rf.getDateFilter() == 3) {
           Date today = new Date();
          
           Calendar cal = Calendar.getInstance();
          
           cal.setTime(today);
          
           cal.set(Calendar.HOUR, 23);
           cal.set(Calendar.MINUTE, 59);
           cal.set(Calendar.SECOND, 59);
           Date to = cal.getTime();
          
           cal.set(Calendar.HOUR, 0);
           cal.set(Calendar.MINUTE, 0);
           cal.set(Calendar.SECOND, 0);
           cal.set(Calendar.MILLISECOND, 0);
          
           cal.add(Calendar.HOUR, -24);
           cal.add(Calendar.HOUR, -24);
           cal.add(Calendar.HOUR, -24);
           cal.add(Calendar.HOUR, -24);
           cal.add(Calendar.HOUR, -24);
           cal.add(Calendar.HOUR, -24);
           cal.add(Calendar.HOUR, -24);
           Date from = cal.getTime();
          
           cr.add(Restrictions.between("created", from, to));
           }
           if (rf.getDateFilter() == 4) {
           cr.add(Restrictions.between("created", rf.getFromDate(), rf
           .getToDate()));
           }
           }
           requestActionList = cr.list();
          
           } else {
           requestActionList = cr.list();
           }
           log.info("raw collection size: #0", requestActionList.size());
          
           for (Request r : new ArrayList<Request>(requestActionList)) {
           if (!Identity.instance().hasPermission("request", "read", r)) {
           requestActionList.remove(r);
           }
           }
           log.info("secured collection size: #0", requestActionList.size());
          
           }
          
           public String find() {
           log.info("finding the requests");
           requestActionList = null;
           return "find";
           }
          
           public String delete() {
           log.info("deleting the request: #0", request);
           em.remove(request);
           requestActionList = null;
           return DefaultActions.DELETED;
           }
          
           @End(beforeRedirect = true)
           @ValidatedMethod(formName = "addForm", validators = { @CustomValidator(validatorClass = RequestSaveValidator.class, mapping = {
           "category", "requestType", "request" }) })
           public String save() {
           log.info("adding the request #0", request);
           em.refresh(category);
           em.refresh(requestType);
          
           requestType.getRequests().add(request);
          
           request.setCategory(category);
           request.setAuthor(loggedUser);
           request.setCreated(new Date());
           request.setRequestType(requestType);
          
           if (parReqId != null) { // podrizeny request - nastavime vazby a ulozime
           // rodice
           Request parentRequest = em.find(Request.class, Long
           .valueOf(parReqId));
           request.setParent(parentRequest);
           parentRequest.getChildren().add(request);
           em.merge(parentRequest);
           parReqId = null; // pro jistotu
           }
           em.merge(request);
          
           requestService.save(request);
           return DefaultActions.SAVED;
           }
          
           @ValidatedMethod(formName = "editForm", validators = { @CustomValidator(validatorClass = RequestSaveValidator.class, mapping = {
           "category", "requestType", "request" }) })
           @End(beforeRedirect = true)
           public String update() {
           log.info("adding the request #0", request);
           em.refresh(category);
           em.refresh(requestType);
          
           if (!requestType.getRequests().contains(request)) {
           requestType.getRequests().add(request);
           }
           request.setCategory(category);
           request.setAuthor(loggedUser);
           request.setCreated(new Date());
           request.setRequestType(requestType);
          
           em.merge(request);
           return DefaultActions.EDITED;
           }
          
           @Begin(join = true)
           public String loadDetail() {
           edit();
           return DefaultActions.LOADED;
           }
          
           @Begin(join = true)
           public String edit() {
           em.refresh(request);
           requestAction_attachements = request.getAttachements();
           return DefaultActions.EDITED;
           }
          
           @Begin(join = true)
           public String addAttachement() {
           checkRequest();
           log.info("adding attachement #0: #1", request, uploadedFile);
          
           if (uploadedFile == null) {
           return null;
           }
          
           String location = uploadedFile.getUploadedFile().getName()
           + (new Date()).toString();
          
           Attachement a = new Attachement();
           a.setContentType(uploadedFile.getUploadedFile().getContentType());
           a.setFileName(uploadedFile.getUploadedFile().getName());
           a.setFileSize(uploadedFile.getUploadedFile().getSize());
           a.setRequest(request);
           a.setLocation(location);
          
           request.getAttachements().add(a);
           requestAction_attachements = request.getAttachements();
          
           return "attachementAdded";
           }
          
           @Begin(join = true)
           public String removeAttachement() {
           checkRequest();
           log.info("removing attachement #0", request);
          
           request.getAttachements().remove(attachement);
           requestAction_attachements = request.getAttachements();
          
           return "attachementRemoved";
           }
          
           private void checkRequest() {
           if (request == null) {
           request = new Request();
           }
           }
          
           @Destroy
           @Remove
           public void destroy() {
           }
          
           /**
           * Tato metoda je volaná kdy? chce autor akceptovat vy?e?ení HelpDesku.
           * Metoda je kone?ná.
           */
           @Begin(join = true)
           public String authAcceptSolution() {
           requestService.authAcceptSolution(request);
           return null;
           }
          
           /**
           * Tato metoda je volaná kdy? chce autor odmítnout (reklamovat) validované
           * ?e?ení. Metoda p?esm?rovává na stránku se zadáním d?vodu.
           */
           @Begin(join = true)
           public String authRejectSolution() {
           reason = new Reason();
           return "rejectSolution";
           }
          
           /**
           * Tato metoda je volaná kdy? chce autor odmítnout (reklamovat) validované
           * ?e?ení. Metoda se zavolá ze stránky, která definovala d?vod pro odmítnutí
           * ?e?ení.
           */
           @End(beforeRedirect = true)
           @ValidatedMethod(formName = "rejectForm", validators = { @CustomValidator(validatorClass = ReasonValidator.class, mapping = "reason") })
           public String authSaveRejectSolution() {
           requestService.authSaveRejectSolution(request, reason);
           return "rejectedSolution";
           }
          
           /**
           * Tato metoda nastaví operátor?v souhlas s autorovou reklamací. Vrací
           * po?adavek zp?t do stavu "?e?í se"
           */
           @End(beforeRedirect = true)
           public String opAcceptReclamation() {
           requestService.opAcceptReclamation(request);
           return null;
           }
          
           /**
           * Tato metoda nastavuje validaci operátora s vy?e?ením po?adavku.
           */
           @End(beforeRedirect = true)
           public String opAcceptSolution() {
           requestService.opAcceptSolution(request);
           return null;
           }
          
           /**
           * Tato metoda posíla p?esm?rování na solverselect.xhtml, kde se zobrazí
           * v?ichni ?e?itelé.
           */
           @Begin(join = true)
           public String opAssignSolver() {
           log.info("forwarding to select solver...");
           return "selectSolver";
           }
          
           /**
           * Tato metoda zajistí ulo?ení vybraného ?e?itele. Odskakuje zp?t na
           * /actions/request/list.xhtml
           */
           @End(beforeRedirect = true)
           public String opSaveAssignSolver() {
           log.info("saving the assigned solver...");
           requestService.opSaveAssignSolver(request, selectedUser);
           return "solverSelected";
           }
          
           /**
           * Tato metoda provede p?esm?rování na stránku pro zadání od?vodn?ní
           * nesouhlasu s autorovou reklamací.
           */
           @Begin(join = true)
           public String opRejectReclamation() {
           log.info("redirecting to the rejectreclamation");
           return "rejectReclamation";
           }
          
           /**
           * Tato metoda zavolá servisku pro odmítnutí u?ivatelské reklamace.
           */
           @End(beforeRedirect = true)
           @ValidatedMethod(formName = "rejectForm", validators = { @CustomValidator(validatorClass = ReasonValidator.class, mapping = "reason") })
           public String opSaveRejectReclamation() {
           requestService.opSaveRejectReclamation(request, reason);
           return "rejectReclamationSaved";
           }
          
           /**
           * Tato metoda zajistí p?esm?rování na zadání d?vodu pro odmítnutí po?adaku.
           */
           @Begin(join = true)
           public String opRejectRequest() {
           log.info("forwarding to request reject.");
           return "rejectRequest";
           }
          
           /**
           * Tato metoda zajistí zapsání informace o odmítnutí a odmítnutí po?adavku.
           */
           @End(beforeRedirect = true)
           @ValidatedMethod(formName = "rejectForm", validators = { @CustomValidator(validatorClass = ReasonValidator.class, mapping = "reason") })
           public String opSaveRejectRequest() {
           requestService.opSaveRejectRequest(request, reason);
           return "rejectRequestSaved";
           }
          
           public String opRejectSolution() {
           request.setState(RequestState.SOLVING);
           em.merge(request);
           return "returnToSolving";
           }
          
           @End(beforeRedirect = true)
           public String opSaveRejectSolution() {
           // TODO Auto-generated method stub
           return "returnedToSolving";
           }
          
           /** nastavi stav v reseni */
           @End(beforeRedirect = true)
           public String solvAcceptAssignment() {
           requestService.solvAcceptAssignment(request);
           return "";
           }
          
           /**
           * Tato metoda provede p?esm?rování na formulá? zadávající d?vod pro?
           * ?e?itel odmítl po?adavek.
           */
           @Begin(join = true)
           public String solvRejectAssignment() {
           log.info("redirecting to the reject solving");
           reason = new Reason();
           return "rejectAssignment";
           }
          
           @End(beforeRedirect = true)
           @ValidatedMethod(formName = "rejectForm", validators = { @CustomValidator(validatorClass = ReasonValidator.class, mapping = "reason") })
           public String solvSaveRejectAssignment() {
           requestService.solvSaveRejectAssignment(request, reason);
           return "rejectAssignmentSaved";
           }
          
           /**
           * Tato metoda p?epo?le ?e?itele na zadání ?e?ení.
           */
           @Begin(join = true)
           public String solvSolveRequest() {
           log.info("redirecting to the add solution");
           em.refresh(request);
           return "solveRequest";
           }
          
           /**
           * Tato metoda ulo?í vy?e?ení, nebo p?idá ?e?ení ke stávajícímu
           */
           @End(beforeRedirect = true)
           @ValidatedMethod(formName = "solveForm", validators = { @CustomValidator(validatorClass = SolutionValidator.class, mapping = "request") })
           public String solvSaveSolveRequest() {
           requestService.solvSolveRequest(request, solution);
           return "solutionSaved";
           }
          
           /**
           * Tato metoda p?eposílá na správu filtr?
           */
           public String manageFilters() {
           return "manageFilters";
           }
          
           @Factory("requestAction_filters")
           public void initFilters() {
           requestAction_filters = ((EntityManagerImpl) (em.getDelegate()))
           .getSession().createCriteria(RequestFilter.class).createAlias(
           "account", "a").add(
           Restrictions.eq("a.id", loggedUser.getId())).list();
           log.info("loading user filters for request: #0", requestAction_filters);
           }
          
           public String setFilter(Long id) {
           log.info("trying to set filter #0", id);
           rf = (RequestFilter) em.find(RequestFilter.class, id);
           log.info("succesfully loaded filter: #0", rf);
           requestActionList = null;
           return "list";
           }
          
           public String deleteFilter() {
           log.info("deleting filter #0", requestFilter);
           Account a = (Account) em.find(Account.class, requestFilter.getAccount()
           .getId());
           // a.getFilters().remove(requestFilter);
           em.remove(requestFilter);
           em.merge(a);
          
           requestAction_filters = null;
           return "filterDeleted";
           }
          
           public void initAddChildren() {
           if (parReqId != null) {
           request = null;
           }
           }
          
           @Begin(nested = true)
           public String addFilter() {
           return "addFilter";
           }
          
           @End(beforeRedirect = true)
           public String saveFilter() {
           requestFilter.setAccount(loggedUser);
           Account a = em.find(Account.class, loggedUser.getId());
          
           a.getFilters().add(requestFilter);
           em.refresh(a);
          
           em.merge(requestFilter);
           em.merge(a);
           requestAction_filters = null;
           requestFilter = null;
           return "filterSaved";
           }
          
           public String editFilter() {
           return "editFilter";
           }
          
           public String removeFilter() {
           return null;
           }
          
           public String updateFilter() {
           return "filterSaved";
           }
          
           public String cancelFilter() {
           rf = null;
           requestActionList = null;
           return "list";
           }
          }
          
          



          • 2. Re: Exception: Could not register transaction ....
            Miloslav Vlach Novice

            RequestHistory.java

            package cz.bpsolutions.ims.actions.historyservice;
            
            import java.util.Date;
            
            import javax.ejb.Remove;
            import javax.ejb.Stateful;
            import javax.persistence.EntityManager;
            import javax.persistence.PersistenceContext;
            import javax.persistence.PersistenceContextType;
            
            import org.jboss.seam.ScopeType;
            import org.jboss.seam.annotations.Destroy;
            import org.jboss.seam.annotations.In;
            import org.jboss.seam.annotations.Name;
            
            import cz.bpsolutions.ims.model.Account;
            import cz.bpsolutions.ims.model.History;
            import cz.bpsolutions.ims.model.Request;
            import cz.bpsolutions.ims.service.other.Message;
            
            @Stateful
            @Name("historyService")
            public class HistoryService implements HistoryServiceLocal {
             @PersistenceContext(type=PersistenceContextType.EXTENDED)
             private EntityManager em;
            
             @In(scope = ScopeType.SESSION, value = "loggedUser")
             Account loggedUser;
            
             public void addToHistory(Request request, String actionKey, String message) {
             History h = new History();
            
             h.setActionKey(actionKey);
             h.setDescription(message);
             h.setCreated(new Date());
            
             h.setRequest(request);
             h.setUser(loggedUser);
            
             request.getHistory().add(h);
            
             em.persist(h);
             em.persist(request);
             }
            
             public String getActionKey(String key) {
             return Message.getMessageResourceString2(key);
             }
            
             public String getDescription (String key, Object... parameters) {
             return Message.getMessageResourceString2(key, parameters);
             }
            
             @Destroy @Remove
             public void destroy() {
             // TODO Auto-generated method stub
            
             }
            }