[Bug 54105] Thread BLOCKED - Restart tomcat

2012-11-06 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54105

Alim Yigiter  changed:

   What|Removed |Added

Version|unspecified |6.0.29

-- 
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 54105] Thread BLOCKED - Restart tomcat

2012-11-06 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54105

--- Comment #1 from Alim Yigiter  ---
VM and Appserver
Java Runtime:Java(TM) SE Runtime Environment
Version:1.6.0_22
Java VM Name:Java HotSpot(TM) 64-Bit Server VM
Available Processors/Cores:8
Server time:Tue Nov 06 09:30:50 CET 2012
Server info:Apache Tomcat/6.0.29

-- 
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: r1406140 - in /tomcat/trunk: java/org/apache/jasper/compiler/ java/org/apache/jasper/resources/ modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ modules/jdbc-pool/src/test/java

2012-11-06 Thread markt
Author: markt
Date: Tue Nov  6 13:59:31 2012
New Revision: 1406140

URL: http://svn.apache.org/viewvc?rev=1406140&view=rev
Log:
Fix a handful of Eclipse warnings

Modified:
tomcat/trunk/java/org/apache/jasper/compiler/SmapUtil.java
tomcat/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java
tomcat/trunk/java/org/apache/jasper/resources/LocalStrings.properties

tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java

tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ProxyConnection.java

tomcat/trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/TestStatementCache.java

Modified: tomcat/trunk/java/org/apache/jasper/compiler/SmapUtil.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/SmapUtil.java?rev=1406140&r1=1406139&r2=1406140&view=diff
==
--- tomcat/trunk/java/org/apache/jasper/compiler/SmapUtil.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/SmapUtil.java Tue Nov  6 
13:59:31 2012
@@ -226,13 +226,13 @@ public class SmapUtil {
 }
 
 static byte[] readWhole(File input) throws IOException {
-FileInputStream inStream = new FileInputStream(input);
 int len = (int)input.length();
 byte[] bytes = new byte[len];
-if (inStream.read(bytes, 0, len) != len) {
-throw new IOException("expected size: " + len);
+try (FileInputStream inStream = new FileInputStream(input)) {
+if (inStream.read(bytes, 0, len) != len) {
+throw new IOException("expected size: " + len);
+}
 }
-inStream.close();
 return bytes;
 }
 

Modified: tomcat/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java?rev=1406140&r1=1406139&r2=1406140&view=diff
==
--- tomcat/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java 
(original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java Tue 
Nov  6 13:59:31 2012
@@ -470,7 +470,10 @@ class TagLibraryInfoImpl extends TagLibr
 }
 }
 
