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

Fix NullPointerException when exporting layout definition in json

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 5.9.6-SNAPSHOT
    • Fix Version/s: 6.0
    • Component/s: Layouts & Widgets

      Description

      Some definitions throw a NPE, for instance:

      http://localhost:8080/nuxeo/site/layout-manager/layouts/json?layoutName=thumbnail_listing
      
      11:50:25,455 ERROR [DefaultNuxeoExceptionHandler] Cannot forward to error page: response is already committed
      12:04:17,917 WARN  [WebEngineExceptionMapper] Exception in JAX-RS processing
      java.lang.NullPointerException
      	at org.nuxeo.ecm.platform.forms.layout.io.JSONLayoutExporter.exportToJson(JSONLayoutExporter.java:1091)
      	at org.nuxeo.ecm.platform.forms.layout.io.JSONLayoutExporter.exportToJson(JSONLayoutExporter.java:954)
      	at org.nuxeo.ecm.platform.forms.layout.io.JSONLayoutExporter.exportToJson(JSONLayoutExporter.java:746)
      	at org.nuxeo.ecm.platform.forms.layout.export.LayoutResource.getAsJson(LayoutResource.java:108)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:606)
      	at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
      

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 1 hour
                  1h
                  Remaining:
                  Remaining Estimate - 1 hour
                  1h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified