Re: rc-10 bug?
2014/1/6 Peter : > Thanks to an email from Martin, I had a strong indicator of where to look. I > checked out tomcat 8 from trunk and validated in eclipse in debug mode. (FYI > build.properties.default is broken due to missing commons pool, had to tweak > a bit). > > From webappclassloader.java snippet below (line 737), jars[] does not only > contain jars, but also any other resources. i added a howTo.txt file in > WEB-INF/lib, which results in jars.length will NEVER equal > jarModificationTimes.size(). > > Fix is simple - just filter out the non-jar, non-executable elements b4 > comparing. Workaround is equally trivial - remove said elements from the the > lib folder. > Hope this helps, > Peter > > > > // Check if JARs have been added or removed > WebResource[] jars = resources.listResources("/WEB-INF/lib"); > > if (jars.length > jarModificationTimes.size()) { > log.info(sm.getString("webappClassLoader.jarsAdded", > resources.getContext().getName())); > return true; > } else if (jars.length < jarModificationTimes.size()){ > log.info(sm.getString("webappClassLoader.jarsRemoved", > resources.getContext().getName())); > return true; > } > > for (WebResource jar : jars) { > if (jar.getName().endsWith(".jar") && jar.isFile() && > jar.canRead()) { Thank you. I filed this into Bugzilla https://issues.apache.org/bugzilla/show_bug.cgi?id=55970 Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: rc-10 bug?
Thanks to an email from Martin, I had a strong indicator of where to look. I checked out tomcat 8 from trunk and validated in eclipse in debug mode. (FYI build.properties.default is broken due to missing commons pool, had to tweak a bit). From webappclassloader.java snippet below (line 737), jars[] does not only contain jars, but also any other resources. i added a howTo.txt file in WEB-INF/lib, which results in jars.length will NEVER equal jarModificationTimes.size(). Fix is simple - just filter out the non-jar, non-executable elements b4 comparing. Workaround is equally trivial - remove said elements from the the lib folder. Hope this helps, Peter // Check if JARs have been added or removed WebResource[] jars = resources.listResources("/WEB-INF/lib"); if (jars.length > jarModificationTimes.size()) { log.info(sm.getString("webappClassLoader.jarsAdded", resources.getContext().getName())); return true; } else if (jars.length < jarModificationTimes.size()){ log.info(sm.getString("webappClassLoader.jarsRemoved", resources.getContext().getName())); return true; } for (WebResource jar : jars) { if (jar.getName().endsWith(".jar") && jar.isFile() && jar.canRead()) {
Re: rc-10 bug?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Peter, On 1/3/14, 12:42 PM, Peter wrote: > > > I have 2 integration scenarios, both work in all earlier tomcat > 6,7,and 8.0.0.rc5: 1) tomcat.zip , unzipped, deployed > ServletSample.war 2) tomcat.zip, unzipped, Spring jars added to > tomcat lib, SpringSample.war deployed > > In RC-10, testcase 2 seems to work, but every few seconds the > contains restarts with the following message: Jan 03, 2014 12:39:16 > PM org.apache.catalina.loader.WebappClassLoader modified INFO: One > of more JARs have been added to the web application > [/Cssp3FactorySample] Jan 03, 2014 12:39:16 PM > org.apache.catalina.core.StandardContext reload INFO: Reloading > Context with name [/Cssp3FactorySample] has started > > Just a heads up - if there are any suggestions to enable specific > logging, I am willing to try. Thanks, When I update certain resources, I find that Tomcat repeatedly reloads my webapp several times before it settles down. I haven't had time yet to investigate why Tomcat does the multiple-reloads, but I can confirm that it does sometimes happen. It's been happening for me for a long time, through multiple versions of Tomcat 7 and also 6 I think. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJSyHmDAAoJEBzwKT+lPKRYq2IP/jj47oIbhJOKv89S3uApIev+ eQIir4BFNowZNecc/AbuoocWxqLCwBfC2j9rOxU/Ma4QZ5I0d2865pXUvgJaL30i fSTmIm5ptvHatnoS2wJxWcJpmCZYxmBqqBm5qwZv47FZJJTBhIkm+OU9YNURkEao 5RkzxpuqMuoFeE6JNvQFbYm3b/PX8JxWdv+hlQKpoIlUEz4SOjex8/UpdObfPPYL gekAvRPmqjRzNx5f+t6Ph55Lb3miGeUuR+5n7504exh1DMVS1r6IolXOOTptR1p+ +TpGVDv/nREzMH6qyQBWRkTbz2GdDSzrhuv34EcsV9Hv1DJesOhIh3urDysQjBpu p7SJtICDlzOCpapjvcFjl0PkzkSBKntP02IxUc0b2Mcdy+fIkPtHWtw1EW1q9hkt ueqxANBMpyiJ2HavLNECrNa0QNchp8nQv0tQ6P+fCv0C4VAJenVO1/RbdhjvawT0 DCIPaT/2WfKeCiFKIuiVvWHmVn4J7EAO7IOSD7xBqUhYd5ch60f9po/A78c9swPl ixT9oEodUFn+Sv3KWFDPmB6YmGNoVFtph/eFPJP+CXpuMNKKCbTur2atpbH+j8vs cIPY/TIO6wzBNBLHiuvNpOYXd/Wy74DHBI+s6Q9QJQM34iukUqbIeqUv9GAQKAzG OaRNBP/v92WZ+sAk+LJN =rfo0 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: rc-10 bug?
> From: Peter [mailto:peterdni...@yahoo.com] > Subject: rc-10 bug? > In RC-10, testcase 2 seems to work, but every few seconds the contains > restarts with the following message: > Jan 03, 2014 12:39:16 PM org.apache.catalina.loader.WebappClassLoader modified > INFO: One of more JARs have been added to the web application > [/Cssp3FactorySample] Any chance that the timestamps on the various JARs are in the future? (Judging from the timestamp on the log entry, the system clock appears to be ok.) - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
rc-10 bug?
I have 2 integration scenarios, both work in all earlier tomcat 6,7,and 8.0.0.rc5: 1) tomcat.zip , unzipped, deployed ServletSample.war 2) tomcat.zip, unzipped, Spring jars added to tomcat lib, SpringSample.war deployed In RC-10, testcase 2 seems to work, but every few seconds the contains restarts with the following message: Jan 03, 2014 12:39:16 PM org.apache.catalina.loader.WebappClassLoader modified INFO: One of more JARs have been added to the web application [/Cssp3FactorySample] Jan 03, 2014 12:39:16 PM org.apache.catalina.core.StandardContext reload INFO: Reloading Context with name [/Cssp3FactorySample] has started Just a heads up - if there are any suggestions to enable specific logging, I am willing to try. Thanks, - Peter