[Bug 56391] test error for NIO and org.apache.tomcat.util.net.TestSsl

2014-04-23 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56391

--- Comment #14 from Remy Maucherat r...@apache.org ---
From my debugging, in the test it is never NEED_TASK, so tasks() is not called
(and it doesn't feel wrong).

However, (tracing the write, since that is what the test is doing) the
handshake status goes into NEED_WRAP and NEED_UNWRAP, which means the write
should read. Not a good concept IMO ...

More specifically about NIO2, this could be very difficult if not impossible to
do it right (depending on what ends up being needed), since mixing read and
write operations after the initial handshake would corrupt data or run into
pending checks. This could be a candidate to end up as a known issue.

-- 
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-test-nio (in module tomcat-trunk) failed

2014-04-23 Thread Bill Barker
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-nio has an issue affecting its community integration.
This issue affects 1 projects.
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-nio :  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-nio/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.
 -DEBUG- Dependency on tomcat-trunk exists, no need to add for property 
tomcat-dbcp.home.
 -INFO- Failed with reason build failed
 -INFO- Project Reports in: 
/srv/gump/public/workspace/tomcat-trunk/output/build/logs



The following work was performed:
http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-test-nio/gump_work/build_tomcat-trunk_tomcat-trunk-test-nio.html
Work Name: build_tomcat-trunk_tomcat-trunk-test-nio (Type: Build)
Work ended in a state of : Failed
Elapsed: 24 mins 18 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
 
-Dtomcat-native.tar.gz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-20140423-native-src.tar.gz
 -Dexamples.sources.skip=true 
-Dtomcat-dbcp.home=/srv/gump/public/workspace/tomcat-trunk/tomcat-deps 
-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-20140423.jar
 
-Dcommons-daemon.native.src.tgz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-20140423-native-src.tar.gz
 -Dexecute.test.nio=true -Dtest.accesslog=true 
-Dcommons-pool.home=/srv/gump/public/workspace/apache-comm
 ons/pool -Dcommons-dbcp.home=/srv/gump/public/workspace/apache-commons/dbcp 
-Dexecute.test.nio2=false -Dexecute.test.bio=false 
-Deasymock.jar=/srv/gump/public/workspace/easymock/easymock/target/easymock-3.3-SNAPSHOT.jar
 
-Dhamcrest.jar=/srv/gump/public/workspace/hamcrest/hamcrest-java/build/hamcrest-core-20140423.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/servle
 
t-api.jar:/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

[Bug 55483] ELException when object has overloaded methods

2014-04-23 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55483

--- Comment #7 from Christopher Ng cng1...@gmail.com ---
The fix for this has broken one of our EL expressions, we have an overloaded
method like so:

doSomething(HttpServletRequest a, String b, String c, String d);
doSomething(String a, String b, String c, String d);

and we end up with an error 'Unable to find unambiguous method'.  It is
supposed to invoke the first method.

From what I can tell it's because when it is assessing the suitability of each
method, it doesn't find an exact match for either as the actual request object
is a sub-class of HttpServletRequest, and can also be coerced into a String.

Perhaps this can be fixed by prioritising sub-class matches over coercions?

-- 
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: r1589382 - in /tomcat/tc6.0.x/trunk: STATUS.txt res/tomcat.nsi webapps/docs/changelog.xml

2014-04-23 Thread kkolinko
Author: kkolinko
Date: Wed Apr 23 12:24:10 2014
New Revision: 1589382

URL: http://svn.apache.org/r1589382
Log:
Improvements to exe installer:
Specify explicit JVM memory sizes when installing the service (--JvmMs,
--JvmMx) with values of 128 Mb and 256 Mb respectively, the same as used
by service.bat file.
Explicitly specify --LogPath path when uninstalling Windows service. (The
default value for that option was %SystemRoot%\System32\LogFiles\Apache.)

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt
tomcat/tc6.0.x/trunk/res/tomcat.nsi
tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1589382r1=1589381r2=1589382view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Wed Apr 23 12:24:10 2014
@@ -28,16 +28,6 @@ None
 PATCHES PROPOSED TO BACKPORT:
   [ New proposals should be added at the end of the list ]
 
-* Improvements to exe installer:
-  Specify explicit JVM memory sizes when installing the service (--JvmMs,
-  --JvmMx) with values of 128 Mb and 256 Mb respectively, the same as used
-  by service.bat file.
-  Explicitly specify --LogPath path when uninstalling Windows service. (The
-  default value for that option was %SystemRoot%\System32\LogFiles\Apache.)
-  https://people.apache.org/~kkolinko/patches/2014-04-11_tc6_tomcat_nsi.patch
-  +1: kkolinko, markt, remm
-  -1:
-
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56334
   Correct double unescaping
   
http://people.apache.org/~markt/patches/2014-04-17-attribute-escaping-tc6-v2.patch

Modified: tomcat/tc6.0.x/trunk/res/tomcat.nsi
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/res/tomcat.nsi?rev=1589382r1=1589381r2=1589382view=diff
==
--- tomcat/tc6.0.x/trunk/res/tomcat.nsi (original)
+++ tomcat/tc6.0.x/trunk/res/tomcat.nsi Wed Apr 23 12:24:10 2014
@@ -318,7 +318,7 @@ Section -post
 FileWrite $ServiceInstallLog $\r$\n
 FileWrite $ServiceInstallLog '$INSTDIR\bin\$TomcatServiceFileName 
//US//$TomcatServiceName --JvmOptions 
-Dcatalina.home=$INSTDIR#-Dcatalina.base=$INSTDIR#-Djava.endorsed.dirs=$INSTDIR\endorsed#-Djava.io.tmpdir=$INSTDIR\temp#-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager#-Djava.util.logging.config.file=$INSTDIR\conf\logging.properties'
 FileWrite $ServiceInstallLog $\r$\n
-FileWrite $ServiceInstallLog '$INSTDIR\bin\$TomcatServiceFileName 
//US//$TomcatServiceName --StdOutput auto --StdError auto'
+FileWrite $ServiceInstallLog '$INSTDIR\bin\$TomcatServiceFileName 
//US//$TomcatServiceName --StdOutput auto --StdError auto --JvmMs 128 --JvmMx 
256'
 FileWrite $ServiceInstallLog $\r$\n
 FileClose $ServiceInstallLog
   ${EndIf}
@@ -326,7 +326,7 @@ Section -post
   DetailPrint Configuring $TomcatServiceName service
   nsExec::ExecToLog '$INSTDIR\bin\$TomcatServiceFileName 
//US//$TomcatServiceName --Classpath 
$INSTDIR\bin\bootstrap.jar;$INSTDIR\bin\tomcat-juli.jar --StartClass 
org.apache.catalina.startup.Bootstrap --StopClass 
org.apache.catalina.startup.Bootstrap --StartParams start --StopParams stop  
--StartMode jvm --StopMode jvm'
   nsExec::ExecToLog '$INSTDIR\bin\$TomcatServiceFileName 
//US//$TomcatServiceName --JvmOptions 
-Dcatalina.home=$INSTDIR#-Dcatalina.base=$INSTDIR#-Djava.endorsed.dirs=$INSTDIR\endorsed#-Djava.io.tmpdir=$INSTDIR\temp#-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager#-Djava.util.logging.config.file=$INSTDIR\conf\logging.properties'
-  nsExec::ExecToLog '$INSTDIR\bin\$TomcatServiceFileName 
//US//$TomcatServiceName --StdOutput auto --StdError auto'
+  nsExec::ExecToLog '$INSTDIR\bin\$TomcatServiceFileName 
//US//$TomcatServiceName --StdOutput auto --StdError auto --JvmMs 128 --JvmMx 
256'
 
   ${If} $TomcatShortcutAllUsers == 1
 WriteRegStr HKLM Software\Microsoft\Windows\CurrentVersion\Run 
ApacheTomcatMonitor@VERSION_MAJOR_MINOR@_$TomcatServiceName 
'$INSTDIR\bin\$TomcatServiceManagerFileName //MS//$TomcatServiceName'
@@ -1099,7 +1099,7 @@ Section Uninstall
   nsExec::ExecToLog '$INSTDIR\bin\$TomcatServiceManagerFileName 
//MQ//$TomcatServiceName'
   ; Delete Tomcat service
   DetailPrint Uninstalling $TomcatServiceName service
-  nsExec::ExecToLog '$INSTDIR\bin\$TomcatServiceFileName 
//DS//$TomcatServiceName'
+  nsExec::ExecToLog '$INSTDIR\bin\$TomcatServiceFileName 
//DS//$TomcatServiceName --LogPath $INSTDIR\logs'
   ClearErrors
 
   ; Don't know if 32-bit or 64-bit registry was used so, for now, remove both

Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?rev=1589382r1=1589381r2=1589382view=diff
==
--- 

svn commit: r1589384 - /tomcat/trunk/test/org/apache/tomcat/util/net/TestSsl.java

2014-04-23 Thread remm
Author: remm
Date: Wed Apr 23 12:27:52 2014
New Revision: 1589384

URL: http://svn.apache.org/r1589384
Log:
Do 10 requests even if the listener is complete, to check if everything is 
still fine after the handshake.

Modified:
tomcat/trunk/test/org/apache/tomcat/util/net/TestSsl.java

Modified: tomcat/trunk/test/org/apache/tomcat/util/net/TestSsl.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/util/net/TestSsl.java?rev=1589384r1=1589383r2=1589384view=diff
==
--- tomcat/trunk/test/org/apache/tomcat/util/net/TestSsl.java (original)
+++ tomcat/trunk/test/org/apache/tomcat/util/net/TestSsl.java Wed Apr 23 
12:27:52 2014
@@ -129,10 +129,14 @@ public class TestSsl extends TomcatBaseT
 
 // One request should be sufficient
 int requestCount = 0;
+int listenerComplete = 0;
 try {
-while (!listener.isComplete()  requestCount  5) {
+while (requestCount  10) {
 requestCount++;
 doRequest(os, r);
+if (listener.isComplete()  listenerComplete == 0) {
+listenerComplete = requestCount;
+}
 }
 } catch (AssertionError | IOException e) {
 String message = Failed on request number  + requestCount
@@ -142,7 +146,7 @@ public class TestSsl extends TomcatBaseT
 }
 
 Assert.assertTrue(listener.isComplete());
-System.out.println(Renegotiation completed after  + requestCount +  
requests);
+System.out.println(Renegotiation completed after  + listenerComplete 
+  requests);
 }
 
 private void doRequest(OutputStream os, Reader r) throws IOException {



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



RE: svn propchange: r1588102 - svn:log

2014-04-23 Thread Konstantin Preißer
Hi,

 -Original Message-
 From: Konstantin Kolinko [mailto:knst.koli...@gmail.com]
 Sent: Tuesday, April 22, 2014 10:50 PM
 
 2014-04-23 0:43 GMT+04:00 Mark Thomas ma...@apache.org:

(snip)

  No objection to the final being restored, it is good practice to use
  final when possible.
 
  It isn't something that has been used much elsewhere in the Tomcat code
  base. Is there much benefit to going through and adding it everywhere it
  could be used? If I recall correctly, the UCDetector plugin can flag up
  all the places where this can be done and probably add them as well.
 
 I think that it does not change the generated byte code, thus no real
 difference.
 It is good from documentation point of view (to express you intention
 to do not change the variable).
 
 If one goes pedantic way,  I have seen code where 'final' was added to
 all parameters of every method. I do not like that code style.

+1

I've once worked with a Java program at a company that used a code style tool 
issuing a warning for every local variable that did not change and was not 
declared as final. The result was that for some method's code, you felt like 
the code consists only of final modifiers and it was harder to read.


AFAIK, the only two technical uses of final for method/local variables are:
1) If you assign a constant expression to a variable, the Eclipse and Oracle 
compiler will replace references to this variable with the constant expression. 
E.g., if you write:

public static void someMethod(int x) {
int i1 = 42;
final int i2 = 42;
System.out.println(i1);
System.out.println(i2);

int x1 = x;
final int x2 = x;
System.out.println(x1);
System.out.println(x2);
}

and compile it, then view the .class file with a decompiler, it will show:

  public static void someMethod(int x) {
int i1 = 42;
int i2 = 42;
System.out.println(i1);
System.out.println(42);

int x1 = x;
int x2 = x;
System.out.println(x1);
System.out.println(x2);
  }

So references to i2 have been replaced with the constant expression by the 
compiler. This should also happen for class attributes that a final modifier 
and constant values.


2) If you want to use a local variable inside of an anonymous inner class. The 
compiler will have to make a copy of the variable when the anonymous class 
instance is created, as the variable is stored in the stack and will vanish 
once the outer method returns. I think the final probably would technically 
not be needed, but then if you changed the variable in the anonymous inner 
class' method, the change would not be reflected in the outer method.


