Hello, I've been working with Wicket for about a week now and things were moving along all cruisy until I started adding Hibernate and Databinder dependencies into my POM. Then all hell broke loose and I seem to now find myself in the NoClassDefFoundError, then find and manually install jar cycle. I mean, things with Wicket were just so, well, SENSIBLE, and now I'm back in nightmare-programming-land again.
In looking at some of the examples on the Web that combine Wicket and Hibernate, they don't seem to be needing anywhere near the number of dependencies I am now adding. I'm guessing I must be doing something wrong, as I'm still pretty new to Maven, being a longstanding Ant person. That I've had to manually install a whole bunch (6) of jars seems a clue. Part of this may be due to the folks who wrote Databinder using git rather than a maven repository (why oh why?!). My application extends net.databinder.auth.hib.AuthDataApplication so that it can be an authenticating database application. I've attached both the latest stack trace and my pom.xml file in hopes that some kind soul can tell me where I've gone terribly wrong. Perhaps I'm almost at the end of the dependency tunnel but I'm not yet seeing any light yet. I'm guessing this is probably a blaringly obvious problem, or maybe not a problem at all and I'm almost there. Thanks very much, Ichiro PS. BTW, I'm really enjoying Wicket so far; I haven't had this much fun programming since HyperCard. I hope it's not significantly more complicated a year or two from now than it is now. If the developer team can keep to that ethos of simplicity Wicket will only gain in popularity. Avoid the bloat.
------------------------------------------------------------------------------- Test set: net.neocortext.web.TestHomePage ------------------------------------------------------------------------------- Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.225 sec <<< FAILURE! testRenderMyPage(net.neocortext.web.TestHomePage) Time elapsed: 0.182 sec <<< ERROR! java.lang.NoClassDefFoundError: org/hibernate/annotations/common/reflection/MetadataProvider at net.databinder.hib.DataApplication.buildHibernateSessionFactory(DataApplication.java:88) at net.databinder.hib.DataApplication.dataInit(DataApplication.java:56) at net.databinder.DataApplicationBase.internalInit(DataApplicationBase.java:54) at net.databinder.auth.hib.AuthDataApplication.internalInit(AuthDataApplication.java:74) at org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:721) at org.apache.wicket.protocol.http.MockWebApplication.<init>(MockWebApplication.java:168) at org.apache.wicket.util.tester.BaseWicketTester.<init>(BaseWicketTester.java:218) at org.apache.wicket.util.tester.WicketTester.<init>(WicketTester.java:331) at org.apache.wicket.util.tester.WicketTester.<init>(WicketTester.java:314) at net.neocortext.web.TestHomePage.setUp(TestHomePage.java:19) at junit.framework.TestCase.runBare(TestCase.java:128) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:120) at junit.framework.TestSuite.runTest(TestSuite.java:230) at junit.framework.TestSuite.run(TestSuite.java:225) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:213) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127) at org.apache.maven.surefire.Surefire.run(Surefire.java:177) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345) at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009) Caused by: java.lang.ClassNotFoundException: org.hibernate.annotations.common.reflection.MetadataProvider at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) ... 31 more Caused by: java.lang.ClassNotFoundException: org.hibernate.annotations.common.reflection.MetadataProvider at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) ... 31 more
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>net.neocortext</groupId> <artifactId>neu</artifactId> <packaging>war</packaging> <version>1.0</version> <name>Neo</name> <description></description> <organization> <name>Neocortex.net</name> <url>http://neocortext.net/</url> </organization> <repositories> <repository> <id>wicket-snaps</id> <url>http://wicketstuff.org/maven/repository</url> <snapshots> <enabled>true</enabled> </snapshots> <releases> <enabled>true</enabled> </releases> </repository> <repository> <id>databinder</id> <name>Databinder repository</name> <url>http://databinder.net/repo/</url> </repository> <!-- for snapshot releases <repository> <id>databinder-snapshots</id> <name>Databinder snapshot repository</name> <url>http://databinder.net/snapshot/</url> </repository> --> </repositories> <pluginRepositories> <pluginRepository> <id>tlc</id> <name>TLC Repository</name> <url>http://commons.ucalgary.ca/pub/m2</url> </pluginRepository> </pluginRepositories> <licenses> <license> <name>The Apache Software License, Version 2.0</name> <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url> <distribution>repo</distribution> </license> </licenses> <dependencies> <!-- WICKET DEPENDENCIES --> <dependency> <groupId>org.apache.wicket</groupId> <artifactId>wicket</artifactId> <version>${wicket.version}</version> </dependency> <dependency> <groupId>org.apache.wicket</groupId> <artifactId>wicket-auth-roles</artifactId> <version>${wicket.version}</version> </dependency> <!-- <dependency> <groupId>org.apache.wicket.wicket-security</groupId> <artifactId>swarm</artifactId> <version>1.4</version> <scope>compile</scope> </dependency> --> <!-- OPTIONAL <dependency> <groupId>org.apache.wicket</groupId> <artifactId>wicket-extensions</artifactId> <version>${wicket.version}</version> </dependency> --> <!-- LOGGING DEPENDENCIES - LOG4J --> <dependency> <groupId>org.slf4j</groupId> <!-- <artifactId>slf4j-log4j12</artifactId> --> <artifactId>slf4j-jdk14</artifactId> <version>${slf4j.version}</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>${slf4j.version}</version> </dependency> <!-- <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>1.2.14</version> </dependency> --> <!-- JUNIT DEPENDENCY FOR TESTING --> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>3.8.2</version> <scope>test</scope> </dependency> <!-- JETTY DEPENDENCIES FOR TESTING --> <dependency> <groupId>org.mortbay.jetty</groupId> <artifactId>jetty</artifactId> <version>${jetty.version}</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.mortbay.jetty</groupId> <artifactId>jetty-util</artifactId> <version>${jetty.version}</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.mortbay.jetty</groupId> <artifactId>jetty-management</artifactId> <version>${jetty.version}</version> <scope>provided</scope> </dependency> <dependency> <groupId>commons-io</groupId> <artifactId>commons-io</artifactId> <version>1.4</version> </dependency> <!-- DOM4J Dependencies for Hibernate --> <dependency> <groupId>dom4j</groupId> <artifactId>dom4j</artifactId> <version>${dom4j.version}</version> </dependency> <!-- Hibernate dependencies ........... --> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-core</artifactId> <version>${hibernate.version}</version> </dependency> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-annotations</artifactId> <version>${hibernate.version}</version> </dependency> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-commons-annotations</artifactId> <version>3.3.0.ga</version> </dependency> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-validator</artifactId> <version>${hibernate-validator.version}</version> </dependency> <!-- Databinder dependencies ........... --> <dependency> <groupId>net.databinder</groupId> <artifactId>databinder-app-hib</artifactId> <version>${databinder.version}</version> </dependency> <dependency> <groupId>net.databinder</groupId> <artifactId>databinder-app</artifactId> <version>1.3.1-SNAPSHOT</version> </dependency> <dependency> <groupId>net.databinder</groupId> <artifactId>databinder-components</artifactId> <version>1.3.1-SNAPSHOT</version> </dependency> <dependency> <groupId>net.databinder</groupId> <artifactId>databinder-auth-components</artifactId> <version>1.3.1-SNAPSHOT</version> </dependency> <dependency> <groupId>net.databinder</groupId> <artifactId>databinder-models-hib</artifactId> <version>${databinder.version}</version> </dependency> <!-- HSQLDB dependencies ........... --> <dependency> <groupId>hsqldb</groupId> <artifactId>hsqldb</artifactId> <version>${hsqldb.version}</version> </dependency> <!-- MySQL dependencies ........... --> <!-- uncomment for MySQL <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>5.1.6</version> </dependency> --> <dependency> <groupId>javax.persistence</groupId> <artifactId>persistence-api</artifactId> <version>1.0</version> </dependency> </dependencies> <build> <!-- <finalName>${project.artifactId}-${project.version}-${buildNumber}</finalName> --> <finalName>${project.artifactId}-${project.version}</finalName> <resources> <resource> <filtering>false</filtering> <directory>src/main/resources</directory> </resource> <resource> <filtering>false</filtering> <directory>src/main/java</directory> <includes> <include>**</include> </includes> <excludes> <exclude>**/*.java</exclude> </excludes> </resource> </resources> <testResources> <testResource> <filtering>false</filtering> <directory>src/test/java</directory> <includes> <include>**</include> </includes> <excludes> <exclude>**/*.java</exclude> </excludes> </testResource> </testResources> <pluginManagement> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <version>2.1</version> </plugin> </plugins> </pluginManagement> <plugins> <plugin> <inherited>true</inherited> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.5</source> <target>1.5</target> <optimize>true</optimize> <debug>true</debug> </configuration> </plugin> <plugin> <groupId>org.mortbay.jetty</groupId> <artifactId>maven-jetty-plugin</artifactId> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-eclipse-plugin</artifactId> <configuration> <downloadSources>true</downloadSources> </configuration> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>tomcat-maven-plugin</artifactId> <configuration> <warFile>target/${project.artifactId}-${project.version}.war</warFile> <url>http://localhost:8787/manager</url> <server>tomcat01</server> <path>/neu</path> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <configuration> <archive> <manifest> <addDefaultImplementationEntries>true</addDefaultImplementationEntries> </manifest> <manifestEntries> <Implementation-Build>${buildNumber}</Implementation-Build> </manifestEntries> </archive> </configuration> </plugin> <!-- <plugin> <artifactId>maven-war-plugin</artifactId> <version>2.0.2</version> <configuration> <manifest> <addDefaultImplementationEntries>true</addDefaultImplementationEntries> </manifest> <archive> <manifestEntries> <Implementation-Build>${buildNumber}</Implementation-Build> </manifestEntries> </archive> </configuration> </plugin> --> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>maven-buildnumber-plugin</artifactId> <version>0.9.6</version> <executions> <execution> <phase>validate</phase> <goals> <goal>create</goal> </goals> </execution> </executions> <configuration> <format>{0,date,yyyyMMdd}</format> <items> <item>timestamp</item> </items> <doCheck>true</doCheck> <doUpdate>true</doUpdate> </configuration> </plugin> </plugins> </build> <properties> <wicket.version>1.4.12</wicket.version> <jetty.version>6.1.4</jetty.version> <slf4j.version>1.6.1</slf4j.version> <dom4j.version>1.6.1</dom4j.version> <hibernate.version>3.5.6-Final</hibernate.version> <hibernate-validator.version>4.1.0.Final</hibernate-validator.version> <databinder.version>1.3.0-SNAPSHOT</databinder.version> <hsqldb.version>2.0.0</hsqldb.version> </properties> </project>
--------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org