[MGNLUI-3332] Wrong dependency to imaging in magnolia-ui-project causes broken images Created: 23/Jan/15  Updated: 06/Aug/15  Resolved: 13/Mar/15

Status: Closed
Project: Magnolia UI
Component/s: build
Affects Version/s: 5.3.5
Fix Version/s: 5.3.8

Type: Bug Priority: Major
Reporter: Natascha Desmarais Assignee: Christoph Meier
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

M5.3.5, tested with bundled webapp as well as enterprise webapp


Attachments: Text File dep_tree_5.3.5_withProject.txt    
Issue Links:
Cloners
is cloned by MGNLUI-3390 CLONE - Wrong dependency to imaging i... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

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



 Comments   
Comment by Christoph Meier [ 12/Mar/15 ]

So ... on the 5.3.x branches ...
parent-pom of the ce-bundle is referencing to magnolia-module-imaging v. 3.1.3, but
parent pom of the ui-project is referencing to magnolia-module-imaging v. 3.0.1.
The "solution" will be to change parent pom of the ui-project - if this has no unwanted side effects for the ui project.

Comment by Christoph Meier [ 12/Mar/15 ]

Fix is on branch "MGNLUI-3332" (see http://goo.gl/iT0kWd)

Comment by Magnolia International [ 17/Mar/15 ]

Looks good, but to be consistent, when merging to master you'll need to bump to 3.2

Comment by Christoph Meier [ 23/Mar/15 ]

Integrated onto branch magnolia-ui-5.3.x.

Generated at Mon Feb 12 09:05:33 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.