Re: Tomcat 7.0.33 progress report
On 16/11/2012 04:03, Konstantin Kolinko wrote: > 2012/11/16 Mark Thomas : >> The 7.0.33 release is taking longer then planned as my pre-tag checks >> are still ongoing. >> >> The short version is that the Servlet TCK is failing with httpd + >> mod_proxy_ajp but not with httpd + mod_jk and I am still investigating. >> >> The long version is that I have taken a quick look at the failures but >> it appears that the reported failures are symptoms rather than the root >> cause (i.e. another test is getting Tomcat's internals into a bad state >> and the next test that re-uses whichever object it is that is in a bad >> state fails). Tracking down the test(s) triggering the problem will take >> time. Since mod_jk is OK, it could be a mod_proxy_ajp bug we have hit >> with the changes to the Async error handling. I have just updated the >> httpd version I use for the TCKs and am re-running the TCK. >> >> I'll provide an updated progress report in a few days or just create the >> tag if I resolve the issue. > > 1. I wonder whether configuring the logging to include a thread name > will help here > ( org.apache.juli.OneLineFormatter and %I in AccessLogValve) Probably not. Past experience is that it is the Processor that needs to be tracked. There should be a way to get that logged. As it happens some further digging showed that the failure did not depend on any other tests (I missed this the first time around as I was testing in a different environment where the test passed). Now I have a repeatable failure in a relatively simple test case I can start looking at it more closely. That is today's task. > 2. There is a bug in implementation of the "Out" tagplugin that should > be fixed before tagging > https://issues.apache.org/bugzilla/show_bug.cgi?id=54144#c2 > > (I certainly do not have time for it for the next ~8 hours.) Ack. I'm not going to get to that before the TCK issue is addressed. If it still todo when I have finished the TCK stuff I'll take a look. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[GUMP@vmgump]: Project tomcat-taglibs-standard (in module tomcat-taglibs) failed
To whom it may engage... This is an automated request, but not an unsolicited one. For more information please visit http://gump.apache.org/nagged.html, and/or contact the folk at gene...@gump.apache.org. Project tomcat-taglibs-standard has an issue affecting its community integration. This issue affects 2 projects, and has been outstanding for 187 runs. The current state of this project is 'Failed', with reason 'Build Failed'. For reference only, the following projects are affected by this: - tomcat-taglibs-standard : Standard Taglib - tomcat-taglibs-standard-install : JSP Taglibs Full details are available at: http://vmgump.apache.org/gump/public/tomcat-taglibs/tomcat-taglibs-standard/index.html That said, some information snippets are provided here. The following annotations (debug/informational/warning/error messages) were provided: -INFO- Optional dependency httpunit failed with reason build failed -DEBUG- (Apache Gump generated) Apache Maven Settings in: /srv/gump/public/workspace/tomcat-taglibs/standard/gump_mvn_settings.xml -INFO- Failed with reason build failed -DEBUG- Maven POM in: /srv/gump/public/workspace/tomcat-taglibs/standard/pom.xml -INFO- Failed to extract fallback artifacts from Gump Repository The following work was performed: http://vmgump.apache.org/gump/public/tomcat-taglibs/tomcat-taglibs-standard/gump_work/build_tomcat-taglibs_tomcat-taglibs-standard.html Work Name: build_tomcat-taglibs_tomcat-taglibs-standard (Type: Build) Work ended in a state of : Failed Elapsed: 22 secs Command Line: /opt/maven2/bin/mvn --batch-mode -DskipTests=true --settings /srv/gump/public/workspace/tomcat-taglibs/standard/gump_mvn_settings.xml install [Working Directory: /srv/gump/public/workspace/tomcat-taglibs/standard] M2_HOME: /opt/maven2 - [INFO] [compiler:compile {execution: default-compile}] [INFO] Nothing to compile - all classes are up to date [debug] execute contextualize [INFO] [resources:testResources {execution: default-testResources}] [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory /srv/gump/public/workspace/tomcat-taglibs/standard/spec/src/test/resources [INFO] Copying 3 resources [INFO] [compiler:testCompile {execution: default-testCompile}] [INFO] No sources to compile [INFO] [surefire:test {execution: default-test}] [INFO] Tests are skipped. [INFO] [bundle:bundle {execution: default-bundle}] [INFO] [install:install {execution: default-install}] [INFO] Installing /srv/gump/public/workspace/tomcat-taglibs/standard/spec/target/taglibs-standard-spec-1.2-SNAPSHOT.jar to /srv/gump/public/workspace/mvnlocalrepo/shared/org/apache/taglibs/taglibs-standard-spec/1.2-SNAPSHOT/taglibs-standard-spec-1.2-SNAPSHOT.jar [INFO] [bundle:install {execution: default-install}] [INFO] Parsing file:/srv/gump/public/workspace/mvnlocalrepo/shared/repository.xml [INFO] Installing org/apache/taglibs/taglibs-standard-spec/1.2-SNAPSHOT/taglibs-standard-spec-1.2-SNAPSHOT.jar [INFO] Writing OBR metadata [INFO] [INFO] Building JSTL Implementation [INFO]task-segment: [install] [INFO] [INFO] [remote-resources:process {execution: default}] [INFO] snapshot org.apache.taglibs:taglibs-standard-spec:1.2-SNAPSHOT: checking for updates from apache.snapshots [debug] execute contextualize [INFO] [resources:resources {execution: default-resources}] [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 14 resources [INFO] Copying 3 resources [INFO] [compiler:compile {execution: default-compile}] [INFO] Compiling 96 source files to /srv/gump/public/workspace/tomcat-taglibs/standard/impl/target/classes [INFO] - [ERROR] COMPILATION ERROR : [INFO] - [ERROR] /srv/gump/public/workspace/tomcat-taglibs/standard/impl/src/main/java/org/apache/taglibs/standard/tag/common/sql/DataSourceWrapper.java:[38,7] error: DataSourceWrapper is not abstract and does not override abstract method getParentLogger() in CommonDataSource [INFO] 1 error [INFO] - [INFO] [ERROR] BUILD FAILURE [INFO] [INFO] Compilation failure /srv/gump/public/workspace/tomcat-taglibs/standard/impl/src/main/java/org/apache/taglibs/standard/tag/common/sql/DataSourceWrapper.java:[38,7] error: DataSourceWrapper is not abstract and does not override abstract method getParentLogger() in CommonDataSource [INFO] [INFO] For more information, run Maven with the -e switch [INFO] --
Re: Tomcat 7.0.33 progress report
On 16.11.2012 11:18, Mark Thomas wrote: On 16/11/2012 04:03, Konstantin Kolinko wrote: 2012/11/16 Mark Thomas : The 7.0.33 release is taking longer then planned as my pre-tag checks are still ongoing. The short version is that the Servlet TCK is failing with httpd + mod_proxy_ajp but not with httpd + mod_jk and I am still investigating. The long version is that I have taken a quick look at the failures but it appears that the reported failures are symptoms rather than the root cause (i.e. another test is getting Tomcat's internals into a bad state and the next test that re-uses whichever object it is that is in a bad state fails). Tracking down the test(s) triggering the problem will take time. Since mod_jk is OK, it could be a mod_proxy_ajp bug we have hit with the changes to the Async error handling. I have just updated the httpd version I use for the TCKs and am re-running the TCK. I'll provide an updated progress report in a few days or just create the tag if I resolve the issue. 1. I wonder whether configuring the logging to include a thread name will help here ( org.apache.juli.OneLineFormatter and %I in AccessLogValve) Probably not. Past experience is that it is the Processor that needs to be tracked. There should be a way to get that logged. As it happens some further digging showed that the failure did not depend on any other tests (I missed this the first time around as I was testing in a different environment where the test passed). Now I have a repeatable failure in a relatively simple test case I can start looking at it more closely. That is today's task. If I can help around ajp let me know and send some details. Regards, Rainer - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1410466 - /tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java
Author: markt Date: Fri Nov 16 16:56:47 2012 New Revision: 1410466 URL: http://svn.apache.org/viewvc?rev=1410466&view=rev Log: Make sure onComplete() works when running with a security manager Modified: tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java Modified: tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java?rev=1410466&r1=1410465&r2=1410466&view=diff == --- tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java Fri Nov 16 16:56:47 2012 @@ -97,11 +97,22 @@ public class AsyncContextImpl implements List listenersCopy = new ArrayList<>(); listenersCopy.addAll(listeners); -ClassLoader oldCL = Thread.currentThread().getContextClassLoader(); -ClassLoader newCL = request.getContext().getLoader().getClassLoader(); +ClassLoader oldCL; +if (Globals.IS_SECURITY_ENABLED) { +PrivilegedAction pa = new PrivilegedGetTccl(); +oldCL = AccessController.doPrivileged(pa); +} else { +oldCL = Thread.currentThread().getContextClassLoader(); +} +ClassLoader newCL = context.getLoader().getClassLoader(); try { -Thread.currentThread().setContextClassLoader(newCL); +if (Globals.IS_SECURITY_ENABLED) { +PrivilegedAction pa = new PrivilegedSetTccl(newCL); +AccessController.doPrivileged(pa); +} else { +Thread.currentThread().setContextClassLoader(newCL); +} for (AsyncListenerWrapper listener : listenersCopy) { try { listener.fireOnComplete(event); @@ -111,7 +122,12 @@ public class AsyncContextImpl implements } } } finally { -Thread.currentThread().setContextClassLoader(oldCL); +if (Globals.IS_SECURITY_ENABLED) { +PrivilegedAction pa = new PrivilegedSetTccl(oldCL); +AccessController.doPrivileged(pa); +} else { +Thread.currentThread().setContextClassLoader(oldCL); +} } } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1410468 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/core/AsyncContextImpl.java
Author: markt Date: Fri Nov 16 16:57:31 2012 New Revision: 1410468 URL: http://svn.apache.org/viewvc?rev=1410468&view=rev Log: Make sure onComplete() works when running with a security manager Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/AsyncContextImpl.java Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1410466 Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/AsyncContextImpl.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/AsyncContextImpl.java?rev=1410468&r1=1410467&r2=1410468&view=diff == --- tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/AsyncContextImpl.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/AsyncContextImpl.java Fri Nov 16 16:57:31 2012 @@ -98,11 +98,22 @@ public class AsyncContextImpl implements new ArrayList(); listenersCopy.addAll(listeners); -ClassLoader oldCL = Thread.currentThread().getContextClassLoader(); -ClassLoader newCL = request.getContext().getLoader().getClassLoader(); +ClassLoader oldCL; +if (Globals.IS_SECURITY_ENABLED) { +PrivilegedAction pa = new PrivilegedGetTccl(); +oldCL = AccessController.doPrivileged(pa); +} else { +oldCL = Thread.currentThread().getContextClassLoader(); +} +ClassLoader newCL = context.getLoader().getClassLoader(); try { -Thread.currentThread().setContextClassLoader(newCL); +if (Globals.IS_SECURITY_ENABLED) { +PrivilegedAction pa = new PrivilegedSetTccl(newCL); +AccessController.doPrivileged(pa); +} else { +Thread.currentThread().setContextClassLoader(newCL); +} for (AsyncListenerWrapper listener : listenersCopy) { try { listener.fireOnComplete(event); @@ -112,7 +123,12 @@ public class AsyncContextImpl implements } } } finally { -Thread.currentThread().setContextClassLoader(oldCL); +if (Globals.IS_SECURITY_ENABLED) { +PrivilegedAction pa = new PrivilegedSetTccl(oldCL); +AccessController.doPrivileged(pa); +} else { +Thread.currentThread().setContextClassLoader(oldCL); +} } } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: svn commit: r1408150 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/core/AsyncContextImpl.java webapps/docs/changelog.xml
On 13/11/2012 13:47, Mark Thomas wrote: > On 13/11/2012 01:08, Konstantin Kolinko wrote: >> 2012/11/12 : >>> Author: markt >>> Date: Sun Nov 11 23:32:43 2012 >>> New Revision: 1408150 >>> >>> URL: http://svn.apache.org/viewvc?rev=1408150&view=rev >>> Log: >>> both timeout and complete, as with all container callbacks must be invoked >>> with the right context >>> Backport of fhanik's r1356898 >> >> >> 1. The change only takes care of timeout(). >> What about complete (fireOnComplete()) that is mentioned in the commit >> message and in the changelog? > > This was a straight backport so my subsequent change would apply > cleanly. I agree it looks like firOnComplete() needs this too. > >> >> 2. I wonder what about running with SecurityManager. (Well, timeout() >> is probably called by Tomcat code, so there might be no concern, or >> maybe you will notice it while running TCK). > > It looks to me like neither can be called directly from user code. I was wrong on this. fireOnComplete() can get triggered directly by user code. I have just fixed this. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Tomcat 7.0.33 progress report
On 16/11/2012 16:51, Rainer Jung wrote: > On 16.11.2012 11:18, Mark Thomas wrote: >> On 16/11/2012 04:03, Konstantin Kolinko wrote: >>> 2012/11/16 Mark Thomas : The 7.0.33 release is taking longer then planned as my pre-tag checks are still ongoing. The short version is that the Servlet TCK is failing with httpd + mod_proxy_ajp but not with httpd + mod_jk and I am still investigating. The long version is that I have taken a quick look at the failures but it appears that the reported failures are symptoms rather than the root cause (i.e. another test is getting Tomcat's internals into a bad state and the next test that re-uses whichever object it is that is in a bad state fails). Tracking down the test(s) triggering the problem will take time. Since mod_jk is OK, it could be a mod_proxy_ajp bug we have hit with the changes to the Async error handling. I have just updated the httpd version I use for the TCKs and am re-running the TCK. I'll provide an updated progress report in a few days or just create the tag if I resolve the issue. >>> >>> 1. I wonder whether configuring the logging to include a thread name >>> will help here >>> ( org.apache.juli.OneLineFormatter and %I in AccessLogValve) >> >> Probably not. Past experience is that it is the Processor that needs to >> be tracked. There should be a way to get that logged. >> >> As it happens some further digging showed that the failure did not >> depend on any other tests (I missed this the first time around as I was >> testing in a different environment where the test passed). Now I have a >> repeatable failure in a relatively simple test case I can start looking >> at it more closely. That is today's task. > > If I can help around ajp let me know and send some details. Thanks. I am making progress now. A couple of configuration errors on my part (changed wrong connector in server.xml to NIO) sent me down a few blind alleys. It looks like Tomcat was doing the wrong thing (not sending an end message and mod_jk and mod_proxy_ajp were both getting upset but in different ways. I'll shout if I get stuck although the fastest way to find my errors seems to be writing an e-mail to the dev list as shortly after I send it, I spot the silly mistake that invalidates most of what I just wrote. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1410500 - /tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/AccessLogValve.java
Author: markt Date: Fri Nov 16 17:31:02 2012 New Revision: 1410500 URL: http://svn.apache.org/viewvc?rev=1410500&view=rev Log: Correct case for class Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/AccessLogValve.java Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/AccessLogValve.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/AccessLogValve.java?rev=1410500&r1=1410499&r2=1410500&view=diff == --- tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/AccessLogValve.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/AccessLogValve.java Fri Nov 16 17:31:02 2012 @@ -509,7 +509,7 @@ public class AccessLogValve extends Valv /** * The list of our format types. */ -private static enum formatType { +private static enum FormatType { CLF, SEC, MSEC, MSEC_FRAC, SDF } @@ -1433,7 +1433,7 @@ public class AccessLogValve extends Valv /* Whether to use begin of request or end of response as the timestamp */ private boolean usesBegin = false; /* The format type */ -private formatType type = formatType.CLF; +private FormatType type = FormatType.CLF; /* Whether we need to postprocess by adding milliseconds */ private boolean usesMsecs = false; @@ -1485,15 +1485,15 @@ public class AccessLogValve extends Valv format = format.substring(4); } if (format.length() == 0) { -type = formatType.CLF; +type = FormatType.CLF; } else if (format.equals(secFormat)) { -type = formatType.SEC; +type = FormatType.SEC; } else if (format.equals(msecFormat)) { -type = formatType.MSEC; +type = FormatType.MSEC; } else if (format.equals(msecFractionFormat)) { -type = formatType.MSEC_FRAC; +type = FormatType.MSEC_FRAC; } else { -type = formatType.SDF; +type = FormatType.SDF; format = tidyFormat(format); } } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 53523] rollbackOnReturn/commitOnReturn does not work without defaultAutoCommit=false
https://issues.apache.org/bugzilla/show_bug.cgi?id=53523 Pavel Cibulka changed: What|Removed |Added CC||pavelcibu...@gmail.com --- Comment #5 from Pavel Cibulka --- Hi, I think this issue should be reopened. rollbackOnReturn seems to me useless in current state. I don't agree with performance reason argument. If you don't want use this feature because of performance, you shouldn't enable it in the first place (instead of "tomcat will disable it for you, because we know better than you" approach). If you enable it, you should enable ConnectionState interceptor or pay performance cost. If you really want to protect people before themselves, you can enable this only, if ConnectionState interceptor is enabled. Pavel Cibulka -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1410545 - /tomcat/trunk/java/org/apache/catalina/security/SecurityClassLoad.java
Author: markt Date: Fri Nov 16 19:35:42 2012 New Revision: 1410545 URL: http://svn.apache.org/viewvc?rev=1410545&view=rev Log: Fix some security exceptions when running with a security manager Modified: tomcat/trunk/java/org/apache/catalina/security/SecurityClassLoad.java Modified: tomcat/trunk/java/org/apache/catalina/security/SecurityClassLoad.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/security/SecurityClassLoad.java?rev=1410545&r1=1410544&r2=1410545&view=diff == --- tomcat/trunk/java/org/apache/catalina/security/SecurityClassLoad.java (original) +++ tomcat/trunk/java/org/apache/catalina/security/SecurityClassLoad.java Fri Nov 16 19:35:42 2012 @@ -43,6 +43,7 @@ public final class SecurityClassLoad { loadRealmPackage(loader); loadSessionPackage(loader); loadUtilPackage(loader); +loadValvesPackage(loader); loadJavaxPackage(loader); loadConnectorPackage(loader); loadTomcatPackage(loader); @@ -54,6 +55,9 @@ public final class SecurityClassLoad { final String basePackage = "org.apache.catalina.core."; loader.loadClass (basePackage + + "AccessLogAdapter"); +loader.loadClass +(basePackage + "ApplicationContextFacade$1"); loader.loadClass (basePackage + @@ -72,6 +76,12 @@ public final class SecurityClassLoad { "AsyncContextImpl$1"); loader.loadClass (basePackage + +"AsyncContextImpl$PrivilegedGetTccl"); +loader.loadClass +(basePackage + +"AsyncContextImpl$PrivilegedSetTccl"); +loader.loadClass +(basePackage + "AsyncListenerWrapper"); loader.loadClass (basePackage + @@ -135,6 +145,13 @@ public final class SecurityClassLoad { } +private static final void loadValvesPackage(ClassLoader loader) +throws Exception { +final String basePackage = "org.apache.catalina.valves."; +loader.loadClass(basePackage + "AccessLogValve$3"); +} + + private static final void loadCoyotePackage(ClassLoader loader) throws Exception { final String basePackage = "org.apache.coyote."; - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1410548 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/security/SecurityClassLoad.java webapps/docs/changelog.xml
Author: markt Date: Fri Nov 16 19:38:51 2012 New Revision: 1410548 URL: http://svn.apache.org/viewvc?rev=1410548&view=rev Log: Fix TCK failures under a security manager. Fix additional security exceptions identified during testing Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/catalina/security/SecurityClassLoad.java tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1410545 Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/security/SecurityClassLoad.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/security/SecurityClassLoad.java?rev=1410548&r1=1410547&r2=1410548&view=diff == --- tomcat/tc7.0.x/trunk/java/org/apache/catalina/security/SecurityClassLoad.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/security/SecurityClassLoad.java Fri Nov 16 19:38:51 2012 @@ -43,6 +43,7 @@ public final class SecurityClassLoad { loadRealmPackage(loader); loadSessionPackage(loader); loadUtilPackage(loader); +loadValvesPackage(loader); loadJavaxPackage(loader); loadConnectorPackage(loader); loadTomcatPackage(loader); @@ -54,6 +55,9 @@ public final class SecurityClassLoad { final String basePackage = "org.apache.catalina.core."; loader.loadClass (basePackage + + "AccessLogAdapter"); +loader.loadClass +(basePackage + "ApplicationContextFacade$1"); loader.loadClass (basePackage + @@ -72,6 +76,12 @@ public final class SecurityClassLoad { "AsyncContextImpl$1"); loader.loadClass (basePackage + +"AsyncContextImpl$PrivilegedGetTccl"); +loader.loadClass +(basePackage + +"AsyncContextImpl$PrivilegedSetTccl"); +loader.loadClass +(basePackage + "AsyncListenerWrapper"); loader.loadClass (basePackage + @@ -136,6 +146,13 @@ public final class SecurityClassLoad { } +private static final void loadValvesPackage(ClassLoader loader) +throws Exception { +final String basePackage = "org.apache.catalina.valves."; +loader.loadClass(basePackage + "AccessLogValve$3"); +} + + private static final void loadCoyotePackage(ClassLoader loader) throws Exception { final String basePackage = "org.apache.coyote."; Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1410548&r1=1410547&r2=1410548&view=diff == --- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Fri Nov 16 19:38:51 2012 @@ -157,6 +157,11 @@ Revert occasional API change in BaseDirContext class that was done in 7.0.32. Methods should not be final. (kkolinko) + +Prevent failures in the AccessLogValve when running under a +SecurityManager and the first request received is an asynchronous one. +(markt) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Tomcat Wiki] Update of "LocalBadContent" by ChuckCaldarale
Dear Wiki user, You have subscribed to a wiki page or wiki category on "Tomcat Wiki" for change notification. The "LocalBadContent" page has been changed by ChuckCaldarale: http://wiki.apache.org/tomcat/LocalBadContent?action=diff&rev1=61&rev2=62 chatsky\.cn cheapestoemsoftware computerrental\.biz + directorysubmitlist\.com dragonseo dreamstation\.com dublinbet - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1410609 - in /tomcat/trunk: java/org/apache/jasper/tagplugins/jstl/core/Out.java test/org/apache/jasper/tagplugins/jstl/core/TestOut.java
Author: markt Date: Fri Nov 16 22:45:28 2012 New Revision: 1410609 URL: http://svn.apache.org/viewvc?rev=1410609&view=rev Log: Follow up on the fix for https://issues.apache.org/bugzilla/show_bug.cgi?id=54011 Need to use the body as the default if no default attribute is defined Modified: tomcat/trunk/java/org/apache/jasper/tagplugins/jstl/core/Out.java tomcat/trunk/test/org/apache/jasper/tagplugins/jstl/core/TestOut.java Modified: tomcat/trunk/java/org/apache/jasper/tagplugins/jstl/core/Out.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/tagplugins/jstl/core/Out.java?rev=1410609&r1=1410608&r2=1410609&view=diff == --- tomcat/trunk/java/org/apache/jasper/tagplugins/jstl/core/Out.java (original) +++ tomcat/trunk/java/org/apache/jasper/tagplugins/jstl/core/Out.java Fri Nov 16 22:45:28 2012 @@ -42,6 +42,7 @@ public final class Out implements TagPlu String strValName = ctxt.getTemporaryVariableName(); String strDefName = ctxt.getTemporaryVariableName(); String strEscapeXmlName = ctxt.getTemporaryVariableName(); +String strSkipBodyName = ctxt.getTemporaryVariableName(); //according to the tag file, the value attribute is mandatory. ctxt.generateJavaSource("String " + strValName + " = null;"); @@ -77,12 +78,16 @@ public final class Out implements TagPlu //main part. ctxt.generateJavaSource( +"boolean " + strSkipBodyName + " = " + "org.apache.jasper.tagplugins.jstl.core.Out.output(out, " + strValName + ", " + strDefName + ", " + strEscapeXmlName + ");"); +ctxt.generateJavaSource("if(!" + strSkipBodyName + ") {"); +ctxt.generateBody(); +ctxt.generateJavaSource("}"); } -public static void output(JspWriter out, String value, String defaultValue, +public static boolean output(JspWriter out, String value, String defaultValue, boolean escapeXml) throws IOException { String v = value != null ? value : defaultValue; if (v != null) { @@ -90,6 +95,9 @@ public final class Out implements TagPlu v = org.apache.jasper.tagplugins.jstl.Util.escapeXml(v); } out.write(v); +return true; +} else { +return false; } } } Modified: tomcat/trunk/test/org/apache/jasper/tagplugins/jstl/core/TestOut.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/jasper/tagplugins/jstl/core/TestOut.java?rev=1410609&r1=1410608&r2=1410609&view=diff == --- tomcat/trunk/test/org/apache/jasper/tagplugins/jstl/core/TestOut.java (original) +++ tomcat/trunk/test/org/apache/jasper/tagplugins/jstl/core/TestOut.java Fri Nov 16 22:45:28 2012 @@ -38,4 +38,20 @@ public class TestOut extends AbstractTes Assert.assertTrue(body.contains("OK - 1")); Assert.assertTrue(body.contains("OK - 2")); } + +@Test +public void testBug54144() throws Exception { +ByteChunk res = new ByteChunk(); + +int rc = getUrl("http://localhost:"; + getPort() + +"/test/bug54144.jsp", res, null); + +Assert.assertEquals(HttpServletResponse.SC_OK, rc); + +String body = res.toString(); +Assert.assertTrue(body.contains("OK - 1")); +Assert.assertTrue(body.contains("OK - 2")); +Assert.assertTrue(body.contains("OK - 3")); +Assert.assertFalse(body.contains("FAIL")); +} } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1410614 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/jasper/tagplugins/jstl/core/Out.java
Author: markt Date: Fri Nov 16 22:49:12 2012 New Revision: 1410614 URL: http://svn.apache.org/viewvc?rev=1410614&view=rev Log: Follow up on the fix for https://issues.apache.org/bugzilla/show_bug.cgi?id=54011 Need to use the body as the default if no default attribute is defined Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/jasper/tagplugins/jstl/core/Out.java Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1410609,1410611 Modified: tomcat/tc7.0.x/trunk/java/org/apache/jasper/tagplugins/jstl/core/Out.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/jasper/tagplugins/jstl/core/Out.java?rev=1410614&r1=1410613&r2=1410614&view=diff == --- tomcat/tc7.0.x/trunk/java/org/apache/jasper/tagplugins/jstl/core/Out.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/jasper/tagplugins/jstl/core/Out.java Fri Nov 16 22:49:12 2012 @@ -42,7 +42,8 @@ public final class Out implements TagPlu String strValName = ctxt.getTemporaryVariableName(); String strDefName = ctxt.getTemporaryVariableName(); String strEscapeXmlName = ctxt.getTemporaryVariableName(); - +String strSkipBodyName = ctxt.getTemporaryVariableName(); + //according to the tag file, the value attribute is mandatory. ctxt.generateJavaSource("String " + strValName + " = null;"); ctxt.generateJavaSource("if("); @@ -77,12 +78,16 @@ public final class Out implements TagPlu //main part. ctxt.generateJavaSource( +"boolean " + strSkipBodyName + " = " + "org.apache.jasper.tagplugins.jstl.core.Out.output(out, " + strValName + ", " + strDefName + ", " + strEscapeXmlName + ");"); +ctxt.generateJavaSource("if(!" + strSkipBodyName + ") {"); +ctxt.generateBody(); +ctxt.generateJavaSource("}"); } -public static void output(JspWriter out, String value, String defaultValue, +public static boolean output(JspWriter out, String value, String defaultValue, boolean escapeXml) throws IOException { String v = value != null ? value : defaultValue; if (v != null) { @@ -90,6 +95,9 @@ public final class Out implements TagPlu v = org.apache.jasper.tagplugins.jstl.Util.escapeXml(v); } out.write(v); +return true; +} else { +return false; } } } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 54011] Code generation error in jstl tagPlugin "Out" when has "escapeXml" on the tagPlugin
https://issues.apache.org/bugzilla/show_bug.cgi?id=54011 --- Comment #5 from Mark Thomas --- I've fixed using body as the default issue in trunk and 7.0.x. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 54144] Processing of java.io.Reader in "Out" tagplugin
https://issues.apache.org/bugzilla/show_bug.cgi?id=54144 --- Comment #3 from Mark Thomas --- I've fixed using body as the default issue in trunk and 7.0.x. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1410632 - in /tomcat/trunk: java/org/apache/jasper/tagplugins/jstl/Util.java java/org/apache/jasper/tagplugins/jstl/core/Out.java test/org/apache/jasper/tagplugins/jstl/core/TestOut.java
Author: markt Date: Fri Nov 16 23:56:12 2012 New Revision: 1410632 URL: http://svn.apache.org/viewvc?rev=1410632&view=rev Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54144 Add required behaviour for Reader objects when used with c:out Modified: tomcat/trunk/java/org/apache/jasper/tagplugins/jstl/Util.java tomcat/trunk/java/org/apache/jasper/tagplugins/jstl/core/Out.java tomcat/trunk/test/org/apache/jasper/tagplugins/jstl/core/TestOut.java tomcat/trunk/test/webapp-3.0/bug54144.jsp Modified: tomcat/trunk/java/org/apache/jasper/tagplugins/jstl/Util.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/tagplugins/jstl/Util.java?rev=1410632&r1=1410631&r2=1410632&view=diff == --- tomcat/trunk/java/org/apache/jasper/tagplugins/jstl/Util.java (original) +++ tomcat/trunk/java/org/apache/jasper/tagplugins/jstl/Util.java Fri Nov 16 23:56:12 2012 @@ -179,11 +179,18 @@ public class Util { * * taken from org.apache.taglibs.standard.tag.common.core.Util */ -@SuppressWarnings("null") // escapedBuffer cannot be null public static String escapeXml(String buffer) { +String result = escapeXml(buffer.toCharArray(), buffer.length()); +if (result == null) { +return buffer; +} else { +return result; +} +} + +@SuppressWarnings("null") // escapedBuffer cannot be null +public static String escapeXml(char[] arrayBuffer, int length) { int start = 0; -int length = buffer.length(); -char[] arrayBuffer = buffer.toCharArray(); StringBuilder escapedBuffer = null; for (int i = 0; i < length; i++) { @@ -207,7 +214,7 @@ public class Util { } // no xml escaping was necessary if (start == 0) { -return buffer; +return null; } // add rest of unescaped portion if (start < length) { Modified: tomcat/trunk/java/org/apache/jasper/tagplugins/jstl/core/Out.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/tagplugins/jstl/core/Out.java?rev=1410632&r1=1410631&r2=1410632&view=diff == --- tomcat/trunk/java/org/apache/jasper/tagplugins/jstl/core/Out.java (original) +++ tomcat/trunk/java/org/apache/jasper/tagplugins/jstl/core/Out.java Fri Nov 16 23:56:12 2012 @@ -19,11 +19,13 @@ package org.apache.jasper.tagplugins.jstl.core; import java.io.IOException; +import java.io.Reader; import javax.servlet.jsp.JspWriter; import org.apache.jasper.compiler.tagplugin.TagPlugin; import org.apache.jasper.compiler.tagplugin.TagPluginContext; +import org.apache.jasper.tagplugins.jstl.Util; public final class Out implements TagPlugin { @@ -39,24 +41,26 @@ public final class Out implements TagPlu //strValName, strEscapeXmlName & strDefName are two variables' name //standing for value, escapeXml and default attribute +String strObjectName = ctxt.getTemporaryVariableName(); String strValName = ctxt.getTemporaryVariableName(); String strDefName = ctxt.getTemporaryVariableName(); String strEscapeXmlName = ctxt.getTemporaryVariableName(); String strSkipBodyName = ctxt.getTemporaryVariableName(); //according to the tag file, the value attribute is mandatory. -ctxt.generateJavaSource("String " + strValName + " = null;"); -ctxt.generateJavaSource("if("); +ctxt.generateJavaSource("Object " + strObjectName + "="); ctxt.generateAttribute("value"); -ctxt.generateJavaSource("!=null){"); -ctxt.generateJavaSource("" + strValName + " = ("); -ctxt.generateAttribute("value"); -ctxt.generateJavaSource(").toString();"); +ctxt.generateJavaSource(";"); +ctxt.generateJavaSource("String " + strValName + "=null;"); +ctxt.generateJavaSource("if(!(" + strObjectName + +" instanceof Reader) && "+ strObjectName + " != null){"); +ctxt.generateJavaSource( +strValName + " = " + strObjectName + ".toString();"); ctxt.generateJavaSource("}"); //initiate the strDefName with null. //if the default has been specified, then assign the value to it; -ctxt.generateJavaSource("String " + strDefName + " = null;\n"); +ctxt.generateJavaSource("String " + strDefName + " = null;"); if(hasDefault){ ctxt.generateJavaSource("if("); ctxt.generateAttribute("default"); @@ -80,24 +84,45 @@ public final class Out implements TagPlu ctxt.generateJavaSource( "boolean " + strSkipBodyName + " = " + "org.apache.jasper.tagplugins.jstl.core.Out.output(out, " + -strValName + ", " + strDefName + ", " + strEscapeXmlName + -
svn commit: r1410636 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/jasper/tagplugins/jstl/Util.java java/org/apache/jasper/tagplugins/jstl/core/Out.java webapps/docs/changelog.xml
Author: markt Date: Sat Nov 17 00:01:35 2012 New Revision: 1410636 URL: http://svn.apache.org/viewvc?rev=1410636&view=rev Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54144 Add required behaviour for Reader objects when used with c:out Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/jasper/tagplugins/jstl/Util.java tomcat/tc7.0.x/trunk/java/org/apache/jasper/tagplugins/jstl/core/Out.java tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1410632 Modified: tomcat/tc7.0.x/trunk/java/org/apache/jasper/tagplugins/jstl/Util.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/jasper/tagplugins/jstl/Util.java?rev=1410636&r1=1410635&r2=1410636&view=diff == --- tomcat/tc7.0.x/trunk/java/org/apache/jasper/tagplugins/jstl/Util.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/jasper/tagplugins/jstl/Util.java Sat Nov 17 00:01:35 2012 @@ -178,11 +178,18 @@ public class Util { * * taken from org.apache.taglibs.standard.tag.common.core.Util */ -@SuppressWarnings("null") // escapedBuffer cannot be null public static String escapeXml(String buffer) { +String result = escapeXml(buffer.toCharArray(), buffer.length()); +if (result == null) { +return buffer; +} else { +return result; +} +} + +@SuppressWarnings("null") // escapedBuffer cannot be null +public static String escapeXml(char[] arrayBuffer, int length) { int start = 0; -int length = buffer.length(); -char[] arrayBuffer = buffer.toCharArray(); StringBuilder escapedBuffer = null; for (int i = 0; i < length; i++) { @@ -206,7 +213,7 @@ public class Util { } // no xml escaping was necessary if (start == 0) { -return buffer; +return null; } // add rest of unescaped portion if (start < length) { Modified: tomcat/tc7.0.x/trunk/java/org/apache/jasper/tagplugins/jstl/core/Out.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/jasper/tagplugins/jstl/core/Out.java?rev=1410636&r1=1410635&r2=1410636&view=diff == --- tomcat/tc7.0.x/trunk/java/org/apache/jasper/tagplugins/jstl/core/Out.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/jasper/tagplugins/jstl/core/Out.java Sat Nov 17 00:01:35 2012 @@ -19,11 +19,13 @@ package org.apache.jasper.tagplugins.jstl.core; import java.io.IOException; +import java.io.Reader; import javax.servlet.jsp.JspWriter; import org.apache.jasper.compiler.tagplugin.TagPlugin; import org.apache.jasper.compiler.tagplugin.TagPluginContext; +import org.apache.jasper.tagplugins.jstl.Util; public final class Out implements TagPlugin { @@ -39,24 +41,26 @@ public final class Out implements TagPlu //strValName, strEscapeXmlName & strDefName are two variables' name //standing for value, escapeXml and default attribute +String strObjectName = ctxt.getTemporaryVariableName(); String strValName = ctxt.getTemporaryVariableName(); String strDefName = ctxt.getTemporaryVariableName(); String strEscapeXmlName = ctxt.getTemporaryVariableName(); String strSkipBodyName = ctxt.getTemporaryVariableName(); //according to the tag file, the value attribute is mandatory. -ctxt.generateJavaSource("String " + strValName + " = null;"); -ctxt.generateJavaSource("if("); +ctxt.generateJavaSource("Object " + strObjectName + "="); ctxt.generateAttribute("value"); -ctxt.generateJavaSource("!=null){"); -ctxt.generateJavaSource("" + strValName + " = ("); -ctxt.generateAttribute("value"); -ctxt.generateJavaSource(").toString();"); +ctxt.generateJavaSource(";"); +ctxt.generateJavaSource("String " + strValName + "=null;"); +ctxt.generateJavaSource("if(!(" + strObjectName + +" instanceof Reader) && "+ strObjectName + " != null){"); +ctxt.generateJavaSource( +strValName + " = " + strObjectName + ".toString();"); ctxt.generateJavaSource("}"); //initiate the strDefName with null. //if the default has been specified, then assign the value to it; -ctxt.generateJavaSource("String " + strDefName + " = null;\n"); +ctxt.generateJavaSource("String " + strDefName + " = null;"); if(hasDefault){ ctxt.generateJavaSource("if("); ctxt.generateAttribute("default"); @@ -80,24 +84,45 @@ public final class Out implements TagPlu ctxt.generateJavaSou
[Bug 54144] Processing of java.io.Reader in "Out" tagplugin
https://issues.apache.org/bugzilla/show_bug.cgi?id=54144 Mark Thomas changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #4 from Mark Thomas --- Fixed in trunk and 7.0.x and will be included in 7.0.33 onwards. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
buildbot failure in ASF Buildbot on tomcat-trunk
The Buildbot has detected a new failure on builder tomcat-trunk while building ASF Buildbot. Full details are available at: http://ci.apache.org/builders/tomcat-trunk/builds/3572 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm_ubuntu Build Reason: scheduler Build Source Stamp: [branch tomcat/trunk] 1410632 Blamelist: markt BUILD FAILED: failed compile_1 sincerely, -The Buildbot