For comparison, in .Net/C#, when you write an anonymous method inside of 
another method and the anonymous method accesses some variables of the outer 
method, the compiler will automatically change the code to store that set of 
variables in some wrapper object, and have the code working with that wrapper. 
That means if you change one of the variables in the anonymous method, the 
change will be reflected on the outer method.

Consequently, C# does have a readonly modifier to mark class/type attributes 
as read-only like the final in Java, but not for local variables. However, 
for constant values, it has the const modifier that can be used for both 
class-wide variables (which would be like using static readonly) and local 
variables, so the compiler will replace those variable references with the 
constant values (and const variables will not take space on the stack or in 
an object).


Regards,
Konstantin Preißer


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1589390 - in /tomcat/tc6.0.x/trunk: STATUS.txt bin/service.bat webapps/docs/changelog.xml webapps/docs/tomcat-docs.xsl webapps/docs/windows-service-howto.xml

2014-04-23 Thread kkolinko
Author: kkolinko
Date: Wed Apr 23 12:38:58 2014
New Revision: 1589390

URL: http://svn.apache.org/r1589390
Log:
* Fix http://issues.apache.org/bugzilla/show_bug.cgi?id=56143
  and http://issues.apache.org/bugzilla/show_bug.cgi?id=49993

  Improve service.bat so that it can be launched from a non-UAC console,
  and backport other minor improvements.

  Update documentation. There is no more a need to start cmd.exe with
  elevated priviledges.

  Add support for 'version-major/', 'version-major-minor' to
  tomcat-docs.xsl to simplify documentation backports.

  (I am not backporting the /user option of service.bat. The rest of
  service.bat is the same as in TC7 and TC8.)

  Changes to service.bat:

  - Improve service.bat so that it can be launched from a non-UAC console.
  This includes using a single call to tomcat6.exe to install the Windows
  service rather than three calls, and using command line arguments instead
  of environment variables to pass the settings. (BZ 56143)

  - Align options with *.exe Windows installer. This affects --Classpath,
  --DisplayName, --StartPath, --StopPath and --LogPath.

  - Make command comparisons case-insensitive. Remove %OS% check for setlocal.

  (This assumes that nobody runs on ancient non-NT systems that do not have
  setlocal).

  - Improve check for JAVA_HOME and add support for JRE_HOME environment
  variable. (BZ 49993)

  - Print a warning in case if neither server nor client jvm is found.

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt
tomcat/tc6.0.x/trunk/bin/service.bat
tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
tomcat/tc6.0.x/trunk/webapps/docs/tomcat-docs.xsl
tomcat/tc6.0.x/trunk/webapps/docs/windows-service-howto.xml

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1589390r1=1589389r2=1589390view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Wed Apr 23 12:38:58 2014
@@ -41,45 +41,6 @@ PATCHES PROPOSED TO BACKPORT:
   +1: markt, remm
   -1:
 
