Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-2826

Wicket fails to read html markup from jar after updating and redeploying in jetty

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Invalid
    • 1.4.7
    • 1.4.11
    • wicket
    • None
    • Linux, jetty 6 using context deployer

    Description

      I wrote a web application and packaged the main code and html markup files into a jar. I deployed it in jetty using the "extracted war" folder structure and a context descriptor. The application worked fine.
      Then I made a minor change in an html file, rebuilt the jar, copied it over the old one in jetty and touched the descriptor to reload the context. Then when trying to access the application in the browser, I got errors like:

      org.apache.wicket.markup.MarkupCache - Unable to find markup from jar:file:/path/to/jar!/path/to/html
      org.apache.wicket.util.resource.ResourceStreamNotFoundException: Resource jar:file:/path/to/jar!/path/to/html could not be opened
      at org.apache.wicket.util.resource.UrlResourceStream.getInputStream(UrlResourceStream.java:179)
      at org.apache.wicket.markup.MarkupResourceStream.getInputStream(MarkupResourceStream.java:130)
      at org.apache.wicket.markup.MarkupParser.parse(MarkupParser.java:265)
      at org.apache.wicket.markup.loader.SimpleMarkupLoader.loadMarkup(SimpleMarkupLoader.java:52)
      at org.apache.wicket.markup.loader.InheritedMarkupMarkupLoader.loadMarkup(InheritedMarkupMarkupLoader.java:62)
      at org.apache.wicket.markup.loader.DefaultMarkupLoader.loadMarkup(DefaultMarkupLoader.java:55)
      at org.apache.wicket.markup.MarkupCache.loadMarkup(MarkupCache.java:464)
      at org.apache.wicket.markup.MarkupCache.loadMarkupAndWatchForChanges(MarkupCache.java:559)
      at org.apache.wicket.markup.MarkupCache.getMarkup(MarkupCache.java:325)
      at org.apache.wicket.markup.MarkupCache.getMarkupStream(MarkupCache.java:216)
      at org.apache.wicket.MarkupContainer.getAssociatedMarkupStream(MarkupContainer.java:351)
      at org.apache.wicket.Page.onRender(Page.java:1558)
      [...]
      Caused by: java.io.FileNotFoundException: JAR entry path/to/html not found in /path/to/jar
      [...]
      org.apache.wicket.markup.MarkupNotFoundException: Markup of type 'html' for component 'page.class.name' not found. [...]
      at org.apache.wicket.markup.MarkupCache.getMarkupStream(MarkupCache.java:227)
      at org.apache.wicket.MarkupContainer.getAssociatedMarkupStream(MarkupContainer.java:351)
      at org.apache.wicket.Page.onRender(Page.java:1558)
      [...]

      If I restart jetty, with no other change, everything works fine.

      Attachments

        1. jetty.xml
          10 kB
          Adrian Sándor
        2. simplewicket.xml
          0.3 kB
          Adrian Sándor
        3. simplewicket.zip
          9 kB
          Adrian Sándor

        Activity

          People

            ivaynberg Igor Vaynberg
            aditsu Adrian Sándor
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: