Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-78513

UnmarshallException traces are not shown in logs using LiferaySerializer

    Details

      Description

      UnmarshallException traces are not shown when unmarshall an object using LiferaySerializer.

      Steps to reproduce in master/70x:

      1. Start a master/70x platform.
      2. Go to 'Control Panel' > Configuration > 'Server Administration' > 'Log Levels' > 'Add Category':
        • Logger name: 'com.liferay.portal.json.jabsorb.serializer'
        • Log level: DEBUG
      3. Create new "Dinamic Data List" in "Site Menu" > Content > "Dynamic Data Lists" using workflow 'Single Approver' and any 'Data Definition' (e.g. Contacts).
      4. After created this DDL, create a new registry of this DDL.
      5. Go to "User Menu" > "My Account" > Notifications, open Dynamic Data Lists Notification and do next actions:
        • "Assign to Me" + "Done" in comment.
        • "Approve" + "Done" in comment.

      Expected behavior
      Some traces should be shown because there is an exception.
      Current behavior
      Log does not show any traces.

      Exception to show should be like below:

      2018-03-06 12:19:24.219 DEBUG [http-nio-8080-exec-2][LiferaySerializer:348] org.jabsorb.serializer.UnmarshallException: could not instantiate bean of type com.liferay.portal.kernel.model.PortletPreferencesIds, make sure it has a no argument constructor and that it is not an interface or abstract class
      org.jabsorb.serializer.UnmarshallException: could not instantiate bean of type com.liferay.portal.kernel.model.PortletPreferencesIds, make sure it has a no argument constructor and that it is not an interface or abstract class
          at org.jabsorb.serializer.impl.BeanSerializer.unmarshall(BeanSerializer.java:386)
          at org.jabsorb.JSONSerializer.unmarshall(JSONSerializer.java:692)
          at com.liferay.portal.json.jabsorb.serializer.LiferayJSONSerializer.unmarshall(LiferayJSONSerializer.java:50)
          at com.liferay.portal.json.jabsorb.serializer.LiferaySerializer.unmarshall(LiferaySerializer.java:342)
          at org.jabsorb.JSONSerializer.unmarshall(JSONSerializer.java:692)
          at com.liferay.portal.json.jabsorb.serializer.LiferayJSONSerializer.unmarshall(LiferayJSONSerializer.java:50)
          at org.jabsorb.serializer.impl.MapSerializer.unmarshall(MapSerializer.java:265)
          at org.jabsorb.JSONSerializer.unmarshall(JSONSerializer.java:692)
          at com.liferay.portal.json.jabsorb.serializer.LiferayJSONSerializer.unmarshall(LiferayJSONSerializer.java:50)
          at org.jabsorb.JSONSerializer.fromJSON(JSONSerializer.java:262)
          at com.liferay.portal.json.JSONFactoryImpl.deserialize(JSONFactoryImpl.java:181)
          at com.liferay.portal.kernel.json.JSONFactoryUtil.deserialize(JSONFactoryUtil.java:89)
          at com.liferay.portal.workflow.kaleo.runtime.util.WorkflowContextUtil.convert(WorkflowContextUtil.java:47)
          at com.liferay.portal.workflow.kaleo.runtime.integration.impl.internal.WorkflowTaskManagerImpl.fetchWorkflowTask(WorkflowTaskManagerImpl.java:207)
      [...]
      Caused by: java.lang.InstantiationException: com.liferay.portal.kernel.model.PortletPreferencesIds
          at java.lang.Class.newInstance(Class.java:427)
          at org.jabsorb.serializer.impl.BeanSerializer.unmarshall(BeanSerializer.java:382)
          ... 279 more
      Caused by: java.lang.NoSuchMethodException: com.liferay.portal.kernel.model.PortletPreferencesIds.<init>()
          at java.lang.Class.getConstructor0(Class.java:3082)
          at java.lang.Class.newInstance(Class.java:412)
          ... 280 more
      

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                1 year, 35 weeks, 5 days ago

                Packages

                Version Package
                7.0.0 DXP FP41
                7.0.6 CE GA7
                7.0.0 DXP SP8
                7.0.X
                7.1.0 M2
                7.1.X
                Master