-* Fix http://issues.apache.org/bugzilla/show_bug.cgi?id=56143
-  and http://issues.apache.org/bugzilla/show_bug.cgi?id=49993
-
-  Improve service.bat so that it can be launched from a non-UAC console,
-  and backport other minor improvements.
-
-  Update documentation. There is no more a need to start cmd.exe with
-  elevated priviledges.
-
-  Add support for 'version-major/', 'version-major-minor' to
-  tomcat-docs.xsl to simplify documentation backports.
-
-  (I am not backporting the /user option of service.bat. The rest of
-  service.bat is the same as in TC7 and TC8.)
-
-  Changes to service.bat:
-
-  - Improve service.bat so that it can be launched from a non-UAC console.
-  This includes using a single call to tomcat6.exe to install the Windows
-  service rather than three calls, and using command line arguments instead
-  of environment variables to pass the settings. (BZ 56143)
-
-  - Align options with *.exe Windows installer. This affects --Classpath,
-  --DisplayName, --StartPath, --StopPath and --LogPath.
-
-  - Make command comparisons case-insensitive. Remove %OS% check for setlocal.
-
-  (This assumes that nobody runs on ancient non-NT systems that do not have
-  setlocal).
-
-  - Improve check for JAVA_HOME and add support for JRE_HOME environment
-  variable. (BZ 49993)
-
-  - Print a warning in case if neither server nor client jvm is found.
-
-  https://people.apache.org/~kkolinko/patches/2014-04-14_tc6_56143_v2.patch
-  +1: kkolinko, markt, remm
-  -1:
-
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56369
   Ensure that removing an MBean notification listener
   reverts all the operations performed when adding an MBean notification

Modified: tomcat/tc6.0.x/trunk/bin/service.bat
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/bin/service.bat?rev=1589390r1=1589389r2=1589390view=diff
==
--- tomcat/tc6.0.x/trunk/bin/service.bat (original)
+++ tomcat/tc6.0.x/trunk/bin/service.bat Wed Apr 23 12:38:58 2014
@@ -14,7 +14,6 @@ rem WITHOUT WARRANTIES OR CONDITIONS OF 
 rem See the License for the specific language governing permissions and
 rem limitations under the License.
 
-if %OS% == Windows_NT setlocal
 rem ---
 rem NT Service Install/Uninstall script
 rem
@@ -24,9 +23,11 @@ remService is in
 rem remove Remove the service from the System.
 rem
 rem name(optional) If the second argument is present it is considered
-remto be new service name  
 
+remto be new service name
 rem ---
 
+setlocal
+
 rem Guess CATALINA_HOME if not 

[Bug 56143] Allow service.bat install to be used in an non-UAC cmd.exe session

2014-04-23 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56143

--- Comment #3 from Konstantin Kolinko knst.koli...@gmail.com ---
Fixed in Tomcat 6 with r1589390 , will be in 6.0.40.

-- 
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 49993] service.bat does not check for JAVA_HOME validity

2014-04-23 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=49993

--- Comment #3 from Konstantin Kolinko knst.koli...@gmail.com ---
Fixed in Tomcat 6 with r1589390 , will be in 6.0.40.

-- 
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 56383] Securing ErrorReportValve [PATCH]

2014-04-23 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56383

--- Comment #4 from Nick Bunn thrain...@gmail.com ---
Do i need to provide a patch for tomcat 6 and 8?

-- 
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 56448] New: Implement a robust solution for client initiated SSL renegotiation with NIO

2014-04-23 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56448

Bug ID: 56448
   Summary: Implement a robust solution for client initiated SSL
renegotiation with NIO
   Product: Tomcat 8
   Version: trunk
  Hardware: All