-if (path.startsWith("/META-INF/tags")) {
+if (path == null) {
+// path is required
+err.jspError("jsp.error.tagfile.missingPath");
+} else if (path.startsWith("/META-INF/tags")) {
 // Tag file packaged in JAR
 // See https://issues.apache.org/bugzilla/show_bug.cgi?id=46471
 // This needs to be removed once all the broken code that depends 
on

Modified: tomcat/trunk/java/org/apache/jasper/resources/LocalStrings.properties
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/resources/LocalStrings.properties?rev=1406140&r1=1406139&r2=1406140&view=diff
==
--- tomcat/trunk/java/org/apache/jasper/resources/LocalStrings.properties 
(original)
+++ tomcat/trunk/java/org/apache/jasper/resources/LocalStrings.properties Tue 
Nov  6 13:59:31 2012
@@ -326,6 +326,7 @@ jsp.error.jspoutput.invalidUse=

[Bug 54064] tomcat native randomly very slow with high CPU usage

2012-11-06 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54064

--- Comment #11 from Mladen Turk  ---
OK, so it seems we are still missing some info.

1. Did you build tomcat-native as well? 
   If not from where it comes.
2. Where do you load tomcat-native from
   modules/org/jboss/as/web/main/lib/linux-x86_64
   or you depend on system LD_LIBRARY_PATH
3. IIUC you are using https (openssl version 0.9.8k) when those delays occur.
   Does it happen for non-ssl layer as well?

-- 
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-taglibs-standard (in module tomcat-taglibs) failed

2012-11-06 Thread Gump
To whom it may engage...

This is an automated request, but not an unsolicited one. For 
more information please visit http://gump.apache.org/nagged.html, 
and/or contact the folk at gene...@gump.apache.org.

Project tomcat-taglibs-standard has an issue affecting its community 
integration.
This issue affects 2 projects,
 and has been outstanding for 167 runs.
The current state of this project is 'Failed', with reason 'Build Failed'.
For reference only, the following projects are affected by this:
- tomcat-taglibs-standard :  Standard Taglib
- tomcat-taglibs-standard-install :  JSP Taglibs


Full details are available at:

http://vmgump.apache.org/gump/public/tomcat-taglibs/tomcat-taglibs-standard/index.html

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were 
provided:
 -INFO- Optional dependency httpunit failed with reason build failed
 -DEBUG- (Apache Gump generated) Apache Maven Settings in: 
/srv/gump/public/workspace/tomcat-taglibs/standard/gump_mvn_settings.xml
 -INFO- Failed with reason build failed
 -DEBUG- Maven POM in: 
/srv/gump/public/workspace/tomcat-taglibs/standard/pom.xml
 -INFO- Failed to extract fallback artifacts from Gump Repository



The following work was performed:
http://vmgump.apache.org/gump/public/tomcat-taglibs/tomcat-taglibs-standard/gump_work/build_tomcat-taglibs_tomcat-taglibs-standard.html
Work Name: build_tomcat-taglibs_tomcat-taglibs-standard (Type: Build)
Work ended in a state of : Failed
Elapsed: 24 secs
Command Line: /opt/maven2/bin/mvn --batch-mode -DskipTests=true --settings 
/srv/gump/public/workspace/tomcat-taglibs/standard/gump_mvn_settings.xml 
install 
[Working Directory: /srv/gump/public/workspace/tomcat-taglibs/standard]
M2_HOME: /opt/maven2
-
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Nothing to compile - all classes are up to date
[debug] execute contextualize
[INFO] [resources:testResources {execution: default-testResources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory 
/srv/gump/public/workspace/tomcat-taglibs/standard/spec/src/test/resources
[INFO] Copying 3 resources
[INFO] [compiler:testCompile {execution: default-testCompile}]
[INFO] No sources to compile
[INFO] [surefire:test {execution: default-test}]
[INFO] Tests are skipped.
[INFO] [bundle:bundle {execution: default-bundle}]
[INFO] [install:install {execution: default-install}]
[INFO] Installing 
/srv/gump/public/workspace/tomcat-taglibs/standard/spec/target/taglibs-standard-spec-1.2-SNAPSHOT.jar
 to 
/srv/gump/public/workspace/mvnlocalrepo/shared/org/apache/taglibs/taglibs-standard-spec/1.2-SNAPSHOT/taglibs-standard-spec-1.2-SNAPSHOT.jar
[INFO] [bundle:install {execution: default-install}]
[INFO] Parsing 
file:/srv/gump/public/workspace/mvnlocalrepo/shared/repository.xml
[INFO] Installing 
org/apache/taglibs/taglibs-standard-spec/1.2-SNAPSHOT/taglibs-standard-spec-1.2-SNAPSHOT.jar
[INFO] Writing OBR metadata
[INFO] 
[INFO] Building JSTL Implementation
[INFO]task-segment: [install]
[INFO] 
[INFO] [remote-resources:process {execution: default}]
[INFO] snapshot org.apache.taglibs:taglibs-standard-spec:1.2-SNAPSHOT: checking 
for updates from apache.snapshots
[debug] execute contextualize
[INFO] [resources:resources {execution: default-resources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 14 resources
[INFO] Copying 3 resources
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Compiling 96 source files to 
/srv/gump/public/workspace/tomcat-taglibs/standard/impl/target/classes
[INFO] -
[ERROR] COMPILATION ERROR : 
[INFO] -
[ERROR] 
/srv/gump/public/workspace/tomcat-taglibs/standard/impl/src/main/java/org/apache/taglibs/standard/tag/common/sql/DataSourceWrapper.java:[38,7]
 error: DataSourceWrapper is not abstract and does not override abstract method 
getParentLogger() in CommonDataSource
[INFO] 1 error
[INFO] -
[INFO] 
[ERROR] BUILD FAILURE
[INFO] 
[INFO] Compilation failure
/srv/gump/public/workspace/tomcat-taglibs/standard/impl/src/main/java/org/apache/taglibs/standard/tag/common/sql/DataSourceWrapper.java:[38,7]
 error: DataSourceWrapper is not abstract and does not override abstract method 
getParentLogger() in CommonDataSource

[INFO] 
[INFO] For more information, run Maven with the -e switch
[INFO] --

svn commit: r1406156 - /tomcat/trunk/java/org/apache/jasper/runtime/PageContextImpl.java

2012-11-06 Thread markt
Author: markt
Date: Tue Nov  6 14:52:00 2012
New Revision: 1406156

URL: http://svn.apache.org/viewvc?rev=1406156&view=rev
Log:
Fix where possible and silence where not possible some deprecation warnings

Modified:
tomcat/trunk/java/org/apache/jasper/runtime/PageContextImpl.java

Modified: tomcat/trunk/java/org/apache/jasper/runtime/PageContextImpl.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/runtime/PageContextImpl.java?rev=1406156&r1=1406155&r2=1406156&view=diff
==
--- tomcat/trunk/java/org/apache/jasper/runtime/PageContextImpl.java (original)
+++ tomcat/trunk/java/org/apache/jasper/runtime/PageContextImpl.java Tue Nov  6 
14:52:00 2012
@@ -28,6 +28,7 @@ import java.util.Enumeration;
 import java.util.HashMap;
 
 import javax.el.ELContext;
+import javax.el.ELException;
 import javax.el.ExpressionFactory;
 import javax.el.ValueExpression;
 import javax.servlet.RequestDispatcher;
@@ -44,7 +45,6 @@ import javax.servlet.jsp.JspException;
 import javax.servlet.jsp.JspFactory;
 import javax.servlet.jsp.JspWriter;
 import javax.servlet.jsp.PageContext;
-import javax.servlet.jsp.el.ELException;
 import javax.servlet.jsp.tagext.BodyContent;
 
 import org.apache.jasper.compiler.Localizer;
@@ -832,6 +832,7 @@ public class PageContextImpl extends Pag
 
 }
 
+@SuppressWarnings("deprecation") // Still jave to support old JSP EL
 private void doHandlePageException(Throwable t) throws IOException,
 ServletException {
 
@@ -887,10 +888,9 @@ public class PageContextImpl extends Pag
 throw (RuntimeException) t;
 
 Throwable rootCause = null;
-if (t instanceof JspException) {
-rootCause = ((JspException) t).getCause();
-} else if (t instanceof ELException) {
-rootCause = ((ELException) t).getCause();
+if (t instanceof JspException || t instanceof ELException ||
+t instanceof javax.servlet.jsp.el.ELException) {
+rootCause =t.getCause();
 }
 
 if (rootCause != null) {



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



svn commit: r1406166 - in /tomcat/trunk/java/org/apache/jasper/runtime: JspContextWrapper.java ProtectedFunctionMapper.java

2012-11-06 Thread markt
Author: markt
Date: Tue Nov  6 14:59:38 2012
New Revision: 1406166

URL: http://svn.apache.org/viewvc?rev=1406166&view=rev
Log:
Silence some more deprecation warnings we can't avoid

Modified:
tomcat/trunk/java/org/apache/jasper/runtime/JspContextWrapper.java
tomcat/trunk/java/org/apache/jasper/runtime/ProtectedFunctionMapper.java

Modified: tomcat/trunk/java/org/apache/jasper/runtime/JspContextWrapper.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/runtime/JspContextWrapper.java?rev=1406166&r1=1406165&r2=1406166&view=diff
==
--- tomcat/trunk/java/org/apache/jasper/runtime/JspContextWrapper.java 
(original)
+++ tomcat/trunk/java/org/apache/jasper/runtime/JspContextWrapper.java Tue Nov  
6 14:59:38 2012
@@ -57,6 +57,7 @@ import org.apache.jasper.compiler.Locali
  * @author Jan Luehe
  * @author Jacob Hookom
  */
+@SuppressWarnings("deprecation") // Have to support old JSP EL API
 public class JspContextWrapper extends PageContext implements VariableResolver 
{
 
 // Invoking JSP context

Modified: 
tomcat/trunk/java/org/apache/jasper/runtime/ProtectedFunctionMapper.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/runtime/ProtectedFunctionMapper.java?rev=1406166&r1=1406165&r2=1406166&view=diff
==
--- tomcat/trunk/java/org/apache/jasper/runtime/ProtectedFunctionMapper.java 
(original)
+++ tomcat/trunk/java/org/apache/jasper/runtime/ProtectedFunctionMapper.java 
Tue Nov  6 14:59:38 2012
@@ -35,6 +35,7 @@ import org.apache.jasper.security.Securi
  * @author Mark Roth
  * @author Kin-man Chung
  */
+@SuppressWarnings("deprecation") // Have to support old JSP EL API
 public final class ProtectedFunctionMapper extends javax.el.FunctionMapper
 implements FunctionMapper {
 



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



[Bug 44454] busy count reported in mod_jk inflated, causes incorrect balancing

2012-11-06 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=44454

Juan  changed:

   What|Removed |Added

 CC||jcasti...@oesia.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



Re: svn commit: r1406156 - /tomcat/trunk/java/org/apache/jasper/runtime/PageContextImpl.java

2012-11-06 Thread Konstantin Kolinko
2012/11/6  :
> Author: markt
> Date: Tue Nov  6 14:52:00 2012
> New Revision: 1406156
>
> URL: http://svn.apache.org/viewvc?rev=1406156&view=rev
> Log:
> Fix where possible and silence where not possible some deprecation warnings
>
> Modified:
> tomcat/trunk/java/org/apache/jasper/runtime/PageContextImpl.java
>
> Modified: tomcat/trunk/java/org/apache/jasper/runtime/PageContextImpl.java
> URL: 
> http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/runtime/PageContextImpl.java?rev=1406156&r1=1406155&r2=1406156&view=diff
> ==
> --- tomcat/trunk/java/org/apache/jasper/runtime/PageContextImpl.java 
> (original)
> +++ tomcat/trunk/java/org/apache/jasper/runtime/PageContextImpl.java Tue Nov  
> 6 14:52:00 2012
> @@ -28,6 +28,7 @@ import java.util.Enumeration;
>  import java.util.HashMap;
>
>  import javax.el.ELContext;
> +import javax.el.ELException;
>  import javax.el.ExpressionFactory;
>  import javax.el.ValueExpression;
>  import javax.servlet.RequestDispatcher;
> @@ -44,7 +45,6 @@ import javax.servlet.jsp.JspException;
>  import javax.servlet.jsp.JspFactory;
>  import javax.servlet.jsp.JspWriter;
>  import javax.servlet.jsp.PageContext;
> -import javax.servlet.jsp.el.ELException;
>  import javax.servlet.jsp.tagext.BodyContent;
>

Just noting that this change of imports  results in change in the type
of ELException that is thrown by the "proprietaryEvaluate()" method in
this class, because it will use a different exception now.

Just highlighting it in case if it needs more review and as this
change is not clear from the commit message. From the first look at
it, the change looks OK.

BTW, there are "XXX" comments on this
PageContextImpl#proprietaryEvaluate() method and in
o.a.jasper.compiler.JspUtil#interpreterCall(..) where it generates JSP
java code that calls this method.

The comments say that the intention was to remove this
"proprietaryEvaluate()" method.


Best regards,
Konstantin Kolinko

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



Re: svn commit: r1406156 - /tomcat/trunk/java/org/apache/jasper/runtime/PageContextImpl.java

2012-11-06 Thread Mark Thomas
On 06/11/2012 16:15, Konstantin Kolinko wrote:
> 2012/11/6  :
>> Author: markt
>> Date: Tue Nov  6 14:52:00 2012
>> New Revision: 1406156
>>
>> URL: http://svn.apache.org/viewvc?rev=1406156&view=rev
>> Log:
>> Fix where possible and silence where not possible some deprecation warnings
>>
>> Modified:
>> tomcat/trunk/java/org/apache/jasper/runtime/PageContextImpl.java
>>
>> Modified: tomcat/trunk/java/org/apache/jasper/runtime/PageContextImpl.java
>> URL: 
>> http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/runtime/PageContextImpl.java?rev=1406156&r1=1406155&r2=1406156&view=diff
>> ==
>> --- tomcat/trunk/java/org/apache/jasper/runtime/PageContextImpl.java 
>> (original)
>> +++ tomcat/trunk/java/org/apache/jasper/runtime/PageContextImpl.java Tue Nov 
>>  6 14:52:00 2012
>> @@ -28,6 +28,7 @@ import java.util.Enumeration;
>>  import java.util.HashMap;
>>
>>  import javax.el.ELContext;
>> +import javax.el.ELException;
>>  import javax.el.ExpressionFactory;
>>  import javax.el.ValueExpression;
>>  import javax.servlet.RequestDispatcher;
>> @@ -44,7 +45,6 @@ import javax.servlet.jsp.JspException;
>>  import javax.servlet.jsp.JspFactory;
>>  import javax.servlet.jsp.JspWriter;
>>  import javax.servlet.jsp.PageContext;
>> -import javax.servlet.jsp.el.ELException;
>>  import javax.servlet.jsp.tagext.BodyContent;
>>
> 
> Just noting that this change of imports  results in change in the type
> of ELException that is thrown by the "proprietaryEvaluate()" method in
> this class, because it will use a different exception now.
> 
> Just highlighting it in case if it needs more review and as this
> change is not clear from the commit message. From the first look at
> it, the change looks OK.

Yes, that was intentional. I think it is OK too.

> BTW, there are "XXX" comments on this
> PageContextImpl#proprietaryEvaluate() method and in
> o.a.jasper.compiler.JspUtil#interpreterCall(..) where it generates JSP
> java code that calls this method.
> 
> The comments say that the intention was to remove this
> "proprietaryEvaluate()" method.

I'm not sure how feasible that is, particularly given that special
handling is required when a security manager is used.

As always, thanks for the review.

Mark


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



Re: svn commit: r1405980 - /tomcat/maven-plugin/trunk/init-git-svn.sh

2012-11-06 Thread Konstantin Kolinko
It would be better to add some comment at the top of the script,  describing
- what it is needed for  (whether it initializes "git", "svn" or "git-svn"),
- how often it has to be run ("once"? Though maybe more often if the
authors file is updated).

Or maybe just mention that the file is described elsewhere, or follows
some procedure described elsewhere.

It may be worth adding the AL header (though some say that trivial
files do not need it).

Best regards,
Konstantin Kolinko

2012/11/6  :
> Author: olamy
> Date: Mon Nov  5 21:59:43 2012
> New Revision: 1405980
>
> URL: http://svn.apache.org/viewvc?rev=1405980&view=rev
> Log:
> add init-git-svn.sh script to ease git svn setup
>
> Added:
> tomcat/maven-plugin/trunk/init-git-svn.sh   (with props)
>
> Added: tomcat/maven-plugin/trunk/init-git-svn.sh
> URL: 
> http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/init-git-svn.sh?rev=1405980&view=auto
> ==
> --- tomcat/maven-plugin/trunk/init-git-svn.sh (added)
> +++ tomcat/maven-plugin/trunk/init-git-svn.sh Mon Nov  5 21:59:43 2012
> @@ -0,0 +1,4 @@
> +cd .git;wget http://git.apache.org/authors.txt; cd ..
> +git config svn.authorsfile ".git/authors.txt"
> +git svn init --prefix=origin/ --tags=tags --trunk=trunk --branches=branches 
> https://svn.apache.org/repos/asf/tomcat/maven-plugin/
> +git svn rebase
>
> Propchange: tomcat/maven-plugin/trunk/init-git-svn.sh
> --
> svn:eol-style = native
>
> Propchange: tomcat/maven-plugin/trunk/init-git-svn.sh
> --
> svn:executable = *
>
> Propchange: tomcat/maven-plugin/trunk/init-git-svn.sh
> --
> svn:keywords = Author Date Id Revision
>
>
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
>

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



[Bug 54064] tomcat native randomly very slow with high CPU usage

2012-11-06 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54064

Mladen Turk  changed:

   What|Removed |Added

  Attachment #29548|0   |1
is obsolete||

-- 
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: About Module Development

2012-11-06 Thread Konstantin Kolinko
2012/11/6 Mayur Patil :
> Hi,
>
>I want to contribute to the Tomcat code.
>
>Any tutorial please??
>

Start with RTFM and this page:
http://tomcat.apache.org/getinvolved.html

It is hard to recommend anything without knowing your qualifications.

If you want a printed book on Apache Tomcat, those are listed here:
http://tomcat.apache.org/resources.html

and on the "Books" page in the wiki.

Best regards,
Konstantin Kolinko

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



[Bug 54064] tomcat native randomly very slow with high CPU usage

2012-11-06 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54064

--- Comment #12 from Mladen Turk  ---
Created attachment 29560
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29560&action=edit
tomcat native for ubuntu 10.04

This is build on ubuntu server 10.04 linking to system's apr (1.3.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



Re: About Module Development

2012-11-06 Thread Mayur Patil
Hi Konstantin,

  I am learning java and also trying to play with Git.

  Also using tomcat from past 1 year.

  Cheers,

   Mayur.


On Tue, Nov 6, 2012 at 10:00 PM, Konstantin Kolinko
wrote:

> 2012/11/6 Mayur Patil :
> > Hi,
> >
> >I want to contribute to the Tomcat code.
> >
> >Any tutorial please??
> >
>
> Start with RTFM and this page:
> http://tomcat.apache.org/getinvolved.html
>
> It is hard to recommend anything without knowing your qualifications.
>
> If you want a printed book on Apache Tomcat, those are listed here:
> http://tomcat.apache.org/resources.html
>
> and on the "Books" page in the wiki.
>
> Best regards,
> Konstantin Kolinko
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
>
>


-- 

*Yours Sincerely,
Mayur S Patil,
*Survey No 124,
MIT College of Engineering,
Paud Road,
Kothrud,
Pune-38.
Ta: Haweli,
Dist: Pune.


[Bug 54105] Thread BLOCKED - Restart tomcat

2012-11-06 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54105

Konstantin Kolinko  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |INVALID

--- Comment #2 from Konstantin Kolinko  ---
1. There is nothing wrong with Acceptor thread waiting for incoming
connections. 

It is its job to wait for those.

2. "2" is the value of JkHandler.ERROR.

Nothing more can be said from that.

3. The Catalina$CatalinaShutdownHook thread ("Thread-19") is stalled in
unLockSocket(). That is, trying to open a new connection to Tomcat. That is
normal.

If the acceptor thread is in good state (waiting on a socket) and new
connections cannot be made, the cause is somewhere in the network libraries,
out of the control of Tomcat.

If you need further help with it, ask on the users list.

Maybe you could use other tools to diagnose your network, maybe you are hitting
ulimits.

Maybe you have hit OutOfMemory some time earlier (and as a consequence your JVM
is hardly usable any more).


4. A "critical" issue?

Note that 6.0.29 is more than 2 years old. A number of issues has been fixed
since then, including some issues with AJP protocol and some security issues.

Closing as INVALID.

BTW, the org.apache.jk implementation of AJP protocol was removed from later
versions of Apache Tomcat. Whatever this issue is, those classes do not exist
in Tomcat 7 and later.

-- 
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 54080] Comma related bug in org.apache.catalina.valves.RemoteIpValve

2012-11-06 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54080

--- Comment #2 from Konstantin Kolinko  ---
It should be possible to write '\d{1,3}' simply as '\d\d?\d?'.

-- 
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: r1406342 - in /tomcat/site/trunk: docs/migration-7.html xdocs/migration-7.xml

2012-11-06 Thread kkolinko
Author: kkolinko
Date: Tue Nov  6 21:25:11 2012
New Revision: 1406342

URL: http://svn.apache.org/viewvc?rev=1406342&view=rev
Log:
Several additions to the migration guide for Tomcat 7
1. Mention the issue with unpackWARs (bug 51294).
2. Mention the issue with slow initialization of SessionIdGenerator due to 
blocking entropy source
3. Mention the change in welcome files processing
4. Mention the annotation scanning and how to avoid it

Modified:
tomcat/site/trunk/docs/migration-7.html
tomcat/site/trunk/xdocs/migration-7.xml

Modified: tomcat/site/trunk/docs/migration-7.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/migration-7.html?rev=1406342&r1=1406341&r2=1406342&view=diff
==
--- tomcat/site/trunk/docs/migration-7.html (original)
+++ tomcat/site/trunk/docs/migration-7.html Tue Nov  6 21:25:11 2012
@@ -243,6 +243,12 @@
 Processing of conf/web.xml file
 
 
+Welcome files processing
+
+
+Annotation scanning
+
+
 Internal APIs
 
 
@@ -463,11 +469,18 @@ of Apache Tomcat.
 
   
 
-XML context descriptors are no longer extracted from deployed WARs and
-directories and copied to the host's xmlBase. The default
+XML context descriptors (META-INF/context.xml files)
+are no longer copied from deployed WARs and directories to the host's
+xmlBase. The default
 Tomcat 6 behavior can be enabled by setting the copyXML
 attribute of the Host element to true.
+
 
+The WARs outside of the host's appBase are no longer
+unpacked, regardless of the value of the Host's
+unpackWARs setting. See issue
+https://issues.apache.org/bugzilla/show_bug.cgi?id=51294#c1";>51294.
+
   
 
 
@@ -680,6 +693,35 @@ of Apache Tomcat.
 The entropy attribute has been removed
 
 
+
+
+One known issue with java.secure.SecureRandom is that
+it initialization requires some random data from an entropy source. With
+some entropy source implementations it may require some time to gather
+enough random data. If initialization of session id generator takes
+noticeable time (more than 100ms), a diagnostic message will be logged.
+E.g.:
+
+
+
+
+DATE org.apache.catalina.util.SessionIdGenerator 
createSecureRandom
+
+
+INFO: Creation of SecureRandom instance for session ID generation using 
[SHA1PRNG] took [406] milliseconds.
+
+
+
+
+It is possible to change the entropy source used by JRE by defining
+a system property. E.g.:
+
+-Djava.security.egd=file:/dev/./urandom
+
+
+
+The "/./" characters in the above value are to workaround
+http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6202721";>JRE 
issue #6202721.
   
 
 
@@ -929,7 +971,10 @@ of Apache Tomcat.
 Servlet 3.0 specification defines how web.xml file of an application
   can be combined from web fragments and annotations. Processing of the
   global conf/web.xml file that defines server-wide defaults
-  was changed as a result of implementing those rules. One noticeable
+  was changed as a result of implementing those rules.
+
+  
+One noticeable
   difference is that Filters defined in the global conf/web.xml
   now follow the ones defined in a web application, instead of preceding
   them. See issues
@@ -952,6 +997,112 @@ of Apache Tomcat.
   
 
 
+
+Welcome files 
processing
+
+
+
+
+
+  
+The welcome file processing was changed to follow clarifications in the
+  Servlet 3.0 specification. If your list of welcome files includes ones that
+  are processed by a servlet (such as *.jsp), you may observe the change in
+  behaviour. See the resourceOnlyServlets option on
+  Context.
+  
+
+  
+
+
+
+
+
+
+
+
+
+
+  
+
+
+
+Annotation 
scanning
+
+
+
+
+
+  
+The annotation scanning required by the Servlet 3.0 specification
+  may have impact on the startup time of your web application, as well as
+  increase requirements on the memory needed to load scanned classes.
+  Note, that upon clarification from the Servlet EG, even applications
+  using Servlet 2.4 and older versions of specification are being scanned.
+  See issue
+  https://issues.apache.org/bugzilla/show_bug.cgi?id=53619";>53619
+  and related discussions on the users mailing list.
+  
+
+  
+There are several ways to deal with this issue. The recommended way is
+  to mark those applications that do not require annotation scanning as such.
+  It can be done in the WEB-INF/web.xml of your application by
+  the following steps:
+
+  
+
+
+
+  Update the web-app element to indicate that the web
+  application is using specification version 3.0. You may copy the values
+  for the version, xsi:schemaLocation,
+  xmlns and xmlns:xsi attributes from the default
+  conf/web.xml file.
+
+
+
+  Add metadata-complete="true" attribute to the
+  web-app element.
+
+
+
+  Add an empty  element.
+
+  
+
+
+  
+The metadata-complete attribute is supported starting with
+  S

[Bug 54064] tomcat native randomly very slow with high CPU usage

2012-11-06 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54064

--- Comment #13 from dragos cernahoschi  ---
Answers:

1. No. It seems that the build system for jboss produces the native libraries
auto magically. It declares a dependency with jboss native 2.0.10 and I think
it downloads the libraries from somewhere, they couldn't be built locally. If
you build the Jboss 7.1.2 from github you will have the exact libraries I'm
using.

2. Jboss v. > 7.1.1 has a "native" configuration parameter for jboss web
 that enables or
disables the native support. They are definitely loaded from
modules/org/jboss/as/web/main/lib/linux-x86_64. Here I replace the jboss
library with the library you sent to me.

3. Yes. The application runs only on https. And the slow connections with high
CPU usage happen only when using ssl with the native connector "native="true".
When using the ssl with the java connector (native="false") there are some slow
requests, but they deterministic: clients connecting with strange devices, slow
connections and more importantly the CPU usage remains normal.

The bad news is that the last library you attached works better, but is not
usable. It serves https requests, but the pages are only partially loaded.
Sorry.

-- 
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: r1406384 - /tomcat/trunk/java/org/apache/jasper/runtime/JspRuntimeLibrary.java

2012-11-06 Thread markt
Author: markt
Date: Tue Nov  6 22:35:55 2012
New Revision: 1406384

URL: http://svn.apache.org/viewvc?rev=1406384&view=rev
Log:
Remove unnecessary casts and comment that does not make sense

Modified:
tomcat/trunk/java/org/apache/jasper/runtime/JspRuntimeLibrary.java

Modified: tomcat/trunk/java/org/apache/jasper/runtime/JspRuntimeLibrary.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/runtime/JspRuntimeLibrary.java?rev=1406384&r1=1406383&r2=1406384&view=diff
==
--- tomcat/trunk/java/org/apache/jasper/runtime/JspRuntimeLibrary.java 
(original)
+++ tomcat/trunk/java/org/apache/jasper/runtime/JspRuntimeLibrary.java Tue Nov  
6 22:35:55 2012
@@ -133,8 +133,7 @@ public class JspRuntimeLibrary {
 if (s == null || s.length() == 0) {
 return (char) 0;
 } else {
-// this trick avoids escaping issues
-return (char)(int) s.charAt(0);
+return s.charAt(0);
 }
 }
 



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



svn commit: r1406385 - /tomcat/trunk/java/org/apache/jasper/compiler/Mark.java

2012-11-06 Thread markt
Author: markt
Date: Tue Nov  6 22:45:26 2012
New Revision: 1406385

URL: http://svn.apache.org/viewvc?rev=1406385&view=rev
Log:
Add Eclipse generate hashCode() to fix a warning

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=1406385&r1=1406384&r2=1406385&view=diff
==
--- tomcat/trunk/java/org/apache/jasper/compiler/Mark.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/Mark.java Tue Nov  6 22:45:26 
2012
@@ -247,6 +247,20 @@ final class Mark {
 return false;
 }
 
+
+@Override
+public int hashCode() {
+final int prime = 31;
+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;
+}
+
+
 /**
  * Keep track of parser before parsing an included file.
  * This class keeps track of the parser before we switch to parsing an



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



svn commit: r1406388 - /tomcat/trunk/java/org/apache/jasper/compiler/SmapUtil.java

2012-11-06 Thread markt
Author: markt
Date: Tue Nov  6 22:51:15 2012
New Revision: 1406388

URL: http://svn.apache.org/viewvc?rev=1406388&view=rev
Log:
Refactor to avoid Eclipse warning

Modified:
tomcat/trunk/java/org/apache/jasper/compiler/SmapUtil.java

Modified: tomcat/trunk/java/org/apache/jasper/compiler/SmapUtil.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/SmapUtil.java?rev=1406388&r1=1406387&r2=1406388&view=diff
==
--- tomcat/trunk/java/org/apache/jasper/compiler/SmapUtil.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/SmapUtil.java Tue Nov  6 
22:51:15 2012
@@ -196,7 +196,8 @@ public class SmapUtil {
 
 static void install(File classFile, byte[] smap) throws IOException {
 File tmpFile = new File(classFile.getPath() + "tmp");
-new SDEInstaller(classFile, smap, tmpFile);
+SDEInstaller installer = new SDEInstaller(classFile, smap);
+installer.install(tmpFile);
 if (!classFile.delete()) {
 throw new IOException("classFile.delete() failed");
 }
@@ -205,7 +206,7 @@ public class SmapUtil {
 }
 }
 
-SDEInstaller(File inClassFile, byte[] sdeAttr, File outClassFile)
+SDEInstaller(File inClassFile, byte[] sdeAttr)
 throws IOException {
 if (!inClassFile.exists()) {
 throw new FileNotFoundException("no such file: " + 
inClassFile);
@@ -215,7 +216,9 @@ public class SmapUtil {
 // get the bytes
 orig = readWhole(inClassFile);
 gen = new byte[orig.length + sdeAttr.length + 100];
+}
 
+void install(File outClassFile) throws IOException {
 // do it
 addSDE();
 



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



svn commit: r1406389 - /tomcat/trunk/TOMCAT-NEXT.txt

2012-11-06 Thread markt
Author: markt
Date: Tue Nov  6 22:53:42 2012
New Revision: 1406389

URL: http://svn.apache.org/viewvc?rev=1406389&view=rev
Log:
Progress update

Modified:
tomcat/trunk/TOMCAT-NEXT.txt

Modified: tomcat/trunk/TOMCAT-NEXT.txt
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/TOMCAT-NEXT.txt?rev=1406389&r1=1406388&r2=1406389&view=diff
==
--- tomcat/trunk/TOMCAT-NEXT.txt (original)
+++ tomcat/trunk/TOMCAT-NEXT.txt Tue Nov  6 22:53:42 2012
@@ -202,9 +202,7 @@ but possibly 7.1.x).
 
 12. Java 7 updates
 - Use of <> operator where possible
-  - Complete for javax.*
-  - Complete for o.a.[catalina|coyote|el].*
-  - Not started for remainder
+  - Complete
 - Use of try with resources
   - Not started
 - Catching multiple exceptions



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



Re: svn commit: r1406384 - /tomcat/trunk/java/org/apache/jasper/runtime/JspRuntimeLibrary.java

2012-11-06 Thread Konstantin Kolinko
2012/11/7  :
> Author: markt
> Date: Tue Nov  6 22:35:55 2012
> New Revision: 1406384
>
> URL: http://svn.apache.org/viewvc?rev=1406384&view=rev
> Log:
> Remove unnecessary casts and comment that does not make sense
>
> Modified:
> tomcat/trunk/java/org/apache/jasper/runtime/JspRuntimeLibrary.java
>
> Modified: tomcat/trunk/java/org/apache/jasper/runtime/JspRuntimeLibrary.java
> URL: 
> http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/runtime/JspRuntimeLibrary.java?rev=1406384&r1=1406383&r2=1406384&view=diff
> ==
> --- tomcat/trunk/java/org/apache/jasper/runtime/JspRuntimeLibrary.java 
> (original)
> +++ tomcat/trunk/java/org/apache/jasper/runtime/JspRuntimeLibrary.java Tue 
> Nov  6 22:35:55 2012
> @@ -133,8 +133,7 @@ public class JspRuntimeLibrary {
>  if (s == null || s.length() == 0) {
>  return (char) 0;
>  } else {
> -// this trick avoids escaping issues
> -return (char)(int) s.charAt(0);
> +return s.charAt(0);
>  }
>  }

Just noting that I am OK with this change.

1) The (char)(int) trick would make sense if the original data were a
byte or an int. It makes no sense if the original data is a char.

For a byte the trick is needed to get rid of the sign (for an
ISO-8859-1 character in the range 128-255).

2) Quickly looking what the spec says. The JSP one says to use the EL
rules (JSP.2.3.2, JSP.2.3.4). The EL one (1.18.4) says to just call
charAt(0) here.

Best regards,
Konstantin Kolinko

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



svn commit: r1406392 - in /tomcat/trunk: java/org/apache/tomcat/util/net/NioEndpoint.java modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/SlowQueryReport.java

2012-11-06 Thread markt
Author: markt
Date: Tue Nov  6 23:07:43 2012
New Revision: 1406392

URL: http://svn.apache.org/viewvc?rev=1406392&view=rev
Log:
Fix some more warnings

Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java

tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/SlowQueryReport.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=1406392&r1=1406391&r2=1406392&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Tue Nov  6 
23:07:43 2012
@@ -1209,7 +1209,9 @@ public class NioEndpoint extends Abstrac
 cancelledKey(sk,SocketStatus.ERROR);
 return false;
 }
-sd.fchannel = new FileInputStream(f).getChannel();
+@SuppressWarnings("resource") // Closed when channel is 
closed
+FileInputStream fis = new FileInputStream(f);
+sd.fchannel = fis.getChannel();
 }
 
 //configure output channel

Modified: 
tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/SlowQueryReport.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/SlowQueryReport.java?rev=1406392&r1=1406391&r2=1406392&view=diff
==
--- 
tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/SlowQueryReport.java
 (original)
+++ 
tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/SlowQueryReport.java
 Tue Nov  6 23:07:43 2012
@@ -247,7 +247,7 @@ public class SlowQueryReport extends Abs
 "The date and time of the last invocation"
 };
 
-static final OpenType[] FIELD_TYPES = new OpenType[] {
+static final OpenType[] FIELD_TYPES = new OpenType[] {
 SimpleType.STRING,
 SimpleType.INTEGER,
 SimpleType.LONG,
@@ -281,7 +281,7 @@ public class SlowQueryReport extends Abs
 return FIELD_DESCRIPTIONS;
 }
 
-public static OpenType[] getFieldTypes() {
+public static OpenType[] getFieldTypes() {
 return FIELD_TYPES;
 }
 



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



svn commit: r1406394 - /tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java

2012-11-06 Thread markt
Author: markt
Date: Tue Nov  6 23:19:36 2012
New Revision: 1406394

URL: http://svn.apache.org/viewvc?rev=1406394&view=rev
Log:
Fix warnings in IntrospectionUtils.
One functional change to replace a debug message and a subsequent NPE with an 
IAE

Modified:
tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java?rev=1406394&r1=1406393&r2=1406394&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java Tue Nov  6 
23:19:36 2012
@@ -40,6 +40,8 @@ public final class IntrospectionUtils {
 public static boolean setProperty(Object o, String name, String value) {
 return setProperty(o,name,value,true);
 }
+
+@SuppressWarnings("null") // setPropertyMethodVoid is not null when used
 public static boolean setProperty(Object o, String name, String value,
 boolean invokeSetProperty) {
 if (log.isDebugEnabled())
@@ -308,6 +310,8 @@ public final class IntrospectionUtils {
 return methods;
 }
 
+@SuppressWarnings("null") // Neither params nor methodParams can be null
+  // when comparing their lengths
 public static Method findMethod(Class c, String name,
 Class params[]) {
 Method methods[] = findMethods(c);
@@ -341,9 +345,9 @@ public final class IntrospectionUtils {
 public static Object callMethod1(Object target, String methodN,
 Object param1, String typeParam1, ClassLoader cl) throws Exception 
{
 if (target == null || param1 == null) {
-if (log.isDebugEnabled())
-log.debug("IntrospectionUtils: Assert: Illegal params " +
-target + " " + param1);
+throw new IllegalArgumentException(
+"IntrospectionUtils: Assert: Illegal params " +
+target + " " + param1);
 }
 if (log.isDebugEnabled())
 log.debug("IntrospectionUtils: callMethod1 " +



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



svn commit: r1406399 - /tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileCleaningTracker.java

2012-11-06 Thread markt
Author: markt
Date: Tue Nov  6 23:34:27 2012
New Revision: 1406399

URL: http://svn.apache.org/viewvc?rev=1406399&view=rev
Log:
Sync to Commons IO 2.2
Fixes Eclipse warnings in this file.

Modified:

tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileCleaningTracker.java

Modified: 
tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileCleaningTracker.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileCleaningTracker.java?rev=1406399&r1=1406398&r2=1406399&view=diff
==
--- 
tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileCleaningTracker.java
 (original)
+++ 
tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileCleaningTracker.java
 Tue Nov  6 23:34:27 2012
@@ -19,8 +19,11 @@ package org.apache.tomcat.util.http.file
 import java.io.File;
 import java.lang.ref.PhantomReference;
 import java.lang.ref.ReferenceQueue;
+import java.util.ArrayList;
 import java.util.Collection;
-import java.util.Vector;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
 
 /**
  * Keeps track of files awaiting deletion, and deletes them when an associated
@@ -33,22 +36,24 @@ import java.util.Vector;
  * In an environment with multiple class loaders (a servlet container, for
  * example), you should consider stopping the background thread if it is no
  * longer needed. This is done by invoking the method
- * {@link #exitWhenFinished()}, typically in
+ * {@link #exitWhenFinished}, typically in
  * {@link javax.servlet.ServletContextListener#contextDestroyed} or similar.
  *
- * @author Noel Bergman
- * @author Martin Cooper
- * @version $Id: FileCleaner.java 490987 2006-12-29 12:11:48Z scolebourne $
+ * @version $Id$
  */
 public class FileCleaningTracker {
 /**
  * Queue of Tracker instances being watched.
  */
-ReferenceQueue /* Tracker */ q = new ReferenceQueue();
+ReferenceQueue q = new ReferenceQueue<>();
 /**
  * Collection of Tracker instances in existence.
  */
-final Collection trackers = new Vector<>();  // synchronized
+final Collection trackers = Collections.synchronizedSet(new 
HashSet()); // synchronized
+/**
+ * Collection of File paths that failed to delete.
+ */
+final List deleteFailures = Collections.synchronizedList(new 
ArrayList());
 /**
  * Whether to terminate the thread when the tracking is complete.
  */
@@ -150,6 +155,15 @@ public class FileCleaningTracker {
 }
 
 /**
+ * Return the file paths that failed to delete.
+ *
+ * @return the file paths that failed to delete
+ */
+public List getDeleteFailures() {
+return deleteFailures;
+}
+
+/**
  * Call this method to cause the file cleaner thread to terminate when
  * there are no more objects being tracked for deletion.
  * 
@@ -168,7 +182,7 @@ public class FileCleaningTracker {
  * 
  * This method allows the thread to be terminated. Simply call this method
  * in the resource cleanup code, such as {@link 
javax.servlet.ServletContextListener#contextDestroyed}.
- * One called, no new objects can be tracked by the file cleaner.
+ * Once called, no new objects can be tracked by the file cleaner.
  */
 public synchronized void exitWhenFinished() {
 // synchronized block protects reaper
@@ -200,17 +214,16 @@ public class FileCleaningTracker {
 public void run() {
 // thread exits when exitWhenFinished is true and there are no 
more tracked objects
 while (exitWhenFinished == false || trackers.size() > 0) {
-Tracker tracker = null;
 try {
 // Wait for a tracker to remove.
-tracker = (Tracker) q.remove();
-} catch (Exception e) {
-continue;
-}
-if (tracker != null) {
-tracker.delete();
-tracker.clear();
+Tracker tracker = (Tracker) q.remove(); // cannot return 
null
 trackers.remove(tracker);
+if (!tracker.delete()) {
+deleteFailures.add(tracker.getPath());
+}
+tracker.clear();
+} catch (InterruptedException e) {
+continue;
 }
 }
 }
@@ -220,7 +233,7 @@ public class FileCleaningTracker {
 /**
  * Inner class which acts as the reference for a file pending deletion.
  */
-private static final class Tracker extends PhantomReference {
+private static final class Tracker extends PhantomReference {
 
 /**
  * The full path to the file being tracked.
@@ -239,17 +252,26 @@ public class FileCleaningTracker {
  * @param marker  the marker object used to track the file, not null

[Bug 54064] tomcat native randomly very slow with high CPU usage

2012-11-06 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54064

--- Comment #14 from Mladen Turk  ---
OK, thanks for a detailed feedback.
It seems patch I made is faulty so let me try something different.

Because of high CPU usage you observe its probable we have some endless loop
and detecting such scenarios can be a real PITA, especially since its caused by
some sort of client-server communication irregularity.

I'd appreciated if you could test few more versions with some debug logging
added so we get some clue what is going on with those margin requests.

BTW, what kind of client you are using, and is there some consistency on client
usage (e.g more errors with particular client or similar)?

-- 
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: r1406456 - /tomcat/trunk/webapps/docs/config/systemprops.xml

2012-11-06 Thread kkolinko
Author: kkolinko
Date: Wed Nov  7 04:31:31 2012
New Revision: 1406456

URL: http://svn.apache.org/viewvc?rev=1406456&view=rev
Log:
Move JAR Scanning-related properties into separate section.
Correct a typo: the file is conf/catalina.properties.

Modified:
tomcat/trunk/webapps/docs/config/systemprops.xml

Modified: tomcat/trunk/webapps/docs/config/systemprops.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/systemprops.xml?rev=1406456&r1=1406455&r2=1406456&view=diff
==
--- tomcat/trunk/webapps/docs/config/systemprops.xml (original)
+++ tomcat/trunk/webapps/docs/config/systemprops.xml Wed Nov  7 04:31:31 2012
@@ -523,6 +523,39 @@
 
 
 
+
+
+  
+
+  The comma-separated list of filenames of JARs that Tomcat will not 
scan
+ for configuration information when using the
+ JarScanner functionality. Note that
+ there are additional system properties that enable JARs to be excluded
+ from specific scans rather than all scans.
+  The coded default is that no JARs are skipped however the system
+ property is set in a default Tomcat installation via the
+ $CATALINA_BASE/conf/catalina.properties file.
+
+
+
+  The comma-separated list of additional filenames of JARs that Tomcat
+ will not scan for Servlet 3.0 pluggability features.
+  The coded default is that no JARs are skipped however the system
+ property is set in a default Tomcat installation via the
+ $CATALINA_BASE/conf/catalina.properties file.
+
+
+
+  The comma-separated list of additional filenames of JARs that Tomcat
+ will not scan for TLDs.
+  The coded default is that no JARs are skipped however the system
+ property is set in a default Tomcat installation via the
+ $CATALINA_BASE/conf/catalina.properties file.
+
+  
+
+
+
 
 
   
@@ -610,33 +643,6 @@
   If not specified, the default value of false will be 
used.
 
 
-
-  The comma-separated list of filenames of JARs that Tomcat will not 
scan
- for configuration information when using the
- JarScanner functionality. Note that
- there are additional system properties that enable JARs to be excluded
- from specific scans rather than all scans.
-  The coded default is that no JARs are skipped however the system
- property is set in a default Tomcat installation via the
- $CATALINA_BASE/catalina.properties file.
-
-
-
-  The comma-separated list of additional filenames of JARs that Tomcat
- will not scan for Servlet 3.0 pluggability features.
-  The coded default is that no JARs are skipped however the system
- property is set in a default Tomcat installation via the
- $CATALINA_BASE/catalina.properties file.
-
-
-
-  The comma-separated list of additional filenames of JARs that Tomcat
- will not scan for TLDs.
-  The coded default is that no JARs are skipped however the system
- property is set in a default Tomcat installation via the
- $CATALINA_BASE/catalina.properties file.
-
-
   
 
 



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



svn commit: r1406459 - in /tomcat/tc7.0.x/trunk: ./ webapps/docs/config/systemprops.xml

2012-11-06 Thread kkolinko
Author: kkolinko
Date: Wed Nov  7 04:37:34 2012
New Revision: 1406459

URL: http://svn.apache.org/viewvc?rev=1406459&view=rev
Log:
Merged revision 1406456 from tomcat/trunk:
Move JAR Scanning-related properties into separate section.
Correct a typo: the file is conf/catalina.properties.

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/webapps/docs/config/systemprops.xml

Propchange: tomcat/tc7.0.x/trunk/
--
  Merged /tomcat/trunk:r1406456

Modified: tomcat/tc7.0.x/trunk/webapps/docs/config/systemprops.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/config/systemprops.xml?rev=1406459&r1=1406458&r2=1406459&view=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/config/systemprops.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/config/systemprops.xml Wed Nov  7 
04:37:34 2012
@@ -523,6 +523,39 @@
 
 
 
+
+
+  
+
+  The comma-separated list of filenames of JARs that Tomcat will not 
scan
+ for configuration information when using the
+ JarScanner functionality. Note that
+ there are additional system properties that enable JARs to be excluded
+ from specific scans rather than all scans.
+  The coded default is that no JARs are skipped however the system
+ property is set in a default Tomcat installation via the
+ $CATALINA_BASE/conf/catalina.properties file.
+
+
+
+  The comma-separated list of additional filenames of JARs that Tomcat
+ will not scan for Servlet 3.0 pluggability features.
+  The coded default is that no JARs are skipped however the system
+ property is set in a default Tomcat installation via the
+ $CATALINA_BASE/conf/catalina.properties file.
+
+
+
+  The comma-separated list of additional filenames of JARs that Tomcat
+ will not scan for TLDs.
+  The coded default is that no JARs are skipped however the system
+ property is set in a default Tomcat installation via the
+ $CATALINA_BASE/conf/catalina.properties file.
+
+  
+
+
+
 
 
   
@@ -610,33 +643,6 @@
   If not specified, the default value of false will be 
used.
 
 
-
-  The comma-separated list of filenames of JARs that Tomcat will not 
scan
- for configuration information when using the
- JarScanner functionality. Note that
- there are additional system properties that enable JARs to be excluded
- from specific scans rather than all scans.
-  The coded default is that no JARs are skipped however the system
- property is set in a default Tomcat installation via the
- $CATALINA_BASE/catalina.properties file.
-
-
-
-  The comma-separated list of additional filenames of JARs that Tomcat
- will not scan for Servlet 3.0 pluggability features.
-  The coded default is that no JARs are skipped however the system
- property is set in a default Tomcat installation via the
- $CATALINA_BASE/catalina.properties file.
-
-
-
-  The comma-separated list of additional filenames of JARs that Tomcat
- will not scan for TLDs.
-  The coded default is that no JARs are skipped however the system
- property is set in a default Tomcat installation via the
- $CATALINA_BASE/catalina.properties file.
-
-
   
 
 



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



buildbot failure in ASF Buildbot on tomcat-trunk

2012-11-06 Thread buildbot
The Buildbot has detected a new failure on builder tomcat-trunk while building 
ASF Buildbot.
Full details are available at:
 http://ci.apache.org/builders/tomcat-trunk/builds/3537

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: bb-vm_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch tomcat/trunk] 1406456
Blamelist: kkolinko

BUILD FAILED: failed compile_1

sincerely,
 -The Buildbot





svn commit: r1406481 - in /tomcat/trunk/webapps/docs/config: globalresources.xml systemprops.xml

2012-11-06 Thread kkolinko
Author: kkolinko
Date: Wed Nov  7 07:24:40 2012
New Revision: 1406481

URL: http://svn.apache.org/viewvc?rev=1406481&view=rev
Log:
* globalresources.xml:
Document the "closeMethod" and "singleton" attributes of a Resource element. 
The text is copied from context.xml.

* systemprops.xml:
Add spaces and breaks to reduce horizontal scrolling.

Modified:
tomcat/trunk/webapps/docs/config/globalresources.xml
tomcat/trunk/webapps/docs/config/systemprops.xml

Modified: tomcat/trunk/webapps/docs/config/globalresources.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/globalresources.xml?rev=1406481&r1=1406480&r2=1406481&view=diff
==
--- tomcat/trunk/webapps/docs/config/globalresources.xml (original)
+++ tomcat/trunk/webapps/docs/config/globalresources.xml Wed Nov  7 07:24:40 
2012
@@ -192,6 +192,15 @@
 application uses a  instead.
   
 
+  
+Name of the zero-argument method to call on a singleton resource 
when
+it is no longer required. This is intended to speed up clean-up of
+resources that would otherwise happen as part of garbage collection.
+This attribute is ignored if the singleton attribute is
+false. If not specificed, no default is defined and no close method 
will
+be called.
+  
+
   
 Optional, human-readable description of this resource.
   
@@ -208,6 +217,19 @@
 connections are assumed to be shareable.
   
 
+  
+Specify whether this resource definition is for a singleton 
resource,
+i.e. one where there is only a single instance of the resource. If this
+attribute is true, multiple JNDI lookups for this resource
+will return the same object. If this attribute is false,
+multiple JNDI lookups for this resource will return different objects.
+This attribute must be true for
+javax.sql.DataSource resources to enable JMX registration
+of the DataSource. The value of this attribute must be 
true
+or false. By default, this attribute is true.
+
+  
+
   
 The fully qualified Java class name expected by the web
 application when it performs a lookup for this resource.

Modified: tomcat/trunk/webapps/docs/config/systemprops.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/systemprops.xml?rev=1406481&r1=1406480&r2=1406481&view=diff
==
--- tomcat/trunk/webapps/docs/config/systemprops.xml (original)
+++ tomcat/trunk/webapps/docs/config/systemprops.xml Wed Nov  7 07:24:40 2012
@@ -276,14 +276,14 @@
   The default value of this system property is false.
   If this is true the default values will be changed for:
   
-  
org.apache.catalina.core.ApplicationContext.GET_RESOURCE_REQUIRE_SLASH
-  
org.apache.catalina.core.ApplicationDispatcher.WRAP_SAME_OBJECT
-  
org.apache.catalina.core.StandardHostValve.ACCESS_SESSION
-  
org.apache.catalina.session.StandardSession.ACTIVITY_CHECK
-  
org.apache.catalina.session.StandardSession.LAST_ACCESS_AT_START
-  
org.apache.tomcat.util.http.ServerCookie.ALWAYS_ADD_EXPIRES
-  
org.apache.tomcat.util.http.ServerCookie.FWD_SLASH_IS_SEPARATOR
-  
org.apache.tomcat.util.http.ServerCookie.STRICT_NAMING
+  
org.apache.catalina.core.ApplicationContext.GET_RESOURCE_REQUIRE_SLASH
+  
org.apache.catalina.core.ApplicationDispatcher.WRAP_SAME_OBJECT
+  
org.apache.catalina.core.StandardHostValve.ACCESS_SESSION
+  
org.apache.catalina.session.StandardSession.ACTIVITY_CHECK
+  
org.apache.catalina.session.StandardSession.LAST_ACCESS_AT_START
+  
org.apache.tomcat.util.http.ServerCookie.ALWAYS_ADD_EXPIRES
+  
org.apache.tomcat.util.http.ServerCookie.FWD_SLASH_IS_SEPARATOR
+  
org.apache.tomcat.util.http.ServerCookie.STRICT_NAMING
   The resourceOnlyServlets attribute of any
   Context element.
   The tldNamespaceAware attribute of any
@@ -460,7 +460,7 @@
  
-Dorg.apache.juli.formatter=org.apache.juli.OneLineFormatter
 
 
-
+
   When the memory limit of records has been reached the system needs to 
determine what action to take.
  Currently there are three actions that can be taken:
   
@@ -473,7 +473,7 @@
   The default value is 1 (OVERFLOW_DROP_LAST).
 
 
-
+
   The max number of log records that the async logger will keep in 
memory. When this limit is reached and a new record is being logged by the
  JULI framework the system will take an action based on the 
org.apache.juli.AsyncOverflowDropType setting.
   The default value is 1 records.
@@ -481,14 +481,14 @@
   
 
 
-
+
   The poll interval in milliseconds for the asynchronous logger thread 
in milliseconds.
  If the log queue

svn commit: r1406482 - in /tomcat/tc7.0.x/trunk: ./ webapps/docs/config/globalresources.xml webapps/docs/config/systemprops.xml

2012-11-06 Thread kkolinko
Author: kkolinko
Date: Wed Nov  7 07:30:07 2012
New Revision: 1406482

URL: http://svn.apache.org/viewvc?rev=1406482&view=rev
Log:
Merged revision 1406481 from tomcat/trunk:
* globalresources.xml:
Document the "closeMethod" and "singleton" attributes of a Resource element. 
The text is copied from context.xml.

* systemprops.xml:
Add spaces and breaks to reduce horizontal scrolling.

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/webapps/docs/config/globalresources.xml
tomcat/tc7.0.x/trunk/webapps/docs/config/systemprops.xml

Propchange: tomcat/tc7.0.x/trunk/
--
  Merged /tomcat/trunk:r1406481

Modified: tomcat/tc7.0.x/trunk/webapps/docs/config/globalresources.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/config/globalresources.xml?rev=1406482&r1=1406481&r2=1406482&view=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/config/globalresources.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/config/globalresources.xml Wed Nov  7 
07:30:07 2012
@@ -192,6 +192,15 @@
 application uses a  instead.
   
 
+  
+Name of the zero-argument method to call on a singleton resource 
when
+it is no longer required. This is intended to speed up clean-up of
+resources that would otherwise happen as part of garbage collection.
+This attribute is ignored if the singleton attribute is
+false. If not specificed, no default is defined and no close method 
will
+be called.
+  
+
   
 Optional, human-readable description of this resource.
   
@@ -208,6 +217,19 @@
 connections are assumed to be shareable.
   
 
+  
+Specify whether this resource definition is for a singleton 
resource,
+i.e. one where there is only a single instance of the resource. If this
+attribute is true, multiple JNDI lookups for this resource
+will return the same object. If this attribute is false,
+multiple JNDI lookups for this resource will return different objects.
+This attribute must be true for
+javax.sql.DataSource resources to enable JMX registration
+of the DataSource. The value of this attribute must be 
true
+or false. By default, this attribute is true.
+
+  
+
   
 The fully qualified Java class name expected by the web
 application when it performs a lookup for this resource.

Modified: tomcat/tc7.0.x/trunk/webapps/docs/config/systemprops.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/config/systemprops.xml?rev=1406482&r1=1406481&r2=1406482&view=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/config/systemprops.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/config/systemprops.xml Wed Nov  7 
07:30:07 2012
@@ -276,14 +276,14 @@
   The default value of this system property is false.
   If this is true the default values will be changed for:
   
-  
org.apache.catalina.core.ApplicationContext.GET_RESOURCE_REQUIRE_SLASH
-  
org.apache.catalina.core.ApplicationDispatcher.WRAP_SAME_OBJECT
-  
org.apache.catalina.core.StandardHostValve.ACCESS_SESSION
-  
org.apache.catalina.session.StandardSession.ACTIVITY_CHECK
-  
org.apache.catalina.session.StandardSession.LAST_ACCESS_AT_START
-  
org.apache.tomcat.util.http.ServerCookie.ALWAYS_ADD_EXPIRES
-  
org.apache.tomcat.util.http.ServerCookie.FWD_SLASH_IS_SEPARATOR
-  
org.apache.tomcat.util.http.ServerCookie.STRICT_NAMING
+  
org.apache.catalina.core.ApplicationContext.GET_RESOURCE_REQUIRE_SLASH
+  
org.apache.catalina.core.ApplicationDispatcher.WRAP_SAME_OBJECT
+  
org.apache.catalina.core.StandardHostValve.ACCESS_SESSION
+  
org.apache.catalina.session.StandardSession.ACTIVITY_CHECK
+  
org.apache.catalina.session.StandardSession.LAST_ACCESS_AT_START
+  
org.apache.tomcat.util.http.ServerCookie.ALWAYS_ADD_EXPIRES
+  
org.apache.tomcat.util.http.ServerCookie.FWD_SLASH_IS_SEPARATOR
+  
org.apache.tomcat.util.http.ServerCookie.STRICT_NAMING
   The resourceOnlyServlets attribute of any
   Context element.
   The tldNamespaceAware attribute of any
@@ -460,7 +460,7 @@
  
-Dorg.apache.juli.formatter=org.apache.juli.OneLineFormatter
 
 
-
+
   When the memory limit of records has been reached the system needs to 
determine what action to take.
  Currently there are three actions that can be taken:
   
@@ -473,7 +473,7 @@
   The default value is 1 (OVERFLOW_DROP_LAST).
 
 
-
+
   The max number of log records that the async logger will keep in 
memory. When this limit is reached and a new record is being logged by the
  JULI f