Re: Offline generation of effective web.xml

2012-12-03 Thread Violeta Georgieva
Hi Mark,

> OK. First question. How did you create your git repo? I am trying to add
> your repo as a remote repo to my own but there are no common ancestors.
> I think I can hack around this but I'd like to understand how it
> happened in the first place.
>

I'm using "git svn".
The last rebase that I made was 11 days ago. Commit id
8f6de1068cd1299f34ae4171e941998b9752c07a

Fix

https://issues.apache.org/bugzilla/show_bug.cgi?id=54170… 

Ensure correct registration of Filters and Servlets in the JMX
registry if the Filter or Servlet name includes a character that must
be quoted if used in an ObjectName value.

git-svn-id: http://svn.apache.org/repos/asf/tomcat/trunk@1412575
13f79535-47bb-0310-9956-ffa450edef68


This migth be the problem - if your repo contains the newest commits.
Isn't it easier to clone the repo?
I also can update it to the latest revision.

Thanks and Regards
Violeta


[Tomcat Wiki] Update of "FAQ/Password" by markt

2012-12-03 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Tomcat Wiki" for change 
notification.

The "FAQ/Password" page has been changed by markt:
http://wiki.apache.org/tomcat/FAQ/Password?action=diff&rev1=7&rev2=8

Comment:
Add note about how the config file should be protected

  = Passwords =
  == Why are plain text passwords in the config files? ==
- Because there isn't a a good way to "secure" them. When Tomcat needs to 
connect to a database, it needs the original password. While the password could 
be encoded, there still needs to be a mechanism to decode it. And since the 
source to Tomcat is freely available, the attacker would know the decoding 
method. So at best, the password is obscured - but not really protected. Please 
see the user and dev list archives for flames wars about this topic.
+ Because there isn't a a good way to "secure" them. When Tomcat needs to 
connect to a database, it needs the original password. While the password could 
be encoded, there still needs to be a mechanism to decode it. And since the 
source to Tomcat is freely available, the attacker would know the decoding 
method. So at best, the password is obscured - but not really protected. Please 
see the user and dev list archives for flames wars about this topic. That said, 
any configuration file that does contain a password needs to be appropriately 
secured. That means limiting access to the file to the user that Tomcat process 
as and root (or the administrator on Windows).
  
  In [[http://www.catb.org/~esr/writings/cathedral-bazaar/|The Cathedral and 
the Bazaar]], Eric S. Raymond recounts a story where his fetchmail users asked 
for encrypted passwords in the .fetchmailrc file (which is almost identical to 
the situation posed here with server.xml). He refused 
[[http://www.catb.org/~esr/writings/cathedral-bazaar/cathedral-bazaar/ar01s09.html|using
 the same arguments posed here]]: encrypting or otherwise obfuscating the 
password in server.xml does not provide any real security: only "security by 
obscurity" which isn't actually secure.
  

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



Re: Offline generation of effective web.xml

2012-12-03 Thread Mark Thomas
On 03/12/2012 08:51, Violeta Georgieva wrote:
> Hi Mark,
> 
>> OK. First question. How did you create your git repo? I am trying to add
>> your repo as a remote repo to my own but there are no common ancestors.
>> I think I can hack around this but I'd like to understand how it
>> happened in the first place.
>>
> 
> I'm using "git svn".
> The last rebase that I made was 11 days ago. Commit id
> 8f6de1068cd1299f34ae4171e941998b9752c07a

>From which git repository? I couldn't find that commit ID in the ASF git
repo for Tomcat trunk nor the GitHub mirror.

> git-svn-id: http://svn.apache.org/repos/asf/tomcat/trunk@1412575
> 13f79535-47bb-0310-9956-ffa450edef68

It is the problem. Hence why I am trying to understand how it happened.
Me not knowing git very well, there could be a perfectly simple
explanation for this.

> This migth be the problem - if your repo contains the newest commits.
> Isn't it easier to clone the repo?
> I also can update it to the latest revision.

I have already fixed it on my local machine with git replace to graft
your changes onto my local fork of the ASF git repo for Tomcat trunk. It
should be easy to merge in your changes from there.

Mark


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



svn commit: r1416397 - in /tomcat/trunk: java/org/apache/tomcat/websocket/LocalStrings.properties java/org/apache/tomcat/websocket/UriTemplate.java test/org/apache/tomcat/websocket/TestUriTemplate.jav

2012-12-03 Thread markt
Author: markt
Date: Mon Dec  3 09:47:56 2012
New Revision: 1416397

URL: http://svn.apache.org/viewvc?rev=1416397&view=rev
Log:
Use Pattern.quote() as suggested by kkolinko
Tighten up implementation. WS spec (draft 8, section 3.1.1.) states "if the 
relative path is a URI template (level-1) the request URI matches if and only 
if the request URI is an expanded version of the URI-template" so every path 
segment must be present - none can be optional

Modified:
tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties
tomcat/trunk/java/org/apache/tomcat/websocket/UriTemplate.java
tomcat/trunk/test/org/apache/tomcat/websocket/TestUriTemplate.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=1416397&r1=1416396&r2=1416397&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties Mon 
Dec  3 09:47:56 2012
@@ -17,4 +17,5 @@ serverContainer.endpointDeploy=Endpoint 
 serverContainer.missingEndpoint=An Endpoint instance has been request for path 
[{0}] but no matching Endpoint class was found
 serverContainer.pojoDeploy=POJO class [{0}] deploying to path [{1}] in 
ServletContext [{2}]
 serverContainer.servletContextMismatch=Attempted to register a POJO annotated 
for WebSocket at path [{0}] in the ServletContext with context path [{1}] when 
the WebSocket ServerContainer is allocated to the ServletContext with context 
path [{2}]
-serverContainer.servletContextMissing=No ServletContext was specified
\ No newline at end of file
+serverContainer.servletContextMissing=No ServletContext was specified
+uriTemplate.noMatch=The input template [{0}] generated the pattern [{1}] which 
did not match the supplied pathInfo [{2}]
\ No newline at end of file

Modified: tomcat/trunk/java/org/apache/tomcat/websocket/UriTemplate.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/UriTemplate.java?rev=1416397&r1=1416396&r2=1416397&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/websocket/UriTemplate.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/UriTemplate.java Mon Dec  3 
09:47:56 2012
@@ -23,28 +23,36 @@ import java.util.Map;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
+import org.apache.tomcat.util.res.StringManager;
+
 /**
  * Extracts path parameters from URIs used to create web socket connections
  * using the URI template defined for the associated Endpoint.
  */
 public class UriTemplate {
 
+private static StringManager sm = StringManager.getManager(
+Constants.PACKAGE_NAME);
+
+private final String template;
 private final Pattern pattern;
 private final List names = new ArrayList<>();
 
 public UriTemplate(String template) {
+
+this.template = template;
+
 // +10 is just a guess at this point
 StringBuilder pattern = new StringBuilder(template.length() + 10);
 
-
 int pos = 0;
 int end = 0;
 int start = template.indexOf('{');
 while (start > -1) {
 end = template.indexOf('}', start);
 pattern.append('(');
-pattern.append(template.substring(pos, start));
-pattern.append(")?([^/]*)");
+pattern.append(Pattern.quote(template.substring(pos, start)));
+pattern.append(")([^/]*)");
 names.add(template.substring(start + 1, end));
 pos = end + 1;
 start = template.indexOf('{', pos);
@@ -77,7 +85,11 @@ public class UriTemplate {
 public Map match(String pathInfo) {
 Map result = new HashMap<>();
 Matcher m = pattern.matcher(pathInfo);
-m.matches();
+
+if (!m.matches()) {
+throw new IllegalArgumentException(sm.getString(
+"uriTemplate.noMatch", template, pattern, pathInfo));
+}
 
 int group = 2;
 for (String name : names) {

Modified: tomcat/trunk/test/org/apache/tomcat/websocket/TestUriTemplate.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/websocket/TestUriTemplate.java?rev=1416397&r1=1416396&r2=1416397&view=diff
==
--- tomcat/trunk/test/org/apache/tomcat/websocket/TestUriTemplate.java 
(original)
+++ tomcat/trunk/test/org/apache/tomcat/websocket/TestUriTemplate.java Mon Dec  
3 09:47:56 2012
@@ -37,14 +37,10 @@ public class TestUriTemplate {
 }
 
 
-@Test
+@Test(expected=java.lang.IllegalArgumentException.class)
 public void testOneOfTwo() throws Exception {
 UriTemplate t = new UriTemplate("/{a}/{b}");
-

[Bug 54191] TomEE 1.5+ SNAPSHOT struggling with PrimeFaces p:calendar readonlyInput="#{someEL ? 'true' : 'false'}"

2012-12-03 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54191

--- Comment #5 from Mark Thomas  ---
It has been over a week with no response to my request for further information.
I'll leave this open a little longer but without the requested information this
is going to get resolved as WORKSFORME.

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



Time for 7.0.34

2012-12-03 Thread Mark Thomas
There isn't much in the 7.0.x change log but it is the start of the
month so I'm starting the 7.0.34 release process. The plan, as always is:
- fix any open bugs
- check the unit tests and TCKs
- tag
- vote
- hopefully release

Best guess right now is that I'll be tagging 7.0.34 tomorrow.

Mark

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



[Bug 54217] JDBC connection pool runs out of connections when Context reload=“true” is enabled in Tomcat

2012-12-03 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54217

--- Comment #4 from Mark Thomas  ---
There looks to be a memory leak here. Stopping the context should make the
connections eligible for GC but a reference is being retained by the
PoolCleaner thread.

-- 
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: Time for 7.0.34

2012-12-03 Thread Konstantin Kolinko
2012/12/3 Mark Thomas :
> There isn't much in the 7.0.x change log but it is the start of the
> month so I'm starting the 7.0.34 release process. The plan, as always is:
> - fix any open bugs
> - check the unit tests and TCKs
> - tag
> - vote
> - hopefully release
>
> Best guess right now is that I'll be tagging 7.0.34 tomorrow.
>

OK.

1. I think we need to switch over to the recently released Daemon 1.0.11.
2. There are a number of issues filed for jdbc-pool. It is not a
stopper, but it might be worth looking at them.

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: r1415081 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/valves/ webapps/docs/ webapps/docs/config/

2012-12-03 Thread Konstantin Kolinko
2012/11/29  :
> Author: rjung
> Date: Thu Nov 29 08:33:47 2012
> New Revision: 1415081
>
> URL: http://svn.apache.org/viewvc?rev=1415081&view=rev
> Log:
> Add new ALV attribute "renameOnRotate" (Default:false).
>
> If set to "true", the "fileDateFormat" will not be part
> of the current log file. Only at the time of log rotation
> the file is renamed to the final name including the
> "fileDateFormat".
>
> This mimics the behavior e.g. of Log4J and similar frameworks,
> where the active file does not have the timestamp in the file
> name.
>
> Pro: current file has stable name, all files with
>  timestamp in name are old.
> Con: Slightly more complex impl.
>
> Backport of r1414889 from trunk.
>
> Modified:
> tomcat/tc7.0.x/trunk/   (props changed)
> tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/AccessLogValve.java
> 
> tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/LocalStrings.properties
> 
> tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/mbeans-descriptors.xml
> tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
> tomcat/tc7.0.x/trunk/webapps/docs/config/valve.xml
>

Interesting.
Several notes. Just informational.
a) It should be easy to extend this to skip rotation if file.length() is 0.

b) The sample configuration in conf/server.xml is
prefix="localhost_access_log." suffix=".txt"
If I just enable this feature, I would get a file named
"localhost_access_log..txt" with two dots.

A remedy is to explicitly define the fileDateFormat attribute and move
the dot from prefix attribute into fileDateFormat one.

Best regards,
Konstantin Kolinko

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



Re: Time for 7.0.34

2012-12-03 Thread Mark Thomas
On 03/12/2012 11:00, Konstantin Kolinko wrote:
> 2012/12/3 Mark Thomas :
>> There isn't much in the 7.0.x change log but it is the start of the
>> month so I'm starting the 7.0.34 release process. The plan, as always is:
>> - fix any open bugs
>> - check the unit tests and TCKs
>> - tag
>> - vote
>> - hopefully release
>>
>> Best guess right now is that I'll be tagging 7.0.34 tomorrow.
>>
> 
> OK.
> 
> 1. I think we need to switch over to the recently released Daemon 1.0.11.

There is a regression that needs to be fixed. I think we should wait for
1.0.12.

> 2. There are a number of issues filed for jdbc-pool. It is not a
> stopper, but it might be worth looking at them.

I don't usually look at the jdbc-pool bugs when I do a release.

Mark


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



[Bug 53565] deprecated

2012-12-03 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=53565

Mark Thomas  changed:

   What|Removed |Added

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

--- Comment #1 from Mark Thomas  ---
Fixed in trunk and 7.0.x and will be included in 7.0.34 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



svn commit: r1416450 - in /tomcat/tc7.0.x/trunk: ./ modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/ webapps/docs/

2012-12-03 Thread markt
Author: markt
Date: Mon Dec  3 11:15:12 2012
New Revision: 1416450

URL: http://svn.apache.org/viewvc?rev=1416450&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=53565
Fix a handful of Eclipse warnings in the JDBC pool source code

Modified:
tomcat/tc7.0.x/trunk/   (props changed)

tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/FairBlockingQueue.java

tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/MultiLockFairBlockingQueue.java

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

tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/StatementDecoratorInterceptor.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

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

Modified: 
tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/FairBlockingQueue.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/FairBlockingQueue.java?rev=1416450&r1=1416449&r2=1416450&view=diff
==
--- 
tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/FairBlockingQueue.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/FairBlockingQueue.java
 Mon Dec  3 11:15:12 2012
@@ -503,6 +503,7 @@ public class FairBlockingQueue implem
 int index;
 E element = null;
 
+@SuppressWarnings("unchecked") // Can't create arrays of generic types
 public FairIterator() {
 final ReentrantLock lock = FairBlockingQueue.this.lock;
 lock.lock();

Modified: 
tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/MultiLockFairBlockingQueue.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/MultiLockFairBlockingQueue.java?rev=1416450&r1=1416449&r2=1416450&view=diff
==
--- 
tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/MultiLockFairBlockingQueue.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/MultiLockFairBlockingQueue.java
 Mon Dec  3 11:15:12 2012
@@ -80,6 +80,7 @@ public class MultiLockFairBlockingQueue<
 /**
  * Creates a new fair blocking queue.
  */
+@SuppressWarnings("unchecked") // Can create arrays of generic types
 public MultiLockFairBlockingQueue() {
 items = new LinkedList[LOCK_COUNT];
 waiters = new LinkedList[LOCK_COUNT];
@@ -520,6 +521,7 @@ public class MultiLockFairBlockingQueue<
 int index;
 E element = null;
 
+@SuppressWarnings("unchecked") // Can't create arrays of generic types
 public FairIterator() {
 ArrayList list = new 
ArrayList(MultiLockFairBlockingQueue.this.size());
 for (int idx=0; idxhttp://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/SlowQueryReport.java?rev=1416450&r1=1416449&r2=1416450&view=diff
==
--- 
tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/SlowQueryReport.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/SlowQueryReport.java
 Mon Dec  3 11:15:12 2012
@@ -16,8 +16,11 @@
  */
 package org.apache.tomcat.jdbc.pool.interceptor;
 
+import java.text.SimpleDateFormat;
 import java.util.Iterator;
+import java.util.Locale;
 import java.util.Map;
+import java.util.TimeZone;
 import java.util.concurrent.ConcurrentHashMap;
 
 import javax.management.openmbean.CompositeDataSupport;
@@ -116,13 +119,13 @@ public class SlowQueryReport extends Abs
 @Override
 public void prepareStatement(String sql, long time) {
 QueryStats qs = getQueryStats(sql);
-qs.prepare(time, System.currentTimeMillis());
+qs.prepare(time);
 }
 
 @Override
 public void prepareCall(String sql, long time) {
 QueryStats qs = getQueryStats(sql);
-qs.prepare(time, System.currentTimeMillis());
+qs.prepare(time);
 }
 
 /**
@@ -287,6 +290,9 @@ public class SlowQueryReport extends Abs
 
 @Override
 public String toString() {
+SimpleDateFormat sdf =
+new SimpleDateFormat("d MMM  HH:mm:ss z", Locale.US);
+sdf.setTimeZone(TimeZone.getTimeZone("GMT"));
 StringBuilder buf = new StringBuilder("QueryStats[query:");

[Bug 54116] Deadlocks with mysql driver

2012-12-03 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54116

Mark Thomas  changed:

   What|Removed |Added

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

--- Comment #4 from Mark Thomas  ---
Inconsistent locking in the driver is not a JDBC pool 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



[Bug 54190] TestNonLoginAndBasicAuthenticator does not test session timeout properly

2012-12-03 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54190

--- Comment #7 from Brian Burch  ---
Created attachment 29669
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29669&action=edit
Faster detection of expired session in timeout test case

Reduce run time of testBasicLoginSessionTimeout() from 130 to 80 seconds, based
on suggestion (b) from Konstantin Kolinko.

-- 
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 54190] TestNonLoginAndBasicAuthenticator does not test session timeout properly

2012-12-03 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54190

Brian Burch  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |---

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



[OT] was Re: Time for 7.0.34

2012-12-03 Thread Jess Holle

On 12/3/2012 5:09 AM, Mark Thomas wrote:

On 03/12/2012 11:00, Konstantin Kolinko wrote:

1. I think we need to switch over to the recently released Daemon 1.0.11.

There is a regression that needs to be fixed. I think we should wait for
1.0.12.
Can you elaborate on the regression?  [Having just moved to procrun 
1.0.11 for something else, I'm quite interested.]


--
Jess Holle


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



[Bug 54235] New: tomcat jdbc pool stackoverflow error used with spring

2012-12-03 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54235

Bug ID: 54235
   Summary: tomcat jdbc pool stackoverflow error used with spring
   Product: Tomcat Modules
   Version: unspecified
  Hardware: PC
Status: NEW
  Severity: normal
  Priority: P2
 Component: jdbc-pool
  Assignee: dev@tomcat.apache.org
  Reporter: yanky.yo...@gmail.com
Classification: Unclassified

I'm evaluating jdbc pool after reading some blogs on  tomcatexpert.com. But
when I try to switch to jdbc pool from dbcp, I'm  getting stackoverflow error
like this:

Caused by: java.lang.StackOverflowError
at
java.util.concurrent.AbstractExecutorService.(AbstractExecutorService.java:71)
at
java.util.concurrent.ThreadPoolExecutor.(ThreadPoolExecutor.java:1270)
at
java.util.concurrent.ThreadPoolExecutor.(ThreadPoolExecutor.java:1163)
at
org.apache.tomcat.jdbc.pool.ConnectionPool.(ConnectionPool.java:117)
at
org.apache.tomcat.jdbc.pool.DataSourceProxy.pCreatePool(DataSourceProxy.java:116)
at
org.apache.tomcat.jdbc.pool.DataSourceProxy.createPool(DataSourceProxy.java:103)
at
org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:127)
at
org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:86)
at
org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDataSource(PooledConnection.java:224)
at
org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:180)
at
org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:699)
at
org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:631)
at org.apache.tomcat.jdbc.pool.ConnectionPool.init(ConnectionPool.java:485)
at
org.apache.tomcat.jdbc.pool.ConnectionPool.(ConnectionPool.java:143)
at
org.apache.tomcat.jdbc.pool.DataSourceProxy.pCreatePool(DataSourceProxy.java:116)
at
org.apache.tomcat.jdbc.pool.DataSourceProxy.createPool(DataSourceProxy.java:103)
at
org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:127)
at
org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:86)
at
org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDataSource(PooledConnection.java:224)
at
org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:180)
at
org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:699)
at
org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:631)
at org.apache.tomcat.jdbc.pool.ConnectionPool.init(ConnectionPool.java:485)
at
org.apache.tomcat.jdbc.pool.ConnectionPool.(ConnectionPool.java:143)
at
org.apache.tomcat.jdbc.pool.DataSourceProxy.pCreatePool(DataSourceProxy.java:116)
at
org.apache.tomcat.jdbc.pool.DataSourceProxy.createPool(DataSourceProxy.java:103)
at
org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:127)
at
org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:86)
at
org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDataSource(PooledConnection.java:224)

and I noticed that someone had the same issue before but not answered:
http://mail-archives.apache.org/mod_mbox/tomcat-users/201107.mbox/%3c32046311.p...@talk.nabble.com%3E

my web app is a typical springmvc+hibernate application, and here is my
applicationcontext datasource part:
















my system:
win7 32bit
jdk1.7.0_9(also test on jdk1.6.0_25)
mysql 5.5(also test oracle11g)
spring 3.1.0
jdbc pool(tomcat-jdbc-7.0.30.jar from official maven repo)

And by tomcat container resource configuration, I find a workaround to make
jdbc pool work with spring: 
1. add a Resource section in tomcat server.xml to make a global naming resource
2. add a resource-ref section in WEB-INF/web.xml to reference container
resource
3. add a bean section to spring applicationContext.xml to reference container
resouce by spring provided JndiObjectFacetoryBean

-- 
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: [OT] was Re: Time for 7.0.34

2012-12-03 Thread Rainer Jung
On 03.12.2012 12:27, Jess Holle wrote:
> On 12/3/2012 5:09 AM, Mark Thomas wrote:
>> On 03/12/2012 11:00, Konstantin Kolinko wrote:
>>> 1. I think we need to switch over to the recently released Daemon
>>> 1.0.11.
>> There is a regression that needs to be fixed. I think we should wait for
>> 1.0.12.
> Can you elaborate on the regression?  [Having just moved to procrun
> 1.0.11 for something else, I'm quite interested.]

https://issues.apache.org/jira/browse/DAEMON-268

Also https://issues.apache.org/jira/browse/DAEMON-245 was solved
incompletely, so https://issues.apache.org/jira/browse/DAEMON-269 was
raised. That one isn't a regression/showstopper though.

Regards,

Rainer


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



Re: svn commit: r1415184 - in /tomcat/tc7.0.x/trunk: ./ test/org/apache/catalina/authenticator/TestNonLoginAndBasicAuthenticator.java webapps/docs/changelog.xml

2012-12-03 Thread Brian Burch

On 02/12/12 22:00, Konstantin Kolinko wrote:

2012/11/29  :

Author: markt
Date: Thu Nov 29 14:35:02 2012
New Revision: 1415184

URL: http://svn.apache.org/viewvc?rev=1415184&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54190
Improve unit tests.
Patch by Brian Burch.

Modified:
 tomcat/tc7.0.x/trunk/   (props changed)
 
tomcat/tc7.0.x/trunk/test/org/apache/catalina/authenticator/TestNonLoginAndBasicAuthenticator.java
 tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc7.0.x/trunk/
--
   Merged /tomcat/trunk:r1415177-1415179




+private static final int SHORT_TIMEOUT_MINS = 1;
+private static final int LONG_TIMEOUT_MINS = 2;
+private static final int MANAGER_SCAN_DELAY_SECS = 60;
+private static final int EXTRA_DELAY_SECS = 5;
+private static final long TIMEOUT_DELAY_MSECS =
+(((SHORT_TIMEOUT_MINS * 60)
++ MANAGER_SCAN_DELAY_SECS + EXTRA_DELAY_SECS) * 1000);


...


+// allow the session to time out and lose authentication
+Thread.sleep(TIMEOUT_DELAY_MSECS);



According to Buildbot logs, testBasicLoginSessionTimeout() runs for 2
minutes (125 seconds), mainly due to a sleep() call.

I wish there were a way to speed up this test.

My thoughts
a) Maybe use reflection to reduce StandardSession.lastAccessedTime and
thisAccessedTime by some fixed amount (6) instead of waiting for
that time to pass.


That would speed up the test... but it sounds like adding a time machine 
to the test class! My feeling is this would add inappropriate logical 
complexity to a test that has always created and destroyed a tomcat 
instance for each test case (there are now 15).


However, I intend to replicate most of the improvements from this test 
class into the other authenticator tests, so I am already apprehensive 
about adding too many 60+ second delays to the entire suite.


Mark and I briefly discussed adding a new protected method for use by 
these timeout tests:


org.apache.catalina.session.StandardSession.setSessionTimeoutSecs(int secs)

What do you think?


b) Maybe call ManagerBase.setProcessExpiresFrequency(1) instead of the
default value (6)  and reduce MANAGER_SCAN_DELAY_SECS from 60 to 10.


Mark and I discussed this idea earlier, but I was reluctant to increase 
complexity in an already radical change to the original.


Your suggestion showed me how to achieve faster detection in a fairly 
simple manner, so I have reopened the bug and provided a new patch that 
shaves 50 seconds off the run time of the timeout test. Thanks!



Best regards,
Konstantin Kolinko

-
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



svn commit: r1416458 - /tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java

2012-12-03 Thread markt
Author: markt
Date: Mon Dec  3 11:45:47 2012
New Revision: 1416458

URL: http://svn.apache.org/viewvc?rev=1416458&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54217
Prevent PoolCleaner instances retaining references to the ConnectionPool which  
may result in a memory leak.

Modified:

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

Modified: 
tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java?rev=1416458&r1=1416457&r2=1416458&view=diff
==
--- 
tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java
 (original)
+++ 
tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java
 Mon Dec  3 11:45:47 2012
@@ -16,6 +16,7 @@
  */
 package org.apache.tomcat.jdbc.pool;
 
+import java.lang.ref.WeakReference;
 import java.lang.reflect.Constructor;
 import java.lang.reflect.InvocationHandler;
 import java.lang.reflect.Proxy;
@@ -1315,14 +1316,13 @@ public class ConnectionPool {
 return poolCleanTimer;
 }
 
-protected class PoolCleaner extends TimerTask {
-protected ConnectionPool pool;
+protected static class PoolCleaner extends TimerTask {
+protected WeakReference pool;
 protected long sleepTime;
-protected volatile boolean run = true;
 protected volatile long lastRun = 0;
 
 PoolCleaner(ConnectionPool pool, long sleepTime) {
-this.pool = pool;
+this.pool = new WeakReference<>(pool);
 this.sleepTime = sleepTime;
 if (sleepTime <= 0) {
 log.warn("Database connection pool evicter thread interval is 
set to 0, defaulting to 30 seconds");
@@ -1334,11 +1334,11 @@ public class ConnectionPool {
 
 @Override
 public void run() {
-if (pool.isClosed()) {
-if (pool.getSize() <= 0) {
-run = false;
-}
-} else if ((System.currentTimeMillis() - lastRun) > sleepTime) {
+ConnectionPool pool = this.pool.get();
+if (pool == null) {
+stopRunning();
+} else if (!pool.isClosed() &&
+(System.currentTimeMillis() - lastRun) > sleepTime) {
 lastRun = System.currentTimeMillis();
 try {
 if (pool.getPoolProperties().isRemoveAbandoned())
@@ -1350,9 +1350,9 @@ public class ConnectionPool {
 pool.testAllIdle();
 } catch (Exception x) {
 log.error("", x);
-} // catch
-} // end if
-} // run
+}
+}
+}
 
 public void start() {
 registerCleaner(this);



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



Re: [OT] was Re: Time for 7.0.34

2012-12-03 Thread Jess Holle

On 12/3/2012 5:39 AM, Rainer Jung wrote:

On 03.12.2012 12:27, Jess Holle wrote:

On 12/3/2012 5:09 AM, Mark Thomas wrote:

On 03/12/2012 11:00, Konstantin Kolinko wrote:

1. I think we need to switch over to the recently released Daemon
1.0.11.

There is a regression that needs to be fixed. I think we should wait for
1.0.12.

Can you elaborate on the regression?  [Having just moved to procrun
1.0.11 for something else, I'm quite interested.]

https://issues.apache.org/jira/browse/DAEMON-268

Also https://issues.apache.org/jira/browse/DAEMON-245 was solved
incompletely, so https://issues.apache.org/jira/browse/DAEMON-269 was
raised. That one isn't a regression/showstopper though.
So for procrun, 269 is of interest, but not a regression, and 1.0.11 
will do for now.  [1.0.11 was key in actually allowing automatic 
restart, etc, actions upon service failure.]


Thanks.

--
Jess Holle


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



[Bug 54217] JDBC connection pool runs out of connections when Context reload=“true” is enabled in Tomcat

2012-12-03 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54217

Mark Thomas  changed:

   What|Removed |Added

  Component|Documentation   |jdbc-pool
Version|7.0.32  |unspecified
Product|Tomcat 7|Tomcat Modules

--- Comment #5 from Mark Thomas  ---
Confirmed. This is a memory leak bug in jdbc-pool. PoolCleaner instances are
retaining references to the ConnectionPool preventing it from being GC'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: r1416459 - in /tomcat/tc7.0.x/trunk: ./ modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java

2012-12-03 Thread markt
Author: markt
Date: Mon Dec  3 11:48:27 2012
New Revision: 1416459

URL: http://svn.apache.org/viewvc?rev=1416459&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54217
Prevent PoolCleaner instances retaining references to the ConnectionPool which  
may result in a memory leak.

Modified:
tomcat/tc7.0.x/trunk/   (props changed)

tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java

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

Modified: 
tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java?rev=1416459&r1=1416458&r2=1416459&view=diff
==
--- 
tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java
 Mon Dec  3 11:48:27 2012
@@ -16,6 +16,7 @@
  */
 package org.apache.tomcat.jdbc.pool;
 
+import java.lang.ref.WeakReference;
 import java.lang.reflect.Constructor;
 import java.lang.reflect.InvocationHandler;
 import java.lang.reflect.Proxy;
@@ -1315,14 +1316,13 @@ public class ConnectionPool {
 return poolCleanTimer;
 }
 
-protected class PoolCleaner extends TimerTask {
-protected ConnectionPool pool;
+protected static class PoolCleaner extends TimerTask {
+protected WeakReference pool;
 protected long sleepTime;
-protected volatile boolean run = true;
 protected volatile long lastRun = 0;
 
 PoolCleaner(ConnectionPool pool, long sleepTime) {
-this.pool = pool;
+this.pool = new WeakReference(pool);
 this.sleepTime = sleepTime;
 if (sleepTime <= 0) {
 log.warn("Database connection pool evicter thread interval is 
set to 0, defaulting to 30 seconds");
@@ -1334,11 +1334,11 @@ public class ConnectionPool {
 
 @Override
 public void run() {
-if (pool.isClosed()) {
-if (pool.getSize() <= 0) {
-run = false;
-}
-} else if ((System.currentTimeMillis() - lastRun) > sleepTime) {
+ConnectionPool pool = this.pool.get();
+if (pool == null) {
+stopRunning();
+} else if (!pool.isClosed() &&
+(System.currentTimeMillis() - lastRun) > sleepTime) {
 lastRun = System.currentTimeMillis();
 try {
 if (pool.getPoolProperties().isRemoveAbandoned())
@@ -1350,9 +1350,9 @@ public class ConnectionPool {
 pool.testAllIdle();
 } catch (Exception x) {
 log.error("", x);
-} // catch
-} // end if
-} // run
+}
+}
+}
 
 public void start() {
 registerCleaner(this);



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



[Bug 54217] JDBC connection pool runs out of connections when Context reload=“true” is enabled in Tomcat

2012-12-03 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54217

Mark Thomas  changed:

   What|Removed |Added

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

--- Comment #6 from Mark Thomas  ---
This has been fixed in trunk and 7.0.x and will be included in 7.0.34 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 53871] java.lang.StackOverflowError on deploying a web application

2012-12-03 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=53871

Matthias Schuetz  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|WORKSFORME  |---

--- Comment #5 from Matthias Schuetz  ---
I had the same problem. Steps to reproduce are:

Due to dependency management problems I deployed a WAR file containing two JAR
files containing different versions of a library, where version 1 contained a
class A which inherited from B and another version 2 which contained a class B
inheriting from A.
The classes were loaded in such an order that A and B cyclically inherited from
each other which leads to a stack overflow in populateSCIsForCacheEntry because
it does not detect cycles in the inheritance tree.

-- 
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: r1415081 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/valves/ webapps/docs/ webapps/docs/config/

2012-12-03 Thread Rainer Jung
On 03.12.2012 12:09, Konstantin Kolinko wrote:
> 2012/11/29  :
>> Author: rjung
>> Date: Thu Nov 29 08:33:47 2012
>> New Revision: 1415081
>>
>> URL: http://svn.apache.org/viewvc?rev=1415081&view=rev
>> Log:
>> Add new ALV attribute "renameOnRotate" (Default:false).
>>
>> If set to "true", the "fileDateFormat" will not be part
>> of the current log file. Only at the time of log rotation
>> the file is renamed to the final name including the
>> "fileDateFormat".
>>
>> This mimics the behavior e.g. of Log4J and similar frameworks,
>> where the active file does not have the timestamp in the file
>> name.
>>
>> Pro: current file has stable name, all files with
>>  timestamp in name are old.
>> Con: Slightly more complex impl.
>>
>> Backport of r1414889 from trunk.
>>
>> Modified:
>> tomcat/tc7.0.x/trunk/   (props changed)
>> tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/AccessLogValve.java
>> 
>> tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/LocalStrings.properties
>> 
>> tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/mbeans-descriptors.xml
>> tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
>> tomcat/tc7.0.x/trunk/webapps/docs/config/valve.xml
>>
> 
> Interesting.
> Several notes. Just informational.

Thanks for testing!

> a) It should be easy to extend this to skip rotation if file.length() is 0.
> 
> b) The sample configuration in conf/server.xml is
> prefix="localhost_access_log." suffix=".txt"
> If I just enable this feature, I would get a file named
> "localhost_access_log..txt" with two dots.
> 
> A remedy is to explicitly define the fileDateFormat attribute and move
> the dot from prefix attribute into fileDateFormat one.

Yes, what about moving the trailing prefix dot to fileDateFormat for TC
8 and making the default fileDateFormat explicitly known by adding it to
the default server.xml? If we do so: should we still automatically set a
default fileDateFormat if the config contains an explicit empty one? I'd
say no (all for TC 8).

I'm reluctant about changing the default for TC 7 in case someone only
changed prefix or suffix or fileDateFormat and then will suddenly
observe different behavior. I think it is better to let the few people
using the feature fix their settings if they turn on renameOnRotate and
observe the double dot.

For the sake of completeness: the code and config defaults currently
differ slightly (TC 7 and 8):

Config:

prefix="localhost_access_log."
suffix=".txt"
fileDateFormat= Code Default

Code:

prefix="access_log.";
suffix="";
fileDateFormat="-MM-dd"

I would then move the trailing prefix dot in front of the fileDateFormat
default.

Regards,

Rainer

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



Re: svn commit: r1415081 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/valves/ webapps/docs/ webapps/docs/config/

2012-12-03 Thread Rainer Jung
On 03.12.2012 12:09, Konstantin Kolinko wrote:
> 2012/11/29  :
>> Author: rjung
>> Date: Thu Nov 29 08:33:47 2012
>> New Revision: 1415081
>>
>> URL: http://svn.apache.org/viewvc?rev=1415081&view=rev
>> Log:
>> Add new ALV attribute "renameOnRotate" (Default:false).
>>
>> If set to "true", the "fileDateFormat" will not be part
>> of the current log file. Only at the time of log rotation
>> the file is renamed to the final name including the
>> "fileDateFormat".
>>
>> This mimics the behavior e.g. of Log4J and similar frameworks,
>> where the active file does not have the timestamp in the file
>> name.
>>
>> Pro: current file has stable name, all files with
>>  timestamp in name are old.
>> Con: Slightly more complex impl.
>>
>> Backport of r1414889 from trunk.
>>
>> Modified:
>> tomcat/tc7.0.x/trunk/   (props changed)
>> tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/AccessLogValve.java
>> 
>> tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/LocalStrings.properties
>> 
>> tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/mbeans-descriptors.xml
>> tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
>> tomcat/tc7.0.x/trunk/webapps/docs/config/valve.xml
>>
> 
> Interesting.
> Several notes. Just informational.
> a) It should be easy to extend this to skip rotation if file.length() is 0.

Not so sure about that one. An empty rotated file shows there was
nothing written. Skipping rotation might lead to the question, whether
rotation is broken (or the server was down during the change of date).

So I'd prefer keeping the rotation since it isn't so expensive and
doesn't happen to early.

But maybe I misunderstood you.

Regards,

Rainer

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



svn commit: r1416481 - /tomcat/trunk/test/org/apache/catalina/authenticator/TestNonLoginAndBasicAuthenticator.java

2012-12-03 Thread markt
Author: markt
Date: Mon Dec  3 12:10:05 2012
New Revision: 1416481

URL: http://svn.apache.org/viewvc?rev=1416481&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54190
Speed up unit test. Patch provided by Brian Burch.

Modified:

tomcat/trunk/test/org/apache/catalina/authenticator/TestNonLoginAndBasicAuthenticator.java

Modified: 
tomcat/trunk/test/org/apache/catalina/authenticator/TestNonLoginAndBasicAuthenticator.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/authenticator/TestNonLoginAndBasicAuthenticator.java?rev=1416481&r1=1416480&r2=1416481&view=diff
==
--- 
tomcat/trunk/test/org/apache/catalina/authenticator/TestNonLoginAndBasicAuthenticator.java
 (original)
+++ 
tomcat/trunk/test/org/apache/catalina/authenticator/TestNonLoginAndBasicAuthenticator.java
 Mon Dec  3 12:10:05 2012
@@ -32,6 +32,7 @@ import org.apache.catalina.Context;
 import org.apache.catalina.deploy.LoginConfig;
 import org.apache.catalina.deploy.SecurityCollection;
 import org.apache.catalina.deploy.SecurityConstraint;
+import org.apache.catalina.session.ManagerBase;
 import org.apache.catalina.startup.TesterServlet;
 import org.apache.catalina.startup.Tomcat;
 import org.apache.catalina.startup.TomcatBaseTest;
@@ -64,13 +65,15 @@ public class TestNonLoginAndBasicAuthent
 private static final String URI_PROTECTED = "/protected";
 private static final String URI_PUBLIC = "/anyoneCanAccess";
 
-private static final int SHORT_TIMEOUT_MINS = 1;
-private static final int LONG_TIMEOUT_MINS = 2;
-private static final int MANAGER_SCAN_DELAY_SECS = 60;
+private static final int SHORT_SESSION_TIMEOUT_MINS = 1;
+private static final int LONG_SESSION_TIMEOUT_MINS = 2;
+private static final int MANAGER_SCAN_INTERVAL_SECS = 10;
+private static final int MANAGER_EXPIRE_SESSIONS_FAST = 1;
 private static final int EXTRA_DELAY_SECS = 5;
 private static final long TIMEOUT_DELAY_MSECS =
-(((SHORT_TIMEOUT_MINS * 60)
-+ MANAGER_SCAN_DELAY_SECS + EXTRA_DELAY_SECS) * 1000);
+(((SHORT_SESSION_TIMEOUT_MINS * 60)
++ (MANAGER_SCAN_INTERVAL_SECS * MANAGER_EXPIRE_SESSIONS_FAST)
++ EXTRA_DELAY_SECS) * 1000);
 
 private static final String CLIENT_AUTH_HEADER = "authorization";
 private static final String SERVER_AUTH_HEADER = "WWW-Authenticate";
@@ -94,8 +97,8 @@ public class TestNonLoginAndBasicAuthent
 new BasicCredentials(NICE_METHOD, USER, " " + PWD + " ");
 
 private Tomcat tomcat;
-private AuthenticatorBase basicAuthenticator;
-private AuthenticatorBase nonloginAuthenticator;
+private Context basicContext;
+private Context nonloginContext;
 private List cookies;
 
 /*
@@ -321,6 +324,7 @@ public class TestNonLoginAndBasicAuthent
 public void testBasicLoginSessionTimeout() throws Exception {
 
setAlwaysUseSession();
+   setRapidSessionTimeout();
 
// this section is identical to testAuthMethodCaseBasic
 doTestBasic(CONTEXT_PATH_LOGIN + URI_PROTECTED, NO_CREDENTIALS,
@@ -494,74 +498,74 @@ public class TestNonLoginAndBasicAuthent
 private void setUpNonLogin() throws Exception {
 
 // Must have a real docBase for webapps - just use temp
-Context ctxt = tomcat.addContext(CONTEXT_PATH_NOLOGIN,
+nonloginContext = tomcat.addContext(CONTEXT_PATH_NOLOGIN,
 System.getProperty("java.io.tmpdir"));
-ctxt.setSessionTimeout(LONG_TIMEOUT_MINS);
+nonloginContext.setSessionTimeout(LONG_SESSION_TIMEOUT_MINS);
 
 // Add protected servlet to the context
-Tomcat.addServlet(ctxt, "TesterServlet1", new TesterServlet());
-ctxt.addServletMapping(URI_PROTECTED, "TesterServlet1");
+Tomcat.addServlet(nonloginContext, "TesterServlet1", new 
TesterServlet());
+nonloginContext.addServletMapping(URI_PROTECTED, "TesterServlet1");
 
 SecurityCollection collection1 = new SecurityCollection();
 collection1.addPattern(URI_PROTECTED);
 SecurityConstraint sc1 = new SecurityConstraint();
 sc1.addAuthRole(ROLE);
 sc1.addCollection(collection1);
-ctxt.addConstraint(sc1);
+nonloginContext.addConstraint(sc1);
 
 // Add unprotected servlet to the context
-Tomcat.addServlet(ctxt, "TesterServlet2", new TesterServlet());
-ctxt.addServletMapping(URI_PUBLIC, "TesterServlet2");
+Tomcat.addServlet(nonloginContext, "TesterServlet2", new 
TesterServlet());
+nonloginContext.addServletMapping(URI_PUBLIC, "TesterServlet2");
 
 SecurityCollection collection2 = new SecurityCollection();
 collection2.addPattern(URI_PUBLIC);
 SecurityConstraint sc2 = new SecurityConstraint();
 // do not add a role - which signals access permitted without one
 sc2.addCollection(colle

svn commit: r1416483 - in /tomcat/tc7.0.x/trunk: ./ test/org/apache/catalina/authenticator/TestNonLoginAndBasicAuthenticator.java

2012-12-03 Thread markt
Author: markt
Date: Mon Dec  3 12:11:08 2012
New Revision: 1416483

URL: http://svn.apache.org/viewvc?rev=1416483&view=rev
Log:
Speed up unit test. Patch provided by Brian Burch.

Modified:
tomcat/tc7.0.x/trunk/   (props changed)

tomcat/tc7.0.x/trunk/test/org/apache/catalina/authenticator/TestNonLoginAndBasicAuthenticator.java

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

Modified: 
tomcat/tc7.0.x/trunk/test/org/apache/catalina/authenticator/TestNonLoginAndBasicAuthenticator.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/authenticator/TestNonLoginAndBasicAuthenticator.java?rev=1416483&r1=1416482&r2=1416483&view=diff
==
--- 
tomcat/tc7.0.x/trunk/test/org/apache/catalina/authenticator/TestNonLoginAndBasicAuthenticator.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/test/org/apache/catalina/authenticator/TestNonLoginAndBasicAuthenticator.java
 Mon Dec  3 12:11:08 2012
@@ -32,6 +32,7 @@ import org.apache.catalina.Context;
 import org.apache.catalina.deploy.LoginConfig;
 import org.apache.catalina.deploy.SecurityCollection;
 import org.apache.catalina.deploy.SecurityConstraint;
+import org.apache.catalina.session.ManagerBase;
 import org.apache.catalina.startup.TesterServlet;
 import org.apache.catalina.startup.Tomcat;
 import org.apache.catalina.startup.TomcatBaseTest;
@@ -64,13 +65,15 @@ public class TestNonLoginAndBasicAuthent
 private static final String URI_PROTECTED = "/protected";
 private static final String URI_PUBLIC = "/anyoneCanAccess";
 
-private static final int SHORT_TIMEOUT_MINS = 1;
-private static final int LONG_TIMEOUT_MINS = 2;
-private static final int MANAGER_SCAN_DELAY_SECS = 60;
+private static final int SHORT_SESSION_TIMEOUT_MINS = 1;
+private static final int LONG_SESSION_TIMEOUT_MINS = 2;
+private static final int MANAGER_SCAN_INTERVAL_SECS = 10;
+private static final int MANAGER_EXPIRE_SESSIONS_FAST = 1;
 private static final int EXTRA_DELAY_SECS = 5;
 private static final long TIMEOUT_DELAY_MSECS =
-(((SHORT_TIMEOUT_MINS * 60)
-+ MANAGER_SCAN_DELAY_SECS + EXTRA_DELAY_SECS) * 1000);
+(((SHORT_SESSION_TIMEOUT_MINS * 60)
++ (MANAGER_SCAN_INTERVAL_SECS * MANAGER_EXPIRE_SESSIONS_FAST)
++ EXTRA_DELAY_SECS) * 1000);
 
 private static final String CLIENT_AUTH_HEADER = "authorization";
 private static final String SERVER_AUTH_HEADER = "WWW-Authenticate";
@@ -94,8 +97,8 @@ public class TestNonLoginAndBasicAuthent
 new BasicCredentials(NICE_METHOD, USER, " " + PWD + " ");
 
 private Tomcat tomcat;
-private AuthenticatorBase basicAuthenticator;
-private AuthenticatorBase nonloginAuthenticator;
+private Context basicContext;
+private Context nonloginContext;
 private List cookies;
 
 /*
@@ -321,6 +324,7 @@ public class TestNonLoginAndBasicAuthent
 public void testBasicLoginSessionTimeout() throws Exception {
 
setAlwaysUseSession();
+   setRapidSessionTimeout();
 
// this section is identical to testAuthMethodCaseBasic
 doTestBasic(CONTEXT_PATH_LOGIN + URI_PROTECTED, NO_CREDENTIALS,
@@ -498,74 +502,74 @@ public class TestNonLoginAndBasicAuthent
 private void setUpNonLogin() throws Exception {
 
 // Must have a real docBase for webapps - just use temp
-Context ctxt = tomcat.addContext(CONTEXT_PATH_NOLOGIN,
+nonloginContext = tomcat.addContext(CONTEXT_PATH_NOLOGIN,
 System.getProperty("java.io.tmpdir"));
-ctxt.setSessionTimeout(LONG_TIMEOUT_MINS);
+nonloginContext.setSessionTimeout(LONG_SESSION_TIMEOUT_MINS);
 
 // Add protected servlet to the context
-Tomcat.addServlet(ctxt, "TesterServlet1", new TesterServlet());
-ctxt.addServletMapping(URI_PROTECTED, "TesterServlet1");
+Tomcat.addServlet(nonloginContext, "TesterServlet1", new 
TesterServlet());
+nonloginContext.addServletMapping(URI_PROTECTED, "TesterServlet1");
 
 SecurityCollection collection1 = new SecurityCollection();
 collection1.addPattern(URI_PROTECTED);
 SecurityConstraint sc1 = new SecurityConstraint();
 sc1.addAuthRole(ROLE);
 sc1.addCollection(collection1);
-ctxt.addConstraint(sc1);
+nonloginContext.addConstraint(sc1);
 
 // Add unprotected servlet to the context
-Tomcat.addServlet(ctxt, "TesterServlet2", new TesterServlet());
-ctxt.addServletMapping(URI_PUBLIC, "TesterServlet2");
+Tomcat.addServlet(nonloginContext, "TesterServlet2", new 
TesterServlet());
+nonloginContext.addServletMapping(URI_PUBLIC, "TesterServlet2");
 
 SecurityCollection collection2 = new SecurityCollection();
 collection2.addPattern(URI_PUBLIC)

[Bug 54190] TestNonLoginAndBasicAuthenticator does not test session timeout properly

2012-12-03 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54190

Mark Thomas  changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution|--- |FIXED

--- Comment #8 from Mark Thomas  ---
Patch applied to trunk and 7.0.x and will be included in 7.0.34 onwards. Thanks
again.

-- 
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: r1416490 - /tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java

2012-12-03 Thread markt
Author: markt
Date: Mon Dec  3 12:32:44 2012
New Revision: 1416490

URL: http://svn.apache.org/viewvc?rev=1416490&view=rev
Log:
Fix indent

Modified:
tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java

Modified: tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java?rev=1416490&r1=1416489&r2=1416490&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java Mon Dec  3 
12:32:44 2012
@@ -2122,7 +2122,7 @@ public class ContextConfig implements Li
 result.addAll(getSCIsForClass(superClassName));
 
 // Interfaces
-for (String interfaceName : cacheEntry.getInterfaceNames()) {
+for (String interfaceName : cacheEntry.getInterfaceNames()) {
 JavaClassCacheEntry interfaceEntry =
 javaClassCache.get(interfaceName);
 // A null could mean that the class not present in application or



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



[Bug 53871] java.lang.StackOverflowError on deploying a web application

2012-12-03 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=53871

Mark Thomas  changed:

   What|Removed |Added

   Severity|major   |enhancement

--- Comment #6 from Mark Thomas  ---
Changing to an enhancement to see what, if anything, can be done to provide a
better error message.

-- 
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 54217] JDBC connection pool runs out of connections when Context reload=“true” is enabled in Tomcat

2012-12-03 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54217

--- Comment #7 from Levan  ---
(In reply to comment #6)
> This has been fixed in trunk and 7.0.x and will be included in 7.0.34
> onwards.

Wow it turned out to be a bug. Glad I unintentionally found it )

I will update my answer on StackOverflow.com

Thank you for the clarification!

-- 
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: r1415081 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/valves/ webapps/docs/ webapps/docs/config/

2012-12-03 Thread Konstantin Kolinko
2012/12/3 Rainer Jung :
> On 03.12.2012 12:09, Konstantin Kolinko wrote:
>> 2012/11/29  :
>>> Author: rjung
>>> Date: Thu Nov 29 08:33:47 2012
>>> New Revision: 1415081
>>>
>>> URL: http://svn.apache.org/viewvc?rev=1415081&view=rev
>>> Log:
>>> Add new ALV attribute "renameOnRotate" (Default:false).
>>>

>>
>> b) The sample configuration in conf/server.xml is
>> prefix="localhost_access_log." suffix=".txt"
>> If I just enable this feature, I would get a file named
>> "localhost_access_log..txt" with two dots.
>>
>> A remedy is to explicitly define the fileDateFormat attribute and move
>> the dot from prefix attribute into fileDateFormat one.
>
> Yes, what about moving the trailing prefix dot to fileDateFormat for TC
> 8 and making the default fileDateFormat explicitly known by adding it to
> the default server.xml? If we do so: should we still automatically set a
> default fileDateFormat if the config contains an explicit empty one? I'd
> say no (all for TC 8).
>
> I'm reluctant about changing the default for TC 7 in case someone only
> changed prefix or suffix or fileDateFormat and then will suddenly
> observe different behavior. I think it is better to let the few people
> using the feature fix their settings if they turn on renameOnRotate and
> observe the double dot.
>
> For the sake of completeness: the code and config defaults currently
> differ slightly (TC 7 and 8):
>
> Config:
>
> prefix="localhost_access_log."
> suffix=".txt"
> fileDateFormat= Code Default
>
> Code:
>
> prefix="access_log.";
> suffix="";
> fileDateFormat="-MM-dd"
>
> I would then move the trailing prefix dot in front of the fileDateFormat
> default.
>

The programmatic defaults serve different purpose than those in server.xml.

In server.xml we define the "global" access log (thus it is named as
"localhost" one).
In AccessLogValve there are defaults for any access log out there in the wild.

I was only thinking of updating the server.xml one by explicitly
defining fileDateFormat there.

On second thought,
a) It is pointless to change server.xml if we are not also adding
renameOnRotate="true" there. It is of little value.

b) I wonder whether there will be some problems on Windows when using
this feature. (A file deletion does not happen immediately there. I
wonder what is the case with renames).
So I would keep the current default of renameOnRotate="false".

Maybe just add a configuration example to valves.html.

>
>> a) It should be easy to extend this to skip rotation if file.length() is 0.
>
> Not so sure about that one. An empty rotated file shows there was
> nothing written. Skipping rotation might lead to the question, whether
> rotation is broken (or the server was down during the change of date).
>
> So I'd prefer keeping the rotation since it isn't so expensive and
> doesn't happen to early.
>

Just a different feature that people ask sometime: do not create a log
file if it is empty.

An RFE for JULI:
https://issues.apache.org/bugzilla/show_bug.cgi?id=53620

An example is those "host-manager." logs that are in the default
configuration, but nearly nobody is using that app.

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: r1416501 - in /tomcat/trunk/java/org/apache/catalina/startup: ContextConfig.java LocalStrings.properties

2012-12-03 Thread markt
Author: markt
Date: Mon Dec  3 13:18:34 2012
New Revision: 1416501

URL: http://svn.apache.org/viewvc?rev=1416501&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=53871
Improve error message for StackOverflowError

Modified:
tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java
tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties

Modified: tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java?rev=1416501&r1=1416500&r2=1416501&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java Mon Dec  3 
13:18:34 2012
@@ -1957,8 +1957,13 @@ public class ContextConfig implements Li
 
 ClassParser parser = new ClassParser(is, null);
 JavaClass clazz = parser.parse();
-
-checkHandlesTypes(clazz);
+try {
+checkHandlesTypes(clazz);
+} catch (StackOverflowError soe) {
+throw new IllegalStateException(sm.getString(
+"contextConfig.annotationsStackOverflow",
+context.getName()), soe);
+}
 
 if (handlesTypesOnly) {
 return;

Modified: tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties?rev=1416501&r1=1416500&r2=1416501&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties 
(original)
+++ tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties Mon 
Dec  3 13:18:34 2012
@@ -18,6 +18,7 @@ catalina.noCluster=Cluster RuleSet not f
 catalina.shutdownHookFail=The shutdown hook experienced an error while trying 
to stop the server
 catalina.stopServer=No shutdown port configured. Shut down server through OS 
signal. Server not shut down.
 contextConfig.altDDNotFound=alt-dd file {0} not found
+contextConfig.annotationsStackOverflow=Unable to complete the scan for 
annotations for web application [{0}]. Possible root causes include a too low 
setting for -Xss and illegal cyclic inheritance dependencies
 contextConfig.applicationUrl=Unable to determine URL for application web.xml
 contextConfig.applicationMissing=Missing application web.xml, using defaults 
only
 contextConfig.applicationParse=Parse error in application web.xml file at {0}



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



svn commit: r1416502 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/startup/ContextConfig.java java/org/apache/catalina/startup/LocalStrings.properties webapps/docs/changelog.xml

2012-12-03 Thread markt
Author: markt
Date: Mon Dec  3 13:21:57 2012
New Revision: 1416502

URL: http://svn.apache.org/viewvc?rev=1416502&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=53871
Improve error message for StackOverflowError

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/ContextConfig.java

tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/LocalStrings.properties
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

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

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/ContextConfig.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/ContextConfig.java?rev=1416502&r1=1416501&r2=1416502&view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/ContextConfig.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/ContextConfig.java 
Mon Dec  3 13:21:57 2012
@@ -2102,8 +2102,13 @@ public class ContextConfig implements Li
 
 ClassParser parser = new ClassParser(is, null);
 JavaClass clazz = parser.parse();
-
-checkHandlesTypes(clazz);
+try {
+checkHandlesTypes(clazz);
+} catch (StackOverflowError soe) {
+throw new IllegalStateException(sm.getString(
+"contextConfig.annotationsStackOverflow",
+context.getName()), soe);
+}
 
 if (handlesTypesOnly) {
 return;

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/LocalStrings.properties
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/LocalStrings.properties?rev=1416502&r1=1416501&r2=1416502&view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/LocalStrings.properties 
(original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/LocalStrings.properties 
Mon Dec  3 13:21:57 2012
@@ -18,6 +18,7 @@ catalina.noCluster=Cluster RuleSet not f
 catalina.shutdownHookFail=The shutdown hook experienced an error while trying 
to stop the server
 catalina.stopServer=No shutdown port configured. Shut down server through OS 
signal. Server not shut down.
 contextConfig.altDDNotFound=alt-dd file {0} not found
+contextConfig.annotationsStackOverflow=Unable to complete the scan for 
annotations for web application [{0}]. Possible root causes include a too low 
setting for -Xss and illegal cyclic inheritance dependencies
 contextConfig.applicationUrl=Unable to determine URL for application web.xml
 contextConfig.applicationMissing=Missing application web.xml, using defaults 
only
 contextConfig.applicationParse=Parse error in application web.xml file at {0}

Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1416502&r1=1416501&r2=1416502&view=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Mon Dec  3 13:21:57 2012
@@ -57,6 +57,11 @@
   
 
   
+53871: Improve error message if annotation scanning fails
+during web application start due to poor configuration or illegal
+cyclic inheritance with the application's classes. (markt) 
+  
+  
 Fix unit test for AccessLogValve when using non-GMT time zone. (rjung)
   
   



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



[Bug 53871] java.lang.StackOverflowError on deploying a web application

2012-12-03 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=53871

Mark Thomas  changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution|--- |FIXED

--- Comment #7 from Mark Thomas  ---
Better error message added to trunk and 7.0.x and will be included in 7.0.34
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



svn commit: r1416529 - in /tomcat/trunk/java/org/apache/catalina/valves: AccessLogValve.java LocalStrings.properties

2012-12-03 Thread rjung
Author: rjung
Date: Mon Dec  3 14:10:30 2012
New Revision: 1416529

URL: http://svn.apache.org/viewvc?rev=1416529&view=rev
Log:
Only rename AccessLogValve file with renameOnrotate=true
if target file does not already exist.

We don't want to overwrite existing files. Prefer
not to rotate.

Typical case would be several ALV instances configured to
use the same file name. Only the first one should rename
on rotate.

Modified:
tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java
tomcat/trunk/java/org/apache/catalina/valves/LocalStrings.properties

Modified: tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java?rev=1416529&r1=1416528&r2=1416529&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java (original)
+++ tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java Mon Dec  3 
14:10:30 2012
@@ -1086,13 +1086,17 @@ public class AccessLogValve extends Valv
 writer.close();
 if (rename && renameOnRotate) {
 File newLogFile = getLogFile(true);
-try {
-if (!currentLogFile.renameTo(newLogFile)) {
-log.error(sm.getString("accessLogValve.renameFail", 
currentLogFile, newLogFile));
+if (!newLogFile.exists()) {
+try {
+if (!currentLogFile.renameTo(newLogFile)) {
+log.error(sm.getString("accessLogValve.renameFail", 
currentLogFile, newLogFile));
+}
+} catch (Throwable e) {
+ExceptionUtils.handleThrowable(e);
+log.error(sm.getString("accessLogValve.renameFail", 
currentLogFile, newLogFile), e);
 }
-} catch (Throwable e) {
-ExceptionUtils.handleThrowable(e);
-log.error(sm.getString("accessLogValve.renameFail", 
currentLogFile, newLogFile), e);
+} else {
+log.error(sm.getString("accessLogValve.alreadyExists", 
currentLogFile, newLogFile));
 }
 }
 writer = null;

Modified: tomcat/trunk/java/org/apache/catalina/valves/LocalStrings.properties
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/valves/LocalStrings.properties?rev=1416529&r1=1416528&r2=1416529&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/valves/LocalStrings.properties 
(original)
+++ tomcat/trunk/java/org/apache/catalina/valves/LocalStrings.properties Mon 
Dec  3 14:10:30 2012
@@ -23,6 +23,7 @@ accessLogValve.closeFail=Failed to close
 accessLogValve.openDirFail=Failed to create directory [{0}] for access logs
 accessLogValve.rotateFail=Failed to rotate access log
 accessLogValve.renameFail=Failed to rename access log from [{0}] to [{1}]
+accessLogValve.alreadyExists=Failed to rename access log from [{0}] to [{1}], 
file already exists.
 accessLogValve.invalidLocale=Failed to set locale to [{0}]
 accessLogValve.unsupportedEncoding=Failed to set encoding to [{0}], will use 
the system default character set.
 



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



svn commit: r1416531 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/valves/AccessLogValve.java java/org/apache/catalina/valves/LocalStrings.properties

2012-12-03 Thread rjung
Author: rjung
Date: Mon Dec  3 14:13:04 2012
New Revision: 1416531

URL: http://svn.apache.org/viewvc?rev=1416531&view=rev
Log:
Only rename AccessLogValve file with renameOnrotate=true
if target file does not already exist.

We don't want to overwrite existing files. Prefer
not to rotate.

Typical case would be several ALV instances configured to
use the same file name. Only the first one should rename
on rotate.

Backport of r1416529 from trunk.

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/AccessLogValve.java
tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/LocalStrings.properties

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

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/AccessLogValve.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/AccessLogValve.java?rev=1416531&r1=1416530&r2=1416531&view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/AccessLogValve.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/AccessLogValve.java 
Mon Dec  3 14:13:04 2012
@@ -1092,13 +1092,17 @@ public class AccessLogValve extends Valv
 writer.close();
 if (rename && renameOnRotate) {
 File newLogFile = getLogFile(true);
-try {
-if (!currentLogFile.renameTo(newLogFile)) {
-log.error(sm.getString("accessLogValve.renameFail", 
currentLogFile, newLogFile));
+if (!newLogFile.exists()) {
+try {
+if (!currentLogFile.renameTo(newLogFile)) {
+log.error(sm.getString("accessLogValve.renameFail", 
currentLogFile, newLogFile));
+}
+} catch (Throwable e) {
+ExceptionUtils.handleThrowable(e);
+log.error(sm.getString("accessLogValve.renameFail", 
currentLogFile, newLogFile), e);
 }
-} catch (Throwable e) {
-ExceptionUtils.handleThrowable(e);
-log.error(sm.getString("accessLogValve.renameFail", 
currentLogFile, newLogFile), e);
+} else {
+log.error(sm.getString("accessLogValve.alreadyExists", 
currentLogFile, newLogFile));
 }
 }
 writer = null;

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/LocalStrings.properties
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/LocalStrings.properties?rev=1416531&r1=1416530&r2=1416531&view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/LocalStrings.properties 
(original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/LocalStrings.properties 
Mon Dec  3 14:13:04 2012
@@ -27,6 +27,7 @@ accessLogValve.closeFail=Failed to close
 accessLogValve.openDirFail=Failed to create directory [{0}] for access logs
 accessLogValve.rotateFail=Failed to rotate access log
 accessLogValve.renameFail=Failed to rename access log from [{0}] to [{1}]
+accessLogValve.alreadyExists=Failed to rename access log from [{0}] to [{1}], 
file already exists.
 accessLogValve.invalidLocale=Failed to set locale to [{0}]
 accessLogValve.unsupportedEncoding=Failed to set encoding to [{0}], will use 
the system default character set.
 



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



Re: Time for 7.0.34

2012-12-03 Thread Rainer Jung
On 03.12.2012 11:13, Mark Thomas wrote:
> There isn't much in the 7.0.x change log but it is the start of the
> month so I'm starting the 7.0.34 release process. The plan, as always is:
> - fix any open bugs
> - check the unit tests and TCKs
> - tag
> - vote
> - hopefully release
> 
> Best guess right now is that I'll be tagging 7.0.34 tomorrow.

Thanks for the notice.

I right now added an additional check to the small new renameOnRotate
ALV feature (off by default). If there's no negative review I don't plan
more changes to the TC 7 variant.

Regards,

Rainer

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



svn commit: r1416534 - /tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java

2012-12-03 Thread markt
Author: markt
Date: Mon Dec  3 14:18:31 2012
New Revision: 1416534

URL: http://svn.apache.org/viewvc?rev=1416534&view=rev
Log:
If the status code is an error but there was no response body, the error input 
stream will be null. Handle this.

Modified:
tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java

Modified: tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java?rev=1416534&r1=1416533&r2=1416534&view=diff
==
--- tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java (original)
+++ tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java Mon Dec  
3 14:18:31 2012
@@ -255,20 +255,22 @@ public abstract class TomcatBaseTest ext
 } else {
 is = connection.getErrorStream();
 }
-BufferedInputStream bis = null;
-try {
-bis = new BufferedInputStream(is);
-byte[] buf = new byte[2048];
-int rd = 0;
-while((rd = bis.read(buf)) > 0) {
-out.append(buf, 0, rd);
-}
-} finally {
-if (bis != null) {
-try {
-bis.close();
-} catch (IOException e) {
-// Ignore
+if (is != null) {
+BufferedInputStream bis = null;
+try {
+bis = new BufferedInputStream(is);
+byte[] buf = new byte[2048];
+int rd = 0;
+while((rd = bis.read(buf)) > 0) {
+out.append(buf, 0, rd);
+}
+} finally {
+if (bis != null) {
+try {
+bis.close();
+} catch (IOException e) {
+// Ignore
+}
 }
 }
 }



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



svn commit: r1416535 - in /tomcat/trunk: java/org/apache/catalina/valves/ErrorReportValve.java test/org/apache/catalina/valves/TestErrorReportValve.java

2012-12-03 Thread markt
Author: markt
Date: Mon Dec  3 14:19:39 2012
New Revision: 1416535

URL: http://svn.apache.org/viewvc?rev=1416535&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54220
The ErrorReportValve should only generate an error response if the error flag 
on the response is true.

Modified:
tomcat/trunk/java/org/apache/catalina/valves/ErrorReportValve.java
tomcat/trunk/test/org/apache/catalina/valves/TestErrorReportValve.java

Modified: tomcat/trunk/java/org/apache/catalina/valves/ErrorReportValve.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/valves/ErrorReportValve.java?rev=1416535&r1=1416534&r2=1416535&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/valves/ErrorReportValve.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/valves/ErrorReportValve.java Mon Dec  
3 14:19:39 2012
@@ -136,7 +136,8 @@ public class ErrorReportValve extends Va
 
 // Do nothing on a 1xx, 2xx and 3xx status
 // Do nothing if anything has been written already
-if ((statusCode < 400) || (response.getContentWritten() > 0)) {
+if (statusCode < 400 || response.getContentWritten() > 0 ||
+!response.isError()) {
 return;
 }
 

Modified: tomcat/trunk/test/org/apache/catalina/valves/TestErrorReportValve.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/valves/TestErrorReportValve.java?rev=1416535&r1=1416534&r2=1416535&view=diff
==
--- tomcat/trunk/test/org/apache/catalina/valves/TestErrorReportValve.java 
(original)
+++ tomcat/trunk/test/org/apache/catalina/valves/TestErrorReportValve.java Mon 
Dec  3 14:19:39 2012
@@ -66,4 +66,67 @@ public class TestErrorReportValve extend
 resp.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
 }
 }
+
+
+@Test
+public void testBug54220DoNotSetNotFound() throws Exception {
+Tomcat tomcat = getTomcatInstance();
+
+// Must have a real docBase - just use temp
+Context ctx =
+tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+
+Tomcat.addServlet(ctx, "bug54220", new Bug54220Servlet(false));
+ctx.addServletMapping("/", "bug54220");
+
+tomcat.start();
+
+ByteChunk res = new ByteChunk();
+int rc = getUrl("http://localhost:"; + getPort(), res, null);
+
+Assert.assertNull(res.toString());
+Assert.assertEquals(HttpServletResponse.SC_OK, rc);
+}
+
+
+@Test
+public void testBug54220SetNotFound() throws Exception {
+Tomcat tomcat = getTomcatInstance();
+
+// Must have a real docBase - just use temp
+Context ctx =
+tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+
+Tomcat.addServlet(ctx, "bug54220", new Bug54220Servlet(true));
+ctx.addServletMapping("/", "bug54220");
+
+tomcat.start();
+
+ByteChunk res = new ByteChunk();
+int rc = getUrl("http://localhost:"; + getPort(), res, null);
+
+Assert.assertNull(res.toString());
+Assert.assertEquals(HttpServletResponse.SC_NOT_FOUND, rc);
+}
+
+
+private static final class Bug54220Servlet extends HttpServlet {
+
+private static final long serialVersionUID = 1L;
+
+private boolean setNotFound;
+
+private Bug54220Servlet(boolean setNotFound) {
+this.setNotFound = setNotFound;
+}
+
+@Override
+protected void doGet(HttpServletRequest req, HttpServletResponse resp)
+throws ServletException, IOException {
+
+if (setNotFound) {
+resp.setStatus(HttpServletResponse.SC_NOT_FOUND);
+}
+}
+}
 }



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



svn commit: r1416537 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/valves/ErrorReportValve.java test/org/apache/catalina/startup/TomcatBaseTest.java test/org/apache/catalina/valves/TestError

2012-12-03 Thread markt
Author: markt
Date: Mon Dec  3 14:21:12 2012
New Revision: 1416537

URL: http://svn.apache.org/viewvc?rev=1416537&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54220
The ErrorReportValve should only generate an error response if the error flag 
on the response is true.

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/ErrorReportValve.java
tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java

tomcat/tc7.0.x/trunk/test/org/apache/catalina/valves/TestErrorReportValve.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc7.0.x/trunk/
--
  Merged /tomcat/trunk:r1416534-1416535

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/ErrorReportValve.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/ErrorReportValve.java?rev=1416537&r1=1416536&r2=1416537&view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/ErrorReportValve.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/ErrorReportValve.java 
Mon Dec  3 14:21:12 2012
@@ -160,7 +160,8 @@ public class ErrorReportValve extends Va
 
 // Do nothing on a 1xx, 2xx and 3xx status
 // Do nothing if anything has been written already
-if ((statusCode < 400) || (response.getContentWritten() > 0)) {
+if (statusCode < 400 || response.getContentWritten() > 0 ||
+!response.isError()) {
 return;
 }
 

Modified: 
tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java?rev=1416537&r1=1416536&r2=1416537&view=diff
==
--- tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java 
(original)
+++ tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java 
Mon Dec  3 14:21:12 2012
@@ -253,20 +253,22 @@ public abstract class TomcatBaseTest ext
 } else {
 is = connection.getErrorStream();
 }
-BufferedInputStream bis = null;
-try {
-bis = new BufferedInputStream(is);
-byte[] buf = new byte[2048];
-int rd = 0;
-while((rd = bis.read(buf)) > 0) {
-out.append(buf, 0, rd);
-}
-} finally {
-if (bis != null) {
-try {
-bis.close();
-} catch (IOException e) {
-// Ignore
+if (is != null) {
+BufferedInputStream bis = null;
+try {
+bis = new BufferedInputStream(is);
+byte[] buf = new byte[2048];
+int rd = 0;
+while((rd = bis.read(buf)) > 0) {
+out.append(buf, 0, rd);
+}
+} finally {
+if (bis != null) {
+try {
+bis.close();
+} catch (IOException e) {
+// Ignore
+}
 }
 }
 }

Modified: 
tomcat/tc7.0.x/trunk/test/org/apache/catalina/valves/TestErrorReportValve.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/valves/TestErrorReportValve.java?rev=1416537&r1=1416536&r2=1416537&view=diff
==
--- 
tomcat/tc7.0.x/trunk/test/org/apache/catalina/valves/TestErrorReportValve.java 
(original)
+++ 
tomcat/tc7.0.x/trunk/test/org/apache/catalina/valves/TestErrorReportValve.java 
Mon Dec  3 14:21:12 2012
@@ -66,4 +66,67 @@ public class TestErrorReportValve extend
 resp.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
 }
 }
+
+
+@Test
+public void testBug54220DoNotSetNotFound() throws Exception {
+Tomcat tomcat = getTomcatInstance();
+
+// Must have a real docBase - just use temp
+Context ctx =
+tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+
+Tomcat.addServlet(ctx, "bug54220", new Bug54220Servlet(false));
+ctx.addServletMapping("/", "bug54220");
+
+tomcat.start();
+
+ByteChunk res = new ByteChunk();
+int rc = getUrl("http://localhost:"; + getPort(), res, null);
+
+Assert.assertNull(res.toString());
+Assert.assertEquals(HttpServletResponse.SC_OK, rc);
+}
+
+
+@Test
+public void testBug54220SetNotFound() throws Exception {
+Tomcat tomcat = getTomcatInstance();
+
+// Must have a real docBase - just use temp
+Context ctx =
+tomcat.addContext(

[Bug 54220] ErrorReportValve invoked on non-error responses too

2012-12-03 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54220

Mark Thomas  changed:

   What|Removed |Added

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

--- Comment #1 from Mark Thomas  ---
Fixed in trunk and 7.0.x and will be included in 7.0.34 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 54220] ErrorReportValve invoked on non-error responses too

2012-12-03 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54220

Mark Thomas  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |---

--- Comment #2 from Mark Thomas  ---
Opps. Need to keep this open until 6.0x. is fixed.

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

2012-12-03 Thread markt
Author: markt
Date: Mon Dec  3 14:25:05 2012
New Revision: 1416539

URL: http://svn.apache.org/viewvc?rev=1416539&view=rev
Log:
Proposal

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=1416539&r1=1416538&r2=1416539&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Mon Dec  3 14:25:05 2012
@@ -123,6 +123,12 @@ PATCHES PROPOSED TO BACKPORT:
   +1: kkolinko
   -1:
 
+* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54220
+  ErrorReportValve invoked on non-error responses
+  http://svn.apache.org/viewvc?rev=1416537&view=rev (ErrorReportValve.java 
only)
+  +1: markt
+  -1:
+
 
 PATCHES/ISSUES THAT ARE STALLED
 



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



[Bug 54220] ErrorReportValve invoked on non-error responses too

2012-12-03 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54220

--- Comment #3 from Mark Thomas  ---
Proposed for 6.0.x

-- 
You are receiving this mail because:
You are the assignee for the bug.

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



Re: Offline generation of effective web.xml

2012-12-03 Thread Violeta Georgieva
>
> From which git repository? I couldn't find that commit ID in the ASF git
> repo for Tomcat trunk nor the GitHub mirror.


Ok I understood where the missunderstanding is.
That repo (in my github profile) is my own git-to-svn repo and is not a
fork from the one available in github.
Having my own git-to-svn repo I can control when I can do a rebase from svn.


> I have already fixed it on my local machine with git replace to graft
> your changes onto my local fork of the ASF git repo for Tomcat trunk. It
> should be easy to merge in your changes from there.
>

In order to escape such problems in the future I forked the official Tomcat
git repo in github and applied my changes there.
Here is the new link: https://github.com/violetagg/tomcat.git
Hope this time it will work without issues.


Unfortunately not all tests are passing now on this repo. I have

java.lang.NullPointerException
 at
org.apache.tomcat.websocket.ServerContainerImpl.addWsServletMapping(ServerContainerImpl.java:162)
 at
org.apache.tomcat.websocket.ServerContainerImpl.publishServer(ServerContainerImpl.java:119)
 at
websocket.echo.WsConfigListener.contextInitialized(WsConfigListener.java:33)
...

I don't know whether we should discuss it here or to start a new thread
because I think that in

org.apache.tomcat.websocket.ServerContainerImpl.publishServer(Class clazz)

We should have the same check for ServletContext availability as in

org.apache.tomcat.websocket.ServerContainerImpl.publishServer(Class
pojo, ServletContext ctxt, String path)

Regards
Violeta


Re: Offline generation of effective web.xml

2012-12-03 Thread Mark Thomas
On 03/12/2012 14:51, Violeta Georgieva wrote:
>>
>> From which git repository? I couldn't find that commit ID in the ASF git
>> repo for Tomcat trunk nor the GitHub mirror.
> 
> 
> Ok I understood where the missunderstanding is.
> That repo (in my github profile) is my own git-to-svn repo and is not a
> fork from the one available in github.
> Having my own git-to-svn repo I can control when I can do a rebase from svn.

That explains that then.

> In order to escape such problems in the future I forked the official Tomcat
> git repo in github and applied my changes there.
> Here is the new link: https://github.com/violetagg/tomcat.git
> Hope this time it will work without issues.

Thanks. That should make things a little easier moving forwards.
> Unfortunately not all tests are passing now on this repo. I have
> 
> java.lang.NullPointerException
>  at
> org.apache.tomcat.websocket.ServerContainerImpl.addWsServletMapping(ServerContainerImpl.java:162)
>  at
> org.apache.tomcat.websocket.ServerContainerImpl.publishServer(ServerContainerImpl.java:119)
>  at
> websocket.echo.WsConfigListener.contextInitialized(WsConfigListener.java:33)
> ...
> 
> I don't know whether we should discuss it here or to start a new thread

New thread please.

Mark


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



svn commit: r1416568 - in /tomcat/trunk: java/org/apache/tomcat/websocket/ServerContainerImpl.java webapps/examples/WEB-INF/classes/websocket/echo/WsConfigListener.java

2012-12-03 Thread markt
Author: markt
Date: Mon Dec  3 15:51:12 2012
New Revision: 1416568

URL: http://svn.apache.org/viewvc?rev=1416568&view=rev
Log:
Fix a bunch of failing unit tests.

Modified:
tomcat/trunk/java/org/apache/tomcat/websocket/ServerContainerImpl.java

tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/echo/WsConfigListener.java

Modified: tomcat/trunk/java/org/apache/tomcat/websocket/ServerContainerImpl.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/ServerContainerImpl.java?rev=1416568&r1=1416567&r2=1416568&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/websocket/ServerContainerImpl.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/ServerContainerImpl.java Mon 
Dec  3 15:51:12 2012
@@ -96,6 +96,11 @@ public class ServerContainerImpl extends
 public void publishServer(Class clazz)
 throws DeploymentException {
 
+if (servletContext == null) {
+throw new IllegalArgumentException(
+sm.getString("serverContainer.servletContextMissing"));
+}
+
 Endpoint ep = null;
 try {
 ep = clazz.newInstance();

Modified: 
tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/echo/WsConfigListener.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/echo/WsConfigListener.java?rev=1416568&r1=1416567&r2=1416568&view=diff
==
--- 
tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/echo/WsConfigListener.java
 (original)
+++ 
tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/echo/WsConfigListener.java
 Mon Dec  3 15:51:12 2012
@@ -21,14 +21,17 @@ import javax.servlet.ServletContextListe
 import javax.servlet.annotation.WebListener;
 import javax.websocket.ContainerProvider;
 import javax.websocket.DeploymentException;
-import javax.websocket.ServerContainer;
+
+import org.apache.tomcat.websocket.ServerContainerImpl;
 
 @WebListener
 public class WsConfigListener implements ServletContextListener {
 
 @Override
 public void contextInitialized(ServletContextEvent sce) {
-ServerContainer sc = ContainerProvider.getServerContainer();
+ServerContainerImpl sc =
+(ServerContainerImpl) ContainerProvider.getServerContainer();
+sc.setServletContext(sce.getServletContext());
 try {
 sc.publishServer(EchoEndpoint.class);
 } catch (DeploymentException e) {



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



[jira] [Created] (MTOMCAT-187) Scan resources executing run goal

2012-12-03 Thread JIRA
Sergio Fernández created MTOMCAT-187:


 Summary: Scan resources executing run goal
 Key: MTOMCAT-187
 URL: https://issues.apache.org/jira/browse/MTOMCAT-187
 Project: Apache Tomcat Maven Plugin
  Issue Type: Question
  Components: tomcat7
Affects Versions: 2.0-beta-1
Reporter: Sergio Fernández
Assignee: Olivier Lamy (*$^¨%`£)
Priority: Minor


I tried to find this detail at the documentation, but sorry but I didn't.

The question is: does the plugin has any way to force the goal tomcat7:run to 
scan (and updated when are modified) resources?

Thanks in advance. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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



[jira] [Updated] (MTOMCAT-187) Scan resources executing run goal

2012-12-03 Thread JIRA

 [ 
https://issues.apache.org/jira/browse/MTOMCAT-187?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sergio Fernández updated MTOMCAT-187:
-

Description: 
I tried to find this detail at the documentation, but sorry but I didn't.

The question is: does the plugin has any way to force the goal tomcat7:run to 
scan (and updated when are modified) resources? Something equivalent to 
scanIntervalSeconds in the maven jetty plugin.

Thanks in advance. 

  was:
I tried to find this detail at the documentation, but sorry but I didn't.

The question is: does the plugin has any way to force the goal tomcat7:run to 
scan (and updated when are modified) resources?

Thanks in advance. 


> Scan resources executing run goal
> -
>
> Key: MTOMCAT-187
> URL: https://issues.apache.org/jira/browse/MTOMCAT-187
> Project: Apache Tomcat Maven Plugin
>  Issue Type: Question
>  Components: tomcat7
>Affects Versions: 2.0-beta-1
>Reporter: Sergio Fernández
>Assignee: Olivier Lamy (*$^¨%`£)
>Priority: Minor
>  Labels: maven
>
> I tried to find this detail at the documentation, but sorry but I didn't.
> The question is: does the plugin has any way to force the goal tomcat7:run to 
> scan (and updated when are modified) resources? Something equivalent to 
> scanIntervalSeconds in the maven jetty plugin.
> Thanks in advance. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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



[jira] [Commented] (MTOMCAT-187) Scan resources executing run goal

2012-12-03 Thread *$^¨%`£

[ 
https://issues.apache.org/jira/browse/MTOMCAT-187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13508825#comment-13508825
 ] 

Olivier Lamy (*$^¨%`£) commented on MTOMCAT-187:


Did you have a look at 
http://tomcat.apache.org/maven-plugin-2.1-SNAPSHOT/tomcat7-maven-plugin/run-mojo.html#backgroundProcessorDelay

> Scan resources executing run goal
> -
>
> Key: MTOMCAT-187
> URL: https://issues.apache.org/jira/browse/MTOMCAT-187
> Project: Apache Tomcat Maven Plugin
>  Issue Type: Question
>  Components: tomcat7
>Affects Versions: 2.0-beta-1
>Reporter: Sergio Fernández
>Assignee: Olivier Lamy (*$^¨%`£)
>Priority: Minor
>  Labels: maven
>
> I tried to find this detail at the documentation, but sorry but I didn't.
> The question is: does the plugin has any way to force the goal tomcat7:run to 
> scan (and updated when are modified) resources? Something equivalent to 
> scanIntervalSeconds in the maven jetty plugin.
> Thanks in advance. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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



[jira] [Commented] (MTOMCAT-187) Scan resources executing run goal

2012-12-03 Thread JIRA

[ 
https://issues.apache.org/jira/browse/MTOMCAT-187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13508827#comment-13508827
 ] 

Sergio Fernández commented on MTOMCAT-187:
--

Umm, not... I'll try it. What's the semantics of -1 as default value?

> Scan resources executing run goal
> -
>
> Key: MTOMCAT-187
> URL: https://issues.apache.org/jira/browse/MTOMCAT-187
> Project: Apache Tomcat Maven Plugin
>  Issue Type: Question
>  Components: tomcat7
>Affects Versions: 2.0-beta-1
>Reporter: Sergio Fernández
>Assignee: Olivier Lamy (*$^¨%`£)
>Priority: Minor
>  Labels: maven
>
> I tried to find this detail at the documentation, but sorry but I didn't.
> The question is: does the plugin has any way to force the goal tomcat7:run to 
> scan (and updated when are modified) resources? Something equivalent to 
> scanIntervalSeconds in the maven jetty plugin.
> Thanks in advance. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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



[jira] [Commented] (MTOMCAT-187) Scan resources executing run goal

2012-12-03 Thread *$^¨%`£

[ 
https://issues.apache.org/jira/browse/MTOMCAT-187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13508828#comment-13508828
 ] 

Olivier Lamy (*$^¨%`£) commented on MTOMCAT-187:


-1 == never :-)

> Scan resources executing run goal
> -
>
> Key: MTOMCAT-187
> URL: https://issues.apache.org/jira/browse/MTOMCAT-187
> Project: Apache Tomcat Maven Plugin
>  Issue Type: Question
>  Components: tomcat7
>Affects Versions: 2.0-beta-1
>Reporter: Sergio Fernández
>Assignee: Olivier Lamy (*$^¨%`£)
>Priority: Minor
>  Labels: maven
>
> I tried to find this detail at the documentation, but sorry but I didn't.
> The question is: does the plugin has any way to force the goal tomcat7:run to 
> scan (and updated when are modified) resources? Something equivalent to 
> scanIntervalSeconds in the maven jetty plugin.
> Thanks in advance. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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



Re: svn commit: r1415184 - in /tomcat/tc7.0.x/trunk: ./ test/org/apache/catalina/authenticator/TestNonLoginAndBasicAuthenticator.java webapps/docs/changelog.xml

2012-12-03 Thread Brian Burch

On 03/12/12 11:44, Brian Burch wrote:

On 02/12/12 22:00, Konstantin Kolinko wrote:



According to Buildbot logs, testBasicLoginSessionTimeout() runs for 2
minutes (125 seconds), mainly due to a sleep() call.

I wish there were a way to speed up this test.

My thoughts
a) Maybe use reflection to reduce StandardSession.lastAccessedTime and
thisAccessedTime by some fixed amount (6) instead of waiting for
that time to pass.


That would speed up the test... but it sounds like adding a time machine
to the test class! My feeling is this would add inappropriate logical
complexity to a test that has always created and destroyed a tomcat
instance for each test case (there are now 15).

However, I intend to replicate most of the improvements from this test
class into the other authenticator tests, so I am already apprehensive
about adding too many 60+ second delays to the entire suite.

Mark and I briefly discussed adding a new protected method for use by
these timeout tests:

org.apache.catalina.session.StandardSession.setSessionTimeoutSecs(int secs)


Silly me! Sorry if that left you wondering what I meant. That particular 
method already exists, is public, and is called setSessionTimeout.


What I meant to suggest was this:

org.apache.catalina.core.StandardContext.setSessionTimeoutSecs(int timeout)

because it would be much simpler to modify the Context in the test 
setUp, rather than each individual Session.



What do you think?






Best regards,
Konstantin Kolinko

-
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



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



buildbot success in ASF Buildbot on tomcat-trunk

2012-12-03 Thread buildbot
The Buildbot has detected a restored build on builder tomcat-trunk while 
building ASF Buildbot.
Full details are available at:
 http://ci.apache.org/builders/tomcat-trunk/builds/3626

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

Buildslave for this Build: bb-vm_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch tomcat/trunk] 1416568
Blamelist: markt

Build succeeded!

sincerely,
 -The Buildbot





[jira] [Commented] (MTOMCAT-187) Scan resources executing run goal

2012-12-03 Thread JIRA

[ 
https://issues.apache.org/jira/browse/MTOMCAT-187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13508842#comment-13508842
 ] 

Sergio Fernández commented on MTOMCAT-187:
--

Not working for me:


  org.apache.tomcat.maven
  tomcat7-maven-plugin
  2.0
  
10
  


Modified resources are not refreshed at the webapp :-/



> Scan resources executing run goal
> -
>
> Key: MTOMCAT-187
> URL: https://issues.apache.org/jira/browse/MTOMCAT-187
> Project: Apache Tomcat Maven Plugin
>  Issue Type: Question
>  Components: tomcat7
>Affects Versions: 2.0-beta-1
>Reporter: Sergio Fernández
>Assignee: Olivier Lamy (*$^¨%`£)
>Priority: Minor
>  Labels: maven
>
> I tried to find this detail at the documentation, but sorry but I didn't.
> The question is: does the plugin has any way to force the goal tomcat7:run to 
> scan (and updated when are modified) resources? Something equivalent to 
> scanIntervalSeconds in the maven jetty plugin.
> Thanks in advance. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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



[Bug 54217] JDBC connection pool runs out of connections when Context reload=“true” is enabled in Tomcat

2012-12-03 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54217

--- Comment #8 from Michael Osipov <1983-01...@gmx.net> ---
(In reply to comment #5)
> Confirmed. This is a memory leak bug in jdbc-pool. PoolCleaner instances are
> retaining references to the ConnectionPool preventing it from being GC'd.

It still doesn't make the closeMethod call obsolete, does it?

-- 
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 54217] JDBC connection pool runs out of connections when Context reload=“true” is enabled in Tomcat

2012-12-03 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54217

--- Comment #9 from Mark Thomas  ---
As per the docs for closeMethod, that method exists solely to speed up the
freeing of resources that would otherwise be freed by GC.

-- 
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: r1415184 - in /tomcat/tc7.0.x/trunk: ./ test/org/apache/catalina/authenticator/TestNonLoginAndBasicAuthenticator.java webapps/docs/changelog.xml

2012-12-03 Thread Brian Burch

On 03/12/12 16:22, Brian Burch wrote:

On 03/12/12 11:44, Brian Burch wrote:

On 02/12/12 22:00, Konstantin Kolinko wrote:



According to Buildbot logs, testBasicLoginSessionTimeout() runs for 2
minutes (125 seconds), mainly due to a sleep() call.

I wish there were a way to speed up this test.

My thoughts
a) Maybe use reflection to reduce StandardSession.lastAccessedTime and
thisAccessedTime by some fixed amount (6) instead of waiting for
that time to pass.


That would speed up the test... but it sounds like adding a time machine
to the test class! My feeling is this would add inappropriate logical
complexity to a test that has always created and destroyed a tomcat
instance for each test case (there are now 15).

However, I intend to replicate most of the improvements from this test
class into the other authenticator tests, so I am already apprehensive
about adding too many 60+ second delays to the entire suite.

Mark and I briefly discussed adding a new protected method for use by
these timeout tests:

org.apache.catalina.session.StandardSession.setSessionTimeoutSecs(int
secs)


Silly me! Sorry if that left you wondering what I meant. That particular
method already exists, is public, and is called setSessionTimeout.

What I meant to suggest was this:

org.apache.catalina.core.StandardContext.setSessionTimeoutSecs(int timeout)

because it would be much simpler to modify the Context in the test
setUp, rather than each individual Session.


What do you think?


The change seemed almost trivial to me, but I couldn't work out how to 
implement it without changing the public api, i.e.


I have only found one place where it is used:

org.apache.catalina.session.ManagerBase.setContext(Context context)

has this logic:

// Register with the new Context (if any)
if (this.context != null) {
setMaxInactiveInterval(this.context.getSessionTimeout() * 60);
this.context.addPropertyChangeListener(this);
}

I wanted to move the "60" back into StandardContext, but that doesn't 
work because it means changing the org.apache.catalina.Context api to 
work in seconds instead of minutes. ManagerBase and StandardContext are 
in different packages, so a protected accessor for the timeout in 
seconds wouldn't work either.


On the other hand, I wondered about defining an alternative timeout in 
seconds within the ManagerBase, which would only be used by unit tests. 
ManagerBase would use its own timeout if non-zero, otherwise use the 
Context value in minutes.


I would really appreciate some guidance on the best way to proceed. 
(Perhaps it is better to keep things simple by living with an 80 seconds 
test time?)







Best regards,
Konstantin Kolinko

-
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



-
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



Adding a goal to tomcat7-maven-plugin to build an artifact that is both deployable and executable

2012-12-03 Thread Mitch Kyle
Currently the tomcat7-maven-plugin allows for the creation of an  
executable jar, Which is fine but because it can't be deployed to tomcat,  
it requires us to release two artifacts.


What I was thinking would be an alternate goal that would instead build a  
war file for the application with the tomcat code at the root allowing it  
to be launched as an application or deployed to another container. (ex.  
jenkins.war with embedded jetty)


Any thoughts or concerns? Should I move forward with this? Any input is  
welcome.


Thanks,
Mitch
--
Using Opera's revolutionary email client: http://www.opera.com/mail/

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



svn commit: r1416658 - /tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java

2012-12-03 Thread markt
Author: markt
Date: Mon Dec  3 20:46:07 2012
New Revision: 1416658

URL: http://svn.apache.org/viewvc?rev=1416658&view=rev
Log:
Simplify the TimeZone handling in the AccessLogValve and correct a few edge 
cases.
The previous code did not handle edge cases - for example (and what ID'd this 
issue) the UK was at +01:00 from Oct 1968 to Oct 1971.
It is far better to let the formatted handle the TimeZone directly as it will 
handle all the edge cases.

Modified:
tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java

Modified: tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java?rev=1416658&r1=1416657&r2=1416658&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java (original)
+++ tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java Mon Dec  3 
20:46:07 2012
@@ -241,25 +241,6 @@ public class AccessLogValve extends Valv
 
 
 /**
- * The system timezone.
- */
-private static final TimeZone timezone;
-
-
-/**
- * The time zone offset relative to GMT in text form when daylight saving
- * is not in operation.
- */
-private static final String timeZoneNoDST;
-
-
-/**
- * The time zone offset relative to GMT in text form when daylight saving
- * is in operation.
- */
-private static final String timeZoneDST;
-
-/**
  * The size of our global date format cache
  */
 private static final int globalCacheSize = 300;
@@ -307,7 +288,7 @@ public class AccessLogValve extends Valv
 protected class Cache {
 
 /* CLF log format */
-private static final String cLFFormat = "dd/MMM/:HH:mm:ss";
+private static final String cLFFormat = "dd/MMM/:HH:mm:ss Z";
 
 /* Second used to retrieve CLF format in most recent invocation */
 private long previousSeconds = Long.MIN_VALUE;
@@ -417,8 +398,6 @@ public class AccessLogValve extends Valv
 StringBuilder current = new StringBuilder(32);
 current.append('[');
 current.append(previousFormat);
-current.append(' ');
-current.append(getTimeZone(currentDate));
 current.append(']');
 previousFormat = current.toString();
 }
@@ -1223,40 +1202,6 @@ public class AccessLogValve extends Valv
 }
 
 
-private static String getTimeZone(Date date) {
-if (timezone.inDaylightTime(date)) {
-return timeZoneDST;
-} else {
-return timeZoneNoDST;
-}
-}
-
-
-private static String calculateTimeZoneOffset(long offset) {
-StringBuilder tz = new StringBuilder();
-if ((offset < 0)) {
-tz.append("-");
-offset = -offset;
-} else {
-tz.append("+");
-}
-
-long hourOffset = offset / (1000 * 60 * 60);
-long minuteOffset = (offset / (1000 * 60)) % 60;
-
-if (hourOffset < 10) {
-tz.append("0");
-}
-tz.append(hourOffset);
-
-if (minuteOffset < 10) {
-tz.append("0");
-}
-tz.append(minuteOffset);
-
-return tz.toString();
-}
-
 /**
  * Find a locale by name
  */
@@ -1274,14 +1219,6 @@ public class AccessLogValve extends Valv
 return fallback;
 }
 
-static {
-// Initialize the timeZone
-timezone = TimeZone.getDefault();
-timeZoneNoDST = calculateTimeZoneOffset(timezone.getRawOffset());
-int offset = timezone.getDSTSavings();
-timeZoneDST = calculateTimeZoneOffset(timezone.getRawOffset() + 
offset);
-}
-
 
 /**
  * Start this component and implement the requirements
@@ -1300,7 +1237,7 @@ public class AccessLogValve extends Valv
 setFileDateFormat(format);
 }
 fileDateFormatter = new SimpleDateFormat(format, Locale.US);
-fileDateFormatter.setTimeZone(timezone);
+fileDateFormatter.setTimeZone(TimeZone.getDefault());
 dateStamp = fileDateFormatter.format(new 
Date(System.currentTimeMillis()));
 if (rotatable && renameOnRotate) {
 restore();



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



svn commit: r1416660 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/valves/AccessLogValve.java webapps/docs/changelog.xml

2012-12-03 Thread markt
Author: markt
Date: Mon Dec  3 20:47:57 2012
New Revision: 1416660

URL: http://svn.apache.org/viewvc?rev=1416660&view=rev
Log:
Simplify the TimeZone handling in the AccessLogValve and correct a few edge 
cases.
The previous code did not handle edge cases - for example (and what ID'd this 
issue) the UK was at +01:00 from Oct 1968 to Oct 1971.
It is far better to let the formatted handle the TimeZone directly as it will 
handle all the edge cases.

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/AccessLogValve.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

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

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/AccessLogValve.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/AccessLogValve.java?rev=1416660&r1=1416659&r2=1416660&view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/AccessLogValve.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/AccessLogValve.java 
Mon Dec  3 20:47:57 2012
@@ -246,25 +246,6 @@ public class AccessLogValve extends Valv
 
 
 /**
- * The system timezone.
- */
-private static final TimeZone timezone;
-
-
-/**
- * The time zone offset relative to GMT in text form when daylight saving
- * is not in operation.
- */
-private static final String timeZoneNoDST;
-
-
-/**
- * The time zone offset relative to GMT in text form when daylight saving
- * is in operation.
- */
-private static final String timeZoneDST;
-
-/**
  * The size of our global date format cache
  */
 private static final int globalCacheSize = 300;
@@ -312,7 +293,7 @@ public class AccessLogValve extends Valv
 protected class Cache {
 
 /* CLF log format */
-private static final String cLFFormat = "dd/MMM/:HH:mm:ss";
+private static final String cLFFormat = "dd/MMM/:HH:mm:ss Z";
 
 /* Second used to retrieve CLF format in most recent invocation */
 private long previousSeconds = Long.MIN_VALUE;
@@ -422,8 +403,6 @@ public class AccessLogValve extends Valv
 StringBuilder current = new StringBuilder(32);
 current.append('[');
 current.append(previousFormat);
-current.append(' ');
-current.append(getTimeZone(currentDate));
 current.append(']');
 previousFormat = current.toString();
 }
@@ -1221,40 +1200,6 @@ public class AccessLogValve extends Valv
 }
 
 
-private static String getTimeZone(Date date) {
-if (timezone.inDaylightTime(date)) {
-return timeZoneDST;
-} else {
-return timeZoneNoDST;
-}
-}
-
-
-private static String calculateTimeZoneOffset(long offset) {
-StringBuilder tz = new StringBuilder();
-if ((offset < 0)) {
-tz.append("-");
-offset = -offset;
-} else {
-tz.append("+");
-}
-
-long hourOffset = offset / (1000 * 60 * 60);
-long minuteOffset = (offset / (1000 * 60)) % 60;
-
-if (hourOffset < 10) {
-tz.append("0");
-}
-tz.append(hourOffset);
-
-if (minuteOffset < 10) {
-tz.append("0");
-}
-tz.append(minuteOffset);
-
-return tz.toString();
-}
-
 /**
  * Find a locale by name
  */
@@ -1272,14 +1217,6 @@ public class AccessLogValve extends Valv
 return fallback;
 }
 
-static {
-// Initialize the timeZone
-timezone = TimeZone.getDefault();
-timeZoneNoDST = calculateTimeZoneOffset(timezone.getRawOffset());
-int offset = timezone.getDSTSavings();
-timeZoneDST = calculateTimeZoneOffset(timezone.getRawOffset() + 
offset);
-}
-
 
 /**
  * Start this component and implement the requirements
@@ -1298,7 +1235,7 @@ public class AccessLogValve extends Valv
 setFileDateFormat(format);
 }
 fileDateFormatter = new SimpleDateFormat(format, Locale.US);
-fileDateFormatter.setTimeZone(timezone);
+fileDateFormatter.setTimeZone(TimeZone.getDefault());
 dateStamp = fileDateFormatter.format(new 
Date(System.currentTimeMillis()));
 if (rotatable && renameOnRotate) {
 restore();

Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1416660&r1=1416659&r2=1416660&view=diff
==
--- tomcat/tc7

SPDY on the roadmap?

2012-12-03 Thread Elgs Chen
Dear Tomcat Developers,

I'm wondering if there's anything about SPDY connector implementation on the 
Tomcat roadmap? I'm hoping to get some insight about it with Tomcat.

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



Re: [Vote] Add comments.apache.org to Tomcat docs

2012-12-03 Thread Keiichi Fujino
2012/11/22 Rainer Jung :
> Integrate comments.apache.org with TC 7 docs on tomcat.apache.org:
>
> [X] +1, go ahead
> [  ]  0, I don't care
> [  ] -1, Don't integrate, because ...
>

+1


-- 
Keiichi.Fujino

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



svn commit: r1416787 - /tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java

2012-12-03 Thread kfujino
Author: kfujino
Date: Tue Dec  4 06:03:27 2012
New Revision: 1416787

URL: http://svn.apache.org/viewvc?rev=1416787&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54150
Make sure that SlowQueryReportJmx mbean deregistered during webapp shutdown.

Modified:

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

Modified: 
tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java?rev=1416787&r1=1416786&r2=1416787&view=diff
==
--- 
tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java
 (original)
+++ 
tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java
 Tue Dec  4 06:03:27 2012
@@ -402,7 +402,9 @@ public class ConnectionPool {
 PoolProperties.InterceptorDefinition[] proxies = 
getPoolProperties().getJdbcInterceptorsAsArray();
 for (int i=0; i

svn commit: r1416789 - in /tomcat/tc7.0.x/trunk: modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java webapps/docs/changelog.xml

2012-12-03 Thread kfujino
Author: kfujino
Date: Tue Dec  4 06:08:22 2012
New Revision: 1416789

URL: http://svn.apache.org/viewvc?rev=1416789&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54150
Make sure that SlowQueryReportJmx mbean deregistered during webapp shutdown.

Modified:

tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Modified: 
tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java?rev=1416789&r1=1416788&r2=1416789&view=diff
==
--- 
tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java
 Tue Dec  4 06:08:22 2012
@@ -402,7 +402,9 @@ public class ConnectionPool {
 PoolProperties.InterceptorDefinition[] proxies = 
getPoolProperties().getJdbcInterceptorsAsArray();
 for (int i=0; ihttp://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1416789&r1=1416788&r2=1416789&view=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Tue Dec  4 06:08:22 2012
@@ -107,6 +107,10 @@
 Fix a handful of Eclipse warnings in the JDBC pool source code 
including
 the warnings reported in 53565. (markt)
   
+  
+54150: Make sure that SlowQueryReportJmx mbean deregistered
+during webapp shutdown. Reported by Alex Franken. (kfujino)
+  
 
   
   



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



[Bug 54150] SlowQueryReportJmx mbean deregistration failure due to NPE - properties not set during pool close callback

2012-12-03 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54150

Keiichi Fujino  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED
 OS||All

--- Comment #1 from Keiichi Fujino  ---
Thanks for the report.
Fixed in trunk and 7.0.x and will be included in 7.0.34 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



svn commit: r1416793 - /tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSource.java

2012-12-03 Thread kfujino
Author: kfujino
Date: Tue Dec  4 06:31:27 2012
New Revision: 1416793

URL: http://svn.apache.org/viewvc?rev=1416793&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54194
Make sure that connection pool mbean is not registered when jmxEnabled is 
false. 

Modified:

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

Modified: 
tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSource.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSource.java?rev=1416793&r1=1416792&r2=1416793&view=diff
==
--- 
tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSource.java
 (original)
+++ 
tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSource.java
 Tue Dec  4 06:31:27 2012
@@ -98,8 +98,10 @@ public class DataSource extends DataSour
 @Override
 public ObjectName preRegister(MBeanServer server, ObjectName name) throws 
Exception {
 try {
-this.oname = createObjectName(name);
-if (oname!=null) registerJmx();
+if ( isJmxEnabled() ) { 
+this.oname = createObjectName(name);
+if (oname!=null) registerJmx();
+}
 }catch (MalformedObjectNameException x) {
 log.error("Unable to create object name for JDBC pool.",x);
 }



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



svn commit: r1416794 - in /tomcat/tc7.0.x/trunk: modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSource.java webapps/docs/changelog.xml

2012-12-03 Thread kfujino
Author: kfujino
Date: Tue Dec  4 06:35:12 2012
New Revision: 1416794

URL: http://svn.apache.org/viewvc?rev=1416794&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54194
Make sure that connection pool mbean is not registered when jmxEnabled is 
false. 

Modified:

tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSource.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Modified: 
tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSource.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSource.java?rev=1416794&r1=1416793&r2=1416794&view=diff
==
--- 
tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSource.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSource.java
 Tue Dec  4 06:35:12 2012
@@ -98,8 +98,10 @@ public class DataSource extends DataSour
 @Override
 public ObjectName preRegister(MBeanServer server, ObjectName name) throws 
Exception {
 try {
-this.oname = createObjectName(name);
-if (oname!=null) registerJmx();
+if ( isJmxEnabled() ) { 
+this.oname = createObjectName(name);
+if (oname!=null) registerJmx();
+}
 }catch (MalformedObjectNameException x) {
 log.error("Unable to create object name for JDBC pool.",x);
 }

Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1416794&r1=1416793&r2=1416794&view=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Tue Dec  4 06:35:12 2012
@@ -111,6 +111,10 @@
 54150: Make sure that SlowQueryReportJmx mbean deregistered
 during webapp shutdown. Reported by Alex Franken. (kfujino)
   
+  
+54194: Make sure that connection pool mbean is not 
registered
+when jmxEnabled is false. Patch provided by tobias.gierke. (kfujino)
+  
 
   
   



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



[Bug 54194] NPE in DataSource.registerJmx() although DataSource is created with setJmxEnabled(false)

2012-12-03 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54194

Keiichi Fujino  changed:

   What|Removed |Added

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

--- Comment #1 from Keiichi Fujino  ---
Thanks for the report.
The cause of this NPE is not initializing connection pool.
You can avoid this problem by calling dataSource.createPool().

Anyway, I am going to apply your patch. 
And it will be included in 7.0.34 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 54239] New: Extensible EL Interpreter

2012-12-03 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54239

Bug ID: 54239
   Summary: Extensible EL Interpreter
   Product: Tomcat 7
   Version: trunk
  Hardware: PC
Status: NEW
  Severity: enhancement
  Priority: P2
 Component: Jasper
  Assignee: dev@tomcat.apache.org
  Reporter: xs...@ebay.com
Classification: Unclassified

Created attachment 29684
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29684&action=edit
Interface of ELInterpreter

In some cases, applications need doing code generation for EL to make EL
evaluation more faster.

It's better for tomcat to provide an extensible EL Interpreter. So application
can inject it's own ELInterpreter to replace the default
JspUtil.interpreterCall.

Attached an implementation.

-- 
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 54239] Extensible EL Interpreter

2012-12-03 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54239

--- Comment #1 from Sheldon Shao  ---
Created attachment 29685
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29685&action=edit
ELInterpreterFactory

-- 
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 54239] Extensible EL Interpreter

2012-12-03 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54239

Sheldon Shao  changed:

   What|Removed |Added

  Attachment #29684|application/octet-stream|text/plain
  mime type||

-- 
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 54239] Extensible EL Interpreter

2012-12-03 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54239

--- Comment #2 from Sheldon Shao  ---
Created attachment 29686
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29686&action=edit
Patch for Generator.java

-- 
You are receiving this mail because:
You are the assignee for the bug.

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



buildbot failure in ASF Buildbot on tomcat-7-trunk

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

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

Buildslave for this Build: bb-vm_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch tomcat/tc7.0.x/trunk] 1416789
Blamelist: kfujino

BUILD FAILED: failed compile_1

sincerely,
 -The Buildbot





buildbot failure in ASF Buildbot on tomcat-trunk

2012-12-03 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/3628

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

Buildslave for this Build: bb-vm_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch tomcat/trunk] 1416787
Blamelist: kfujino

BUILD FAILED: failed compile_1

sincerely,
 -The Buildbot




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



[Bug 54240] New: Configurable system level tagPlugins.xml

2012-12-03 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54240

Bug ID: 54240
   Summary: Configurable system level tagPlugins.xml
   Product: Tomcat 7
   Version: trunk
  Hardware: PC
Status: NEW
  Severity: normal
  Priority: P2
 Component: Jasper
  Assignee: dev@tomcat.apache.org
  Reporter: xs...@ebay.com
Classification: Unclassified

Created attachment 29687
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29687&action=edit
Patch for TagPluginManager.java

Currently, tagPlugins.xml can only be put in a WAR.
However, if the configuration can be put into a web framework, so web
application don't need to care about this.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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



buildbot success in ASF Buildbot on tomcat-7-trunk

2012-12-03 Thread buildbot
The Buildbot has detected a restored build on builder tomcat-7-trunk while 
building ASF Buildbot.
Full details are available at:
 http://ci.apache.org/builders/tomcat-7-trunk/builds/953

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

Buildslave for this Build: bb-vm_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch tomcat/tc7.0.x/trunk] 1416794
Blamelist: kfujino

Build succeeded!

sincerely,
 -The Buildbot




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



buildbot success in ASF Buildbot on tomcat-trunk

2012-12-03 Thread buildbot
The Buildbot has detected a restored build on builder tomcat-trunk while 
building ASF Buildbot.
Full details are available at:
 http://ci.apache.org/builders/tomcat-trunk/builds/3629

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

Buildslave for this Build: bb-vm_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch tomcat/trunk] 1416793
Blamelist: kfujino

Build succeeded!

sincerely,
 -The Buildbot





[GUMP@vmgump]: Project tomcat-taglibs-standard (in module tomcat-taglibs) failed

2012-12-03 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 222 runs.
The current state of this project is 'Failed', with reason 'Build Failed'.
For reference only, the following projects are affected by this:
- tomcat-taglibs-standard :  Standard Taglib
- tomcat-taglibs-standard-install :  JSP Taglibs


Full details are available at:

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

That said, some information snippets are provided here.

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



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

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

[Bug 54241] New: NPE in BodyContentImpl

2012-12-03 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54241

Bug ID: 54241
   Summary: NPE in BodyContentImpl
   Product: Tomcat 7
   Version: trunk
  Hardware: PC
Status: NEW
  Severity: major
  Priority: P2
 Component: Jasper
  Assignee: dev@tomcat.apache.org
  Reporter: xs...@ebay.com
Classification: Unclassified

Created attachment 29688
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29688&action=edit
Patch for BodyContentImpl.java

Similar as BUG 35410, there is a NPE when calling BodyContentImpl#write(String)
if the String is NULL.

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