Uploaded image for project: 'Magnolia UI'
  1. Magnolia UI
  2. MGNLUI-3332

Wrong dependency to imaging in magnolia-ui-project causes broken images

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 5.3.8
    • 5.3.5
    • build
    • None
    • M5.3.5, tested with bundled webapp as well as enterprise webapp

      Keeping

            <dependency>
              <groupId>info.magnolia.ui</groupId>
              <artifactId>magnolia-ui-project</artifactId>
              <version>${magnoliaVersion}</version>
              <type>pom</type>
              <scope>import</scope>
            </dependency>
      

      in your project POM, whether you don’t remove it with Maven 3 or whether you need it for Maven 2, will actually cause your project to load imaging 3.0.1 instead of 3.1.2 (for M5.3.5 in this case, see [1]). Since the guava version changed between those versions, the outdated imaging module references a method that actually does not exist anymore, causing the following error:

      java.lang.NoSuchMethodError: com.google.common.collect.MapMaker.expiration(JLjava/util/concurrent/TimeUnit;)Lcom/google/common/collect/MapMaker;
      at info.magnolia.imaging.caching.CachingImageStreamer.<init>(CachingImageStreamer.java:107)
      at info.magnolia.imaging.ImagingServlet.getStreamer(ImagingServlet.java:122)
      

      Frontend wise the result is that images generated by the imaging module do not appear.


      Workaround:
      Maven 3 users should remove the above mentioned dependency since it is not needed anyways when importing one of the bundle parents.
      Maven 2 users can specify the correct dependency in their webapp, for example

      <dependency>
          <groupId>info.magnolia</groupId>
          <artifactId>magnolia-module-imaging</artifactId>
          <version>3.1.2</version>
      </dependency>
      

      [1] https://nexus.magnolia-cms.com/content/sites/magnolia.public.sites/ui/5.3.5/dependency-management.html

        Acceptance criteria

              cmeier Christoph Meier
              ndesmarais Natascha Desmarais
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD