Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-5699

local dependent resource fails to load in ZK 10, causes exception

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 10.0.0
    • None

      reproducing case

      run attached project zk10localeresource.zip
      open index.zul

      current result

      fails with stack trace

      [WARNING] /zk10localeresources/
      org.zkoss.zk.ui.UiException: javax.servlet.ServletException: Unable to encode /js/msg*.js
      	at org.zkoss.zk.ui.sys.HtmlPageRenders.append(HtmlPageRenders.java:525)
      	at org.zkoss.zk.ui.sys.HtmlPageRenders.outLangJavaScripts(HtmlPageRenders.java:265)
      	at org.zkoss.zul.impl.PageRenderer.outHeaders(PageRenderer.java:113)
      	at org.zkoss.zul.impl.PageRenderer.renderDesktop(PageRenderer.java:94)
      	at org.zkoss.zul.impl.PageRenderer.render(PageRenderer.java:57)
      	at org.zkoss.zk.ui.impl.PageImpl.redraw(PageImpl.java:931)
      	at org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage0(UiEngineImpl.java:578)
      	at org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage(UiEngineImpl.java:373)
      	at org.zkoss.zk.ui.http.DHtmlLayoutServlet.process(DHtmlLayoutServlet.java:253)
      	at org.zkoss.zk.ui.http.DHtmlLayoutServlet.doGet(DHtmlLayoutServlet.java:170)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:503)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:590)
      	at org.eclipse.jetty.servlet.ServletHolder$NotAsync.service(ServletHolder.java:1419)
      	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:764)
      	at org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1617)
      	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:506)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:131)
      	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:598)
      	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:122)
      	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:223)
      	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1571)
      	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:221)
      	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1373)
      	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:176)
      	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:463)
      	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1544)
      	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:174)
      	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1295)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:129)
      	at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:205)
      	at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:129)
      	at org.eclipse.jetty.server.ResourceService.sendWelcome(ResourceService.java:440)
      	at org.eclipse.jetty.server.ResourceService.doGet(ResourceService.java:255)
      	at org.eclipse.jetty.servlet.DefaultServlet.doGet(DefaultServlet.java:445)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:503)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:590)
      	at org.eclipse.jetty.servlet.ServletHolder$NotAsync.service(ServletHolder.java:1410)
      	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:764)
      	at org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1617)
      	at org.eclipse.jetty.websocket.servlet.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:164)
      	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202)
      	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1592)
      	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:506)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:131)
      	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:580)
      	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:122)
      	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:223)
      	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1571)
      	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:221)
      	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1373)
      	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:176)
      	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:463)
      	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1544)
      	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:174)
      	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1295)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:129)
      	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:149)
      	at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:51)
      	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:122)
      	at org.eclipse.jetty.server.Server.handle(Server.java:562)
      	at org.eclipse.jetty.server.HttpChannel.lambda$handle$0(HttpChannel.java:399)
      	at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:656)
      	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:391)
      	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:282)
      	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:319)
      	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:100)
      	at org.eclipse.jetty.io.SocketChannelEndPoint$1.run(SocketChannelEndPoint.java:101)
      	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333)
      	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310)
      	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168)
      	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:132)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:894)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1038)
      	at java.base/java.lang.Thread.run(Thread.java:833)
      Caused by: javax.servlet.ServletException: Unable to encode /js/msg*.js
      	at org.zkoss.web.servlet.http.Encodes.encodeURL(Encodes.java:406)
      	at org.zkoss.web.fn.ServletFns.encodeURL(ServletFns.java:70)
      	at org.zkoss.zk.ui.sys.HtmlPageRenders.append(HtmlPageRenders.java:523)
      	... 73 more
      Caused by: java.lang.IllegalArgumentException: Absolute path required: \
      	at org.zkoss.web.util.resource.ServletContextLocator.<init>(ServletContextLocator.java:108)
      	at org.zkoss.web.util.resource.ServletContextLocator.<init>(ServletContextLocator.java:65)
      	at org.zkoss.web.servlet.Servlets.locate(Servlets.java:264)
      	at org.zkoss.web.servlet.http.Encodes.encodeURL0(Encodes.java:486)
      	at org.zkoss.web.servlet.http.Encodes$1.encodeURL(Encodes.java:430)
      	at org.zkoss.web.servlet.http.Encodes.encodeURL(Encodes.java:403)
      	... 75 more
      

      expected result

      loads page and resource

      debugging information

      workaround

            Unassigned Unassigned
            MDuchemin MDuchemin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: