[Bug 57152] New: Tomcat Manager cannot start with security manager enabled
https://issues.apache.org/bugzilla/show_bug.cgi?id=57152 Bug ID: 57152 Summary: Tomcat Manager cannot start with security manager enabled Product: Tomcat 7 Version: 7.0.50 Hardware: PC Status: NEW Severity: normal Priority: P2 Component: Manager Assignee: dev@tomcat.apache.org Reporter: joegreen+bugzi...@joegreen.pl The bug is easy to reproduce: just download Tomcat and start it using ./catalina.bat -security or ./catalina.sh -security The Tomcat Manager web application throws an exception. I checked a few versions and it looks like it works correctly (Tomcat Manager starts with security manager enabled) in versions below 7.0.50 and it doesn't work in 7.0.50 and later. I checked in on windows as well as in linux. We use RMI in our webapp and we need the security manager to run it. Giving all permissions in security policy doesn't seem to help: grant { permission java.security.AllPermission; }; Stack trace: INFO: Deploying web application directory C:\Users\joegreen\Desktop\apache-tomcat-7.0.50\webapps\host-manager paź 27, 2014 4:34:57 PM org.apache.catalina.startup.HostConfig deployDirectory SEVERE: The web application with context path [/host-manager] was not deployed because it contained a deployment descriptor [C:\Users\joegreen\Desktop\apache-tomcat-7.0.50\webapps\host-manager\META-INF\context.xml] which may include configuration necessary for the secure deployment of the application but processing of deployment descriptors is prevented by the deployXML setting of this host. An appropriate descriptor should be created at [C:\Users\joegreen\Desktop\apache-tomcat-7.0.50\conf\Catalina\localhost\host-manager.xml] to deploy this application. paź 27, 2014 4:34:57 PM org.apache.catalina.core.ContainerBase addChildInternal SEVERE: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [/host-manager] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901) at org.apache.catalina.core.ContainerBase.access$000(ContainerBase.java:133) at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:156) at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:145) at java.security.AccessController.doPrivileged(Native Method) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:634) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1230) at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1876) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:724) Caused by: org.apache.catalina.LifecycleException: Failed to process either the global, per-host or context-specific context.xml file therefore the [/host-manager] Context cannot be started. at org.apache.catalina.startup.FailedContext.startInternal(FailedContext.java:158) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ... 14 more paź 27, 2014 4:34:57 PM org.apache.catalina.startup.HostConfig deployDirectory SEVERE: Error deploying web application directory C:\Users\joegreen\Desktop\apache-tomcat-7.0.50\webapps\host-manager java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [/host-manager] at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:904) at org.apache.catalina.core.ContainerBase.access$000(ContainerBase.java:133) at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:156) at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:145) at java.security.AccessController.doPrivileged(Native Method) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:634) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1230) at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1876) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at
[Bug 57153] New: StandardJarScanner only searches WEB_INF/lib classes rather than full classpath
https://issues.apache.org/bugzilla/show_bug.cgi?id=57153 Bug ID: 57153 Summary: StandardJarScanner only searches WEB_INF/lib classes rather than full classpath Product: Tomcat 8 Version: 8.0.14 Hardware: PC OS: Windows NT Status: NEW Severity: normal Priority: P2 Component: Util Assignee: dev@tomcat.apache.org Reporter: vmware.teste...@gmail.com The StandardJarScanner.scan(JarScanType, ServletContext, JarScannerCallback) method only searches the WEB-INF/lib and WEB-INF/classes directories for JARs in the webapp's classloader. It then moves on to the parent classloaders and searches their full classpaths. However, there are situations where the classpath may be configured directly on the classloader rather than by putting JARs into the WEB-INF/lib and in these situations we actually want to search the full classpath of the webapp classloader. For example: * When pre-compiling JSPs (using JSPC) within a source tree. JARs containing TLDs can be specified as dependencies and passed in the classpath to JSPC before the WAR (and hence the WEB-INF/lib directory) has been assembled. * When running a webapp from within Eclipse using the Tomcat plug-in (which uses its own classloader, DevLoader, to set-up the classpath rather than relying on JARs being in the WEB-INF/lib directory). Suggest that if WEB-INF/lib is empty then StandardJarScanner should scan JARs configured in the webapp's class loader first, before moving up the class loader hierarchy. Not sure about Tomcat 7, but this is certainly a change from Tomcat 6 where this was all possible. -- 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 57152] Tomcat Manager cannot start with security manager enabled
https://issues.apache.org/bugzilla/show_bug.cgi?id=57152 Christopher Schultz ch...@christopherschultz.net changed: What|Removed |Added Status|NEW |NEEDINFO OS||All --- Comment #1 from Christopher Schultz ch...@christopherschultz.net --- Between 7.0.50 and 7.0.56 (current as of this writing), there have been 4 bugs identified and fixed that involve the manager webapp and security manager. Please re-test with 7.0.56. -- 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 57152] Tomcat Manager cannot start with security manager enabled
https://issues.apache.org/bugzilla/show_bug.cgi?id=57152 Paweł Chorążyk joegreen+bugzi...@joegreen.pl changed: What|Removed |Added Status|NEEDINFO|NEW --- Comment #2 from Paweł Chorążyk joegreen+bugzi...@joegreen.pl --- I haven't stated it clearly but of course I have also verified this behavior in the newest 7.0.56 version of Tomcat. I have just done it again to be sure and yes, it also happens in 7.0.56. -- 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 57152] Tomcat Manager cannot start with security manager enabled
https://issues.apache.org/bugzilla/show_bug.cgi?id=57152 Konstantin Kolinko knst.koli...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |INVALID --- Comment #3 from Konstantin Kolinko knst.koli...@gmail.com --- This behaviour is by design. As mentioned in changelog (7.0.48): If a Host is configured with a value of codefalse/code for codedeployXML/code, a web application has an embedded descriptor at codeMETA-INF/context.xml/code and no explicit descriptor has been defined for this application, do not allow the application to start. The reason for this is that the embedded descriptor may contain configuration necessary for secure operation such as a codeRemoteAddrValve/code. -- 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: r1634690 - in /tomcat/trunk: test/org/apache/catalina/startup/LoggingBaseTest.java webapps/docs/changelog.xml
Author: kkolinko Date: Mon Oct 27 21:18:21 2014 New Revision: 1634690 URL: http://svn.apache.org/r1634690 Log: Log the current test name when the test starts. It makes reading the log files easier. Modified: tomcat/trunk/test/org/apache/catalina/startup/LoggingBaseTest.java tomcat/trunk/webapps/docs/changelog.xml Modified: tomcat/trunk/test/org/apache/catalina/startup/LoggingBaseTest.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/startup/LoggingBaseTest.java?rev=1634690r1=1634689r2=1634690view=diff == --- tomcat/trunk/test/org/apache/catalina/startup/LoggingBaseTest.java (original) +++ tomcat/trunk/test/org/apache/catalina/startup/LoggingBaseTest.java Mon Oct 27 21:18:21 2014 @@ -24,6 +24,8 @@ import static org.junit.Assert.fail; import org.junit.After; import org.junit.Before; +import org.junit.Rule; +import org.junit.rules.TestName; import org.apache.juli.logging.Log; import org.apache.juli.logging.LogFactory; @@ -50,6 +52,12 @@ public abstract class LoggingBaseTest { private ListFile deleteOnTearDown = new ArrayList(); /** + * Provides name of the currently executing test method. + */ +@Rule +public final TestName testName = new TestName(); + +/** * Helper method that returns the directory where Tomcat build resides. It * is used to access resources that are part of default Tomcat deployment. * E.g. the examples webapp. @@ -104,6 +112,7 @@ public abstract class LoggingBaseTest { // Get log instance after logging has been configured log = LogFactory.getLog(getClass()); +log.info(Starting test case [ + testName.getMethodName() + ]); } @After Modified: tomcat/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1634690r1=1634689r2=1634690view=diff == --- tomcat/trunk/webapps/docs/changelog.xml (original) +++ tomcat/trunk/webapps/docs/changelog.xml Mon Oct 27 21:18:21 2014 @@ -352,6 +352,10 @@ pick up the Windows binaries that are based on OpenSSL 1.0.1j and APR 1.5.1. (markt) /update + scode +In Tomcat tests: log name of the current test method at start time. +(kkolinko) + /scode /changelog /subsection /section - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 56397] Establish parallel Maven-based build process
https://issues.apache.org/bugzilla/show_bug.cgi?id=56397 Pierre Viret pierre.vi...@gmail.com changed: What|Removed |Added Attachment #32120|0 |1 is obsolete|| --- Comment #44 from Pierre Viret pierre.vi...@gmail.com --- Created attachment 32151 -- https://issues.apache.org/bugzilla/attachment.cgi?id=32151action=edit patch for tomcat-maven-layout created with svn diff -x -u This patch adds filtering for some webapp files so that the version number gets displayed in the standard tomcat web app. -- 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: r1634697 - in /tomcat/trunk/java/org/apache/jasper/compiler: JspReader.java Parser.java ParserController.java
Author: markt Date: Mon Oct 27 22:03:22 2014 New Revision: 1634697 URL: http://svn.apache.org/r1634697 Log: JspReader.singleFile is always true. The nested files it supports have not been used since Tomcat 3.x. Modified: tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java tomcat/trunk/java/org/apache/jasper/compiler/Parser.java tomcat/trunk/java/org/apache/jasper/compiler/ParserController.java Modified: tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java?rev=1634697r1=1634696r2=1634697view=diff == --- tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java Mon Oct 27 22:03:22 2014 @@ -84,13 +84,6 @@ class JspReader { private final ErrorDispatcher err; /** - * Set to true when using the JspReader on a single file where we read up - * to the end and reset to the beginning many times. - * (as in ParserController.figureOutJspDocument()). - */ -private boolean singleFile; - -/** * Constructor. * * @param ctxt The compilation context @@ -127,7 +120,6 @@ class JspReader { this.err = err; sourceFiles = new Vector(); currFileId = 0; -singleFile = false; pushFile(fname, reader); } @@ -157,10 +149,6 @@ class JspReader { */ boolean hasMoreInput() throws JasperException { if (current.cursor = current.stream.length) { -if (singleFile) return false; -while (popFile()) { -if (current.cursor current.stream.length) return true; -} return false; } return true; @@ -195,7 +183,7 @@ class JspReader { int ch = current.stream[current.cursor]; -mark.init(current, singleFile); +mark.init(current, true); current.cursor++; @@ -415,7 +403,7 @@ class JspReader { while((result = indexOf(firstChar, ret)) != null) { if (result.booleanValue()) { if (restart != null) { - restart.init(current, singleFile); + restart.init(current, true); } else { restart = mark(); } @@ -423,7 +411,7 @@ class JspReader { if (peekChar() == limit.charAt(i)) { nextChar(); } else { - current.init(restart, singleFile); + current.init(restart, true); continue skip; } } @@ -597,10 +585,6 @@ class JspReader { return StringBuilder.toString(); } -void setSingleFile(boolean val) { -singleFile = val; -} - /** * Parse utils - Is current character a token delimiter ? Modified: tomcat/trunk/java/org/apache/jasper/compiler/Parser.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/Parser.java?rev=1634697r1=1634696r2=1634697view=diff == --- tomcat/trunk/java/org/apache/jasper/compiler/Parser.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/Parser.java Mon Oct 27 22:03:22 2014 @@ -1786,7 +1786,6 @@ class Parser implements TagConstants { } private void parseFileDirectives(Node parent) throws JasperException { -reader.setSingleFile(true); reader.skipUntil(); while (reader.hasMoreInput()) { start = reader.mark(); Modified: tomcat/trunk/java/org/apache/jasper/compiler/ParserController.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/ParserController.java?rev=1634697r1=1634696r2=1634697view=diff == --- tomcat/trunk/java/org/apache/jasper/compiler/ParserController.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/ParserController.java Mon Oct 27 22:03:22 2014 @@ -356,7 +356,6 @@ class ParserController implements TagCon } catch (FileNotFoundException ex) { throw new JasperException(ex); } -jspReader.setSingleFile(true); Mark startMark = jspReader.mark(); if (!isExternal) { jspReader.reset(startMark); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 57154] New: Failure of TestWsWebSocketContainer when there is directory %TEMP%\test
https://issues.apache.org/bugzilla/show_bug.cgi?id=57154 Bug ID: 57154 Summary: Failure of TestWsWebSocketContainer when there is directory %TEMP%\test Product: Tomcat 8 Version: trunk Hardware: PC Status: NEW Severity: normal Priority: P2 Component: WebSocket Assignee: dev@tomcat.apache.org Reporter: knst.koli...@gmail.com Steps to reproduce: 1) Go to the temporary directory (System.getProperty(java.io.tmpdir)) and create a directory named test there. 2) Run org.apache.tomcat.websocket.TestWsWebSocketContainer test case with Nio or Nio 2. The following two test cases are failing: testWriteTimeoutServerEndpoint testWriteTimeoutServerContainer Cause of the failure is the following ERROR: The HTTP response from the server [HTTP/1.1 302 Found ] did not permit the HTTP upgrade to WebSocket javax.websocket.DeploymentException: The HTTP response from the server [HTTP/1.1 302 Found ] did not permit the HTTP upgrade to WebSocket This test case configures DefaultServlet and tries to access ws://localhost: + getPort() + /test. I suspect that Mapper responds with 302 redirect before the upgrade request reaches web application. This issue is observed at Buildbot. See TEST-org.apache.tomcat.websocket.TestWsWebSocketContainer.NIO.txt TEST-org.apache.tomcat.websocket.TestWsWebSocketContainer.NIO2.txt files in http://ci.apache.org/projects/tomcat/tomcat8/logs/1634329/ -- 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 57154] Failure of TestWsWebSocketContainer when directory %TEMP%\test exists
https://issues.apache.org/bugzilla/show_bug.cgi?id=57154 Konstantin Kolinko knst.koli...@gmail.com changed: What|Removed |Added Summary|Failure of |Failure of |TestWsWebSocketContainer|TestWsWebSocketContainer |when there is directory |when directory %TEMP%\test |%TEMP%\test |exists OS||All -- 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: r1634703 - in /tomcat/trunk/java/org/apache/jasper/compiler: JspReader.java Parser.java ParserController.java
Author: markt Date: Mon Oct 27 22:09:05 2014 New Revision: 1634703 URL: http://svn.apache.org/r1634703 Log: Simplify JspRead.hasMoreInput() and remove the JasperException which is no longer thrown by that method. Remove a number of other JasperExceptions which are now no longer thrown Modified: tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java tomcat/trunk/java/org/apache/jasper/compiler/Parser.java tomcat/trunk/java/org/apache/jasper/compiler/ParserController.java Modified: tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java?rev=1634703r1=1634702r2=1634703view=diff == --- tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java Mon Oct 27 22:09:05 2014 @@ -145,16 +145,12 @@ class JspReader { * Checks if the current file has more input. * * @return True if more reading is possible - * @throws JasperException if an error occurs */ -boolean hasMoreInput() throws JasperException { -if (current.cursor = current.stream.length) { -return false; -} -return true; +boolean hasMoreInput() { +return current.cursor current.stream.length; } -int nextChar() throws JasperException { +int nextChar() { if (!hasMoreInput()) return -1; @@ -176,7 +172,7 @@ class JspReader { * However, this approach is only safe if the mark is only used within the * JspReader. */ -private int nextChar(Mark mark) throws JasperException { +private int nextChar(Mark mark) { if (!hasMoreInput()) { return -1; } @@ -200,7 +196,7 @@ class JspReader { * Search the given character, If it was found, then mark the current cursor * and the cursor point to next character. */ -private Boolean indexOf(char c, Mark mark) throws JasperException { +private Boolean indexOf(char c, Mark mark) { if (!hasMoreInput()) return null; @@ -239,7 +235,7 @@ class JspReader { current.col--; } -String getText(Mark start, Mark stop) throws JasperException { +String getText(Mark start, Mark stop) { Mark oldstart = mark(); reset(start); CharArrayWriter caw = new CharArrayWriter(); @@ -251,7 +247,7 @@ class JspReader { return caw.toString(); } -int peekChar() throws JasperException { +int peekChar() { if (!hasMoreInput()) return -1; return current.stream[current.cursor]; @@ -288,7 +284,7 @@ class JspReader { * in stream is positioned after the search string, strong * false/strong otherwise, position in stream unchanged. */ -boolean matches(String string) throws JasperException { +boolean matches(String string) { int len = string.length(); int cursor = current.cursor; int streamSize = current.stream.length; @@ -325,7 +321,7 @@ class JspReader { return true; } -boolean matchesETag(String tagName) throws JasperException { +boolean matchesETag(String tagName) { Mark mark = mark(); if (!matches(/ + tagName)) @@ -338,9 +334,7 @@ class JspReader { return false; } -boolean matchesETagWithoutLessThan(String tagName) -throws JasperException -{ +boolean matchesETagWithoutLessThan(String tagName) { Mark mark = mark(); if (!matches(/ + tagName)) @@ -360,9 +354,7 @@ class JspReader { * characters are skipped. If not, false is returned and the * position is restored to where we were before. */ -boolean matchesOptionalSpacesFollowedBy( String s ) -throws JasperException -{ +boolean matchesOptionalSpacesFollowedBy(String s) { Mark mark = mark(); skipSpaces(); @@ -374,7 +366,7 @@ class JspReader { return result; } -int skipSpaces() throws JasperException { +int skipSpaces() { int i = 0; while (hasMoreInput() isSpace()) { i++; @@ -392,7 +384,7 @@ class JspReader { * before the search string) if found, strongnull/strong * otherwise. */ -Mark skipUntil(String limit) throws JasperException { +Mark skipUntil(String limit) { Mark ret = mark(); int limlen = limit.length(); char firstChar = limit.charAt(0); @@ -431,7 +423,7 @@ class JspReader { * before the search string) if found, strongnull/strong * otherwise. */ -Mark skipUntilIgnoreEsc(String limit) throws JasperException { +Mark skipUntilIgnoreEsc(String limit) { Mark ret = mark(); int limlen = limit.length(); int ch; @@ -462,7
[Bug 57154] Failure of TestWsWebSocketContainer when directory %TEMP%\test exists
https://issues.apache.org/bugzilla/show_bug.cgi?id=57154 --- Comment #1 from Konstantin Kolinko knst.koli...@gmail.com --- Created attachment 32152 -- https://issues.apache.org/bugzilla/attachment.cgi?id=32152action=edit TEST-org.apache.tomcat.websocket.TestWsWebSocketContainer.NIO.txt Log file from testing Tomcat 8 trunk (@r1634690) -- 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 57154] Failure of TestWsWebSocketContainer when directory %TEMP%\test exists
https://issues.apache.org/bugzilla/show_bug.cgi?id=57154 --- Comment #2 from Konstantin Kolinko knst.koli...@gmail.com --- Created attachment 32153 -- https://issues.apache.org/bugzilla/attachment.cgi?id=32153action=edit TEST-org.apache.tomcat.websocket.TestWsWebSocketContainer.NIO2.txt Log file from testing Tomcat 8 trunk (@r1634690) -- 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: r1634706 - /tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java
Author: markt Date: Mon Oct 27 22:21:41 2014 New Revision: 1634706 URL: http://svn.apache.org/r1634706 Log: pushFile() is only called from one location so move the code to that location (since it will allow further simplication). Modified: tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java Modified: tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java?rev=1634706r1=1634705r2=1634706view=diff == --- tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java Mon Oct 27 22:21:41 2014 @@ -120,9 +120,57 @@ class JspReader { this.err = err; sourceFiles = new Vector(); currFileId = 0; -pushFile(fname, reader); + +int fileid = registerSourceFile(fname); + +if (fileid == -1) { +// http://issues.apache.org/bugzilla/show_bug.cgi?id=37407 +try { +reader.close(); +} catch (Exception any) { +if(log.isDebugEnabled()) { +log.debug(Exception closing reader: , any); +} +} + +err.jspError(jsp.error.file.already.registered, fname); +} + +currFileId = fileid; + +try { +CharArrayWriter caw = new CharArrayWriter(); +char buf[] = new char[1024]; +for (int i = 0 ; (i = reader.read(buf)) != -1 ;) +caw.write(buf, 0, i); +caw.close(); +if (current == null) { +current = new Mark(this, caw.toCharArray(), fileid, + getFile(fileid), master); +} else { +current.pushStream(caw.toCharArray(), fileid, getFile(fileid), + fname); +} +} catch (Throwable ex) { +ExceptionUtils.handleThrowable(ex); +log.error(Exception parsing file , ex); +// Pop state being constructed: +popFile(); +err.jspError(jsp.error.file.cannot.read, fname); +} finally { +if (reader != null) { +try { +reader.close(); +} catch (Exception any) { +if(log.isDebugEnabled()) { +log.debug(Exception closing reader: , any); +} +} +} +} } + /** * @return JSP compilation context with which this JspReader is * associated @@ -647,65 +695,6 @@ class JspReader { } /** - * Push a file (and its associated Stream) on the file stack. THe - * current position in the current file is remembered. - */ -private void pushFile(String file, - InputStreamReader reader) throws JasperException { - -// Register the file -String longName = file; - -int fileid = registerSourceFile(longName); - -if (fileid == -1) { -// http://issues.apache.org/bugzilla/show_bug.cgi?id=37407 -try { -reader.close(); -} catch (Exception any) { -if(log.isDebugEnabled()) { -log.debug(Exception closing reader: , any); -} -} - -err.jspError(jsp.error.file.already.registered, file); -} - -currFileId = fileid; - -try { -CharArrayWriter caw = new CharArrayWriter(); -char buf[] = new char[1024]; -for (int i = 0 ; (i = reader.read(buf)) != -1 ;) -caw.write(buf, 0, i); -caw.close(); -if (current == null) { -current = new Mark(this, caw.toCharArray(), fileid, - getFile(fileid), master); -} else { -current.pushStream(caw.toCharArray(), fileid, getFile(fileid), - longName); -} -} catch (Throwable ex) { -ExceptionUtils.handleThrowable(ex); -log.error(Exception parsing file , ex); -// Pop state being constructed: -popFile(); -err.jspError(jsp.error.file.cannot.read, file); -} finally { -if (reader != null) { -try { -reader.close(); -} catch (Exception any) { -if(log.isDebugEnabled()) { -log.debug(Exception closing reader: , any); -} -} -} -} -} - -/** * Pop a file from the file stack. The field current is restored * to the value to point to the previous files, if any, and is set * to null otherwise.
svn commit: r1634707 - /tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java
Author: markt Date: Mon Oct 27 22:21:45 2014 New Revision: 1634707 URL: http://svn.apache.org/r1634707 Log: current can only be null since this is a constructor and it hasn't been previously set so simplify the code and remove a branch that will never execute Modified: tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java Modified: tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java?rev=1634707r1=1634706r2=1634707view=diff == --- tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java Mon Oct 27 22:21:45 2014 @@ -144,13 +144,7 @@ class JspReader { for (int i = 0 ; (i = reader.read(buf)) != -1 ;) caw.write(buf, 0, i); caw.close(); -if (current == null) { -current = new Mark(this, caw.toCharArray(), fileid, - getFile(fileid), master); -} else { -current.pushStream(caw.toCharArray(), fileid, getFile(fileid), - fname); -} +current = new Mark(this, caw.toCharArray(), fileid, getFile(fileid), master); } catch (Throwable ex) { ExceptionUtils.handleThrowable(ex); log.error(Exception parsing file , ex); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1634708 - /tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java
Author: markt Date: Mon Oct 27 22:21:50 2014 New Revision: 1634708 URL: http://svn.apache.org/r1634708 Log: If the exception is thrown then current will be null. If current is null then popFile() is a NO-OP. Since popFile() is only called in the exception handler it can be removed. Also remove the other code the IDE marks as unused once popFile() is removed. Modified: tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java Modified: tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java?rev=1634708r1=1634707r2=1634708view=diff == --- tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java Mon Oct 27 22:21:50 2014 @@ -69,11 +69,6 @@ class JspReader { private final ListString sourceFiles; /** - * The current file ID (-1 indicates an error or no file). - */ -private int currFileId; - -/** * The compilation context. */ private final JspCompilationContext context; @@ -119,7 +114,6 @@ class JspReader { this.context = ctxt; this.err = err; sourceFiles = new Vector(); -currFileId = 0; int fileid = registerSourceFile(fname); @@ -136,8 +130,6 @@ class JspReader { err.jspError(jsp.error.file.already.registered, fname); } -currFileId = fileid; - try { CharArrayWriter caw = new CharArrayWriter(); char buf[] = new char[1024]; @@ -148,8 +140,6 @@ class JspReader { } catch (Throwable ex) { ExceptionUtils.handleThrowable(ex); log.error(Exception parsing file , ex); -// Pop state being constructed: -popFile(); err.jspError(jsp.error.file.cannot.read, fname); } finally { if (reader != null) { @@ -669,57 +659,5 @@ class JspReader { sourceFiles.add(file); return sourceFiles.size() - 1; } - - -/** - * Unregister the source file. - * This method is used to implement file inclusion. Each included file - * gets a unique identifier (which is the index in the array of source - * files). - * - * @return The index of the now registered file. - */ -private int unregisterSourceFile(final String file) { -if (!sourceFiles.contains(file)) { -return -1; -} - -sourceFiles.remove(file); -return sourceFiles.size() - 1; -} - -/** - * Pop a file from the file stack. The field current is restored - * to the value to point to the previous files, if any, and is set - * to null otherwise. - * @return true is there is a previous file on the stack. - * false otherwise. - */ -private boolean popFile() throws JasperException { - -// Is stack created ? (will happen if the Jsp file we're looking at is -// missing. -if (current == null || currFileId 0) { -return false; -} - -// Restore parser state: -String fName = getFile(currFileId); -currFileId = unregisterSourceFile(fName); -if (currFileId -1) { -err.jspError(jsp.error.file.not.registered, fName); -} - -Mark previous = current.popStream(); -if (previous != null) { -master = current.baseDir; -current = previous; -return true; -} -// Note that although the current file is undefined here, current -// is not set to null just for convenience, for it maybe used to -// set the current (undefined) position. -return false; -} } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1634711 - /tomcat/trunk/java/org/apache/jasper/compiler/Mark.java
Author: markt Date: Mon Oct 27 22:29:55 2014 New Revision: 1634711 URL: http://svn.apache.org/r1634711 Log: pushStream() and popStream() are no longer used - remove them Modified: tomcat/trunk/java/org/apache/jasper/compiler/Mark.java Modified: tomcat/trunk/java/org/apache/jasper/compiler/Mark.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/Mark.java?rev=1634711r1=1634710r2=1634711view=diff == --- tomcat/trunk/java/org/apache/jasper/compiler/Mark.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/Mark.java Mon Oct 27 22:29:55 2014 @@ -136,59 +136,6 @@ final class Mark { } -/** - * Sets this mark's state to a new stream. - * It will store the current stream in it's includeStack. - * - * @param inStream new stream for mark - * @param inFileId id of new file from which stream comes from - * @param inBaseDir directory of file - */ -public void pushStream(char[] inStream, int inFileId, String name, - String inBaseDir) { - -// store current state in stack -includeStack.push(new IncludeState(cursor, line, col, fileId, - fileName, baseDir, - stream) ); - -// set new variables -cursor = 0; -line = 1; -col = 1; -fileId = inFileId; -fileName = name; -baseDir = inBaseDir; -stream = inStream; -} - - -/** - * Restores this mark's state to a previously stored stream. - * @return The previous Mark instance when the stream was pushed, or null - * if there is no previous stream - */ -public Mark popStream() { -// make sure we have something to pop -if ( includeStack.size() = 0 ) { -return null; -} - -// get previous state in stack -IncludeState state = includeStack.pop( ); - -// set new variables -cursor = state.cursor; -line = state.line; -col = state.col; -fileId = state.fileId; -fileName = state.fileName; -baseDir = state.baseDir; -stream = state.stream; -return this; -} - - public int getLineNumber() { return line; } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1634712 - /tomcat/trunk/java/org/apache/jasper/compiler/Mark.java
Author: markt Date: Mon Oct 27 22:29:59 2014 New Revision: 1634712 URL: http://svn.apache.org/r1634712 Log: Remove code no longer used after [push|pop]Stream() were removed Modified: tomcat/trunk/java/org/apache/jasper/compiler/Mark.java Modified: tomcat/trunk/java/org/apache/jasper/compiler/Mark.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/Mark.java?rev=1634712r1=1634711r2=1634712view=diff == --- tomcat/trunk/java/org/apache/jasper/compiler/Mark.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/Mark.java Mon Oct 27 22:29:59 2014 @@ -18,7 +18,6 @@ package org.apache.jasper.compiler; import java.net.MalformedURLException; import java.net.URL; -import java.util.Stack; import org.apache.jasper.JspCompilationContext; @@ -44,12 +43,6 @@ final class Mark { // name of the current file private String fileName; -/* - * stack of stream and stream state of streams that have included - * current stream - */ -private StackIncludeState includeStack = null; - // reader that owns this mark (so we can look up fileid's) private JspReader reader; @@ -76,7 +69,6 @@ final class Mark { this.fileId = fileId; this.fileName = name; this.baseDir = inBaseDir; -this.includeStack = new Stack(); } @@ -105,15 +97,6 @@ final class Mark { this.fileId = other.fileId; this.fileName = other.fileName; this.baseDir = other.baseDir; - -if (includeStack == null) { -includeStack = new Stack(); -} else { -includeStack.clear(); -} -for (int i = 0; i other.includeStack.size(); i++ ) { -includeStack.addElement(other.includeStack.elementAt(i)); -} } } @@ -132,7 +115,6 @@ final class Mark { this.fileId = -1; this.fileName = filename; this.baseDir = le-basedir; -this.includeStack = null; } @@ -187,31 +169,4 @@ final class Mark { result = prime * result + ((reader == null) ? 0 : reader.hashCode()); return result; } - - -/** - * Keep track of parser before parsing an included file. - * This class keeps track of the parser before we switch to parsing an - * included file. In other words, it's the parser's continuation to be - * reinstalled after the included file parsing is done. - */ -private static class IncludeState { -private final int cursor, line, col; -private final int fileId; -private final String fileName; -private final String baseDir; -private final char[] stream; - -IncludeState(int inCursor, int inLine, int inCol, int inFileId, - String name, String inBaseDir, - char[] inStream) { -cursor = inCursor; -line = inLine; -col = inCol; -fileId = inFileId; -fileName = name; -baseDir = inBaseDir; -stream = inStream; -} -} } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1634714 - in /tomcat/trunk/java/org/apache/jasper/compiler: JspReader.java Mark.java
Author: markt Date: Mon Oct 27 22:35:35 2014 New Revision: 1634714 URL: http://svn.apache.org/r1634714 Log: Mark.fileId and Mark.reader are no longer read anywhere. Remove them. Modified: tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java tomcat/trunk/java/org/apache/jasper/compiler/Mark.java Modified: tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java?rev=1634714r1=1634713r2=1634714view=diff == --- tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java Mon Oct 27 22:35:35 2014 @@ -136,7 +136,7 @@ class JspReader { for (int i = 0 ; (i = reader.read(buf)) != -1 ;) caw.write(buf, 0, i); caw.close(); -current = new Mark(this, caw.toCharArray(), fileid, getFile(fileid), master); +current = new Mark(this, caw.toCharArray(), getFile(fileid), master); } catch (Throwable ex) { ExceptionUtils.handleThrowable(ex); log.error(Exception parsing file , ex); Modified: tomcat/trunk/java/org/apache/jasper/compiler/Mark.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/Mark.java?rev=1634714r1=1634713r2=1634714view=diff == --- tomcat/trunk/java/org/apache/jasper/compiler/Mark.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/Mark.java Mon Oct 27 22:35:35 2014 @@ -37,15 +37,9 @@ final class Mark { // current stream char[] stream = null; -// fileid of current stream -private int fileId; - // name of the current file private String fileName; -// reader that owns this mark (so we can look up fileid's) -private JspReader reader; - private JspCompilationContext ctxt; /** @@ -53,20 +47,17 @@ final class Mark { * * @param reader JspReader this mark belongs to * @param inStream current stream for this mark - * @param fileId id of requested jsp file * @param name JSP file name * @param inBaseDir base directory of requested jsp file */ -Mark(JspReader reader, char[] inStream, int fileId, String name, +Mark(JspReader reader, char[] inStream, String name, String inBaseDir) { -this.reader = reader; this.ctxt = reader.getJspCompilationContext(); this.stream = inStream; this.cursor = 0; this.line = 1; this.col = 1; -this.fileId = fileId; this.fileName = name; this.baseDir = inBaseDir; } @@ -91,10 +82,8 @@ final class Mark { this.col = other.col; if (!singleFile) { -this.reader = other.reader; this.ctxt = other.ctxt; this.stream = other.stream; -this.fileId = other.fileId; this.fileName = other.fileName; this.baseDir = other.baseDir; } @@ -106,13 +95,11 @@ final class Mark { */ Mark(JspCompilationContext ctxt, String filename, int line, int col) { -this.reader = null; this.ctxt = ctxt; this.stream = null; this.cursor = 0; this.line = line; this.col = col; -this.fileId = -1; this.fileName = filename; this.baseDir = le-basedir; } @@ -150,9 +137,7 @@ final class Mark { public boolean equals(Object other) { if (other instanceof Mark) { Mark m = (Mark) other; -return this.reader == m.reader this.fileId == m.fileId - this.cursor == m.cursor this.line == m.line - this.col == m.col; +return this.cursor == m.cursor this.line == m.line this.col == m.col; } return false; } @@ -164,9 +149,7 @@ final class Mark { int result = 1; result = prime * result + col; result = prime * result + cursor; -result = prime * result + fileId; result = prime * result + line; -result = prime * result + ((reader == null) ? 0 : reader.hashCode()); return result; } } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1634720 - /tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java
Author: markt Date: Mon Oct 27 22:51:00 2014 New Revision: 1634720 URL: http://svn.apache.org/r1634720 Log: registerSourceFile() is only called from the constructor. At this point sourceFiles is always empty so registerSourceFile() will always return zero. That makes the code that follows registerSourceFile() always a NO-OP which in turn removes the need for calling registerSourceFile() in the first place. Remove soucrceFiles as unused. Modified: tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java Modified: tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java?rev=1634720r1=1634719r2=1634720view=diff == --- tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java Mon Oct 27 22:51:00 2014 @@ -20,8 +20,6 @@ import java.io.CharArrayWriter; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStreamReader; -import java.util.List; -import java.util.Vector; import org.apache.jasper.JasperException; import org.apache.jasper.JspCompilationContext; @@ -64,11 +62,6 @@ class JspReader { private String master; /** - * The list of source files. - */ -private final ListString sourceFiles; - -/** * The compilation context. */ private final JspCompilationContext context; @@ -113,22 +106,6 @@ class JspReader { this.context = ctxt; this.err = err; -sourceFiles = new Vector(); - -int fileid = registerSourceFile(fname); - -if (fileid == -1) { -// http://issues.apache.org/bugzilla/show_bug.cgi?id=37407 -try { -reader.close(); -} catch (Exception any) { -if(log.isDebugEnabled()) { -log.debug(Exception closing reader: , any); -} -} - -err.jspError(jsp.error.file.already.registered, fname); -} try { CharArrayWriter caw = new CharArrayWriter(); @@ -632,22 +609,5 @@ class JspReader { return true; } } - -/** - * Register a new source file. - * This method is used to implement file inclusion. Each included file - * gets a unique identifier (which is the index in the array of source - * files). - * - * @return The index of the now registered file. - */ -private int registerSourceFile(final String file) { -if (sourceFiles.contains(file)) { -return -1; -} - -sourceFiles.add(file); -return sourceFiles.size() - 1; -} } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1634719 - /tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java
Author: markt Date: Mon Oct 27 22:50:55 2014 New Revision: 1634719 URL: http://svn.apache.org/r1634719 Log: Use the file name directly and remove the now unused getFile() method Modified: tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java Modified: tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java?rev=1634719r1=1634718r2=1634719view=diff == --- tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java Mon Oct 27 22:50:55 2014 @@ -136,7 +136,7 @@ class JspReader { for (int i = 0 ; (i = reader.read(buf)) != -1 ;) caw.write(buf, 0, i); caw.close(); -current = new Mark(this, caw.toCharArray(), getFile(fileid), master); +current = new Mark(this, caw.toCharArray(), fname, master); } catch (Throwable ex) { ExceptionUtils.handleThrowable(ex); log.error(Exception parsing file , ex); @@ -164,16 +164,6 @@ class JspReader { } /** - * Returns the file at the given position in the list. - * - * @param fileid The file position in the list - * @return The file at that position, if found, null otherwise - */ -String getFile(final int fileid) { -return sourceFiles.get(fileid); -} - -/** * Checks if the current file has more input. * * @return True if more reading is possible - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1634724 - in /tomcat/trunk/java/org/apache/jasper/compiler: JspReader.java Mark.java
Author: markt Date: Mon Oct 27 22:56:25 2014 New Revision: 1634724 URL: http://svn.apache.org/r1634724 Log: Remove unused Mark.baseDir This in turn allowed JspReader.master to be removed which was already marked as suspect. Modified: tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java tomcat/trunk/java/org/apache/jasper/compiler/Mark.java Modified: tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java?rev=1634724r1=1634723r2=1634724view=diff == --- tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java Mon Oct 27 22:56:25 2014 @@ -57,11 +57,6 @@ class JspReader { private Mark current; /** - * What is this? - */ -private String master; - -/** * The compilation context. */ private final JspCompilationContext context; @@ -113,7 +108,7 @@ class JspReader { for (int i = 0 ; (i = reader.read(buf)) != -1 ;) caw.write(buf, 0, i); caw.close(); -current = new Mark(this, caw.toCharArray(), fname, master); +current = new Mark(this, caw.toCharArray(), fname); } catch (Throwable ex) { ExceptionUtils.handleThrowable(ex); log.error(Exception parsing file , ex); Modified: tomcat/trunk/java/org/apache/jasper/compiler/Mark.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/Mark.java?rev=1634724r1=1634723r2=1634724view=diff == --- tomcat/trunk/java/org/apache/jasper/compiler/Mark.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/Mark.java Mon Oct 27 22:56:25 2014 @@ -31,9 +31,6 @@ final class Mark { // position within current stream int cursor, line, col; -// directory of file for current stream -String baseDir; - // current stream char[] stream = null; @@ -48,18 +45,14 @@ final class Mark { * @param reader JspReader this mark belongs to * @param inStream current stream for this mark * @param name JSP file name - * @param inBaseDir base directory of requested jsp file */ -Mark(JspReader reader, char[] inStream, String name, - String inBaseDir) { - +Mark(JspReader reader, char[] inStream, String name) { this.ctxt = reader.getJspCompilationContext(); this.stream = inStream; this.cursor = 0; this.line = 1; this.col = 1; this.fileName = name; -this.baseDir = inBaseDir; } @@ -85,7 +78,6 @@ final class Mark { this.ctxt = other.ctxt; this.stream = other.stream; this.fileName = other.fileName; -this.baseDir = other.baseDir; } } @@ -94,14 +86,12 @@ final class Mark { * Constructor */ Mark(JspCompilationContext ctxt, String filename, int line, int col) { - this.ctxt = ctxt; this.stream = null; this.cursor = 0; this.line = line; this.col = col; this.fileName = filename; -this.baseDir = le-basedir; } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1634726 - /tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java
Author: markt Date: Mon Oct 27 23:00:24 2014 New Revision: 1634726 URL: http://svn.apache.org/r1634726 Log: Complete missing Javadoc Modified: tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java Modified: tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java?rev=1634726r1=1634725r2=1634726view=diff == --- tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java Mon Oct 27 23:00:24 2014 @@ -92,6 +92,13 @@ class JspReader { /** * Constructor: same as above constructor but with initialized reader * to the file given. + * + * @param ctxt The compilation context + * @param fname The file name + * @param reader A reader for the JSP source file + * @param err The error dispatcher + * + * @throws JasperException If an error occurs parsing the JSP file */ public JspReader(JspCompilationContext ctxt, String fname, - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1634729 - /tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java
Author: markt Date: Mon Oct 27 23:05:59 2014 New Revision: 1634729 URL: http://svn.apache.org/r1634729 Log: Add a peek method that allows the look ahead to be specified Modified: tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java Modified: tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java?rev=1634729r1=1634728r2=1634729view=diff == --- tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java Mon Oct 27 23:05:59 2014 @@ -248,10 +248,30 @@ class JspReader { return caw.toString(); } +/** + * Read ahead one character without moving the cursor. + * + * @return The next character or -1 if no further input is available + */ int peekChar() { -if (!hasMoreInput()) +return peekChar(0); +} + +/** + * Read ahead the given number of characters without moving the cursor. + * + * @param readAhead The number of characters to read ahead. NOTE: This is + * zero based. + * + * @return The requested character or -1 if the end of the input is reached + * first + */ +int peekChar(int readAhead) { +int target = current.cursor + readAhead; +if (target current.stream.length) { return -1; -return current.stream[current.cursor]; +} +return current.stream[target]; } Mark mark() { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1634732 - /tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java
Author: markt Date: Mon Oct 27 23:11:34 2014 New Revision: 1634732 URL: http://svn.apache.org/r1634732 Log: Whoops. Correct the logic. Modified: tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java Modified: tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java?rev=1634732r1=1634731r2=1634732view=diff == --- tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java Mon Oct 27 23:11:34 2014 @@ -269,9 +269,9 @@ class JspReader { int peekChar(int readAhead) { int target = current.cursor + readAhead; if (target current.stream.length) { -return -1; +return current.stream[target]; } -return current.stream[target]; +return -1; } Mark mark() { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1634735 - /tomcat/trunk/test/org/apache/tomcat/websocket/TestWsWebSocketContainer.java
Author: kkolinko Date: Mon Oct 27 23:14:20 2014 New Revision: 1634735 URL: http://svn.apache.org/r1634735 Log: Correct typo Modified: tomcat/trunk/test/org/apache/tomcat/websocket/TestWsWebSocketContainer.java Modified: tomcat/trunk/test/org/apache/tomcat/websocket/TestWsWebSocketContainer.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/websocket/TestWsWebSocketContainer.java?rev=1634735r1=1634734r2=1634735view=diff == --- tomcat/trunk/test/org/apache/tomcat/websocket/TestWsWebSocketContainer.java (original) +++ tomcat/trunk/test/org/apache/tomcat/websocket/TestWsWebSocketContainer.java Mon Oct 27 23:14:20 2014 @@ -389,7 +389,7 @@ public class TestWsWebSocketContainer ex } -private static volatile boolean timoutOnContainer = false; +private static volatile boolean timeoutOnContainer = false; private void doTestWriteTimeoutServer(boolean setTimeoutOnContainer) throws Exception { @@ -404,7 +404,7 @@ public class TestWsWebSocketContainer ex * because the API uses classes and the tests really need access * to the instances which simply isn't possible. */ -timoutOnContainer = setTimeoutOnContainer; +timeoutOnContainer = setTimeoutOnContainer; Tomcat tomcat = getTomcatInstance(); @@ -558,7 +558,7 @@ public class TestWsWebSocketContainer ex exception = null; running = true; -if (!TestWsWebSocketContainer.timoutOnContainer) { +if (!TestWsWebSocketContainer.timeoutOnContainer) { session.getAsyncRemote().setSendTimeout(TIMEOUT_MS); } @@ -607,7 +607,7 @@ public class TestWsWebSocketContainer ex try { sc.addEndpoint(ServerEndpointConfig.Builder.create( ConstantTxEndpoint.class, PATH).build()); -if (TestWsWebSocketContainer.timoutOnContainer) { +if (TestWsWebSocketContainer.timeoutOnContainer) { sc.setAsyncSendTimeout(TIMEOUT_MS); } } catch (DeploymentException e) { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1634740 - /tomcat/trunk/java/org/apache/jasper/compiler/Parser.java
Author: markt Date: Mon Oct 27 23:43:11 2014 New Revision: 1634740 URL: http://svn.apache.org/r1634740 Log: Follow-up to r1634161 Use JspReader.peek() rather than nextChar() and pushChar() as this allows cleaner end of stream handling. Modified: tomcat/trunk/java/org/apache/jasper/compiler/Parser.java Modified: tomcat/trunk/java/org/apache/jasper/compiler/Parser.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/Parser.java?rev=1634740r1=1634739r2=1634740view=diff == --- tomcat/trunk/java/org/apache/jasper/compiler/Parser.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/Parser.java Mon Oct 27 23:43:11 2014 @@ -1284,61 +1284,48 @@ class Parser implements TagConstants { CharArrayWriter ttext = new CharArrayWriter(); -while (reader.hasMoreInput()) { -int ch = reader.nextChar(); +int ch = reader.nextChar(); +while (ch != -1) { if (ch == '') { // Check for \% -if (reader.nextChar() == '\\') { -if (reader.nextChar() == '%') { -ttext.append(''); -ttext.append('%'); -} else { -reader.pushChar(); -reader.pushChar(); -if (ttext.size() == 0) { -ttext.append(''); -} else { -reader.pushChar(); -break; -} -} +if (reader.peekChar(0) == '\\' reader.peekChar(1) == '%') { +ttext.write(ch); +// Swallow the \ +reader.nextChar(); +ttext.write(reader.nextChar()); } else { -reader.pushChar(); if (ttext.size() == 0) { -ttext.append(''); +ttext.write(ch); } else { reader.pushChar(); break; } } } else if (ch == '\\' !pageInfo.isELIgnored()) { -int next = reader.nextChar(); +int next = reader.peekChar(0); if (next == '$' || next == '#') { -if (reader.nextChar() == '{') { -ttext.write(next); -ttext.append('{'); +if (reader.peekChar(1) == '{') { +ttext.write(reader.nextChar()); +ttext.write(reader.nextChar()); } else { -ttext.append('\\'); -ttext.write(next); -reader.pushChar(); +ttext.write(ch); +ttext.write(reader.nextChar()); } } else { -ttext.append('\\'); -reader.pushChar(); +ttext.write(ch); } } else if ((ch == '$' || ch == '#' !pageInfo.isDeferredSyntaxAllowedAsLiteral()) !pageInfo.isELIgnored()) { -if (reader.nextChar() == '{') { -reader.pushChar(); +if (reader.peekChar(0) == '{') { reader.pushChar(); break; } else { -reader.pushChar(); ttext.write(ch); } } else { ttext.write(ch); } +ch = reader.nextChar(); } @SuppressWarnings(unused) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1634741 - /tomcat/trunk/java/org/apache/jasper/compiler/Parser.java
Author: markt Date: Mon Oct 27 23:43:16 2014 New Revision: 1634741 URL: http://svn.apache.org/r1634741 Log: Follow up to 1634161 Update XML template text parser so \${ and \#{ are considered escapes but \$ and \# are not. Modified: tomcat/trunk/java/org/apache/jasper/compiler/Parser.java Modified: tomcat/trunk/java/org/apache/jasper/compiler/Parser.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/Parser.java?rev=1634741r1=1634740r2=1634741view=diff == --- tomcat/trunk/java/org/apache/jasper/compiler/Parser.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/Parser.java Mon Oct 27 23:43:16 2014 @@ -1345,8 +1345,8 @@ class Parser implements TagConstants { lt;jsp:textgt;); } CharArrayWriter ttext = new CharArrayWriter(); -while (reader.hasMoreInput()) { -int ch = reader.nextChar(); +int ch = reader.nextChar(); +while (ch != -1) { if (ch == '') { // Check for ![CDATA[ if (!reader.matches(![CDATA[)) { @@ -1360,38 +1360,37 @@ class Parser implements TagConstants { String text = reader.getText(start, stop); ttext.write(text, 0, text.length()); } else if (ch == '\\') { -if (!reader.hasMoreInput()) { -ttext.write('\\'); -break; -} -ch = reader.nextChar(); -if (ch != '$' ch != '#') { +int next = reader.peekChar(0); +if (next == '$' || next =='#') { +if (reader.peekChar(1) == '{') { +ttext.write(reader.nextChar()); +ttext.write(reader.nextChar()); +} +} else { ttext.write('\\'); } -ttext.write(ch); } else if (ch == '$' || ch == '#') { -if (!reader.hasMoreInput()) { +if (reader.peekChar(0) == '{') { +// Swallow the '{' +reader.nextChar(); + +// Create a template text node +@SuppressWarnings(unused) +Node unused = new Node.TemplateText( +ttext.toString(), start, parent); + +// Mark and parse the EL expression and create its node: +parseELExpression(parent, (char) ch); + +start = reader.mark(); +ttext.reset(); +} else { ttext.write(ch); -break; -} -if (reader.nextChar() != '{') { -ttext.write(ch); -reader.pushChar(); -continue; } -// Create a template text node -@SuppressWarnings(unused) -Node unused = new Node.TemplateText( -ttext.toString(), start, parent); - -// Mark and parse the EL expression and create its node: -parseELExpression(parent, (char) ch); - -start = reader.mark(); -ttext.reset(); } else { ttext.write(ch); } +ch = reader.nextChar(); } @SuppressWarnings(unused) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: svn commit: r1634161 - in /tomcat/trunk: java/org/apache/jasper/compiler/ELParser.java java/org/apache/jasper/compiler/Parser.java test/org/apache/jasper/compiler/TestParser.java
On 26/10/2014 08:50, Mark Thomas wrote: On 26/10/2014 08:20, Mark Thomas wrote: On 25/10/2014 01:59, Konstantin Kolinko wrote: 2014-10-25 3:27 GMT+04:00 ma...@apache.org: Author: markt Date: Fri Oct 24 23:27:40 2014 New Revision: 1634161 URL: http://svn.apache.org/r1634161 Log: Follow up to r1634089. Fix some additional test failures with the stricter escaping rules. Modified: tomcat/trunk/java/org/apache/jasper/compiler/ELParser.java tomcat/trunk/java/org/apache/jasper/compiler/Parser.java tomcat/trunk/test/org/apache/jasper/compiler/TestParser.java 1) The patches covered Parser.parseTemplateText(). There is also Parser.parseXMLTemplateText() ACK. Should be fixed in r1634741 2) In Parser: reader.nextChar() can return -1 in case when hasMoreInput() is false. In that case nothing has been read and reader.pushChar(); should not be called. There exists reader.peekChar() method in JspReader, but only for one character ahead. ACK. Should be fixed in 1634740 3) In Parser and JspReader that it uses: There is a caveat with reader.hasMoreInput(): it modifies the current reader state due to the call to popFile(). If popFile() call happened during the hasMoreInput() call, then reader.pushChar() won't be possible anymore. Is it possible to call pushChar() after end-of-data has been reached? - I do not see the answer from popFile() code. It needs testing. I looked where this pushing/popping comes from, but the only caller to JspReader.pushFile() is JspReader constructor. I think that actually there is always no more than a single file. In that case I'd be happy to ditch that code, the sooner the better. Anything to make Jasper less complex would be a good thing. I'll so some svn archaeology and see if I can find a time when that feature was used and what it was used for. Tomcat 3.x, for including files: http://svn.apache.org/repos/asf/tomcat/archive/jasper/tags/other/tomcat_33_m4/jasper34/generator/org/apache/jasper34/generator/JspParseEventListener.java and http://svn.apache.org/repos/asf/tomcat/archive/jasper/tags/other/tomcat_33_m4/jasper34/generator/org/apache/jasper34/parser/JspReader.java Elements of it were kept when Jasper was re-written as Jasper2 for Tomcat 4 (and then renamed back to Jasper). As fas as I can tell the pushFile code was never used in Jasper 2 but it has been there since Tomcat 4. Japser(2) handles included files differently. I think it is safe to remove pushFile and all the associated code. Done in multiple commits (so it is easier to follow the justification for why the code can be removed) r1634697-r1634724. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 57155] New: Allow Context without real docbase in embedded Tomcat
https://issues.apache.org/bugzilla/show_bug.cgi?id=57155 Bug ID: 57155 Summary: Allow Context without real docbase in embedded Tomcat Product: Tomcat 8 Version: trunk Hardware: PC Status: NEW Severity: enhancement Priority: P2 Component: Catalina Assignee: dev@tomcat.apache.org Reporter: knst.koli...@gmail.com Many of Tomcat test cases do the following to create and configure a web application programmatically: // Must have a real docBase - just use temp Context ctx = tomcat.addContext(, System.getProperty(java.io.tmpdir)); Essentially, it makes Tomcat to serve the contents of the system temporary directory. Sometimes it results in failures on CI servers (bug 57154 is an example). There shall be a way to configure a context that does not need a real docbase. I do not see a use case for that when running a standalone Tomcat, because docbase is needed to provide executable code for the application, but I do see the use case when running embedded Tomcat. In embedded Tomcat the entire web application can be configured programmatically. If I use a non-existent docbase, e.g. Context ctx = tomcat.addContext(, ROOT); Tomcat startup fails with [[[ Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].StandardContext[]] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154) ... 6 more Caused by: org.apache.catalina.LifecycleException: Failed to start component [org.apache.catalina.webresources.StandardRoot@123f26] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154) at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4875) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5004) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ... 6 more Caused by: java.lang.IllegalArgumentException: The main resource set specified [(censored)\test-tmp\webapps\ROOT] is not valid at org.apache.catalina.webresources.StandardRoot.startInternal(StandardRoot.java:665) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ... 9 more ]]] If I do the following: Context ctx = tomcat.addContext(, ); the test passes successfully. Apparently it is using docBase = appBase. An odd configuration, but it works if there are no other web applications in appBase. -- 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 57155] Allow Context without real docbase in embedded Tomcat
https://issues.apache.org/bugzilla/show_bug.cgi?id=57155 Konstantin Kolinko knst.koli...@gmail.com changed: What|Removed |Added OS||All --- Comment #1 from Konstantin Kolinko knst.koli...@gmail.com --- I think that docBase that is equal to the empty string can be treated specially as this No doc base case. I mean that in this case one needs to configure the resources (org.apache.catalina.webresources.StandardRoot) so that no files are served. I think that now there is a risk that somebody will be unwillingly serving files from appbase if one specifies Context docBase=/ . If anybody really wants to serve files from appbase directory, one can use . or an absolute path. Alternatively, add one-argument method to Tomcat class as public Context addContext(String contextPath) and perform all configuration of StandardRoot programmatically. In this case we can avoid special processing of docBase=. -- 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
[GUMP@vmgump]: Project tomcat-trunk-validate (in module tomcat-trunk) 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-trunk-validate has an issue affecting its community integration. This issue affects 1 projects, and has been outstanding for 8 runs. The current state of this project is 'Failed', with reason 'Build Failed'. For reference only, the following projects are affected by this: - tomcat-trunk-validate : Tomcat 8.x, a web server implementing the Java Servlet 3.1, ... Full details are available at: http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-validate/index.html That said, some information snippets are provided here. The following annotations (debug/informational/warning/error messages) were provided: -DEBUG- Dependency on checkstyle exists, no need to add for property checkstyle.jar. -INFO- Failed with reason build failed The following work was performed: http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-validate/gump_work/build_tomcat-trunk_tomcat-trunk-validate.html Work Name: build_tomcat-trunk_tomcat-trunk-validate (Type: Build) Work ended in a state of : Failed Elapsed: 23 secs Command Line: /usr/lib/jvm/java-7-oracle/bin/java -Djava.awt.headless=true -Dbuild.sysclasspath=only org.apache.tools.ant.Main -Dgump.merge=/srv/gump/public/gump/work/merge.xml -Dcheckstyle.jar=/srv/gump/public/workspace/checkstyle/target/checkstyle-6.1-SNAPSHOT.jar -Dexecute.validate=true validate [Working Directory: /srv/gump/public/workspace/tomcat-trunk] CLASSPATH: /usr/lib/jvm/java-7-oracle/lib/tools.jar:/srv/gump/public/workspace/ant/dist/lib/ant.jar:/srv/gump/public/workspace/ant/dist/lib/ant-launcher.jar:/srv/gump/public/workspace/ant/dist/lib/ant-jmf.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit4.jar:/srv/gump/public/workspace/ant/dist/lib/ant-swing.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-resolver.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-xalan2.jar:/srv/gump/public/workspace/xml-commons/java/build/resolver.jar:/srv/gump/packages/antlr/antlr-3.1.3.jar:/srv/gump/public/workspace/checkstyle/target/checkstyle-6.1-SNAPSHOT.jar:/srv/gump/public/workspace/apache-commons/beanutils/dist/commons-beanutils-20141028.jar:/srv/gump/public/workspace/apache-commons/cli/target/commons-cli-1.3-SNAPSHOT.jar:/srv/gump/public/workspace/commons-collections-3.x/target/commons-collections-3.3-SNAPSHOT.jar:/srv/gump/public/workspace/apache-commons/exec/target/comm ons-exec-1.3-SNAPSHOT.jar:/srv/gump/public/workspace/apache-commons/logging/target/commons-logging-20141028.jar:/srv/gump/public/workspace/apache-commons/logging/target/commons-logging-api-20141028.jar:/srv/gump/public/workspace/apache-commons/validator/dist/commons-validator-20141028.jar:/srv/gump/public/workspace/google-guava/guava/target/guava-19.0-SNAPSHOT.jar - Buildfile: /srv/gump/public/workspace/tomcat-trunk/build.xml build-prepare: [delete] Deleting directory /srv/gump/public/workspace/tomcat-trunk/output/build/temp [mkdir] Created dir: /srv/gump/public/workspace/tomcat-trunk/output/build/temp compile-prepare: download-validate: testexist: [echo] Testing for /srv/gump/public/workspace/checkstyle/target/checkstyle-6.1-SNAPSHOT.jar setproxy: downloadzip: validate: [mkdir] Created dir: /srv/gump/public/workspace/tomcat-trunk/output/res/checkstyle [checkstyle] Running Checkstyle 6.1-SNAPSHOT on 2916 files [checkstyle] /srv/gump/public/workspace/tomcat-trunk/webapps/docs/changelog.xml:357: Line matches the illegal pattern '\s+$'. BUILD FAILED /srv/gump/public/workspace/tomcat-trunk/build.xml:542: Got 1 errors and 0 warnings. Total time: 22 seconds - To subscribe to this information via syndicated feeds: - RSS: http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-validate/rss.xml - Atom: http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-validate/atom.xml == Gump Tracking Only === Produced by Apache Gump(TM) version 2.3. Gump Run 20141028000127, vmgump.apache.org:vmgump:20141028000127 Gump E-mail Identifier (unique within run) #6. -- Apache Gump http://gump.apache.org/ [Instance: vmgump] - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[GUMP@vmgump]: Project tomcat-trunk-test-nio2 (in module tomcat-trunk) 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-trunk-test-nio2 has an issue affecting its community integration. This issue affects 1 projects, and has been outstanding for 5 runs. The current state of this project is 'Failed', with reason 'Build Failed'. For reference only, the following projects are affected by this: - tomcat-trunk-test-nio2 : Tomcat 8.x, a web server implementing the Java Servlet 3.1, ... Full details are available at: http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-test-nio2/index.html That said, some information snippets are provided here. The following annotations (debug/informational/warning/error messages) were provided: -DEBUG- Dependency on commons-daemon exists, no need to add for property commons-daemon.native.src.tgz. -DEBUG- Dependency on commons-daemon exists, no need to add for property tomcat-native.tar.gz. -INFO- Failed with reason build failed -INFO- Project Reports in: /srv/gump/public/workspace/tomcat-trunk/output/logs-NIO2 -INFO- Project Reports in: /srv/gump/public/workspace/tomcat-trunk/output/test-tmp-NIO2/logs The following work was performed: http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-test-nio2/gump_work/build_tomcat-trunk_tomcat-trunk-test-nio2.html Work Name: build_tomcat-trunk_tomcat-trunk-test-nio2 (Type: Build) Work ended in a state of : Failed Elapsed: 25 mins 57 secs Command Line: /usr/lib/jvm/java-7-oracle/bin/java -Djava.awt.headless=true -Dbuild.sysclasspath=only org.apache.tools.ant.Main -Dgump.merge=/srv/gump/public/gump/work/merge.xml -Djunit.jar=/srv/gump/public/workspace/junit/target/junit-4.12-SNAPSHOT.jar -Dobjenesis.jar=/srv/gump/public/workspace/objenesis/main/target/objenesis-2.2-SNAPSHOT.jar -Dtest.reports=output/logs-NIO2 -Dtomcat-native.tar.gz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-20141028-native-src.tar.gz -Dexamples.sources.skip=true -Djdt.jar=/srv/gump/packages/eclipse/plugins/P20140317-1600/ecj-P20140317-1600.jar -Dcommons-daemon.jar=/srv/gump/public/workspace/apache-commons/daemon/dist/commons-daemon-20141028.jar -Dcommons-daemon.native.src.tgz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-20141028-native-src.tar.gz -Dtest.temp=output/test-tmp-NIO2 -Dtest.accesslog=true -Dexecute.test.nio=false -Dtest.openssl.path=/srv/gump/public/workspace/openssl/dest-20141028/bi n/openssl -Dexecute.test.apr=false -Dexecute.test.bio=false -Dexecute.test.nio2=true -Deasymock.jar=/srv/gump/public/workspace/easymock/easymock/target/easymock-3.3-SNAPSHOT.jar -Dhamcrest.jar=/srv/gump/public/workspace/hamcrest/build/hamcrest-all-20141028.jar -Dcglib.jar=/srv/gump/packages/cglib/cglib-nodep-2.2.jar test [Working Directory: /srv/gump/public/workspace/tomcat-trunk] CLASSPATH: /usr/lib/jvm/java-7-oracle/lib/tools.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/webapps/examples/WEB-INF/classes:/srv/gump/public/workspace/tomcat-trunk/output/testclasses:/srv/gump/public/workspace/ant/dist/lib/ant.jar:/srv/gump/public/workspace/ant/dist/lib/ant-launcher.jar:/srv/gump/public/workspace/ant/dist/lib/ant-jmf.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit4.jar:/srv/gump/public/workspace/ant/dist/lib/ant-swing.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-resolver.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-xalan2.jar:/srv/gump/public/workspace/xml-commons/java/build/resolver.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/bin/bootstrap.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/bin/tomcat-juli.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/annotations-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/servlet-api.ja r:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/jsp-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/el-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/websocket-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-ant.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-storeconfig.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/tomcat-coyote.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/jasper.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/jasper-el.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-tribes.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-ha.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/tomcat-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/tomcat-jni.jar:/srv/gump/public/workspace/tomcat-trunk/output/bu