Skip to main content

TOTD #90: Migrating from Wicket 1.3.x to 1.4 - "Couldn't load DiskPageStore index from file" error

Posted by arungupta on August 6, 2009 at 10:44 AM PDT



Now that Apache Wicket
href="http://wicket.apache.org/apache-wicket-14-takes-type-safety-to-the-next-level.html">1.4
is available, migrating from previous versions is pretty
straight forward.



Change the version in your POM file as:


style="text-align: left; background-color: rgb(204, 204, 255); width: 100%;"
cellpadding="2" cellspacing="2">
<wicket.version>1.4.0</wicket.version>



And that's it!



The complete dependency may look like:


style="text-align: left; background-color: rgb(204, 204, 255); width: 100%;"
cellpadding="2" cellspacing="2">
<dependency>

 
<groupId>org.apache.wicket</groupId>

  <artifactId>wicket</artifactId>

  <version>1.4.0</version>

</dependency>



or


style="text-align: left; background-color: rgb(204, 204, 255); width: 100%;"
cellpadding="2" cellspacing="2">
<dependency>

 
<groupId>org.apache.wicket</groupId>

  <artifactId>wicket</artifactId>

 
<version>${wicket.version}</version>

</dependency>



You may encounter the following error:


style="text-align: left; background-color: rgb(204, 204, 255); width: 100%;"
cellpadding="2" cellspacing="2">
2009-08-05 05:58:49.387::INFO:  No Transaction
manager found - if your webapp requires one, please configure one.

ERROR -
DiskPageStore             
- Couldn't load DiskPageStore index from file
/Users/arungupta/workspaces/runner~subversion/wicket/runner/target/work/wicket.runner-filestore/DiskPageStoreIndex.

java.lang.ClassNotFoundException:
org.apache.wicket.util.concurrent.ConcurrentHashMap

       
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)

       
at java.security.AccessController.doPrivileged(Native Method)

       
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)

       
at java.lang.ClassLoader.loadClass(ClassLoader.java:319)



At least I did :)



Fortunately the fix is simple and intuitive. Instead of running "mvn
jetty:run", invoke the command:


style="text-align: left; background-color: rgb(204, 204, 255); width: 100%;"
cellpadding="2" cellspacing="2">
mvn clean jetty:run



Basically, "clean" will clean out references to older version of Wicket
jars in your project and voila!



If you are deploying as WAR file, then bundle Wicket jars in
WEB-INF/lib instead of copying them to the shared folder of your
application server.



Other Wicket tips on this blog are available href="http://blogs.sun.com/arungupta/tags/wicket">here.
Specifically href="http://blogs.sun.com/arungupta/entry/totd_86_getting_started_with">TOTD
#86 shows how to get started with Apache Wicket on href="http://glassfish.org">GlassFish.



Please leave suggestions on other TOTD (Tip Of The Day) that
you'd like to see.
A complete archive of all the tips is available href="http://blogs.sun.com/arungupta/tags/totd">here.




Technorati: wicket
glassfish
migration

Related Topics >>