[JBoss JIRA] Created: (JBRULES-945) Can't passivate WorkingMemory with JBoss cache because ActivationGroupImpl is not serializable
by Gilles Dubuc (JIRA)
Can't passivate WorkingMemory with JBoss cache because ActivationGroupImpl is not serializable
----------------------------------------------------------------------------------------------
Key: JBRULES-945
URL: http://jira.jboss.com/jira/browse/JBRULES-945
Project: JBoss Rules
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 3.0.6
Environment: JBoss AS 4.2 + JBoss Cache + JBoss Rules 3.0.6
Reporter: Gilles Dubuc
Assigned To: Mark Proctor
When attempting to put a WorkingMemory that contains rules relying on activation groups into a TreeCache (which passivates with a JDBC connection), the following happens:
16:55:00,925 ERROR [JDBCCacheLoader] Failed to insert node: org.drools.common.ActivationGroupImpl
java.io.NotSerializableException: org.drools.common.ActivationGroupImpl
...
Surely enough, checking the javadoc (4.0 included) shows that indeed ActivationGroupImpl is not serializable.
And strangely its "cousin" AgendaGroupImpl is serializable.
Any particular reason why ActivationGroupImpl is not serializable?
It prevents us from caching our working memories, we'll have to passivate the rule bases instead, which has a big performance impact on our rule-heavy system. I hope there's an easy fix to that.
In the meantime, I'll try to simply modify the source code to add "implements Serializable" to that class and see what happens. I'll add findings here.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
19 years, 1 month
[JBoss JIRA] Created: (JBPORTAL-1470) IllegalArgumentException: when adding GoogleWedgetPortletInstance to a page
by Prabhat Jha (JIRA)
IllegalArgumentException: when adding GoogleWedgetPortletInstance to a page
---------------------------------------------------------------------------
Key: JBPORTAL-1470
URL: http://jira.jboss.com/jira/browse/JBPORTAL-1470
Project: JBoss Portal
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Portal Core
Affects Versions: 2.6 Final
Reporter: Prabhat Jha
Assigned To: Julien Viet
Fix For: 2.6 Final
This is with portal trunk code as of last Friday (06/01)
1. Login as admin
2. Go to Managment Portlet
3. Select default portal
4. Select News page's page layout
5. Select GoogleWidgetPortletInstance(97) and add it to center region
6. Click on Portal to go back to default portal
7. Go to News page
You will see following exception.
2007-06-05 13:22:29,390 ERROR [org.jboss.portal.portlet.container.org_jboss_portal_widget_WidgetPortlet] The portlet threw an exception
java.lang.IllegalArgumentException
at org.jboss.portal.widget.google.provider.GGProvider.getWidget(GGProvider.java:98)
at org.jboss.portal.widget.WidgetPortlet.doView(WidgetPortlet.java:71)
at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:133)
at org.jboss.portal.widget.WidgetPortlet.doDispatch(WidgetPortlet.java:92)
at javax.portlet.GenericPortlet.render(GenericPortlet.java:306)
at org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl.invokeRender(PortletContainerImpl.java:483)
at org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl.dispatch(PortletContainerImpl.java:405)
at org.jboss.portal.portlet.container.PortletContainerInvoker$1.invoke(PortletContainerInvoker.java:86)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:131)
at org.jboss.portal.core.aspects.portlet.TransactionInterceptor.org$jboss$portal$core$aspects$portlet$TransactionInterceptor$invokeNotSupported$aop(TransactionInterceptor.java:86)
at org.jboss.portal.core.aspects.portlet.TransactionInterceptor$invokeNotSupported_N4547270787964792031.invokeNext(TransactionInterceptor$invokeNotSupported_N4547270787964792031.java)
at org.jboss.aspects.tx.TxPolicy.invokeInNoTx(TxPolicy.java:66)
at org.jboss.aspects.tx.TxInterceptor$NotSupported.invoke(TxInterceptor.java:112)
at org.jboss.portal.core.aspects.portlet.TransactionInterceptor$invokeNotSupported_N4547270787964792031.invokeNext(TransactionInterceptor$invokeNotSupported_N4547270787964792031.java)
at org.jboss.aspects.tx.TxPolicy.invokeInNoTx(TxPolicy.java:66)
at org.jboss.aspects.tx.TxInterceptor$NotSupported.invoke(TxInterceptor.java:102)
at org.jboss.portal.core.aspects.portlet.TransactionInterceptor$invokeNotSupported_N4547270787964792031.invokeNext(TransactionInterceptor$invokeNotSupported_N4547270787964792031.java)
at org.jboss.portal.core.aspects.portlet.TransactionInterceptor.invokeNotSupported(TransactionInterceptor.java)
at org.jboss.portal.core.aspects.portlet.TransactionInterceptor.invoke(TransactionInterceptor.java:56)
at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.core.aspects.portlet.HeaderInterceptor.invoke(HeaderInterceptor.java:50)
at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.portlet.aspects.portlet.ProducerCacheInterceptor.invoke(ProducerCacheInterceptor.java:58)
at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.core.aspects.portlet.AjaxInterceptor.invoke(AjaxInterceptor.java:51)
at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.portlet.aspects.portlet.ModesInterceptor.invoke(ModesInterceptor.java:62)
at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.bridge.BridgeInterceptor.invoke(BridgeInterceptor.java:47)
at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.portlet.aspects.portlet.WindowStatesInterceptor.invoke(WindowStatesInterceptor.java:55)
at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.portlet.aspects.portlet.PortletSessionSynchronizationInterceptor.invoke(PortletSessionSynchronizationInterceptor.java:80)
at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.portlet.aspects.portlet.ContextTrackerInterceptor.invoke(ContextTrackerInterceptor.java:46)
at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.portlet.aspects.portlet.ContextDispatcherInterceptor$1.doCallback(ContextDispatcherInterceptor.java:89)
at org.jboss.portal.web.jboss.JBossWebContext$InvokeNextCommand.execute(JBossWebContext.java:133)
at sun.reflect.GeneratedMethodAccessor372.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.portal.server.servlet.CommandServlet.doGet(CommandServlet.java:99)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
at org.jboss.portal.server.servlet.CommandServlet.include(CommandServlet.java:79)
at org.jboss.portal.web.jboss.JBossWebContext.include(JBossWebContext.java:61)
at sun.reflect.GeneratedMethodAccessor371.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy75.include(Unknown Source)
at org.jboss.portal.portlet.impl.spi.AbstractRequestContext.dispatch(AbstractRequestContext.java:81)
at org.jboss.portal.portlet.aspects.portlet.ContextDispatcherInterceptor.invoke(ContextDispatcherInterceptor.java:70)
at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.portlet.aspects.portlet.SecureTransportInterceptor.invoke(SecureTransportInterceptor.java:68)
at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.portlet.aspects.portlet.ValveInterceptor.invoke(ValveInterceptor.java:60)
at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.common.invocation.Invocation.invoke(Invocation.java:157)
at org.jboss.portal.portlet.container.PortletContainerInvoker.invoke(PortletContainerInvoker.java:198)
at sun.reflect.GeneratedMethodAccessor382.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy119.invoke(Unknown Source)
at org.jboss.portal.portlet.state.producer.ProducerPortletInvoker.invoke(ProducerPortletInvoker.java:233)
at org.jboss.portal.core.impl.portlet.state.ProducerPortletInvoker.org$jboss$portal$core$impl$portlet$state$ProducerPortletInvoker$invoke$aop(ProducerPortletInvoker.java:53)
at org.jboss.portal.core.impl.portlet.state.ProducerPortletInvoker$invoke_N8654503705355129869.invokeNext(ProducerPortletInvoker$invoke_N8654503705355129869.java)
at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:195)
at org.jboss.portal.core.impl.portlet.state.ProducerPortletInvoker$invoke_N8654503705355129869.invokeNext(ProducerPortletInvoker$invoke_N8654503705355129869.java)
at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:195)
at org.jboss.portal.core.impl.portlet.state.ProducerPortletInvoker$invoke_N8654503705355129869.invokeNext(ProducerPortletInvoker$invoke_N8654503705355129869.java)
at org.jboss.portal.core.impl.portlet.state.ProducerPortletInvoker.invoke(ProducerPortletInvoker.java)
at sun.reflect.GeneratedMethodAccessor381.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy123.invoke(Unknown Source)
at org.jboss.portal.portlet.federation.impl.FederatedPortletInvokerService.invoke(FederatedPortletInvokerService.java:147)
at org.jboss.portal.portlet.federation.impl.FederatingPortletInvokerService.invoke(FederatingPortletInvokerService.java:147)
at sun.reflect.GeneratedMethodAccessor380.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy81.invoke(Unknown Source)
at org.jboss.portal.core.impl.model.instance.InstanceContainerImpl$1.invoke(InstanceContainerImpl.java:97)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:131)
at org.jboss.portal.portlet.management.PortletContainerManagementInterceptorImpl.invoke(PortletContainerManagementInterceptorImpl.java:58)
at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.portlet.aspects.portlet.PortalSessionSynchronizationInterceptor.invoke(PortalSessionSynchronizationInterceptor.java:116)
at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.core.model.instance.InstanceSecurityInterceptor.invoke(InstanceSecurityInterceptor.java:78)
at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.portlet.aspects.portlet.ConsumerCacheInterceptor.invoke(ConsumerCacheInterceptor.java:134)
at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.common.invocation.Invocation.invoke(Invocation.java:157)
at org.jboss.portal.core.impl.model.instance.InstanceContainerImpl.org$jboss$portal$core$impl$model$instance$InstanceContainerImpl$invoke$aop(InstanceContainerImpl.java:391)
at org.jboss.portal.core.impl.model.instance.InstanceContainerImpl$invoke_N8654503705355129869.invokeNext(InstanceContainerImpl$invoke_N8654503705355129869.java)
at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:195)
at org.jboss.portal.core.impl.model.instance.InstanceContainerImpl$invoke_N8654503705355129869.invokeNext(InstanceContainerImpl$invoke_N8654503705355129869.java)
at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:195)
at org.jboss.portal.core.impl.model.instance.InstanceContainerImpl$invoke_N8654503705355129869.invokeNext(InstanceContainerImpl$invoke_N8654503705355129869.java)
at org.jboss.portal.core.impl.model.instance.InstanceContainerImpl.invoke(InstanceContainerImpl.java)
at org.jboss.portal.core.impl.model.instance.AbstractInstance.invoke(AbstractInstance.java:231)
at org.jboss.portal.core.impl.model.content.InternalContentProvider.renderWindow(InternalContentProvider.java:213)
at org.jboss.portal.core.model.portal.command.render.RenderWindowCommand.execute(RenderWindowCommand.java:92)
at org.jboss.portal.core.controller.ControllerCommand$1.invoke(ControllerCommand.java:68)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:131)
at org.jboss.portal.core.aspects.controller.node.EventBroadcasterInterceptor.invoke(EventBroadcasterInterceptor.java:123)
at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.core.aspects.controller.PageCustomizerInterceptor.invoke(PageCustomizerInterceptor.java:122)
at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.core.aspects.controller.PolicyEnforcementInterceptor.invoke(PolicyEnforcementInterceptor.java:69)
at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.core.aspects.controller.node.PortalNodeInterceptor.invoke(PortalNodeInterceptor.java:81)
at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.core.aspects.controller.NavigationalStateInterceptor.invoke(NavigationalStateInterceptor.java:42)
at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.core.controller.ajax.AjaxInterceptor.invoke(AjaxInterceptor.java:51)
at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.common.invocation.Invocation.invoke(Invocation.java:157)
at org.jboss.portal.core.controller.ControllerContext.execute(ControllerContext.java:123)
at org.jboss.portal.core.model.portal.command.render.RenderPageCommand.execute(RenderPageCommand.java:204)
at org.jboss.portal.core.controller.ControllerCommand$1.invoke(ControllerCommand.java:68)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:131)
at org.jboss.portal.core.aspects.controller.node.EventBroadcasterInterceptor.invoke(EventBroadcasterInterceptor.java:123)
at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.core.aspects.controller.PageCustomizerInterceptor.invoke(PageCustomizerInterceptor.java:122)
at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.core.aspects.controller.PolicyEnforcementInterceptor.invoke(PolicyEnforcementInterceptor.java:69)
at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.core.aspects.controller.node.PortalNodeInterceptor.invoke(PortalNodeInterceptor.java:81)
at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.core.aspects.controller.NavigationalStateInterceptor.invoke(NavigationalStateInterceptor.java:42)
at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.core.controller.ajax.AjaxInterceptor.invoke(AjaxInterceptor.java:51)
at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.common.invocation.Invocation.invoke(Invocation.java:157)
at org.jboss.portal.core.controller.ControllerContext.execute(ControllerContext.java:123)
at org.jboss.portal.core.model.portal.PortalObjectResponseHandler.processCommandResponse(PortalObjectResponseHandler.java:63)
at org.jboss.portal.core.controller.classic.ClassicResponseHandler.processHandlers(ClassicResponseHandler.java:98)
at org.jboss.portal.core.controller.classic.ClassicResponseHandler.processCommandResponse(ClassicResponseHandler.java:72)
at sun.reflect.GeneratedMethodAccessor375.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy127.processCommandResponse(Unknown Source)
at org.jboss.portal.core.controller.handler.ResponseHandlerSelector.processCommandResponse(ResponseHandlerSelector.java:72)
at sun.reflect.GeneratedMethodAccessor374.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy138.processCommandResponse(Unknown Source)
at org.jboss.portal.core.controller.Controller.processCommandResponse(Controller.java:264)
at org.jboss.portal.core.controller.Controller.processCommand(Controller.java:252)
at org.jboss.portal.core.controller.Controller.handle(Controller.java:213)
at sun.reflect.GeneratedMethodAccessor384.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy139.handle(Unknown Source)
at org.jboss.portal.server.RequestControllerDispatcher.invoke(RequestControllerDispatcher.java:51)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:131)
at org.jboss.portal.core.cms.aspect.IdentityBindingInterceptor.invoke(IdentityBindingInterceptor.java:47)
at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.server.aspects.server.ContentTypeInterceptor.invoke(ContentTypeInterceptor.java:68)
at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.core.aspects.server.LocaleInterceptor.invoke(LocaleInterceptor.java:96)
at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.core.aspects.server.UserInterceptor.invoke(UserInterceptor.java:245)
at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.server.aspects.server.SessionInvalidatorInterceptor.invoke(SessionInvalidatorInterceptor.java:84)
at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.core.impl.api.user.UserEventBridgeTriggerInterceptor.invoke(UserEventBridgeTriggerInterceptor.java:65)
at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.core.aspects.server.TransactionInterceptor.org$jboss$portal$core$aspects$server$TransactionInterceptor$invoke$aop(TransactionInterceptor.java:49)
at org.jboss.portal.core.aspects.server.TransactionInterceptor$invoke_N5143606530999904530.invokeNext(TransactionInterceptor$invoke_N5143606530999904530.java)
at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
at org.jboss.aspects.tx.TxInterceptor$RequiresNew.invoke(TxInterceptor.java:253)
at org.jboss.portal.core.aspects.server.TransactionInterceptor$invoke_N5143606530999904530.invokeNext(TransactionInterceptor$invoke_N5143606530999904530.java)
at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
at org.jboss.aspects.tx.TxInterceptor$RequiresNew.invoke(TxInterceptor.java:262)
at org.jboss.portal.core.aspects.server.TransactionInterceptor$invoke_N5143606530999904530.invokeNext(TransactionInterceptor$invoke_N5143606530999904530.java)
at org.jboss.portal.core.aspects.server.TransactionInterceptor.invoke(TransactionInterceptor.java)
at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.server.aspects.LockInterceptor$InternalLock.invoke(LockInterceptor.java:70)
at org.jboss.portal.server.aspects.LockInterceptor.invoke(LockInterceptor.java:131)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.common.invocation.Invocation.invoke(Invocation.java:157)
at org.jboss.portal.server.servlet.PortalServlet.service(PortalServlet.java:380)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:595)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
19 years, 1 month
[JBoss JIRA] Created: (JBCACHE-1059) Memory leak in undo list
by Jason T. Greene (JIRA)
Memory leak in undo list
------------------------
Key: JBCACHE-1059
URL: http://jira.jboss.com/jira/browse/JBCACHE-1059
Project: JBoss Cache
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: PojoCache
Affects Versions: 1.4.1.SP3
Reporter: Jason T. Greene
Assigned To: Jason T. Greene
Fix For: 1.4.1.SP4
A memory leak and test case has been reported in the forums:
Hello,
I believe that there is a memory leak in the PojoCache (JBossCache-1.4.1.SP3) when storing aspectized objects in a collection in the cache. ModifcationEntry objects are added to the PojoCache undoListLocal_ ThreadLocal object, but are never removed after a successful commit to the cache and contain references to the objects being placed in the cache. The undoListLocal_ list continues to grow while the same thread is used to make modifications to the cache.
Below is a unit test which shows this behavior.
| package org.jboss.cache.aop.collection;
|
| import java.io.Serializable;
| import junit.framework.Test;
| import junit.framework.TestCase;
| import junit.framework.TestSuite;
| import org.apache.commons.logging.Log;
| import org.apache.commons.logging.LogFactory;
| import org.jboss.cache.aop.PojoCache;
| import org.jboss.cache.PropertyConfigurator;
|
| import java.util.*;
|
| import javax.transaction.TransactionManager;
| import javax.transaction.Transaction;
|
|
| class MyReplicatedClass
| {
| String key = null;
| int value;
|
| public MyReplicatedClass( String key, int value )
| {
| this.key = key;
| this.value = value;
| }
| }
|
| class MySerializableReplicatedClass implements Serializable
| {
| private static final long serialVersionUID = 6049469200632947143L;
|
| String key = null;
| int value;
|
| public MySerializableReplicatedClass( String key, int value )
| {
| this.key = key;
| this.value = value;
| }
| }
|
| public class ReplicatedAsyncCollectionTest extends TestCase
| {
| Log log=LogFactory.getLog(ReplicatedAsyncCollectionTest.class);
| PojoCache cache1;
| PojoCache cache2;
|
| public ReplicatedAsyncCollectionTest(String name)
| {
| super(name);
| }
|
| protected void setUp() throws Exception
| {
| super.setUp();
| log.info("setUp() ....");
| cache1 = createAsyncCache("CacheGroup");
| cache2 = createAsyncCache("CacheGroup");
| }
|
| protected void tearDown() throws Exception
| {
| super.tearDown();
| cache1.remove("/");
| cache1.stop();
| cache2.stop();
| }
|
| private PojoCache createAsyncCache(String name) throws Exception {
| PojoCache tree=new PojoCache();
| PropertyConfigurator config=new PropertyConfigurator();
| config.configure(tree, "META-INF/replAsync-service.xml");
|
| tree.setClusterName(name);
| tree.createService();
| tree.startService();
| return tree;
| }
|
| public void testPojoMapModList() throws Exception
| {
| Map myMap = new HashMap();
| cache1.putObject( "/myTest", myMap );
| myMap = (HashMap)cache1.getObject("/myTest");
| TransactionManager mgr = cache1.getTransactionManager();
| for ( int i = 0; i < 10; i++ )
| {
| mgr.begin();
|
| MySerializableReplicatedClass mrc = new MySerializableReplicatedClass(Integer.valueOf(i).toString(), i );
| myMap.put(mrc.key, mrc);
|
| mgr.commit();
| }
|
| log.info( "cache1 modification list size = "
| + (cache1.getModList() == null ? 0 : cache1.getModList().size()) );
|
| assertEquals(cache1.getModList().size(), 0 );
| }
|
| public void testPojoAopMapModList() throws Exception
| {
| Map myMap = new HashMap();
| cache1.putObject( "/myTest", myMap );
| myMap = (HashMap)cache1.getObject("/myTest");
| TransactionManager mgr = cache1.getTransactionManager();
| for ( int i = 0; i < 10; i++ )
| {
| mgr.begin();
|
| MyReplicatedClass mrc = new MyReplicatedClass(Integer.valueOf(i).toString(), i );
|
| myMap.put(mrc.key, mrc);
|
| mgr.commit();
|
| }
| // Possible work around to manually clear the undo list
| // cache1.getModList().clear();
| log.info( "cache1 modification list size = "
| + (cache1.getModList() == null ? 0 : cache1.getModList().size()) );
|
| assertEquals(cache1.getModList().size(), 0 );
| }
|
|
| public static Test suite() throws Exception
| {
| return new TestSuite(ReplicatedAsyncCollectionTest.class);
| }
|
| public static void main(String[] args) throws Exception
| {
| junit.textui.TestRunner.run(suite());
| }
|
| }
|
|
The corresponding jboss-aop.xml is
| <?xml version="1.0" encoding="UTF-8"?>
|
| <aop>
|
| <prepare expr="field(* org.jboss.cache.aop.collection.MyReplicatedClass->*)" />
|
| </aop>
|
The META-INF/replAsync-service.xml that comes with the JBossCache tests can be used.
The unit test contains two tests: the first (testPojoMapModList) adds Serializable objects to the collection in the PojoCache; and the other (testPojoAopMapModList) adds AOP'd objects to the collection. In the first test after adding Serializable objects to the collection, the undoListLocal_ object is clean. In the second test after adding the AOP'd objects to the collection, the undoListLocal_ still contains all ModificationEntry objects from the transactions used to update the collection. This behavior is also seen is earlier versions of the PojoCache.
The ModificationEntry (PojoCache.undoListLocal_) list can be retrieved from the PojoCache through the getModList() method for the executing thread. Is it safe to clear this list manually after the transaction has been completed? If so this would be a usable solution for this version. The other solution is to use non-AOP'd (i.e. Serializable objects) in the collection, though that is not optimal.
Any thoughts or other work around would be appreciated.
Thanks.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
19 years, 1 month
[JBoss JIRA] Created: (JBPORTAL-1503) Admin Portlet, Content Type drop down list causes exessive page reloads
by Chris DeLashmutt (JIRA)
Admin Portlet, Content Type drop down list causes exessive page reloads
-----------------------------------------------------------------------
Key: JBPORTAL-1503
URL: http://jira.jboss.com/jira/browse/JBPORTAL-1503
Project: JBoss Portal
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Portal Core
Affects Versions: 2.6 CR3
Environment: Firefox 2.0.0.1 on Fedora Core 6
Reporter: Chris DeLashmutt
Assigned To: Julien Viet
When you go to the administrative portal, and click on and portal, and click on "Page Layout" for any page, there is a drop down list at the top of the portlet labeled "Content Type". There is an event tied to the the "onclick" handler for this component that causes a form submission every time the field is clicked. This means that if the user clicks once on the drop down, then the page is actually submitted before the user can choose a value from the drop down list. This behavior is unexpected as drop down lists allow the user to click once on them to view the contained list before causing some action to occur. Also, even if the value of the field isn't changed, the page will be resubmitted. This submission logic should probably be changed to the "onchange" event to correct both of these issues. I have validated that changing to this event works properly in Firefox.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
19 years, 1 month
[JBoss JIRA] Updated: (JBPM-626) CommandExecutorThread thread safety issues
by Ronald van Kuijk (JIRA)
[ http://jira.jboss.com/jira/browse/JBPM-626?page=all ]
Ronald van Kuijk updated JBPM-626:
----------------------------------
Affects Version/s: jBPM jPDL 3.2.1
jBPM jPDL 3.2
jBPM 3.1.4
jBPM 3.1.3
jBPM 3.1.2
jBPM 3.1.1
> CommandExecutorThread thread safety issues
> ------------------------------------------
>
> Key: JBPM-626
> URL: http://jira.jboss.com/jira/browse/JBPM-626
> Project: JBoss jBPM
> Issue Type: Bug
> Components: Core Engine
> Affects Versions: jBPM 3.1, jBPM jPDL 3.2.1, jBPM jPDL 3.2, jBPM 3.1.4, jBPM 3.1.3, jBPM 3.1.2, jBPM 3.1.1
> Environment: Windows XP Pro
> Database: DB2/400 v5r3, HSQLDB
> Reporter: Mark Shotton
> Assigned To: Tom Baeyens
>
> There appears to be a couple of thread safety problems with the behaviour of the CommandExecutorThread:
> (1) Consider the following code:
> JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
> try {
> GraphSession graphSession = jbpmContext.getGraphSession();
>
> // Find the process definition in the database
> ProcessDefinition processDefinition =
> graphSession.findLatestProcessDefinition(processDefinitionName);
>
> // Create an execution of the process definition.
> ProcessInstance processInstance = new ProcessInstance(processDefinition);
>
> // Check that the process instance is in the start state
> Token token = processInstance.getRootToken();
>
> // Start the process execution
> token.signal();
> ?
> jbpmContext.save(processInstance);
>
> } finally {
> // Tear down the pojo persistence context.
> jbpmContext.close();
> }
> If this code is executed while the token is in node ?node 1?, the token.signal() method causes a node-enter event to fire on the next asynchronous node ?node 2? and a message to be stored in the JBPM_MESSAGE table. This message identifies the token as being in ?node 2?. However the node associated with the token in the JBPM_TOKEN table is still in ?node 1? until the jbpmContext.close() method flushes the process instance to the database.
> So the JBPM_MESSAGE.NODE for the token is ?node 2? but the JBPM_TOKEN.NODE for the same token is ?node 1?.
> This means that on line 53 of org.jbpm.command.ExecuteNodeCommand execute(), an exception is thrown:
> public void execute() {
> if (! node.equals(token.getNode())) {
> throw new JbpmException("couldn't continue execution for '"+token+"', token moved");
> }
> and an exception is added to the message so that it is not re-tried.
> As a work-around, I modified the org.jbpm.msg.command.CommandExecutorThread handleProcessingException method in a pretty ugly way; I just leave the message in the table to be re-tried if the exception message contains the String ?token moved?:
> void handleProcessingException(MessageProcessingException e) {
> JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext(jbpmContextName);
> try {
> // get the message session from the context
> DbMessageService dbMessageSessionImpl = (DbMessageService) jbpmContext.getServices().getMessageService();
> MessagingSession messageSession = dbMessageSessionImpl.getMessagingSession();
> // get the problematic command message from the exception
> Message message = e.message;
> // MWS 01/04/06 Workaround for async continuations
> //
> // Will get this exception if the JBPM_MESSAGE.NODE is not the same as
> // the node associated with the JBPM_MESSAGE.TOKEN (i.e. its JBPM_TOKEN.NODE)
> // in the JBPM_MESSAGE table (see org.jbpm.command.ExecuteNodeCommand execute());
> // however this can be caused by a token.signal()
> // persisting the JBPM_MESSAGE (e.g. from a node-enter on an async node)
> // before the token state is persisted by a subsequent call to
> // jbpmContext.close(); e.g.
> //
> // try {
> // ...
> // token.signal() //Writes to JBPM_MESSAGE if async node entered
> // jbpmContext.save();
> // } finally {
> // jbpmContext.close //Updates JBPM.TOKEN in DB
> //
> // i.e. the above is not thread-safe
> //
> // As a workaround, leave the message to be processed again
> // on the following invocation of the CommandExecutorThread
> //
> if (e.getCause().getMessage() != null) {
> if (e.getCause().getMessage().indexOf("token moved")!=-1) {
> try {
> Thread.sleep(2000);
> } catch(InterruptedException ie) {
> //Do nothing
> }
> return;
> }
> }
>
> // remove the problematic message from the queue
> dbMessageSessionImpl.receiveByIdNoWait(message.getId());
>
> message = Message.createCopy(message);
> // update the message with the stack trace
> StringWriter sw = new StringWriter();
> e.printStackTrace(new PrintWriter(sw));
> message.setException(sw.toString());
> // update the message with the jbpm-error-queue destination
> message.setDestination(errorDestination);
>
> // resend
> messageSession.save(message);
> } finally {
> jbpmContext.close();
> }
> }
> (2) There also appears to be a problem with the interaction of the SchedulerThread and the CommandExecutorThread. For a node ?node 1? that is marked asynchronous and has a timer that fires on node-enter with an associated action that executes immediately, the ActionHandler on the timer action may progress the token from asynchronous node ?node 1? to node ?node 2? and update the token in the JBPM_TOKEN table. However the update of the JPBM_TOKEN row may occur before the CommandExecutorThread has consumed the message in the JBPM_MESSAGE table that is stored on entry into ?node 1? and details that the token is currently in ?node 1?.
> So the JBPM_MESSAGE.NODE for the token is ?node 1? but the JBPM_TOKEN.NODE for the same token is ?node 2?. This means that on line 53 of org.jbpm.command.ExecuteNodeCommand execute(), an exception is thrown (as described in (1)):
> public void execute() {
> if (! node.equals(token.getNode())) {
> throw new JbpmException("couldn't continue execution for '"+token+"', token moved");
> }
> If node 2 is also asynchronous, the situation can arise where the same token ID appears in the JBPM_MESSAGE table twice, with each identifying a different node; ?node 1? and ?node 2?.
> As a work-around, in the ActionHandler for the timer, I wait for any messages related to the current node to be consumed by the CommandExecutorThread before progressing the token (I make the assumption that the JBPM_MESSAGE table can only contain one message per token):
> JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
> try {
> graphSession = jbpmContext.getGraphSession();
>
> //Load the processInstance from the database
> processInstance = graphSession.loadProcessInstance(getProcessInstanceId());
> ?
> MessagingSession messagingSession = jbpmContext.getMessagingSession();
> for (;;) {
> java.util.Iterator iterator = messagingSession.getMessageIterator("CMD_EXECUTOR");
> boolean foundToken = false;
> while(iterator.hasNext()) {
> Message message = (Message) iterator.next();
> if (message.getToken() == token) {
> foundToken = true;
> }
> }
> if (foundToken) {
> try {
> System.out.println("Found message for token: " + token.getId());
> System.out.println("Waiting for CommandExecutorThread to consume message");
> Thread.sleep(500);
> } catch (InterruptedException e) {
> //Do nothing
> }
> } else {
> break;
> }
> }
>
> ?
>
> //Progress over the 'credit_approved' transition
> taskInstance.end("credit_approved");
> jbpmContext.save(processInstance);
> } finally {
> jbpmContext.close();
> }
> Note that I open a new jbpmContext rather than getting this from the ExecutionContext because the code above executes in a new thread spawned by the ActionHandler. However, this work-around occasionally produces the following exception, so I?m obviously doing something wrong (I haven?t investigated this in detail as yet):
> Found message for token: 6
> Waiting for CommandExecutorThread to consume message
> org.jbpm.persistence.JbpmPersistenceException: couldn't commit hibernate session
> at org.jbpm.persistence.db.DbPersistenceService.close(DbPersistenceService.java:171)
> at org.jbpm.svc.Services.close(Services.java:211)
> at org.jbpm.JbpmContext.close(JbpmContext.java:138)
> at com.mdsuk.bpm.webshop.actions.ReceiveCreditReferenceAsyncActionHandler.asyncExecute(ReceiveCreditReferenceAsyncActionHandler.java:103)
> at com.mdsuk.bpm.webshop.actions.AsyncActionHandler.run(AsyncActionHandler.java:24)
> at java.lang.Thread.run(Unknown Source)
> Caused by: org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [org.jbpm.graph.exe.Token#6]
> at org.hibernate.persister.entity.AbstractEntityPersister.check(AbstractEntityPersister.java:1635)
> at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2208)
> at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2118)
> at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2374)
> at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:84)
> at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:243)
> at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:227)
> at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:141)
> at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:296)
> at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
> at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:980)
> at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:353)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
19 years, 1 month
[JBoss JIRA] Commented: (JBPM-642) Signaling RootToken on Fork Node
by Ronald van Kuijk (JIRA)
[ http://jira.jboss.com/jira/browse/JBPM-642?page=comments#action_12366669 ]
Ronald van Kuijk commented on JBPM-642:
---------------------------------------
Still an issue with the latest 3.2 release? If so assign versions. If not please close.
> Signaling RootToken on Fork Node
> ---------------------------------
>
> Key: JBPM-642
> URL: http://jira.jboss.com/jira/browse/JBPM-642
> Project: JBoss jBPM
> Issue Type: Feature Request
> Components: Core Engine
> Reporter: Enric Cecilla
> Assigned To: Tom Baeyens
>
> Giving the following processdefinition:
> *start->fork->a->join->end
> ->b ^
> When RootToken is on Fork node trying to signal again the RootToken actually moves the token to one branch state, then RootToken can be signalled til it is on the Join node. At that moment it can be signalled again and it leaves the Join node.
> pi.signal();
> assertEquals( "fork", pi.getRootToken().getNode().getName() ); //true
> pi.signal();
> assertEquals( "b", pi.getRootToken().getNode().getName() ); //true
> pi.signal();
> assertEquals( "join", pi.getRootToken().getNode().getName() ); //true
> Does it makes any sense being able to signal a RootToken on Fork node which has children on every branch? From my point of view signalling on that condition should throw and Exception. Only child tokens should be allowed to signal since "real" tasks are on child tokens
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
19 years, 1 month