Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-8393

Random component activation issue

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 5.5
    • Fix Version/s: 5.5
    • Component/s: None

      Description

      Randomly (can happen on one machine but not the other) when creating a case item,

      Caused by: java.lang.NullPointerException
      	at org.nuxeo.cm.core.service.CaseDistributionServiceImpl.addCaseItemToCase(CaseDistributionServiceImpl.java:251)
      	at org.nuxeo.cm.web.caseitem.CaseItemDocumentActionsBean.createCaseItemInCase(CaseItemDocumentActionsBean.java:126)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
      	at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
      	at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
      	at org.nuxeo.cm.web.invalidations.CaseManagementContextInterceptor.aroundInvoke(CaseManagementContextInterceptor.java:49)
      	at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      	at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28)
      	at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      	at org.nuxeo.ecm.platform.ui.web.util.NuxeoBijectionInterceptor.aroundInvoke(NuxeoBijectionInterceptor.java:68)
      	at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      	at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44)
      	at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      	at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
      	at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:166)
      	at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:102)
      	at org.nuxeo.cm.web.caseitem.CaseItemDocumentActionsBean_$$_javassist_50.createCaseItemInCase(CaseItemDocumentActionsBean_$$_javassist_50.java)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:329)
      	... 74 more
      
      

      This is because pathSegmentService is null. The component containing the service definition is not yet activated yet and the call of this service is done in the activate method of org.nuxeo.cm.core.service.CaseManagementComponent. If the component is loaded after the activate, it is setting pathSegmentService to null.

      The fix can consist of: adding a "require" tag on CaseManagementComponent or lasy loading the service.

      In OSGI-INF/cm-framework.xml of nuxeo-case-management-core

      
      <component name="org.nuxeo.cm.service.mailboxManagement">
      
        <require>org.nuxeo.ecm.core.api.pathsegment.PathSegmentService</require>
      ...
      
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                stan Sun Tan
                Participants:
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  PagerDuty

                  Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.