tag:blogger.com,1999:blog-19648744.post-3897906682062421622008-08-05T16:13:00.000-05:002008-08-05T16:13:00.000-05:002008-08-05T16:13:00.000-05:00Hi,I'd like to point out another problem with this...Hi,<BR/><BR/>I'd like to point out another problem with this setup that took me a lot of time and patience to figure out...<BR/><BR/>First of all, I had a problem using Jetty (with the jetty:run command that I added in the project properties under Actions), namely that the Tapestry's error handling page was somehow overriden by Jetty's default stacktrace dump. So this was a big annoyance.<BR/><BR/>Also, Netbeans does not automatically compile and deploy java sources, you have to redeploy (run) the application when they change. <BR/><BR/>But templates and other resources are copied directly to the target folder and you can view them immediately on the running server, so you only have to redeploy when you change the sources.<BR/><BR/>So I tried deploying on Tomcat, which worked, until I tried to redeploy (or rerun) the application while the server was still running. This produced an error <I>java.io.FileNotFoundException: JAR entry log4j.properties not found </I> when the server tried to undeploy the app that was still running. This also caused the redeploy to fail. After a server restart, the app would run normally, but this is too time consuming.<BR/><BR/>The root cause for this, after a few hours of googling and pulling my hair, is that the tapestry5 quickstart maven archetype contains a configuration option that <A HREF="http://article.gmane.org/gmane.comp.java.tapestry.user/58393" REL="nofollow">packages the sources as a .jar file</A> and puts them in the lib folder for the target. <BR/><BR/>The problem is that the Java runtime caches ZIP file indexes and this causes a file not found error when the underlying jar file is changed.<BR/><BR/><B>Editing the <archiveClasses> option in the pom.xml file </B> in the root of your project <B>from true to false </B>makes the project deploy the application normally, as an exploded war. <BR/><BR/>Note that you probably have to do a clean afterwards or manually delete the project's .jar file in the <I>target/project-name/WEB-INF/lib</I> directory.Danehttp://www.blogger.com/profile/14377518922708976247noreply@blogger.com