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

MongoDB: NPE when refreshing page with custom fields

    Details

      Description

      Viewing a page with Custom Fields results in NPE in the console if MongoDB hook is installed.

      Steps to reproduce:

      1. Download MongoDB
      2. Extract to C:\
      3. Create [C:\data\db] directory
      4. Open a command prompt at [C:[mongoDB_dir]\bin]
      5. Run mongod.exe
      6. Run mongo.exe
      7. Start Liferay
      8. Deploy mongodb-hook
      9. Restart application server
      10. Navigate to Control Panel > Custom Fields
      11. Add a Custom Field for Blogs Entry
      12. Navigate to home page
      13. Add Blogs portlet to page
      14. Click Add Blog Entry
        Console error will be present in console.
        b Navigate to
        1. Add Custom Field to Pages using control panel.

      2. Attempt to update the Custom Field in any page configuration.

      3. LR 6.2 throws a Nullpointer exception as shown in the log.

      java.lang.NullPointerException
      at com.liferay.mongodb.hook.service.impl.MongoExpandoValueLocalServiceImpl.toExpandoValue(MongoExpandoValueLocalServiceImpl.java:667)
      at com.liferay.mongodb.hook.service.impl.MongoExpandoValueLocalServiceImpl.getValue(MongoExpandoValueLocalServiceImpl.java:598)

      ...

        Attachments

          Activity

            People

            • Assignee:
              jeffrey.yang Jeffrey Yang (Inactive)
              Reporter:
              piosystems@yahoo.co.uk Pius Onobhayedo
              Participants of an Issue:
              Recent user:
              Esther Sanz
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                6 years, 2 weeks, 3 days ago

                Packages

                Version Package
                7.0.0 M1