[jboss-jira] [JBoss JIRA] (WFLY-13656) Wildfly 18 - Failed to run scheduled task - after redeployment

Cheng Fang (Jira) issues at jboss.org
Wed Jul 8 14:41:04 EDT 2020


    [ https://issues.redhat.com/browse/WFLY-13656?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14207231#comment-14207231 ] 

Cheng Fang commented on WFLY-13656:
-----------------------------------

{\{ManagedScheduledExecutorService}} can do some lightweight scheduling, but I don't think it can fully replace ejb timer, which has features like transaction support, full lifecycle operations (create, read, cancel timers), and persistent timers can also survive server crash and restart. In terms of load distribution among cluster memebers, I think that's the common expectation for a timer at a specific point to fire only at one of the nodes in order to avoid duplication. In case you need the same timer to fire in all members, you can configure it as non-persistent. This is just my personal opinion. Choose the technology that best fits your app.

> Wildfly 18 - Failed to run scheduled task - after redeployment
> --------------------------------------------------------------
>
>                 Key: WFLY-13656
>                 URL: https://issues.redhat.com/browse/WFLY-13656
>             Project: WildFly
>          Issue Type: Bug
>          Components: Concurrency Utilities, EJB
>    Affects Versions: 18.0.0.Final
>            Reporter: ralph Soika
>            Assignee: Cheng Fang
>            Priority: Major
>
> I have a application deployed on wildfly 18 implementing a @Singleton ejb which starts a ManagedScheduledExecutorService on @PostContstruct init method.
> This service runs fine until I do a redeployment without a server restart (auto deploy function).
> After a redeployment the following message occurred permanently:
> {{imixs-documents_1 | 17:42:23,207 ERROR [org.jboss.as.ee] (EE-ManagedScheduledExecutorService-default-Thread-5) WFLYEE0110: Failed to run scheduled task: org.jboss.as.ee.component.ComponentIsStoppedException: WFLYEE0043: Component is stopped}}
> {{imixs-documents_1 | at org.jboss.as.ee at 18.0.0.Final//org.jboss.as.ee.component.BasicComponent.waitForComponentStart(BasicComponent.java:110)}}
> {{imixs-documents_1 | at org.jboss.as.ee at 18.0.0.Final//org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:194)}}
> {{imixs-documents_1 | at org.jboss.as.ee at 18.0.0.Final//org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:185)}}
> {{imixs-documents_1 | at org.jboss.as.ee at 18.0.0.Final//org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:81)}}
> {{imixs-documents_1 | at deployment.imixs-documents.war//org.imixs.workflow.engine.EventLogService$$$view52.releaseDeadLocks(Unknown Source)}}
> {{imixs-documents_1 | at jdk.internal.reflect.GeneratedMethodAccessor36.invoke(Unknown Source)}}
> {{imixs-documents_1 | at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)}}
> {{imixs-documents_1 | at java.base/java.lang.reflect.Method.invoke(Method.java:564)}}
> {{imixs-documents_1 | at org.jboss.weld.core at 3.1.2.Final//org.jboss.weld.util.reflection.Reflections.invokeAndUnwrap(Reflections.java:410)}}
> {{imixs-documents_1 | at org.jboss.weld.core at 3.1.2.Final//org.jboss.weld.module.ejb.EnterpriseBeanProxyMethodHandler.invoke(EnterpriseBeanProxyMethodHandler.java:134)}}
> {{imixs-documents_1 | at org.jboss.weld.core at 3.1.2.Final//org.jboss.weld.bean.proxy.EnterpriseTargetBeanInstance.invoke(EnterpriseTargetBeanInstance.java:56)}}
> {{imixs-documents_1 | at org.jboss.weld.core at 3.1.2.Final//org.jboss.weld.module.ejb.InjectionPointPropagatingEnterpriseTargetBeanInstance.invoke(InjectionPointPropagatingEnterpriseTargetBeanInstance.java:68)}}
> {{imixs-documents_1 | at org.jboss.weld.core at 3.1.2.Final//org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:106)}}
> {{imixs-documents_1 | at deployment.imixs-documents.war//org.imixs.workflow.engine.EventLogService$Proxy$_$$_Weld$EnterpriseProxy$.releaseDeadLocks(Unknown Source)}}
> {{imixs-documents_1 | at deployment.imixs-documents.war//org.imixs.workflow.engine.AsyncEventScheduler.run(AsyncEventScheduler.java:125)}}
> {{imixs-documents_1 | at org.jboss.as.ee at 18.0.0.Final//org.jboss.as.ee.concurrent.ControlPointUtils$ControlledScheduledRunnable.run(ControlPointUtils.java:158)}}
> {{imixs-documents_1 | at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:514)}}
> {{imixs-documents_1 | at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)}}
> {{imixs-documents_1 | at org.glassfish.javax.enterprise.concurrent//org.glassfish.enterprise.concurrent.internal.ManagedScheduledThreadPoolExecutor$ManagedScheduledFutureTask.access$201(ManagedScheduledThreadPoolExecutor.java:383)}}
> {{imixs-documents_1 | at org.glassfish.javax.enterprise.concurrent//org.glassfish.enterprise.concurrent.internal.ManagedScheduledThreadPoolExecutor$ManagedScheduledFutureTask.run(ManagedScheduledThreadPoolExecutor.java:534)}}
> {{imixs-documents_1 | at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1135)}}
> {{imixs-documents_1 | at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)}}
> {{imixs-documents_1 | at java.base/java.lang.Thread.run(Thread.java:844)}}
> {{imixs-documents_1 | at org.glassfish.javax.enterprise.concurrent//org.glassfish.enterprise.concurrent.ManagedThreadFactoryImpl$ManagedThread.run(ManagedThreadFactoryImpl.java:250)}}
> {{imixs-documents_1 |}}
> I can not see how to solve this exception within my application. The message occurs each timeout (in my case every 500ms)
> Only a server restart did solve the problem.
> But the scheduler runs correctly even with this message.
>  



--
This message was sent by Atlassian Jira
(v7.13.8#713008)



More information about the jboss-jira mailing list