For me, one of the the main cases for putting necessary libs inside the web-app's lib dir as opposed to in the system classpath, is to handle versioning correctly when multiple copies of the same lib are used. With containers generally getting better (such as TomCat's multi-classloader tree, or the variant in WebLogic), together with proper use of the thread context classloader by all libs, it becomes possible to successfully deploy a bunch of varied apps into the same server, even with different versions of the same lib...
[EMAIL PROTECTED] wrote: >Unlike Struts, it is reasonable to put the Tapestry JAR >file o the system classpath. Tapestry is careful in how >it loads classes ... it makes sure to always use the >ClassLoader that loads the Tapestry servlet. > >-- >[EMAIL PROTECTED] > >http://tapestry.sf.net > >>Very interesting, this would appear to be a nasty WebLogic bug of some >>sort. If I run the tutorial.war file with the tapestry jar inside of it >>having the name >> com.primix.tapestry-2.0.1.jar >>or >> tapestry-2.0.1.jar >>I get the NoClassDefFoundError error mentioned below. If I rename the jar to >> tapestry.jar >>the tutorial works fine. >> >>Looking into the temp directory where WebLogic expands the contents of >>the lib dir in the war, in the error cases the tapestry jar is not >>there, while it is there in the non-error cases. >> >>Looks like WebLogic 6.1 has a problem when a jar file inside the >>WEB-INF/lib dir contains periods in the filename. Experimenting with >>other names (the same issue exists for the contrib jar that is used by >>the tutorial) the period is what seems to cause things to fail.. >> >>Nasty... >> >> >>Colin Sampaleanu wrote: >> >>>Hi All, >>> >>>I've tried to deploy the tutorial app into WebLogic, and come upon one >>>small issue and one large one. >>> >>>I have modified tutorial.war to include required jars (such as the >>>tapestry jar and others) in the WEB-INF/lib directory. On startup, >>>WebLogic complains that the 'load-on-startup' element must have a >>>numeric value. In the web.xml file for the tutorial, 'load-on-startup' >>>is just set to an empty value via entries like >>> <load-on-startup/> >>> >>>Now looking at the servlet spec, the is completely correct, the >>>servlet engine is supposed to treat this the same a value of 0, and >>>load the servlet on startup of the web-app. So this is a WebLogic bug >>>for sure. Given that WebLogic has such a large share of the market >>>(something like 33% last time I looked), it is probably worth working >>>around this, which can be done by changing the entries to >>> <load-on-startup>0</load-on-startup> >>> >>>The major problem which I am getting however is NoClassDefFoundError >>>errors, of the form: >>> >>>java.lang.NoClassDefFoundError: com/primix/tapestry/ApplicationServlet >>> at java.lang.ClassLoader.defineClass0(Native Method) >>> at java.lang.ClassLoader.defineClass(ClassLoader.java:486) >>> at >>>java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111) >>> at >>> >>weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader >>.java:339) >> >>> at >>> >>weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java >>:156) >> >>> at >>> >>weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoa >>der.java:65) >> >>> at java.lang.ClassLoader.loadClass(ClassLoader.java:297) >>> at java.lang.ClassLoader.loadClass(ClassLoader.java:253) >>> at >>> >>weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoa >>der.java:43) >> >>> at >>> >>weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:58 >>3) >> >>> at >>> >>weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletConte >>xt.java:2221) >> >>> at >>> >>weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServletCont >>ext.java:2178) >> >>> at >>> >>weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServletCont >>ext.java:2163) >> >>> at >>>weblogic.servlet.internal.HttpServer.preloadServlets(HttpServer.java:475) >>> at >>>weblogic.servlet.internal.WebService.preloadServlets(WebService.java:450) >>> at weblogic.t3.srvr.ServletInitRunner.run(ServletInitRunner.java:49) >>> at java.lang.Thread.run(Thread.java:484) >>>####<26-Apr-02 9:48:26 EDT AM> <Error> <HTTP> <colins> <myserver> >>><Thread-2> <system> <> <101124> >>><[WebAppServletContext(3047940,tutorial,/tutorial)] Error loading >>>servlet: "hello"> >>> >>>Now the ApplicationServlet class is definitely there, in fact I have >>>used the same .war file in Resin with some success (problems mentioned >>>in another email). Has anybody seen this happening under WebLogic. >>>This is a completely standard setup, similar to how Struts is >>>configured, or any number of other web-apps. This is probably a >>>WebLogic issue, but on the other hand I've never seen anything like >>>this happen under WL, so I am thinking it has somehting to do with >>>this confuguration... I am quite willing and able to trace deeper >>>into this, but unfortunatley due to a deadline and a bus. trip next >>>week can only allocate some hours to it in about a week and a half >>>from now... >>> >>>Thanks for any info, >>> >>>Colin >>> >>>_______________________________________________ >>>Tapestry-developer mailing list >>>[EMAIL PROTECTED] >>>https://lists.sourceforge.net/lists/listinfo/tapestry-developer >>> >> >>_______________________________________________ >>Tapestry-developer mailing list >>[EMAIL PROTECTED] >>https://lists.sourceforge.net/lists/listinfo/tapestry-developer >> _______________________________________________ Tapestry-developer mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/tapestry-developer
