[MGNLCACHE-129] Ehcache fails to start if the same physical webapp is reused multiple times Created: 03/Mar/16  Updated: 11/Mar/16  Resolved: 10/Mar/16

Status: Closed
Project: Cache Modules
Component/s: ehcache
Affects Version/s: 5.4
Fix Version/s: 5.4.4

Type: Bug Priority: Major
Reporter: Stephan Helas Assignee: Roman Kovařík
Resolution: Fixed Votes: 0
Labels: support
Remaining Estimate: 0d
Time Spent: 3h
Original Estimate: Not Specified
Environment:

debian amd64


Issue Links:
Relates
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
Documentation update required:
Yes
Date of First Response:
Sprint: Kromeriz 34
Story Points: 3

 Description   

Hello,

first of all: This configuration is working on Magnolia 5.3.

the bundle is built on top of 5.4.4 CE empty-webapp.

I have a tomcat configured using the same application twice. First as author and second as public instance. the instances are several services as you can see in server.xml After starting the first instance, the second failes to start the ehcache module.

— error ----
net.sf.ehcache.CacheException: javax.management.InstanceAlreadyExistsException: net.sf.ehcache:type=CacheManager,name=/opt/data/tomcat-apps/netbank-webapp-release#info.magnolia.module.cache.ehcache.EhCacheFactory#cacheManager
— / error ----

the logfile entrie looks like there is an problem using the same "physical" application.



 Comments   
Comment by Roman Kovařík [ 04/Mar/16 ]

For docu:

  • you can use property magnolia.cache.manager.id to differentiate between author and public web apps to fix the issue with net.sf.ehcache.CacheException: javax.management.InstanceAlreadyExistsException: net.sf.ehcache:type=CacheManager,name=/path/to/your/webapp#info.magnolia.module.cache.ehcache.EhCacheFactory#cacheManager.
    This exception occurs if you have multiple instances deployed from the same location (a testing environment with shared web app for author/public).
Comment by Stephan Helas [ 07/Mar/16 ]

Hi Roman,

do i need a new Cache Modul Version or will this work with 5.4.4? I've added the entry to the magnolia.properties. But the Error stays the same.

Best Regards
Stephan

Comment by Roman Kovařík [ 07/Mar/16 ]

Hello Stephan,

this ticket is still in progress and will be released as cache 5.4.4 for Magnolia 5.4.6 but this version of the cache module will be also usable with Magnolia 5.4 or greater. We can also release the cache module before Magnolia 5.4.6 as soon as this ticket will be closed.

For now, you can copy your web app and use different physical web apps for author/public instance as workaround.

Regards
Roman

Generated at Sun Feb 11 23:52:29 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.