Wicket: ModalWindow and ClassNotFound: CompressedResourceReference

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Wicket: ModalWindow and ClassNotFound: CompressedResourceReference

grinsen
Everytime I try to implement a modalwindow I get:

java.lang.ClassNotFoundException: org.apache.wicket.request.resource.CompressedResourceReference

None of my libraries has this element. I already know that was dropped in Wicket 1.5 along with other compression stuff. My dependency are:

    <dependency>
        <groupId>org.apache.wicket</groupId>
        <artifactId>wicket-core</artifactId>
        <version>1.5.3</version>
    </dependency>

   
    <dependency>
        <groupId>org.apache.wicket</groupId>
        <artifactId>wicket-datetime</artifactId>
        <version>1.5.2</version>
    </dependency>


<dependency>
<groupId>org.apache.wicket</groupId>
<artifactId>wicket-extensions</artifactId>
<version>1.5.3</version>
 </dependency>



Thats how I implemented my Modal Window:



 import org.apache.wicket.ajax.AbstractAjaxTimerBehavior;
 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.ajax.markup.html.AjaxLink;
 import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
 import org.apache.wicket.markup.html.WebPage;
 import org.apache.wicket.util.time.Duration;



public class ModalPanel1 extends WebPage
{
 public ModalPanel1(String id)
{
final ModalWindow modalWindow = new ModalWindow("modal");

modalWindow.setTitle("Popup");
modalWindow.setInitialWidth(400);
modalWindow.setInitialHeight(400);
modalWindow.setResizable(true);
modalWindow.setContent(new AbstractModalClosePanel(modalWindow)
{
  public void onClick(AjaxRequestTarget target)
  {
    modalWindow.close(target);
  }
});
add(modalWindow);

add(new AjaxLink<Void>("open")
{
  @Override
  public void onClick(AjaxRequestTarget target)
  {
    modalWindow.show(target);
  }
});

add(new AbstractAjaxTimerBehavior(Duration.seconds(2))
{
  @Override
  protected void onTimer(AjaxRequestTarget target)
  {
    modalWindow.show(target);
    stop();
  }
});
 }
 }

and



 import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
 import org.apache.wicket.markup.html.panel.Panel;


 public abstract class AbstractModalClosePanel extends Panel
 {
   public AbstractModalClosePanel(ModalWindow modalWindow)
   {
super(modalWindow.getContentId());



 }



As you can see there are no imports which refer to old wicket jars.



Thats the full stacktrace:



Complete Stack Trace

Complete stack:org.apache.wicket.WicketRuntimeException: Can't instantiate page using constructor 'public com.onespark.wicket.components.tasks.Tasks()'. 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:750) at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64) at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:252) at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:209) at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:280) at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:162)java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) 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:750) at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64) at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:252) at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:209) at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:280) at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:162)java.lang.NoClassDefFoundError: org/apache/wicket/request/resource/CompressedResourceReference at com.onespark.wicket.components.tasks.ModalPanel1.(ModalPanel1.java:16) at com.onespark.wicket.components.tasks.Tasks.(Tasks.java:14) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) 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:750) at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64) at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:252) at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:209) at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:280) at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:162)



I hope someone can help me.