[jboss-jira] [JBoss JIRA] (WFLY-3386) Nullpointer exception on AbstractSessionBeanStore.getLockStore from within Activiti CDI

Andries Ehlers (JIRA) issues at jboss.org
Mon May 26 14:51:56 EDT 2014


    [ https://issues.jboss.org/browse/WFLY-3386?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12970597#comment-12970597 ] 

Andries Ehlers commented on WFLY-3386:
--------------------------------------

Stuart/Jozef,

Not sure if the following will help or just re-affirm your above conclusions.  Regarding the stacktrace:  The next line in the stacktrace would be our would be our application code executing the startTask() method on the Activiti BusinessProcess class.

Our application uses a JAX-RS as an entry-point, thus the only CDI scope present at that time is a RequestScope.  We don't explicitly start a conversation scope or anything of the sorts.  
Its a basic scenario of a JAX-RS resource with an injected Facade (stateless session bean).  The session bean calls startTask() on an injected BusinessProcess instance.

If you refer to the Javadoc of BusinessProcess.java (see link below), you'll notice the following comment  "...in the absence of a conversation, (non faces request, i.e. when processing a JAX-RS, JAX-WS, JMS, remote EJB or plain Servlet requests), the {@link BusinessProcess} bean associates with the current Request (see {@link RequestScoped @RequestScoped})....."   

This is our scenario.

Link:  http://svn.codehaus.org/activiti/activiti/trunk/modules/activiti-cdi/src/main/java/org/activiti/cdi/BusinessProcess.java

Hope this helps.

> Nullpointer exception on AbstractSessionBeanStore.getLockStore from within Activiti CDI
> ---------------------------------------------------------------------------------------
>
>                 Key: WFLY-3386
>                 URL: https://issues.jboss.org/browse/WFLY-3386
>             Project: WildFly
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: CDI / Weld
>    Affects Versions: 8.0.0.Final
>         Environment: CentOS, Mac (Mountain Lion).
>            Reporter: Andries Ehlers
>            Assignee: Jozef Hartinger
>
> Background:
> The actual exception seems to be very close the one in issue: WFLY-3001 but we are not using JSF at all, but Activiti CDI.
> Not sure if this is a Wildfly or Activiti issue - it could very well be that there is a bug in Activiti with how it manages the CDI scopes.  Unfortunately we're at a loss and seeing that the nullpointer is thrown from within a weld AbstractSessionBeanStore, I decided to post it here.  Please advise.
> Error:
> We use Activiti CDI within Wildfly 8.0.0.Final.  We randomly encounter an issue (sometimes immediately after a redeploy, other times after a few hours of inactivity on the server) the following issue.  When Activiti attempts to retrieve the ContextBeanInstance from its ConversationScopedAssociationProxy, a NullPointer exception is thrown while attempting to retrieve the lock store within Weld (see below).
> -----------------------------
> 2014-05-21 10:05:34,430 INFO  [stdout] (default task-12) java.lang.NullPointerException: null
> 2014-05-21 10:05:34,430 INFO  [stdout] (default task-12) 	at org.jboss.weld.context.beanstore.http.AbstractSessionBeanStore.getLockStore(AbstractSessionBeanStore.java:113) ~[weld-core-impl-2.1.2.Final.jar!/:2014-01-09 09:23]
> 2014-05-21 10:05:34,430 INFO  [stdout] (default task-12) 	at org.jboss.weld.context.beanstore.AttributeBeanStore.lock(AttributeBeanStore.java:210) ~[weld-core-impl-2.1.2.Final.jar!/:2014-01-09 09:23]
> 2014-05-21 10:05:34,430 INFO  [stdout] (default task-12) 	at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:90) ~[weld-core-impl-2.1.2.Final.jar!/:2014-01-09 09:23]
> 2014-05-21 10:05:34,431 INFO  [stdout] (default task-12) 	at org.jboss.weld.context.PassivatingContextWrapper$AbstractPassivatingContextWrapper.get(PassivatingContextWrapper.java:76) ~[weld-core-impl-2.1.2.Final.jar!/:2014-01-09 09:23]
> 2014-05-21 10:05:34,431 INFO  [stdout] (default task-12) 	at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:98) ~[weld-core-impl-2.1.2.Final.jar!/:2014-01-09 09:23]
> 2014-05-21 10:05:34,431 INFO  [stdout] (default task-12) 	at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:78) ~[weld-core-impl-2.1.2.Final.jar!/:2014-01-09 09:23]
> 2014-05-21 10:05:34,431 INFO  [stdout] (default task-12) 	at org.activiti.cdi.impl.context.DefaultContextAssociationManager$ConversationScopedAssociation$Proxy$_$$_WeldClientProxy.getTask(Unknown Source) ~[activiti-cdi-5.15.jar:na]
> 2014-05-21 10:05:34,431 INFO  [stdout] (default task-12) 	at org.activiti.cdi.impl.context.DefaultContextAssociationManager.getTask(DefaultContextAssociationManager.java:237) ~[activiti-cdi-5.15.jar:na]
> 2014-05-21 10:05:34,432 INFO  [stdout] (default task-12) 	at org.activiti.cdi.BusinessProcess.startTask(BusinessProcess.java:332) ~[activiti-cdi-5.15.jar:na]



--
This message was sent by Atlassian JIRA
(v6.2.3#6260)


More information about the jboss-jira mailing list