OS: All
Status: NEW
  Severity: enhancement
  Priority: P2
 Component: Connectors
  Assignee: dev@tomcat.apache.org
  Reporter: ma...@apache.org

The current implementation is believed to work:
- with BIO on all platforms
- with NIO on some platform / JVM combinations

This enhancement is to implement a robust solution for NIO on all platforms and
supported JVMs.

For background see:
https://issues.apache.org/bugzilla/show_bug.cgi?id=56391
org.apache.tomcat.util.net.TestSsl

-- 
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 56391] test error for NIO and org.apache.tomcat.util.net.TestSsl

2014-04-23 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56391

Mark Thomas ma...@apache.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #15 from Mark Thomas ma...@apache.org ---
I have disabled this test for NIO (it was already disabled for APR) as the
improved unit test has demonstrated that the current implementation is not
reliable.

I have created bug 56448 to track implementing improved renegotiation support.

-- 
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 56448] Implement a robust solution for client initiated SSL renegotiation with NIO

2014-04-23 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56448

Petr Sumbera petr.sumb...@oracle.com changed:

   What|Removed |Added

 CC||petr.sumb...@oracle.com

-- 
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 56448] Implement a robust solution for client initiated SSL renegotiation with NIO

2014-04-23 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56448

--- Comment #1 from Remy Maucherat r...@apache.org ---
I looked at it, but I am still quite lost about why it works or fails.

I don't see how it could work with async IO (like Servlet 3.1). Even blocking
IO could (possibly) be doing concurrent read / write. Is it really mandatory to
have that capability ?

Could you reproduce a failure with NIO2 on some platforms ? It hasn't failed
for me, although the code is the same.

-- 
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 56026] RemoteEndpoint.Async#sendText(String, SendHandler) not thread safe

2014-04-23 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56026

--- Comment #10 from Mark Thornton mthorn...@optrak.com ---
It may be worth noting that the Tyrus 1.5 implementation does appear to be
thread safe. Even arbitrary mixtures of Basic and Async sends work as one might
expect: all messages are delivered without error Jetty, on the other hand,
behaves in the same way as Tomcat.

-- 
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 56026] RemoteEndpoint.Async#sendText(String, SendHandler) not thread safe

2014-04-23 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56026

Mark Thornton mthorn...@optrak.com changed:

   What|Removed |Added

 CC||mthorn...@optrak.com

-- 
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: r1589429 - /tomcat/tc6.0.x/trunk/STATUS.txt

2014-04-23 Thread fhanik
Author: fhanik
Date: Wed Apr 23 14:31:14 2014
New Revision: 1589429

URL: http://svn.apache.org/r1589429
Log:
Votes


Modified:
tomcat/tc6.0.x/trunk/STATUS.txt

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1589429r1=1589428r2=1589429view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Wed Apr 23 14:31:14 2014
@@ -31,14 +31,14 @@ PATCHES PROPOSED TO BACKPORT:
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56334
   Correct double unescaping
   
http://people.apache.org/~markt/patches/2014-04-17-attribute-escaping-tc6-v2.patch
-  +1: markt, remm
+  +1: markt, remm, fhanik
   -1:
 
 * Enabling building with Java 8
   
http://people.apache.org/~markt/patches/2014-04-12-build-with-java8-tc6-v1.patch
   (Note: It is easier to verify the AbstractReplicatedMap changes by diffing
  against the Tomcat 7 version of the class)
-  +1: markt, remm
+  +1: markt, remm, fhanik
   -1:
 
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56369



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Reporting Tomcat version information to end user

2014-04-23 Thread Maarten van Hulsentop
Hello all,

