Estou desenvolvendo um projeto Wicket-Hibernate-Spring. Até realizar a comunicação e persistência de objetos no banco, estava funcionando normalmente.
Após algum tempo, com aumento de alguns escopos, preciso utilizar JQWicket, que seria uma dependência para integrar Wicket e Jquery.
Estou me deparando com esse erro quando inicializo o servidor (Tomcat 7.0):
java.lang.NoClassDefFoundError: org/apache/wicket/request/resource/UrlResourceReference
at de.agilecoders.wicket.core.Bootstrap.install(Bootstrap.java:78)
at de.agilecoders.wicket.core.Bootstrap.install(Bootstrap.java:110)
at com.projeto.core.WicketApplication.init(WicketApplication.java:45)
at org.apache.wicket.Application.initApplication(Application.java:807)
at org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:346)
at org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:286)
at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4854)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5546)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: org.apache.wicket.request.resource.UrlResourceReference
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1720)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)
... 18 more
Acredito que o meu erro esteja em minhas dependências do Maven, mas não vejo o por que de estarem de alguma maneira erradas:
<dependencies>
<dependency>
<groupId>org.apache.wicket</groupId>
<artifactId>wicket-spring</artifactId>
<version>${wicket.version}</version>
</dependency>
<dependency>
<groupId>org.apache.wicket</groupId>
<artifactId>wicket-extensions</artifactId>
<exclusions>
<exclusion>
<groupId>org.apache.wicket</groupId>
<artifactId>wicket-core</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.wicket</groupId>
<artifactId>wicket-util</artifactId>
<classifier>tests</classifier>
<scope>test</scope>
<version>${project.version}</version>
</exclusion>
</exclusions>
<version>${wicket.version}</version>
</dependency>
<dependency>
<groupId>org.apache.wicket</groupId>
<artifactId>wicket-core</artifactId>
<version>${wicket.version}</version>
</dependency>
<dependency>
<groupId>org.apache.wicket</groupId>
<artifactId>wicket-request</artifactId>
<version>1.5.3</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${slf4j.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.14</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.version}</version>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate.java-persistence</groupId>
<artifactId>jpa-api</artifactId>
<version>2.0-cr-1</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>${hibernate.version}</version>
</dependency>
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>net.sourceforge.jtds</groupId>
<artifactId>jtds</artifactId>
<version>1.3.1</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.6</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.aggregate</groupId>
<artifactId>jetty-all-server</artifactId>
<version>${jetty.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-c3p0</artifactId>
<version>${hibernate.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-osgi</artifactId>
<version>${hibernate.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-envers</artifactId>
<version>${hibernate.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-proxool</artifactId>
<version>${hibernate.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-infinispan</artifactId>
<version>${hibernate.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-ehcache</artifactId>
<version>${hibernate.version}</version>
</dependency>
<dependency>
<groupId>de.agilecoders.wicket</groupId>
<artifactId>wicket-bootstrap-extensions</artifactId>
<exclusions>
<exclusion>
<groupId>org.apache.wicket</groupId>
<artifactId>wicket-util</artifactId>
</exclusion>
</exclusions>
<version>0.9.7</version>
</dependency>
<dependency>
<groupId>com.google.code.jqwicket</groupId>
<artifactId>jqwicket</artifactId>
<version>0.8</version>
</dependency>
</dependencies>
Alguém já passou por algo parecido e possa compartilhar a experiencia?
EDIÇÃO
Parece que descobri a causa, mas não consigo desfazer o erro. O JQWicket tenta utilizar a classe UrlResourceReference enquanto ela não faz parte do Wicket 1.5.3, mas sim do 6.19, que seria uma versão estavel acima. O por que, eu gostaria de entender, já que a versão do JQWicket parece ser a estável para o 1.5.3.
EDIÇÃO 2
Se eu mudar para a versão 6.19 do Wicket, o JQWicket acusa que há um método faltante na classe Url. Um método que a classe Url do 1.5.3 tem.