title: WICKET: Can't instantiate page using constructor when using DatePicker
body: <p>This time I have problem on putting DatePicker on my wicket Page.
  <br><br>
  My code is follows:<br></p>
  
  <pre><code>public class StateDB extends BasePage {
      private Date date = new Date();
      public StateDB() {
          Form form = new Form("form");
          DateTextField birthDate = new DateTextField("birthDate", new PropertyModel&lt;Date&gt;(
                  this, "date"), new StyleDateConverter("S-", true));
          PickDate datePicker = new PickDate();
          datePicker.setShowOnFieldClick(true);
          datePicker.setAutoHide(true);
          birthDate.add(datePicker);
          form.add(birthDate);  
          add(form);
      }
  }
  </code></pre>
  
  <p>When I run it on server and link to this page I'm getting Exception:<br></p>
  
  <pre><code>Last cause: org.apache.wicket.markup.head.HeaderItem
  WicketMessage: Can't instantiate page using constructor 'public kz.company.myPackage.controller.StateDB()'. Might be it doesn't exist, may be it is not visible (public).
  </code></pre>
  
  <p>But as you can see constructor of my class is public</p>
  
  <pre><code>public StateDB() {
  </code></pre>
  
  <p>There is stacktrace</p>
  
  <pre><code>Complete stack:
  
  org.apache.wicket.WicketRuntimeException: Can't instantiate page using constructor 'public kz.company.myPackage.controller.StateDB()'. Might be it doesn't exist, may be it is not visible (public).
       at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:196)
       at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:68)
       at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:47)
       at org.apache.wicket.DefaultMapperContext.newPageInstance(DefaultMapperContext.java:103)
       at org.apache.wicket.request.handler.PageProvider.resolvePageInstance(PageProvider.java:264)
       at org.apache.wicket.request.handler.PageProvider.getPageInstance(PageProvider.java:165)
       at org.apache.wicket.request.handler.render.PageRenderer.getPage(PageRenderer.java:78)
       at org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:105)
       at org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:224)
       at org.apache.wicket.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:167)
       at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:784)
       at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
       at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:255)
       at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:212)
       at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:283)
       at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:188)
  
  java.lang.reflect.InvocationTargetException
       at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
       at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
       at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
       at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:177)
       at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:68)
       at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:47)
       at org.apache.wicket.DefaultMapperContext.newPageInstance(DefaultMapperContext.java:103)
       at org.apache.wicket.request.handler.PageProvider.resolvePageInstance(PageProvider.java:264)
       at org.apache.wicket.request.handler.PageProvider.getPageInstance(PageProvider.java:165)
       at org.apache.wicket.request.handler.render.PageRenderer.getPage(PageRenderer.java:78)
       at org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:105)
       at org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:224)
       at org.apache.wicket.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:167)
       at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:784)
       at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
       at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:255)
       at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:212)
       at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:283)
       at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:188)
  
  java.lang.NoClassDefFoundError: org/apache/wicket/markup/head/HeaderItem
       at kz.company.myPackage.controller.StateDB.&lt;init&gt;(StateDB.java:72)
       at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
       at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
       at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:177)
       at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:68)
       at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:47)
       at org.apache.wicket.DefaultMapperContext.newPageInstance(DefaultMapperContext.java:103)
       at org.apache.wicket.request.handler.PageProvider.resolvePageInstance(PageProvider.java:264)
       at org.apache.wicket.request.handler.PageProvider.getPageInstance(PageProvider.java:165)
       at org.apache.wicket.request.handler.render.PageRenderer.getPage(PageRenderer.java:78)
       at org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:105)
       at org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:224)
       at org.apache.wicket.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:167)
       at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:784)
       at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
       at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:255)
       at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:212)
       at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:283)
       at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:188)
  </code></pre>