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

Avoid NPE when creating a relation to an empty document

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 7.3
    • Fix Version/s: 7.4
    • Component/s: Relations

      Description

      How to reproduce:

      • Click on "Add a new relation" link in relations tab of an asset.
      • Selected Predicate as "References".
      • Selected Object as Document (Radio button selected) and value not entered.
      • Click On "Add" button --> NPE in logs:
         java.lang.NullPointerException
        	at org.nuxeo.ecm.platform.relations.web.listener.ejb.RelationCreationBean.validateObject(RelationCreationBean.java:91)
        	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        	at java.lang.reflect.Method.invoke(Unknown Source)
        	at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:335)
        	at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:348)
        	at org.jboss.el.parser.AstPropertySuffix.invoke(AstPropertySuffix.java:58)
        	at org.jboss.el.parser.AstValue.invoke(AstValue.java:96)
        	at org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
        	at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
        	at javax.faces.validator.MethodExpressionValidator.validate(MethodExpressionValidator.java:106)
        	at javax.faces.component.UIInput.validateValue(UIInput.java:1165)
        	at javax.faces.component.UIInput.validate(UIInput.java:983)
        	at javax.faces.component.UIInput.executeValidate(UIInput.java:1249)
        	at javax.faces.component.UIInput.processValidators(UIInput.java:712)
        	at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1258)
        	at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1258)
        	at javax.faces.component.UIForm.processValidators(UIForm.java:253).
        

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: