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

Fix EasyShare NPE on document without dc:expired

    XMLWordPrintable

    Details

      Description

      If a document doesn't have a dc:expired date, accessing it through an EasyShare link (http://localhost:8080/nuxeo/site/easyshare/213e9f11-21b2-4874-90df-978bdf8bad31) crashes with:

      2017-12-20 15:34:43,037 ERROR [http-nio-0.0.0.0-8080-exec-8] [org.nuxeo.ecm.webengine.app.WebEngineExceptionMapper] java.lang.NullPointerException
      java.lang.NullPointerException
      	at java.util.Date.getMillisOf(Date.java:958)
      	at java.util.Date.after(Date.java:931)
      	at org.nuxeo.easyshare.EasyShare.checkIfShareIsValid(EasyShare.java:169)
      	at org.nuxeo.easyshare.EasyShare.access$000(EasyShare.java:67)
      	at org.nuxeo.easyshare.EasyShare$1.run(EasyShare.java:92)
      	at org.nuxeo.easyshare.EasyShareUnrestrictedRunner.runUnrestricted(EasyShareUnrestrictedRunner.java:55)
      	at org.nuxeo.easyshare.EasyShare.getShareListing(EasyShare.java:200)
      

      and in the UI:

      {"entity-type":"exception","status":500,"message":"javax.ws.rs.WebApplicationException: com.sun.jersey.api.MessageException: A message body writer for Java class org.nuxeo.ecm.core.api.NuxeoException, and Java type class org.nuxeo.ecm.core.api.NuxeoException, and MIME media type text/html; charset=UTF-8 was not found.\n"}
      

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:

                  PagerDuty

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