Looking at Tomcat bug 56383 - Securing ErrorReportValve (
https://issues.apache.org/bugzilla/show_bug.cgi?id=56383 ), i think a
similar thing can also be done for the Tomcat version number reported by
the DefaultServlet.
This servlet will show the version information from ServerInfo when the
listings are enabled. Currently it seems there is no way of disabling
version reporting other than 'hacking' the ServerInfo.

For me, it would for sure be a welcome feature to be able to turn this off
without losing the version information on the back end process such as
logfiles.

What's your take on this?

Regards,

Maarten van Hulsentop


[Bug 56026] RemoteEndpoint.Async#sendText(String, SendHandler) not thread safe

2014-04-23 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56026

--- Comment #11 from Mark Thornton mthorn...@optrak.com ---
Some emails amongst the expert group doesn't constitute information of which
users could be expected to be aware. Is this really the only place that the
intent is described?

-- 
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



Re: NIO buffering

2014-04-23 Thread Filip Hanik
I am not convinced by the NIO buffering that is used on output.

what are you exactly referring to? Maybe I can shed some light on it.


On Fri, Apr 18, 2014 at 1:30 PM, Rémy Maucherat r...@apache.org wrote:

 Hi,

 I am not convinced by the NIO buffering that is used on output. Due to
 concurrent access issues I couldn't use it in NIO 2, but then I cannot see
 either what it does to justify using a more complex structure over a
 simpler array list.

 If the idea was to reuse buffers (which it doesn't), there is no option
 except using a static buffer pool. Was that the original general idea
 around this deque structure ?

 Then the upgrade buffering is even more basic, but is probably not a
 performance issue, the current code is likely fast enough since it is so
 lightweight.

 Rémy



Re: NIO buffering

2014-04-23 Thread Rémy Maucherat
2014-04-23 16:50 GMT+02:00 Filip Hanik fi...@hanik.com:

 I am not convinced by the NIO buffering that is used on output.

 what are you exactly referring to? Maybe I can shed some light on it.


Ok, so more precisely I was talking about the
AbstractOutputBuffer.bufferedWrites field.

Rémy




 On Fri, Apr 18, 2014 at 1:30 PM, Rémy Maucherat r...@apache.org wrote:

  Hi,
 
  I am not convinced by the NIO buffering that is used on output. Due to
  concurrent access issues I couldn't use it in NIO 2, but then I cannot
 see
  either what it does to justify using a more complex structure over a
  simpler array list.
 
  If the idea was to reuse buffers (which it doesn't), there is no option
  except using a static buffer pool. Was that the original general idea
  around this deque structure ?
 
  Then the upgrade buffering is even more basic, but is probably not a
  performance issue, the current code is likely fast enough since it is so
  lightweight.
 
  Rémy
 



[Bug 54596] Relative path functionality truncates last character of configuration parameters preventing connector from working.

2014-04-23 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54596

--- Comment #3 from Thomas Hoffmann thomas.hoffm...@speed4trade.com ---
I have also encountered this problem.
Testet with 1.2.40.0 of isapi_redirect.dll
The relative paths are not taken into account. Line-breaks are CR+LF
Neither \ nor / are working. 

Sample Config-File with relevant entries:
log_file=iis_redirect.log
worker_file=..\..\conf\worker.properties
worker_mount_file=..\..\conf\uriworkermap.properties


Logfile is written with the following messages:
[Wed Apr 23 17:20:34.695 2014] [6716:13964] [debug] jk_set_time_fmt::jk_util.c
(480): Pre-processed log time stamp format is '[%a %b %d %H:%M:%S.000 %Y] '
[Wed Apr 23 17:20:34.699 2014] [6716:13964] [info] init_jk::jk_isapi_plugin.c
(2689): Starting Jakarta/ISAPI/isapi_redirector/1.2.40
[Wed Apr 23 17:20:34.702 2014] [6716:13964] [debug] init_jk::jk_isapi_plugin.c
(2700): Detected IIS version 8.0
[Wed Apr 23 17:20:34.705 2014] [6716:13964] [debug] init_jk::jk_isapi_plugin.c
(2702): Using ini file D:\Programme\Apache Software Foundation\Tomcat
7.0.53\bin\win32\isapi_redirect.properties.
[Wed Apr 23 17:20:34.707 2014] [6716:13964] [debug] init_jk::jk_isapi_plugin.c
(2708): Using log file D:\Programme\Apache Software Foundation\Tomcat
7.0.53\bin\win32\iis_redirect.lo.
...
[Wed Apr 23 17:20:34.724 2014] [6716:13964] [debug] init_jk::jk_isapi_plugin.c
(2714): Using worker file D:\Programme\Apache Software Foundation\Tomcat
7.0.53\bin\win32\conf\worker.properties.
[Wed Apr 23 17:20:34.727 2014] [6716:13964] [debug] init_jk::jk_isapi_plugin.c
(2715): Using worker mount file D:\Programme\Apache Software Foundation\Tomcat
7.0.53\bin\win32\conf\uriworkermap.properties.
...
[Wed Apr 23 17:20:34.752 2014] [6716:13964] [error]
uri_worker_map_load::jk_uri_worker_map.c (1280): Failed to load uri_worker_map
file D:\Programme\Apache Software Foundation\Tomcat
7.0.53\bin\win32\conf\uriworkermap.properties (errno=2, err=No such file or
directory).


This shows that the dots for the relative paths are truncated and not taken
into account. The conversion from relative path to absolute path seems to fail.


Tested under Win 8.1 64 Bit, Connector version 1.2.40.0
Hope this informations helps to narrow down the problem.

-- 
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



Re: NIO buffering

2014-04-23 Thread Filip Hanik
Ok, Mark would know the exact details. It simply looks like a when a buffer
has been flipped already, to simplify adding more bytes, add it to a new
unflipped buffer, rather than append to existing one.
So I don't think its about reuse, I think it may be to simplify the
handling of buffer flipping.




On Wed, Apr 23, 2014 at 9:01 AM, Rémy Maucherat r...@apache.org wrote:

 2014-04-23 16:50 GMT+02:00 Filip Hanik fi...@hanik.com:

  I am not convinced by the NIO buffering that is used on output.
 
  what are you exactly referring to? Maybe I can shed some light on it.
 

 Ok, so more precisely I was talking about the
 AbstractOutputBuffer.bufferedWrites field.

 Rémy


 
 
  On Fri, Apr 18, 2014 at 1:30 PM, Rémy Maucherat r...@apache.org wrote:
 
   Hi,
  
   I am not convinced by the NIO buffering that is used on output. Due to
   concurrent access issues I couldn't use it in NIO 2, but then I cannot
  see
   either what it does to justify using a more complex structure over a
   simpler array list.
  
   If the idea was to reuse buffers (which it doesn't), there is no option
   except using a static buffer pool. Was that the original general idea
   around this deque structure ?
  
   Then the upgrade buffering is even more basic, but is probably not a
   performance issue, the current code is likely fast enough since it is
 so
   lightweight.
  
   Rémy
  
 



[Bug 56449] New: WebSocket session get closed if in onOpen will sendText (sync mode)

2014-04-23 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56449

Bug ID: 56449
   Summary: WebSocket session get closed if in onOpen will
sendText (sync mode)
   Product: Tomcat 8
   Version: 8.0.5
  Hardware: PC
OS: Linux
Status: NEW
  Severity: major
  Priority: P2
 Component: WebSocket
  Assignee: dev@tomcat.apache.org
  Reporter: veliscu.cri...@gmail.com

Created attachment 31552
  -- https://issues.apache.org/bugzilla/attachment.cgi?id=31552action=edit
The exception captured

@ServerEndpoint(/push/echo)
public class EchoAnnotation {
@OnOpen
public void open(Session session) {
try { 
if(session.isOpen()) session.getBasicRemote().sendText(
Welcome!);
} catch(Exception e) { 
try {
session.close();
} catch (IOException e1) {
// Ignore
}
}
}


Doing session.getAsynRemote() is working.
Important: This errors happens with thousands of websockets.

-- 
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



Re: NIO buffering

2014-04-23 Thread Mark Thomas
On 23/04/2014 16:30, Filip Hanik wrote:
 Ok, Mark would know the exact details.

I'm not sure where you got that idea from, you introduced this code [1].

 It simply looks like a when a buffer
 has been flipped already, to simplify adding more bytes, add it to a new
 unflipped buffer, rather than append to existing one.
 So I don't think its about reuse, I think it may be to simplify the
 handling of buffer flipping.

I'd agree with that assessment.

I do remember having to be very careful with some of that code to get
things working correctly. If there is a cleaner solution then I'd be all
for it as long as performance is no worse.

Mark

[1] http://svn.apache.org/viewvc?view=revisionrevision=1358055


 
 
 
 
 On Wed, Apr 23, 2014 at 9:01 AM, Rémy Maucherat r...@apache.org wrote:
 
 2014-04-23 16:50 GMT+02:00 Filip Hanik fi...@hanik.com:

 I am not convinced by the NIO buffering that is used on output.

 what are you exactly referring to? Maybe I can shed some light on it.


 Ok, so more precisely I was talking about the
 AbstractOutputBuffer.bufferedWrites field.

 Rémy




 On Fri, Apr 18, 2014 at 1:30 PM, Rémy Maucherat r...@apache.org wrote:

 Hi,

 I am not convinced by the NIO buffering that is used on output. Due to
 concurrent access issues I couldn't use it in NIO 2, but then I cannot
 see
 either what it does to justify using a more complex structure over a
 simpler array list.

 If the idea was to reuse buffers (which it doesn't), there is no option
 except using a static buffer pool. Was that the original general idea
 around this deque structure ?

 Then the upgrade buffering is even more basic, but is probably not a
 performance issue, the current code is likely fast enough since it is
 so
 lightweight.

 Rémy



 


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: NIO buffering

2014-04-23 Thread Rémy Maucherat
2014-04-23 18:30 GMT+02:00 Mark Thomas ma...@apache.org:

 I'd agree with that assessment.

 I do remember having to be very careful with some of that code to get
 things working correctly. If there is a cleaner solution then I'd be all
 for it as long as performance is no worse.

 Mark

 [1] http://svn.apache.org/viewvc?view=revisionrevision=1358055


Well, it's fine, but I didn't see the point for me since the buffers were
throw away and I didn't need to track their flip state.

So the plan next for me would be to try a buffer pool for NIO2 [this is
appropriate for NIO2 since scatter/gather can be used to access them]. No
idea if it would actually be really faster.

Rémy


[Bug 54596] Relative path functionality truncates last character of configuration parameters preventing connector from working.

2014-04-23 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54596

--- Comment #4 from Christopher Schultz ch...@christopherschultz.net ---
(In reply to Thomas Hoffmann from comment #3)
 I have also encountered this problem.
 Testet with 1.2.40.0 of isapi_redirect.dll
 The relative paths are not taken into account. Line-breaks are CR+LF
 Neither \ nor / are working. 
 
 Sample Config-File with relevant entries:
 log_file=iis_redirect.log
 worker_file=..\..\conf\worker.properties
 worker_mount_file=..\..\conf\uriworkermap.properties

[snip]

 init_jk::jk_isapi_plugin.c (2702): Using ini file D:\Programme\Apache
 Software Foundation\Tomcat 7.0.53\bin\win32\isapi_redirect.properties.

This path appears to be correct.

 [Wed Apr 23 17:20:34.707 2014] [6716:13964] [debug]
 init_jk::jk_isapi_plugin.c (2708): Using log file D:\Programme\Apache
 Software Foundation\Tomcat 7.0.53\bin\win32\iis_redirect.lo.

This one appears to not be correct.

Is this only a problem with the log file specifically? Other examples I see in
here all have a correct properties file name and a broken log file name.

 ...
 [Wed Apr 23 17:20:34.724 2014] [6716:13964] [debug]
 init_jk::jk_isapi_plugin.c (2714): Using worker file D:\Programme\Apache
 Software Foundation\Tomcat 7.0.53\bin\win32\conf\worker.properties.
 [Wed Apr 23 17:20:34.727 2014] [6716:13964] [debug]
 init_jk::jk_isapi_plugin.c (2715): Using worker mount file
 D:\Programme\Apache Software Foundation\Tomcat
 7.0.53\bin\win32\conf\uriworkermap.properties.
 ...
 [Wed Apr 23 17:20:34.752 2014] [6716:13964] [error]
 uri_worker_map_load::jk_uri_worker_map.c (1280): Failed to load
 uri_worker_map file D:\Programme\Apache Software Foundation\Tomcat
 7.0.53\bin\win32\conf\uriworkermap.properties (errno=2, err=No such file or
 directory).
 
 
 This shows that the dots for the relative paths are truncated and not taken
 into account. The conversion from relative path to absolute path seems to
 fail.
 
 
 Tested under Win 8.1 64 Bit, Connector version 1.2.40.0
 Hope this informations helps to narrow down the problem.

This appears to be a different issue: relative paths aren't properly-resolved
at 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



[Bug 56418] Manager incorrectly reports deployment as OK even though it failed

2014-04-23 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56418

Sylvain Laurent slaur...@apache.org changed:

   What|Removed |Added

  Attachment #31536|0   |1
is obsolete||

--- Comment #2 from Sylvain Laurent slaur...@apache.org ---
Created attachment 31554
  -- https://issues.apache.org/bugzilla/attachment.cgi?id=31554action=edit
Proposed patch on tomcat7 trunk

(In reply to Christopher Schultz from comment #1)
 The first and second chunks of your patch change behavior (by adding an
 isAvailable check). Is that the real fix for this bug?

Yes, exactly.
 
 In general, I'm not a fan of having a check method dump anything to the
 output writer. Would it be possible to re-write the patch with the
 re-factored method but not dump any output? Or, maybe just change the name
 so it's clear that stuff will be printed to the output writer (even though
 it should be obvious to the reader than the writer is bring used since it's
 passed as a parameter).

OK, I renamed the method to checkAndOutputContextDeploymentStatus, see new
patch attached.

If this is OK, I can commit it since I should still have commit rights.
But I did not follow much tomcat dev lately : should I commit on 8.x  then 7.x
? should I update the changelog in the same commit or different one ?
Or if you prefer to commit this yourself, be my guest ;-)

-- 
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 53011] Ant Jasper task fails after one error

2014-04-23 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=53011

Marc Pompl marc.po...@lynorics.de changed:

   What|Removed |Added

 CC||marc.po...@lynorics.de

-- 
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 50234] JspC use servlet 3.0 features

2014-04-23 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50234

Marc Pompl marc.po...@lynorics.de changed:

   What|Removed |Added

 CC||marc.po...@lynorics.de

-- 
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 50234] JspC use servlet 3.0 features

2014-04-23 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50234

--- Comment #4 from Marc Pompl marc.po...@lynorics.de ---
4) abandon the requirement for web.xml if a web-fragment.xml is present
At the moment (Tomcat 7), a dummy web.xml has to be defined in order to define
the version (i.e. for expresions within the JSPs).

-- 
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: r1589513 - /tomcat/trunk/test/org/apache/tomcat/util/net/TesterSupport.java

2014-04-23 Thread markt
Author: markt
Date: Wed Apr 23 20:40:00 2014
New Revision: 1589513

URL: http://svn.apache.org/r1589513
Log:
Disable SSL renegotiation test for NIO

Modified:
tomcat/trunk/test/org/apache/tomcat/util/net/TesterSupport.java

Modified: tomcat/trunk/test/org/apache/tomcat/util/net/TesterSupport.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/util/net/TesterSupport.java?rev=1589513r1=1589512r2=1589513view=diff
==
--- tomcat/trunk/test/org/apache/tomcat/util/net/TesterSupport.java (original)
+++ tomcat/trunk/test/org/apache/tomcat/util/net/TesterSupport.java Wed Apr 23 
20:40:00 2014
@@ -133,6 +133,11 @@ public final class TesterSupport {
 // Disabled by default in 1.1.20 windows binary (2010-07-27)
 return false;
 }
+if (protocol.contains(NioProtocol)) {
+// Doesn't work on all platforms - see BZ 56448.
+return false;
+}
+
 return true;
 }
 



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1589521 - in /tomcat/trunk: java/org/apache/coyote/http11/Http11NioProcessor.java webapps/docs/changelog.xml

2014-04-23 Thread markt
Author: markt
Date: Wed Apr 23 21:11:20 2014
New Revision: 1589521

URL: http://svn.apache.org/r1589521
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56348
Fix slow async reads on non-container thread.
Align code with APR.
Ensure that selector is woken up when a socket is registered for a new event

Modified:
tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java?rev=1589521r1=1589520r2=1589521view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java 
(original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java Wed Apr 
23 21:11:20 2014
@@ -155,20 +155,15 @@ public class Http11NioProcessor extends 
 @Override
 protected void registerForEvent(boolean read, boolean write) {
 final NioChannel socket = socketWrapper.getSocket();
-final NioEndpoint.KeyAttachment attach =
-(NioEndpoint.KeyAttachment) socket.getAttachment(false);
-if (attach == null) {
-return;
-}
-SelectionKey key = 
socket.getIOChannel().keyFor(socket.getPoller().getSelector());
+
+int interestOps = 0;
 if (read) {
-attach.interestOps(attach.interestOps() | SelectionKey.OP_READ);
-key.interestOps(key.interestOps() | SelectionKey.OP_READ);
+interestOps = SelectionKey.OP_READ;
 }
 if (write) {
-attach.interestOps(attach.interestOps() | SelectionKey.OP_WRITE);
-key.interestOps(key.interestOps() | SelectionKey.OP_WRITE);
+interestOps = interestOps | SelectionKey.OP_WRITE;
 }
+socket.getPoller().add(socket, interestOps);
 }
 
 

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1589521r1=1589520r2=1589521view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Wed Apr 23 21:11:20 2014
@@ -149,6 +149,10 @@
   scode
 Fix code duplication between NIO and NIO2. (remm)
   /scode
+  fix
+bug56348/bug: Fix slow asynchronous read when read was performed on
+a non-container thread. (markt) 
+  /fix
 /changelog
   /subsection
   subsection name=Jasper



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 56348] ReadListener reading stream on different thread very slow

2014-04-23 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56348

Mark Thomas ma...@apache.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #1 from Mark Thomas ma...@apache.org ---
Thanks for the report and the test case. This has been fixed in 8.0.x for 8.0.6
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



[Bug 53492] Make JspC shell multithreaded

2014-04-23 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=53492

Marc Pompl marc.po...@lynorics.de changed:

   What|Removed |Added

 CC||marc.po...@lynorics.de

-- 
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 56449] WebSocket session get closed if in onOpen will sendText (sync mode)

