[
https://issues.jboss.org/browse/WFLY-3953?page=com.atlassian.jira.plugin....
]
William Bertan commented on WFLY-3953:
--------------------------------------
I'm having this same problem with the 8.1 and now with the 8.2 too.
With this snippet you can reproduce in 8.2:
{code:borderStyle=solid}
import java.util.concurrent.TimeUnit;
import javax.ejb.AccessTimeout;
import javax.ejb.Schedule;
import javax.ejb.Singleton;
import javax.ejb.Startup;
@Startup
@Singleton
public class SchedulerTeste {
@Schedule(year = "*", dayOfWeek = "*", hour = "*",
minute = "*", second = "*/2", persistent = false)
// @AccessTimeout(value = -1, unit = TimeUnit.MINUTES)
public void automaticTimeout() throws InterruptedException {
System.out.println("[ERRO] Executou o Scheduler");
Thread.sleep(5 * 1000);
}
}
{code}
The error seems to occur when the method stay processing (blocking the next execution) and
the timer flag the Scheduler to execute again, but it's still blocked by the previous
execution. I've tried the AccessTimeout with value -1, but without success. And if I
put the value like 1 minute, and the processing goes more than 1 minute, the Scheduler
start to execute again, but that doesn't what we want, we really want to block the
Scheduler and after the process finish, wait the scheduler time and execute again. This
happens, but the log grows very big because the log error:
{code}
2015-04-20 14:23:06,058 ERROR [org.jboss.as.ejb3] (EJB default - 5) JBAS014122: Error
during retrying timeout for timer: [id=0c7765b9-962a-4eed-b365-7b6b68bcb0c5
timedObjectId=TesteScheduler.TesteScheduler.SchedulerTeste auto-timer?:true
persistent?:false timerService=org.jboss.as.ejb3.timerservice.TimerServiceImpl@5134a6ad
initialExpiration=null intervalDuration(in milli sec)=0 nextExpiration=Mon Apr 20 14:23:08
BRT 2015 timerState=IN_TIMEOUT info=null: javax.ejb.ConcurrentAccessTimeoutException:
JBAS014373: EJB 3.1 PFD2 4.8.5.5.1 concurrent access timeout on
org.jboss.invocation.InterceptorContext$Invocation@abb840a - could not obtain lock within
5000MILLISECONDS
at
org.jboss.as.ejb3.concurrency.ContainerManagedConcurrencyInterceptor.processInvocation(ContainerManagedConcurrencyInterceptor.java:100)
[wildfly-ejb3-8.2.0.Final.jar:8.2.0.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
[jboss-invocation-1.2.1.Final.jar:1.2.1.Final]
at
org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:407)
[jboss-invocation-1.2.1.Final.jar:1.2.1.Final]
at
org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:55)
at
org.jboss.as.weld.ejb.EjbRequestScopeActivationInterceptor.processInvocation(EjbRequestScopeActivationInterceptor.java:83)
[wildfly-weld-8.2.0.Final.jar:8.2.0.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
[jboss-invocation-1.2.1.Final.jar:1.2.1.Final]
at
org.jboss.as.ee.concurrent.ConcurrentContextInterceptor.processInvocation(ConcurrentContextInterceptor.java:45)
[wildfly-ee-8.2.0.Final.jar:8.2.0.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
[jboss-invocation-1.2.1.Final.jar:1.2.1.Final]
at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21)
[jboss-invocation-1.2.1.Final.jar:1.2.1.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
[jboss-invocation-1.2.1.Final.jar:1.2.1.Final]
at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
[jboss-invocation-1.2.1.Final.jar:1.2.1.Final]
at
org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:53)
[wildfly-ee-8.2.0.Final.jar:8.2.0.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
[jboss-invocation-1.2.1.Final.jar:1.2.1.Final]
at
org.jboss.as.ejb3.component.singleton.SingletonComponentInstanceAssociationInterceptor.processInvocation(SingletonComponentInstanceAssociationInterceptor.java:52)
[wildfly-ejb3-8.2.0.Final.jar:8.2.0.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
[jboss-invocation-1.2.1.Final.jar:1.2.1.Final]
at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:273)
[wildfly-ejb3-8.2.0.Final.jar:8.2.0.Final]
at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:340)
[wildfly-ejb3-8.2.0.Final.jar:8.2.0.Final]
at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:239)
[wildfly-ejb3-8.2.0.Final.jar:8.2.0.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
[jboss-invocation-1.2.1.Final.jar:1.2.1.Final]
at
org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)
[wildfly-ejb3-8.2.0.Final.jar:8.2.0.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
[jboss-invocation-1.2.1.Final.jar:1.2.1.Final]
at
org.jboss.as.ejb3.security.SecurityContextInterceptor.processInvocation(SecurityContextInterceptor.java:95)
[wildfly-ejb3-8.2.0.Final.jar:8.2.0.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
[jboss-invocation-1.2.1.Final.jar:1.2.1.Final]
at
org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64)
[wildfly-ejb3-8.2.0.Final.jar:8.2.0.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
[jboss-invocation-1.2.1.Final.jar:1.2.1.Final]
at
org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)
[wildfly-ee-8.2.0.Final.jar:8.2.0.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
[jboss-invocation-1.2.1.Final.jar:1.2.1.Final]
at
org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:55)
[wildfly-ejb3-8.2.0.Final.jar:8.2.0.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
[jboss-invocation-1.2.1.Final.jar:1.2.1.Final]
at
org.jboss.invocation.ContextClassLoaderInterceptor.processInvocation(ContextClassLoaderInterceptor.java:64)
[jboss-invocation-1.2.1.Final.jar:1.2.1.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
[jboss-invocation-1.2.1.Final.jar:1.2.1.Final]
at org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:326)
[jboss-invocation-1.2.1.Final.jar:1.2.1.Final]
at
org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:448)
[wildfly-security-manager-1.0.0.Final.jar:1.0.0.Final]
at
org.jboss.invocation.AccessCheckingInterceptor.processInvocation(AccessCheckingInterceptor.java:61)
[jboss-invocation-1.2.1.Final.jar:1.2.1.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
[jboss-invocation-1.2.1.Final.jar:1.2.1.Final]
at org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:326)
[jboss-invocation-1.2.1.Final.jar:1.2.1.Final]
at
org.jboss.invocation.PrivilegedWithCombinerInterceptor.processInvocation(PrivilegedWithCombinerInterceptor.java:80)
[jboss-invocation-1.2.1.Final.jar:1.2.1.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
[jboss-invocation-1.2.1.Final.jar:1.2.1.Final]
at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
[jboss-invocation-1.2.1.Final.jar:1.2.1.Final]
at
org.jboss.as.ejb3.timerservice.TimedObjectInvokerImpl.callTimeout(TimedObjectInvokerImpl.java:104)
[wildfly-ejb3-8.2.0.Final.jar:8.2.0.Final]
at
org.jboss.as.ejb3.timerservice.task.CalendarTimerTask.callTimeout(CalendarTimerTask.java:61)
[wildfly-ejb3-8.2.0.Final.jar:8.2.0.Final]
at org.jboss.as.ejb3.timerservice.task.TimerTask.retryTimeout(TimerTask.java:219)
[wildfly-ejb3-8.2.0.Final.jar:8.2.0.Final]
at org.jboss.as.ejb3.timerservice.task.TimerTask.run(TimerTask.java:176)
[wildfly-ejb3-8.2.0.Final.jar:8.2.0.Final]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[rt.jar:1.8.0_45]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_45]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[rt.jar:1.8.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[rt.jar:1.8.0_45]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_45]
at org.jboss.threads.JBossThread.run(JBossThread.java:122)
[jboss-threads-2.1.1.Final.jar:2.1.1.Final]
{code}
@Schedule annotation produces "Cannot invoke timeout method
because method null is not a timeout method"
--------------------------------------------------------------------------------------------------------
Key: WFLY-3953
URL:
https://issues.jboss.org/browse/WFLY-3953
Project: WildFly
Issue Type: Bug
Components: EJB
Affects Versions: 8.1.0.Final
Reporter: Andrei Tchijov
Assignee: Stuart Douglas
Please take a look at this gist :
https://gist.github.com/leapingbytes/01838d9534638cb04200
In case of @Schedule second and all consecutive invocations produce this
{code}
13:19:30,635 ERROR U( ) [org.jboss.as.ejb3] (EJB default - 8) JBAS014120: Error
invoking timeout for timer: [id=ba9f1c67-5a91-42ff-8276-f715efaa3723
timedObjectId=ChumbaServer-2.0-SNAPSHOT.ChumbaServer-2.0-SNAPSHOT.SettingsManagerImpl
auto-timer?:false persistent?:true
timerService=org.jboss.as.ejb3.timerservice.TimerServiceImpl@5a898863
initialExpiration=Wed Oct 08 13:17:30 EEST 2014 intervalDuration(in milli sec)=60000
nextExpiration=Wed Oct 08 13:20:30 EEST 2014 timerState=IN_TIMEOUT info=null:
java.lang.RuntimeException: JBAS014481: Cannot invoke timeout method because method null
is not a timeout method
at
org.jboss.as.ejb3.timerservice.TimedObjectInvokerImpl.callTimeout(TimedObjectInvokerImpl.java:84)
[wildfly-ejb3-8.1.0.Final.jar:8.1.0.Final]
at
org.jboss.as.ejb3.timerservice.TimedObjectInvokerImpl.callTimeout(TimedObjectInvokerImpl.java:114)
[wildfly-ejb3-8.1.0.Final.jar:8.1.0.Final]
at org.jboss.as.ejb3.timerservice.task.TimerTask.callTimeout(TimerTask.java:196)
[wildfly-ejb3-8.1.0.Final.jar:8.1.0.Final]
at org.jboss.as.ejb3.timerservice.task.TimerTask.run(TimerTask.java:168)
[wildfly-ejb3-8.1.0.Final.jar:8.1.0.Final]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
[rt.jar:1.7.0_67]
at java.util.concurrent.FutureTask.run(FutureTask.java:262) [rt.jar:1.7.0_67]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
[rt.jar:1.7.0_67]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
[rt.jar:1.7.0_67]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_67]
at org.jboss.threads.JBossThread.run(JBossThread.java:122)
[jboss-threads-2.1.1.Final.jar:2.1.1.Final]
{code}
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)