[JSMODELS-15] RNFE occurs if JS model doesn't exist on the file system, but old CompiledScript still remains in the cache Created: 04/Aug/17  Updated: 11/Aug/17  Resolved: 11/Aug/17

Status: Closed
Project: Magnolia Javascript Models
Component/s: None
Affects Version/s: None
Fix Version/s: 1.0

Type: Bug Priority: Neutral
Reporter: Jaroslav Simak Assignee: Robert Šiška
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

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
Sprint: Kromeriz 108
Story Points: 2

 Description   

One would expect that old CompiledScript will be removed from cache and page will show freemarker error.

WARNUNG: Exception thrown during refresh
java.util.concurrent.ExecutionException: info.magnolia.resourceloader.ResourceOrigin$ResourceNotFoundException: No resource found for path /js-test/templates/pages/rhino.js in origin layered
    at com.google.common.util.concurrent.AbstractFuture$Sync.getValue(AbstractFuture.java:299)
    at com.google.common.util.concurrent.AbstractFuture$Sync.get(AbstractFuture.java:286)
    at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:116)
    at com.google.common.util.concurrent.Uninterruptibles.getUninterruptibly(Uninterruptibles.java:137)
    at com.google.common.cache.LocalCache$Segment.getAndRecordStats(LocalCache.java:2348)
    at com.google.common.cache.LocalCache$Segment$1.run(LocalCache.java:2331)
    at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:457)
    at com.google.common.util.concurrent.ExecutionList.executeListener(ExecutionList.java:156)
    at com.google.common.util.concurrent.ExecutionList.add(ExecutionList.java:101)
    at com.google.common.util.concurrent.AbstractFuture.addListener(AbstractFuture.java:170)
    at com.google.common.cache.LocalCache$Segment.loadAsync(LocalCache.java:2326)
    at com.google.common.cache.LocalCache$Segment.refresh(LocalCache.java:2389)
    at com.google.common.cache.LocalCache.refresh(LocalCache.java:4090)
    at com.google.common.cache.LocalCache$LocalLoadingCache.refresh(LocalCache.java:4843)
    at info.magnolia.module.jsmodels.factory.JavascriptObjectFactory.createCompiledScript(JavascriptObjectFactory.java:191)

Same happens if the JS script contains some error - it won't compile but the "old" script is still cached.


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