Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.3.0.Final
    • Fix Version/s: None
    • Component/s: jberet-core
    • Labels:
      None

      Description

      It was raised in stackoverflow:
      https://stackoverflow.com/questions/52519850/scope-conflicts-until-batch-job-finished

      Tech stack:

      JBeret (core, se) 1.3.0.Final
      Hibernate Search (orm, jsr352-core, jsr352-jberet) 5.10.4.Final
      Weld (servlet-core, se-core) 3.0.5.Final

      If I trigger

      BatchRuntime.getJobOperator().start(
      MassIndexingJob.NAME,
      MassIndexingJob.parameters().forEntity(getDomainObjectClass()).build()
      );

      then I had the situation that a can't access any CDI component outside of the batch job that are RequestScoped or SessionScoped, until the batch job is finished.

      How I can fix this problem?

      Part of the stacktrace

      Caused by: org.jboss.weld.contexts.ContextNotActiveException: WELD-001303: No active contexts for scope type javax.enterprise.context.RequestScoped at org.jboss.weld.manager.BeanManagerImpl.getContext(BeanManagerImpl.java:647) ~[weld-core-impl-3.0.5.Final.jar:3.0.5.Final] at org.jboss.weld.bean.ContextualInstanceStrategy$DefaultContextualInstanceStrategy.getIfExists(ContextualInstanceStrategy.java:89) ~[weld-core-impl-3.0.5.Final.jar:3.0.5.Final] at org.jboss.weld.bean.ContextualInstanceStrategy$CachingContextualInstanceStrategy.getIfExists(ContextualInstanceStrategy.java:164) ~[weld-core-impl-3.0.5.Final.jar:3.0.5.Final] at org.jboss.weld.bean.ContextualInstance.getIfExists(ContextualInstance.java:63) ~[weld-core-impl-3.0.5.Final.jar:3.0.5.Final] at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:87) ~[weld-core-impl-3.0.5.Final.jar:3.0.5.Final] at org.jboss.weld.bean.proxy.ProxyMethodHandler.getInstance(ProxyMethodHandler.java:131) ~[weld-core-impl-3.0.5.Final.jar:3.0.5.Final] at foo.bar.Baz$Proxy$_$$_WeldClientProxy.getFoo(Unknown Source) ~[classes/:na]

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                cfang Cheng Fang
                Reporter:
                cfang Cheng Fang
              • Votes:
                1 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: