Uploaded image for project: 'Magnolia Javascript Models'
  1. Magnolia Javascript Models
  2. JSMODELS-15

RNFE occurs if JS model doesn't exist on the file system, but old CompiledScript still remains in the cache

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Neutral Neutral
    • 1.0
    • None
    • None
    • Kromeriz 108
    • 2

      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.

        Acceptance criteria

              rsiska Robert Šiška
              jsimak Jaroslav Simak
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD