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

Wicket-Guice integration fails - can't find application attached to current thread

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.4.8
    • 1.4.16
    • wicket-guice
    • None
    • Windows 7, JSDK 1.6.21, Maven 3.0.3

    Description

      Simply by starting new project from wicket archetype, then adding a dependency to guice 2.0 and wicket-guice 1.4.8 and providing the guice module through web.xml to GuiceComponentInjector one can get the exception when starting jetty:
      org.apache.wicket.WicketRuntimeException: There is no application attached to current thread main
      at org.apache.wicket.Application.get(Application.java:179)
      at org.apache.wicket.injection.web.InjectorHolder.setInjector(InjectorHolder.java:88)
      at org.apache.wicket.guice.GuiceComponentInjector.<init>(GuiceComponentInjector.java:102)
      at org.apache.wicket.guice.GuiceWebApplicationFactory.createApplication(GuiceWebApplicationFactory.java:177)
      at org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:701)
      at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
      at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
      at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:713)
      ...

      Attachments

        1. wicketBugDemo.rar
          25 kB
          Marek Zganiacz

        Activity

          People

            ivaynberg Igor Vaynberg
            mzganiacz Marek Zganiacz
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: