Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Managed Scheduled Executor Service doesn't execute tasks from versioned applications PAYARA-3451 #3630

Closed
ischuraev opened this issue Jan 18, 2019 · 2 comments
Labels
Type: Bug Label issue as a bug defect
Milestone

Comments

@ischuraev
Copy link

Description


An attempt to start a Runnable-task from a versioned applications leads to an exception like "Caused by: javax.enterprise.concurrent.AbortedException: Module minimalejb is disabled". A deployment of the same application with default name doesn't cause exceptions and the the task is executed. Probably the problem is caused by changes in #3213 .

Expected Outcome

The task is executed.

Current Outcome

An Exception like

[2019-01-18T13:02:45.001+0100] [Payara 5.184] [SCHWERWIEGEND] [] [] [tid: _ThreadID=332 _ThreadName=__ejb-thread-pool14] [timeMillis: 1547812965001] [levelValue: 1000] [[
java.util.concurrent.ExecutionException: javax.enterprise.concurrent.AbortedException: Module minimalejb is disabled
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at de.xqueue.eagle.minimalejb.NewSessionBean.businessMethod(NewSessionBean.java:32)
at sun.reflect.GeneratedMethodAccessor492.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:953)
at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1017)
at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:4884)
at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:656)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:836)
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:608)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doCall(SystemInterceptorProxy.java:163)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundTimeout(SystemInterceptorProxy.java:145)
at sun.reflect.GeneratedMethodAccessor474.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:895)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:835)
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:608)
at org.jboss.weld.module.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:81)
at org.jboss.weld.module.ejb.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:52)
at sun.reflect.GeneratedMethodAccessor473.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:895)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:835)
at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:374)
at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:4856)
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:4844)
at com.sun.ejb.containers.BaseContainer.callEJBTimeout(BaseContainer.java:4122)
at com.sun.ejb.containers.EJBTimerService.deliverTimeout(EJBTimerService.java:1201)
at com.sun.ejb.containers.EJBTimerService.access$000(EJBTimerService.java:96)
at com.sun.ejb.containers.EJBTimerService$TaskExpiredWork.run(EJBTimerService.java:1920)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: javax.enterprise.concurrent.AbortedException: Module minimalejb is disabled
at org.glassfish.enterprise.concurrent.internal.ManagedFutureTask.abort(ManagedFutureTask.java:289)
at org.glassfish.enterprise.concurrent.internal.ManagedFutureTask.run(ManagedFutureTask.java:146)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
at org.glassfish.enterprise.concurrent.ManagedThreadFactoryImpl$ManagedThread.run(ManagedThreadFactoryImpl.java:250)

Steps to reproduce (Only for bug reports)

  1. Download the example maven EJB-Project: minimalejb.zip
  2. Take a fresh payara 5.184.
  3. Start the 'production'-domain.
  4. Register a Managed Executor Service "concurrent/exampleexecutor" with default settings.
  5. Deploy the ejb-project from step 1 under the name "minimalejb:example". "Force Application Name"-checkbox must be checked.
    It should be enough to get the exception in Log.

Samples

The sample project above contains only one class:

@Stateless
@LocalBean
public class NewSessionBean {

    @Resource(mappedName = "concurrent/exampleexecutor")
    private ManagedExecutorService exampleExecutorService;

    @Schedule(second = "*/5", minute = "*", hour = "*", persistent = false)
    public void businessMethod() {
        Future<?> result = exampleExecutorService.submit(new Runnable() {
            @Override
            public void run() {
                System.out.println(new Date());
            }
        });
        try {
            result.get();
        } catch (ExecutionException | InterruptedException ex) {
            ex.printStackTrace();
        }
    }
}

Environment

  • Payara Version: 5.184
  • Edition: Full
  • JDK Version: Oracle JDK 1.8.0_202-b08 under Windows , OpenJDK Runtime Environment (build 1.8.0_191-8u191-b12-0ubuntu0.16.04.1-b12) under Ubuntu
  • Operating System: Windows 8.1 / Ubuntu 16.04.5
@smillidge
Copy link
Contributor

Thanks for the test case we will try to reproduce

@smillidge smillidge added reproducible Type: Bug Label issue as a bug defect Status: Accepted Confirmed defect or accepted improvement to implement, issue has been escalated to Platform Dev and removed try to reproduce labels Jan 29, 2019
@smillidge smillidge added this to the 5.191 milestone Jan 29, 2019
@arjantijms arjantijms modified the milestones: 5.191, 5.192 Feb 27, 2019
@OndroMih OndroMih modified the milestones: 5.192, 5.191 Mar 14, 2019
@OndroMih OndroMih changed the title Managed Scheduled Executor Service doesn't execute tasks from versioned applications Managed Scheduled Executor Service doesn't execute tasks from versioned applications PAYARA-3451 Mar 14, 2019
@OndroMih
Copy link
Contributor

Solved by #3693

@OndroMih OndroMih removed the Status: Accepted Confirmed defect or accepted improvement to implement, issue has been escalated to Platform Dev label Mar 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Label issue as a bug defect
Projects
None yet
Development

No branches or pull requests

4 participants