2014-04-23 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56449

--- Comment #1 from Mark Thomas ma...@apache.org ---
At the moment, I don't see a code path that could trigger this. The session is
open when it is created so something must be closing it very quickly. My
assumption is that there must be an error path triggering this but I don;t see
it so far. What would be very useful is the stack trace from when the session
is closed. If I add some debug logging are you able to build Tomcat from source
and run your test to collect some more information?

-- 
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: r1589523 - in /tomcat/trunk/java/org/apache/tomcat/websocket: LocalStrings.properties WsSession.java

2014-04-23 Thread markt
Author: markt
Date: Wed Apr 23 21:47:50 2014
New Revision: 1589523

URL: http://svn.apache.org/r1589523
Log:
Add session ID to the exception message to aid debugging.

Modified:
tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties
tomcat/trunk/java/org/apache/tomcat/websocket/WsSession.java

Modified: tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties?rev=1589523r1=1589522r2=1589523view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties Wed 
Apr 23 21:47:50 2014
@@ -71,7 +71,7 @@ wsRemoteEndpoint.wrongState=The remote e
 # as many as 4 bytes.
 wsSession.timeout=The WebSocket session timeout expired
 
-wsSession.closed=The WebSocket session has been closed and no method (apart 
from close()) may be called on a closed session
+wsSession.closed=The WebSocket session [{0}] has been closed and no method 
(apart from close()) may be called on a closed session
 wsSession.duplicateHandlerBinary=A binary message handler has already been 
