Tapestry
  1. Tapestry
  2. TAPESTRY-1306

NullPointerException when looking for asset

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.1.5
    • Component/s: Framework
    • Labels:
      None

      Description

      Create a relative path that has more ".." than it should.

      For example, in a *.script file:

      dojo.registerModulePath("buildcap", "../../../js/buildcap");
      dojo.require("buildcap.util");

      Resulted in this exception because translatePath call on AssetService.java:244 returns null.

      Failure to export classpath resource /dojo/../../../js/buildcap.js.

      Session id : 36sjq7hi05pbk

      Exceptions:

      java.lang.NullPointerException
      org.apache.hivemind.impl.DefaultClassResolver.removeLeadingSlash(DefaultClassResolver.java:57)
      org.apache.hivemind.impl.DefaultClassResolver.getResource(DefaultClassResolver.java:48)
      org.apache.tapestry.asset.AssetService.service(AssetService.java:244)
      $IEngineService_111046d3483.service($IEngineService_111046d3483.java)
      org.apache.tapestry.services.impl.EngineServiceOuterProxy.service(EngineServiceOuterProxy.java:72)
      org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:246)
      org.apache.tapestry.services.impl.InvokeEngineTerminator.service(InvokeEngineTerminator.java:54)

        Activity

        Hide
        Andreas Andreou added a comment -

        Perhaps similar is trying to open
        http://127.0.0.1:8080/app?service=asset&asset=../../static/dojo/dojo.js

        01:06:22,328 WARN [RequestExceptionReporter] Failure to export classpath resource null.
        java.lang.NullPointerException
        at org.apache.tapestry.asset.AssetService.service(AssetService.java:227)
        at $IEngineService_111482e1797.service($IEngineService_111482e1797.java)
        at org.apache.tapestry.services.impl.EngineServiceOuterProxy.service(EngineServiceOuterProxy.java:72)
        at org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:246)
        at org.apache.tapestry.services.impl.InvokeEngineTerminator.service(InvokeEngineTerminator.java:54)
        ...

        Show
        Andreas Andreou added a comment - Perhaps similar is trying to open http://127.0.0.1:8080/app?service=asset&asset=../../static/dojo/dojo.js 01:06:22,328 WARN [RequestExceptionReporter] Failure to export classpath resource null. java.lang.NullPointerException at org.apache.tapestry.asset.AssetService.service(AssetService.java:227) at $IEngineService_111482e1797.service($IEngineService_111482e1797.java) at org.apache.tapestry.services.impl.EngineServiceOuterProxy.service(EngineServiceOuterProxy.java:72) at org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:246) at org.apache.tapestry.services.impl.InvokeEngineTerminator.service(InvokeEngineTerminator.java:54) ...

          People

          • Assignee:
            Andreas Andreou
            Reporter:
            Patrick Moore
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development