1
I am developing a Wicket-Hibernate-Spring project. Until the communication and persistence of objects in the bank, it was working normally.
After some time, with some scope increase, I need to use Jqwicket, which would be a dependency to integrate Wicket and Jquery.
I am encountering this error when booting the server (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
I believe my mistake is in my Maven dependencies, but I don’t see why they’re somehow wrong:
<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>
Someone has been through something similar and can share the experience?
EDITION
I seem to have found the cause, but I can’t undo the mistake. Jqwicket tries to use the Urlresourcereference class while it is not part of Wicket 1.5.3, but 6.19, which would be a stable version above. Why, I’d like to understand, since the Jqwicket version seems to be stable for 1.5.3.
ISSUE 2
If I switch to Wicket version 6.19, Jqwicket accuses that there is a missing method in the Url class. A method that the Url class of 1.5.3 has.
Thank you, Bruno. I’ll check.
– Gustavo Cinque