configured
 wsSession.duplicateHandlerPong=A pong message handler has already been 
configured
 wsSession.duplicateHandlerText=A text message handler has already been 
configured

Modified: tomcat/trunk/java/org/apache/tomcat/websocket/WsSession.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/WsSession.java?rev=1589523r1=1589522r2=1589523view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/websocket/WsSession.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/WsSession.java Wed Apr 23 
21:47:50 2014
@@ -649,7 +649,7 @@ public class WsSession implements Sessio
 
 private void checkState() {
 if (state == State.CLOSED) {
-throw new IllegalStateException(sm.getString(wsSession.closed));
+throw new IllegalStateException(sm.getString(wsSession.closed, 
id));
 }
 }
 



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 56449] WebSocket session get closed if in onOpen will sendText (sync mode)

2014-04-23 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56449

--- Comment #2 from Konstantin Preißer kpreis...@apache.org ---
Hi Mark,

FYI, I can reproduce the given stack trace if I use a client that sends an
initial Websocket Request but immediately closes the TCP connection. E.g., when
running the following Java code on Windows while Tomcat (trunk) is running
using the NIO connector:

String str = GET /examples/websocket/chat HTTP/1.1\r\n
+ Host: localhost:8080\r\n
+ Sec-WebSocket-Version: 13\r\n
+ Origin: http://localhost:8080\r\n;
+ Sec-WebSocket-Key: 8Ydn5qfZ/eg0v37Jh4n6tw==\r\n
+ Connection: keep-alive, Upgrade\r\n
+ Upgrade: websocket\r\n\r\n;
byte[] bytes = str.getBytes(UTF-8);

try (Socket s = new Socket(127.0.0.1, 8080)) {
s.getOutputStream().write(bytes);
}

I then get the following exceptions (I think the first is expected):

24-Apr-2014 00:07:57.351 SEVERE [http-nio-8080-exec-1]
websocket.chat.ChatAnnotation.onError Chat Error: java.io.IOException:
java.util.concurrent.ExecutionException:
java.nio.channels.ClosedChannelException
 java.io.IOException: java.util.concurrent.ExecutionException:
