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

Portal will throw NullPointerException when default image is missing

    Details

    • Branch Version/s:
      6.0.x, 5.2.x
    • Backported to Branch:
      Committed

      Description

      In portal-ext.properties:
      image.default.company.logo=logo2.png

      There is no logo2.png anywhere. When I start tomcat and open localhost:8080 page, the following exception is thrown:

      05:42:54,649 ERROR [ImageLocalServiceImpl:78] Default company logo is not available
      05:42:54,701 ERROR [ContextLoader:215] Context initialization failed
      ...
      Caused by: java.lang.NullPointerException
      at com.sun.media.jai.codecimpl.PNMCodec.isFormatRecognized(PNMCodec.java:152)
      at com.liferay.portal.image.ImageProcessorImpl.read(ImageProcessorImpl.java:197)
      at com.liferay.portal.kernel.image.ImageProcessorUtil.read(ImageProcessorUtil.java:69)
      at com.liferay.portal.service.impl.ImageLocalServiceImpl.getImage(ImageLocalServiceImpl.java
      :337)
      at com.liferay.portal.service.impl.ImageLocalServiceImpl.getImage(ImageLocalServiceImpl.java
      :222)
      at com.liferay.portal.service.impl.ImageLocalServiceImpl.afterPropertiesSet(ImageLocalServic
      eImpl.java:81)
      ...

      The logs display that server startup, but portal can't startup in fact.

      Note:This issue only occur in Liferay 5.2.x

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  8 years, 5 weeks, 2 days ago