java.nio.channels.ClosedChannelException
at
org.apache.tomcat.websocket.WsRemoteEndpointImplBase.startMessageBlock(WsRemoteEndpointImplBase.java:242)
at
org.apache.tomcat.websocket.WsSession.sendCloseMessage(WsSession.java:486)
at org.apache.tomcat.websocket.WsSession.doClose(WsSession.java:417)
at org.apache.tomcat.websocket.WsSession.close(WsSession.java:394)
at org.apache.tomcat.websocket.WsSession.close(WsSession.java:388)
at websocket.chat.ChatAnnotation.broadcast(ChatAnnotation.java:99)
at websocket.chat.ChatAnnotation.start(ChatAnnotation.java:59)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at
org.apache.tomcat.websocket.pojo.PojoEndpointBase.doOnOpen(PojoEndpointBase.java:58)
at
org.apache.tomcat.websocket.pojo.PojoEndpointServer.onOpen(PojoEndpointServer.java:70)
at
org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.init(WsHttpUpgradeHandler.java:129)
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:678)
at
org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:222)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1575)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1533)
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:745)
Caused by: java.util.concurrent.ExecutionException:
java.nio.channels.ClosedChannelException
at
org.apache.tomcat.websocket.FutureToSendHandler.get(FutureToSendHandler.java:102)
at
org.apache.tomcat.websocket.WsRemoteEndpointImplBase.startMessageBlock(WsRemoteEndpointImplBase.java:235)
... 20 more
Caused by: java.nio.channels.ClosedChannelException
at sun.nio.ch.SocketChannelImpl.ensureWriteOpen(SocketChannelImpl.java:265)
at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:474)
at org.apache.tomcat.util.net.NioChannel.write(NioChannel.java:122)
at
org.apache.tomcat.util.net.NioSelectorPool.write(NioSelectorPool.java:184)
at
org.apache.coyote.http11.upgrade.NioServletOutputStream.doWriteInternal(NioServletOutputStream.java:94)
at
org.apache.coyote.http11.upgrade.NioServletOutputStream.doWrite(NioServletOutputStream.java:61)
at
org.apache.coyote.http11.upgrade.AbstractServletOutputStream.writeInternal(AbstractServletOutputStream.java:158)
at
org.apache.coyote.http11.upgrade.AbstractServletOutputStream.write(AbstractServletOutputStream.java:124)
at
org.apache.tomcat.websocket.server.WsRemoteEndpointImplServer.onWritePossible(WsRemoteEndpointImplServer.java:99)
at
org.apache.tomcat.websocket.server.WsRemoteEndpointImplServer.doWrite(WsRemoteEndpointImplServer.java:81)
at
org.apache.tomcat.websocket.WsRemoteEndpointImplBase.writeMessagePart(WsRemoteEndpointImplBase.java:390)
at
org.apache.tomcat.websocket.WsRemoteEndpointImplBase.startMessage(WsRemoteEndpointImplBase.java:284)
at
org.apache.tomcat.websocket.WsRemoteEndpointImplBase.startMessageBlock(WsRemoteEndpointImplBase.java:230)
... 20 more


24-Apr-2014 00:07:57.397 SEVERE [http-nio-8080-exec-1]
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process Error
reading request, ignored
 java.lang.IllegalStateException: The WebSocket session [0] has been closed and
no method (apart 

[Bug 56451] New: JNDI lookups under java:comp/Resources do not access Context aliases resources

2014-04-23 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56451

Bug ID: 56451
   Summary: JNDI lookups under java:comp/Resources do not access
Context aliases resources
   Product: Tomcat 7
   Version: 7.0.47
  Hardware: PC
OS: Linux
Status: NEW
  Severity: minor
  Priority: P2
 Component: Catalina
  Assignee: dev@tomcat.apache.org
  Reporter: daniel.moj...@idea.com.py

1. Using JNDI lookup to access resources

Given a resource accessible as

request.getServletContext().getResourceAsStream(/some/path/myResource);

it can also be accessed via JNDI (return type is different but equally useful)

ic.lookup(java:comp/Resources/some/path/myResource)


2. JNDI lookups ignores aliased resources

Given a Context aliases=/someAlias=/any/path .../, its resources are
accessible

request.getServletContext().getResourceAsStream(/someAlias/myOtherResource);

BUT, the lookup 

ic.lookup(java:comp/Resources/someAlias/myOtherResource)

fails throwing org.apache.naming.resources.ImmutableNameNotFoundException.

Listing the java:comp/Resources context shows someAlias is NOT bound.

3. Expected behavior

Tomcat exposes resources under the java:comp/Resources JNDI context. Aliases
should also apply to this alternate access interface.

-- 
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

2014-04-23 Thread Bill Barker
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 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-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: 28 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-5.7-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-5.7-SNAPSHOT.jar:/srv/gump/public/workspace/apache-commons/beanutils/dist/commons-beanutils-20140424.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/tar
 
get/commons-exec-1.3-SNAPSHOT.jar:/srv/gump/public/workspace/apache-commons/logging/target/commons-logging-20140424.jar:/srv/gump/public/workspace/apache-commons/logging/target/commons-logging-api-20140424.jar:/srv/gump/public/workspace/apache-commons/validator/dist/commons-validator-20140424.jar:/srv/gump/public/workspace/google-guava/guava/target/guava-18.0-SNAPSHOT.jar:/srv/gump/packages/javamail-1.4/mail.jar:/srv/gump/packages/javamail-1.4/lib/mailapi.jar:/srv/gump/packages/jaf-1.1ea/activation.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:

proxyflags:

setproxy:

testexist:
 [echo] Testing  for 
/srv/gump/public/workspace/checkstyle/target/checkstyle-5.7-SNAPSHOT.jar

downloadzip:

validate:
[mkdir] Created dir: 
/srv/gump/public/workspace/tomcat-trunk/output/res/checkstyle
[checkstyle] Running Checkstyle 5.7-SNAPSHOT on 2778 files
[checkstyle] 
/srv/gump/public/workspace/tomcat-trunk/webapps/docs/changelog.xml:154: Line 
matches the illegal pattern '\s+$'.

BUILD FAILED
/srv/gump/public/workspace/tomcat-trunk/build.xml:539: Got 1 errors and 0 
warnings.

Total time: 28 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 2014042405, vmgump.apache.org:vmgump:2014042405
Gump E-mail Identifier (unique within run) #4.

--
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