buildbot failure in on tomcat-trunk

2016-02-18 Thread buildbot
The Buildbot has detected a new failure on builder tomcat-trunk while building 
. Full details are available at:
https://ci.apache.org/builders/tomcat-trunk/builds/1078

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

Buildslave for this Build: silvanus_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-commit' 
triggered this build
Build Source Stamp: [branch tomcat/trunk] 1731014
Blamelist: violetagg

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



svn commit: r1731030 - in /tomcat/tc8.0.x/trunk: ./ java/org/apache/catalina/loader/ResourceEntry.java java/org/apache/catalina/loader/WebappClassLoaderBase.java webapps/docs/changelog.xml

2016-02-18 Thread markt
Author: markt
Date: Thu Feb 18 09:45:39 2016
New Revision: 1731030

URL: http://svn.apache.org/viewvc?rev=1731030&view=rev
Log:
Refactor class loading so JAR scanning does not trigger the caching of the 
byte[] for every scanned class until the class is loaded.

Modified:
tomcat/tc8.0.x/trunk/   (props changed)
tomcat/tc8.0.x/trunk/java/org/apache/catalina/loader/ResourceEntry.java

tomcat/tc8.0.x/trunk/java/org/apache/catalina/loader/WebappClassLoaderBase.java
tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc8.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Feb 18 09:45:39 2016
@@ -1 +1 @@
-/tomcat/trunk:1636524,1637156,1637176,1637188,1637331,1637684,1637695,1637890,1637892,1638720-1638725,1639653,1640010,1640083-1640084,1640088,1640275,1640322,1640347,1640361,1640365,1640403,1640410,1640652,1640655-1640658,1640688,1640700-1640883,1640903,1640976,1640978,1641000,1641026,1641038-1641039,1641051-1641052,1641058,1641064,1641300,1641369,1641374,1641380,1641486,1641634,1641656-1641692,1641704,1641707-1641718,1641720-1641722,1641735,1641981,1642233,1642280,1642554,1642564,1642595,1642606,1642668,1642679,1642697,1642699,1642766,1643002,1643045,1643054-1643055,1643066,1643121,1643128,1643206,1643209-1643210,1643216,1643249,1643270,1643283,1643309-1643310,1643323,1643365-1643366,1643370-1643371,1643465,1643474,1643536,1643570,1643634,1643649,1643651,1643654,1643675,1643731,1643733-1643734,1643761,1643766,1643814,1643937,1643963,1644017,1644169,1644201-1644203,1644321,1644323,1644516,1644523,1644529,1644535,1644730,1644768,1644784-1644785,1644790,1644793,1644815,1644884,1644886
 
,1644890,1644892,1644910,1644924,1644929-1644930,1644935,1644989,1645011,1645247,1645355,1645357-1645358,1645455,1645465,1645469,1645471,1645473,1645475,1645486-1645488,1645626,1645641,1645685,1645743,1645763,1645951-1645953,1645955,1645993,1646098-1646106,1646178,1646220,1646302,1646304,1646420,1646470-1646471,1646476,1646559,1646717-1646723,1646773,1647026,1647042,1647530,1647655,1648304,1648815,1648907,1649973,1650081,1650365,1651116,1651120,1651280,1651470,1652938,1652970,1653041,1653471,1653550,1653574,1653797,1653815-1653816,1653819,1653840,1653857,1653888,1653972,1654013,1654030,1654050,1654123,1654148,1654159,1654513,1654515,1654517,1654522,1654524,1654725,1654735,1654766,1654785,1654851-1654852,1654978,1655122-1655124,1655126-1655127,1655129-1655130,1655132-1655133,1655312,1655351,1655438,1655441,1655454,168,1656087,1656299,1656319,1656331,1656345,1656350,1656590,1656648-1656650,1656657,1657041,1657054,1657374,1657492,1657510,1657565,1657580,1657584,1657586,1657589,1657
 
592,1657607,1657609,1657682,1657907,1658207,1658734,1658781,1658790,1658799,1658802,1658804,1658833,1658840,1658966,1659043,1659053,1659059,1659174,1659184,1659188-1659189,1659216,1659263,1659293,1659304,1659306-1659307,1659382,1659384,1659428,1659471,1659486,1659505,1659516,1659521,1659524,1659559,1659562,1659803,1659806,1659814,1659833,1659862,1659905,1659919,1659948,1659967,1659983-1659984,1660060,1660074,1660077,1660133,1660168,1660331-1660332,1660353,1660358,1660924,1661386,1661770,1661867,1661972,1661990,1662200,1662308-1662309,1662548,1662614,1662696,1662736,1662985,1662988-1662989,1663264,1663277,1663298,1663534,1663562,1663676,1663715,1663754,1663768,1663772,1663781,1663893,1663995,1664143,1664163,1664174,1664301,1664317,1664347,1664657,1664659,1664710,1664863-1664864,1664866,1665085,1665292,1665559,1665653,1665661,1665672,1665694,1665697,1665736,1665779,1665976-1665977,1665980-1665981,1665985-1665986,1665989,1665998,1666004,1666008,1666013,1666017,1666024,1666116,1666386-1
 
666387,1666494,1666496,1666552,1666569,1666579,137,149,1666757,1666966,1666972,1666985,1666995,1666997,1667292,1667402,1667406,1667546,1667615,1667630,1667636,1667688,1667764,1667871,1668026,1668135,1668193,1668593,1668596,1668630,1668639,1668843,1669353,1669370,1669451,1669800,1669838,1669876,1669882,1670394,1670433,1670591,1670598-1670600,1670610,1670631,1670719,1670724,1670726,1670730,1670940,1671112,1672272,1672284,1673754,1674294,1675461,1675486,1675594,1675830,1676231,1676250-1676251,1676364,1676381,1676393,1676479,1676525,1676552,1676615,1676630,1676634,1676721,1676926,1676943,1677140,1677802,1678011,1678162,1678174,1678339,1678426-1678427,1678694,1678701,1679534,1679708,1679710,1679716,1680034,1680246,1681056,1681123,1681138,1681280,1681283,1681286,1681450,1681697,1681699,1681701,1681729,1681770,1681779,1681793,1681807,1681837-1681838,1681854,1681862,1681958,1682028,1682033,1682311,1682315,1682317,1682320,1682324,1682330,1682842,1684172,1684366,1684383,1684526-168452
 
7,1684549-1684550,1685556,1685591,1685739,1685744,1685772,1685816,1685826,1685891,1687242,1687261,1687268,1687340,1687551,1688563,1688841,1688878,165,1688896,1688901,1689345-1689346,1689357,1689656,1689675-1689677,1689679,1689687,1689825,1689856,1689918,1690011,1690

svn commit: r1731035 - in /tomcat/tc8.0.x/trunk: ./ java/org/apache/catalina/loader/WebappClassLoaderBase.java

2016-02-18 Thread markt
Author: markt
Date: Thu Feb 18 10:11:55 2016
New Revision: 1731035

URL: http://svn.apache.org/viewvc?rev=1731035&view=rev
Log:
Back-port corrections for regressions in r1731030

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

tomcat/tc8.0.x/trunk/java/org/apache/catalina/loader/WebappClassLoaderBase.java

Propchange: tomcat/tc8.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Feb 18 10:11:55 2016
@@ -1 +1 @@
-/tomcat/trunk:1636524,1637156,1637176,1637188,1637331,1637684,1637695,1637890,1637892,1638720-1638725,1639653,1640010,1640083-1640084,1640088,1640275,1640322,1640347,1640361,1640365,1640403,1640410,1640652,1640655-1640658,1640688,1640700-1640883,1640903,1640976,1640978,1641000,1641026,1641038-1641039,1641051-1641052,1641058,1641064,1641300,1641369,1641374,1641380,1641486,1641634,1641656-1641692,1641704,1641707-1641718,1641720-1641722,1641735,1641981,1642233,1642280,1642554,1642564,1642595,1642606,1642668,1642679,1642697,1642699,1642766,1643002,1643045,1643054-1643055,1643066,1643121,1643128,1643206,1643209-1643210,1643216,1643249,1643270,1643283,1643309-1643310,1643323,1643365-1643366,1643370-1643371,1643465,1643474,1643536,1643570,1643634,1643649,1643651,1643654,1643675,1643731,1643733-1643734,1643761,1643766,1643814,1643937,1643963,1644017,1644169,1644201-1644203,1644321,1644323,1644516,1644523,1644529,1644535,1644730,1644768,1644784-1644785,1644790,1644793,1644815,1644884,1644886
 
,1644890,1644892,1644910,1644924,1644929-1644930,1644935,1644989,1645011,1645247,1645355,1645357-1645358,1645455,1645465,1645469,1645471,1645473,1645475,1645486-1645488,1645626,1645641,1645685,1645743,1645763,1645951-1645953,1645955,1645993,1646098-1646106,1646178,1646220,1646302,1646304,1646420,1646470-1646471,1646476,1646559,1646717-1646723,1646773,1647026,1647042,1647530,1647655,1648304,1648815,1648907,1649973,1650081,1650365,1651116,1651120,1651280,1651470,1652938,1652970,1653041,1653471,1653550,1653574,1653797,1653815-1653816,1653819,1653840,1653857,1653888,1653972,1654013,1654030,1654050,1654123,1654148,1654159,1654513,1654515,1654517,1654522,1654524,1654725,1654735,1654766,1654785,1654851-1654852,1654978,1655122-1655124,1655126-1655127,1655129-1655130,1655132-1655133,1655312,1655351,1655438,1655441,1655454,168,1656087,1656299,1656319,1656331,1656345,1656350,1656590,1656648-1656650,1656657,1657041,1657054,1657374,1657492,1657510,1657565,1657580,1657584,1657586,1657589,1657
 
592,1657607,1657609,1657682,1657907,1658207,1658734,1658781,1658790,1658799,1658802,1658804,1658833,1658840,1658966,1659043,1659053,1659059,1659174,1659184,1659188-1659189,1659216,1659263,1659293,1659304,1659306-1659307,1659382,1659384,1659428,1659471,1659486,1659505,1659516,1659521,1659524,1659559,1659562,1659803,1659806,1659814,1659833,1659862,1659905,1659919,1659948,1659967,1659983-1659984,1660060,1660074,1660077,1660133,1660168,1660331-1660332,1660353,1660358,1660924,1661386,1661770,1661867,1661972,1661990,1662200,1662308-1662309,1662548,1662614,1662696,1662736,1662985,1662988-1662989,1663264,1663277,1663298,1663534,1663562,1663676,1663715,1663754,1663768,1663772,1663781,1663893,1663995,1664143,1664163,1664174,1664301,1664317,1664347,1664657,1664659,1664710,1664863-1664864,1664866,1665085,1665292,1665559,1665653,1665661,1665672,1665694,1665697,1665736,1665779,1665976-1665977,1665980-1665981,1665985-1665986,1665989,1665998,1666004,1666008,1666013,1666017,1666024,1666116,1666386-1
 
666387,1666494,1666496,1666552,1666569,1666579,137,149,1666757,1666966,1666972,1666985,1666995,1666997,1667292,1667402,1667406,1667546,1667615,1667630,1667636,1667688,1667764,1667871,1668026,1668135,1668193,1668593,1668596,1668630,1668639,1668843,1669353,1669370,1669451,1669800,1669838,1669876,1669882,1670394,1670433,1670591,1670598-1670600,1670610,1670631,1670719,1670724,1670726,1670730,1670940,1671112,1672272,1672284,1673754,1674294,1675461,1675486,1675594,1675830,1676231,1676250-1676251,1676364,1676381,1676393,1676479,1676525,1676552,1676615,1676630,1676634,1676721,1676926,1676943,1677140,1677802,1678011,1678162,1678174,1678339,1678426-1678427,1678694,1678701,1679534,1679708,1679710,1679716,1680034,1680246,1681056,1681123,1681138,1681280,1681283,1681286,1681450,1681697,1681699,1681701,1681729,1681770,1681779,1681793,1681807,1681837-1681838,1681854,1681862,1681958,1682028,1682033,1682311,1682315,1682317,1682320,1682324,1682330,1682842,1684172,1684366,1684383,1684526-168452
 
7,1684549-1684550,1685556,1685591,1685739,1685744,1685772,1685816,1685826,1685891,1687242,1687261,1687268,1687340,1687551,1688563,1688841,1688878,165,1688896,1688901,1689345-1689346,1689357,1689656,1689675-1689677,1689679,1689687,1689825,1689856,1689918,1690011,1690021,1690054,1690080,1690209,1691134,1691487,1691813,1692744-1692747,1692849,1693088,1693105,1693429,1693461,1694058,1694111,1694290,1694501,1694548,1694658,1694660,1694788,1694872,1694878,1695006,1695354,1695371,

svn commit: r1731038 - /tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml

2016-02-18 Thread markt
Author: markt
Date: Thu Feb 18 10:31:40 2016
New Revision: 1731038

URL: http://svn.apache.org/viewvc?rev=1731038&view=rev
Log:
whitespace police

Modified:
tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml

Modified: tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml?rev=1731038&r1=1731037&r2=1731038&view=diff
==
--- tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml Thu Feb 18 10:31:40 2016
@@ -53,7 +53,7 @@
 that directory happens to be located along side the original WAR, use
 the directory as the docBase rather than expanding the
 WAR into the appBase and using the newly created expanded
-directory as the docBase. (markt) 
+directory as the docBase. (markt)
   
   
 58988: Special characters in the substitutions for the 
RewriteValve
@@ -78,7 +78,7 @@
   
   
 Refactor the web application class loader to reduce the impact of JAR
-scanning on the memory footprint of the web application. (markt) 
+scanning on the memory footprint of the web application. (markt)
   
 
   



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



buildbot failure in on tomcat-8-trunk

2016-02-18 Thread buildbot
The Buildbot has detected a new failure on builder tomcat-8-trunk while 
building . Full details are available at:
https://ci.apache.org/builders/tomcat-8-trunk/builds/455

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

Buildslave for this Build: silvanus_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-8-commit' 
triggered this build
Build Source Stamp: [branch tomcat/tc8.0.x/trunk] 1731030
Blamelist: markt

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



Context path: any technical reason to ignore it?

2016-02-18 Thread Romain Manni-Bucau
Hi guys,

 in /META-INF/context.xml was used a lot
for tomcat 6/7 and doesn't work anymore since tomcat 8 (didn't check if it
has been backported, can be).

It is documented but I don't get why this feature has been removed.
typically checking if path is null or not before setting ContextName would
be enough to  keep the feature working.

Do I miss anything?

Romain Manni-Bucau
@rmannibucau  |  Blog
 | Github  |
LinkedIn  | Tomitriber



Re: Context path: any technical reason to ignore it?

2016-02-18 Thread Mark Thomas
On 18/02/2016 10:42, Romain Manni-Bucau wrote:
> Hi guys,
> 
>  in /META-INF/context.xml was used a lot
> for tomcat 6/7 and doesn't work anymore since tomcat 8 (didn't check if it
> has been backported, can be).
> 
> It is documented but I don't get why this feature has been removed.
> typically checking if path is null or not before setting ContextName would
> be enough to  keep the feature working.
> 
> Do I miss anything?

Yes. Consider the following:

test1.war with META-INF/context.xml containing 
test2.war with no context.xml

Put them both in the appBase of a default, running Tomcat instance. What
happens?

If you want to change the path, either:
- change the name of the WAR
or
- locate it outside the appBase and put a context.xml file in
conf//

The only place path is used is if the Context is defined in server.xml
and defining contexts in server.xml is strongly discouraged.

Mark


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



Re: Context path: any technical reason to ignore it?

2016-02-18 Thread Romain Manni-Bucau
On a personal side i tend to agree and like to have filesystem aligned with
the deployment
but I have to admit I saw path usage in META-INF/context.xml being quite
large (in real deployments or in tooling integration).

I understand your example but it is true at each level including
conflicting names in conf/* or server.xml.

Now 90% of the usages are to strip the version from the war name (most
build tools generate mywar-1.2.3[.QUALIFIER].
Maybe a flag to strip it on tomcat side would solve most of the cases and
don't encourage that much the risk you refer to?

Something like:



Wdyt?



Romain Manni-Bucau
@rmannibucau  |  Blog
 | Github  |
LinkedIn  | Tomitriber


2016-02-18 11:56 GMT+01:00 Mark Thomas :

> On 18/02/2016 10:42, Romain Manni-Bucau wrote:
> > Hi guys,
> >
> >  in /META-INF/context.xml was used a lot
> > for tomcat 6/7 and doesn't work anymore since tomcat 8 (didn't check if
> it
> > has been backported, can be).
> >
> > It is documented but I don't get why this feature has been removed.
> > typically checking if path is null or not before setting ContextName
> would
> > be enough to  keep the feature working.
> >
> > Do I miss anything?
>
> Yes. Consider the following:
>
> test1.war with META-INF/context.xml containing 
> test2.war with no context.xml
>
> Put them both in the appBase of a default, running Tomcat instance. What
> happens?
>
> If you want to change the path, either:
> - change the name of the WAR
> or
> - locate it outside the appBase and put a context.xml file in
> conf//
>
> The only place path is used is if the Context is defined in server.xml
> and defining contexts in server.xml is strongly discouraged.
>
> Mark
>
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
>
>


Re: Context path: any technical reason to ignore it?

2016-02-18 Thread Konstantin Kolinko
2016-02-18 13:42 GMT+03:00 Romain Manni-Bucau :
> Hi guys,
>
>  in /META-INF/context.xml was used a lot
> for tomcat 6/7 and doesn't work anymore since tomcat 8 (didn't check if it
> has been backported, can be).
>
> It is documented but I don't get why this feature has been removed.
> typically checking if path is null or not before setting ContextName would
> be enough to  keep the feature working.
>
> Do I miss anything?


The "path" attribute is allowed only when Context element is declared
in server.xml.  In all other cases it is ignored in Tomcat
5.5/6.0/7.0/8.0/9.0 as far as I remember (for the last ~5 years).  It
does not work in 6/7, contrary to your claim.


The main reasons are reducing ambiguity and implementation of
(auto)deployment. Note that

1. There are several steps that occur before context.xml is read.
2. Deployment is protected by a lock keyed by web application name or
path. Look for "serviced", "isServiced".

Best regards,
Konstantin Kolinko

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



Re: Context path: any technical reason to ignore it?

2016-02-18 Thread Romain Manni-Bucau
2016-02-18 12:02 GMT+01:00 Konstantin Kolinko :

> 2016-02-18 13:42 GMT+03:00 Romain Manni-Bucau :
> > Hi guys,
> >
> >  in /META-INF/context.xml was used a lot
> > for tomcat 6/7 and doesn't work anymore since tomcat 8 (didn't check if
> it
> > has been backported, can be).
> >
> > It is documented but I don't get why this feature has been removed.
> > typically checking if path is null or not before setting ContextName
> would
> > be enough to  keep the feature working.
> >
> > Do I miss anything?
>
>
> The "path" attribute is allowed only when Context element is declared
> in server.xml.  In all other cases it is ignored in Tomcat
> 5.5/6.0/7.0/8.0/9.0 as far as I remember (for the last ~5 years).  It
> does not work in 6/7, contrary to your claim.
>
>
Seems true, saw it a lot in tomcat 7 apps and assumed it was there so used.
Was probably silently ignored.


>
> The main reasons are reducing ambiguity and implementation of
> (auto)deployment. Note that
>
> 1. There are several steps that occur before context.xml is read.
> 2. Deployment is protected by a lock keyed by web application name or
> path. Look for "serviced", "isServiced".
>
>
Should still be doable when constructing the StandardContext and before it
is added to the host. Just means the standard context needs to be built and
check can't be done just on filename but I don't see it as a blocker.

I'm not a big fan of this (potential) feature but I have to admit it can
save you some headache and time when you don't control the full server or
deployment process. In cloud environments it would also be a simple and
potentially "tomcat-standard" way to configure the path.

Any hope to get the feature?


> Best regards,
> Konstantin Kolinko
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
>
>


buildbot success in on tomcat-8-trunk

2016-02-18 Thread buildbot
The Buildbot has detected a restored build on builder tomcat-8-trunk while 
building . Full details are available at:
https://ci.apache.org/builders/tomcat-8-trunk/builds/456

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

Buildslave for this Build: silvanus_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-8-commit' 
triggered this build
Build Source Stamp: [branch tomcat/tc8.0.x/trunk] 1731038
Blamelist: markt

Build succeeded!

Sincerely,
 -The Buildbot




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



Re: Context path: any technical reason to ignore it?

2016-02-18 Thread Mark Thomas
On 18/02/2016 11:00, Romain Manni-Bucau wrote:
> On a personal side i tend to agree and like to have filesystem aligned with
> the deployment
> but I have to admit I saw path usage in META-INF/context.xml being quite
> large (in real deployments or in tooling integration).
> 
> I understand your example but it is true at each level including
> conflicting names in conf/* or server.xml.

No it isn't.

You can't have conflicting names in conf and/or appBase.

server.xml always takes priority so no conflict either.

> Now 90% of the usages are to strip the version from the war name (most
> build tools generate mywar-1.2.3[.QUALIFIER].
> Maybe a flag to strip it on tomcat side would solve most of the cases and
> don't encourage that much the risk you refer to?
> 
> Something like:
> 
> 
> 
> Wdyt?

No need. The version marker can be used for that:

mywar##1.2.3[.QUALIFIER].war

Mark


> 
> 
> 
> Romain Manni-Bucau
> @rmannibucau  |  Blog
>  | Github  |
> LinkedIn  | Tomitriber
> 
> 
> 2016-02-18 11:56 GMT+01:00 Mark Thomas :
> 
>> On 18/02/2016 10:42, Romain Manni-Bucau wrote:
>>> Hi guys,
>>>
>>>  in /META-INF/context.xml was used a lot
>>> for tomcat 6/7 and doesn't work anymore since tomcat 8 (didn't check if
>> it
>>> has been backported, can be).
>>>
>>> It is documented but I don't get why this feature has been removed.
>>> typically checking if path is null or not before setting ContextName
>> would
>>> be enough to  keep the feature working.
>>>
>>> Do I miss anything?
>>
>> Yes. Consider the following:
>>
>> test1.war with META-INF/context.xml containing 
>> test2.war with no context.xml
>>
>> Put them both in the appBase of a default, running Tomcat instance. What
>> happens?
>>
>> If you want to change the path, either:
>> - change the name of the WAR
>> or
>> - locate it outside the appBase and put a context.xml file in
>> conf//
>>
>> The only place path is used is if the Context is defined in server.xml
>> and defining contexts in server.xml is strongly discouraged.
>>
>> Mark
>>
>>
>> -
>> 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



Re: Context path: any technical reason to ignore it?

2016-02-18 Thread Mark Thomas
On 18/02/2016 11:16, Romain Manni-Bucau wrote:
> 2016-02-18 12:02 GMT+01:00 Konstantin Kolinko :
> 
>> 2016-02-18 13:42 GMT+03:00 Romain Manni-Bucau :
>>> Hi guys,
>>>
>>>  in /META-INF/context.xml was used a lot
>>> for tomcat 6/7 and doesn't work anymore since tomcat 8 (didn't check if
>> it
>>> has been backported, can be).
>>>
>>> It is documented but I don't get why this feature has been removed.
>>> typically checking if path is null or not before setting ContextName
>> would
>>> be enough to  keep the feature working.
>>>
>>> Do I miss anything?
>>
>>
>> The "path" attribute is allowed only when Context element is declared
>> in server.xml.  In all other cases it is ignored in Tomcat
>> 5.5/6.0/7.0/8.0/9.0 as far as I remember (for the last ~5 years).  It
>> does not work in 6/7, contrary to your claim.
>>
>>
> Seems true, saw it a lot in tomcat 7 apps and assumed it was there so used.
> Was probably silently ignored.
> 
> 
>>
>> The main reasons are reducing ambiguity and implementation of
>> (auto)deployment. Note that
>>
>> 1. There are several steps that occur before context.xml is read.
>> 2. Deployment is protected by a lock keyed by web application name or
>> path. Look for "serviced", "isServiced".
>>
>>
> Should still be doable when constructing the StandardContext and before it
> is added to the host. Just means the standard context needs to be built and
> check can't be done just on filename but I don't see it as a blocker.
> 
> I'm not a big fan of this (potential) feature but I have to admit it can
> save you some headache and time when you don't control the full server or
> deployment process. In cloud environments it would also be a simple and
> potentially "tomcat-standard" way to configure the path.
> 
> Any hope to get the feature?

None.

Mark


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



svn commit: r1731055 - in /tomcat/trunk: java/org/apache/catalina/webresources/JarResource.java java/org/apache/catalina/webresources/JarWarResource.java webapps/docs/changelog.xml

2016-02-18 Thread markt
Author: markt
Date: Thu Feb 18 12:26:50 2016
New Revision: 1731055

URL: http://svn.apache.org/viewvc?rev=1731055&view=rev
Log:
Fix some resource leaks in the error handling for accessing files from JARs and 
WARs.

Modified:
tomcat/trunk/java/org/apache/catalina/webresources/JarResource.java
tomcat/trunk/java/org/apache/catalina/webresources/JarWarResource.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/catalina/webresources/JarResource.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/webresources/JarResource.java?rev=1731055&r1=1731054&r2=1731055&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/webresources/JarResource.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/webresources/JarResource.java Thu Feb 
18 12:26:50 2016
@@ -39,8 +39,9 @@ public class JarResource extends Abstrac
 
 @Override
 protected JarInputStreamWrapper getJarInputStreamWrapper() {
+JarFile jarFile = null;
 try {
-JarFile jarFile = getArchiveResourceSet().openJarFile();
+jarFile = getArchiveResourceSet().openJarFile();
 // Need to create a new JarEntry so the certificates can be read
 JarEntry jarEntry = jarFile.getJarEntry(getResource().getName());
 InputStream is = jarFile.getInputStream(jarEntry);
@@ -50,6 +51,9 @@ public class JarResource extends Abstrac
 log.debug(sm.getString("jarResource.getInputStreamFail",
 getResource().getName(), getBaseUrl()), e);
 }
+if (jarFile != null) {
+getArchiveResourceSet().closeJarFile();
+}
 return null;
 }
 }

Modified: tomcat/trunk/java/org/apache/catalina/webresources/JarWarResource.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/webresources/JarWarResource.java?rev=1731055&r1=1731054&r2=1731055&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/webresources/JarWarResource.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/webresources/JarWarResource.java Thu 
Feb 18 12:26:50 2016
@@ -44,29 +44,22 @@ public class JarWarResource extends Abst
 
 @Override
 protected JarInputStreamWrapper getJarInputStreamWrapper() {
+JarFile warFile = null;
+JarInputStream jarIs = null;
+JarEntry entry = null;
 try {
-JarFile warFile = getArchiveResourceSet().openJarFile();
+warFile = getArchiveResourceSet().openJarFile();
 JarEntry jarFileInWar = warFile.getJarEntry(archivePath);
 InputStream isInWar = warFile.getInputStream(jarFileInWar);
 
-JarInputStream jarIs = new JarInputStream(isInWar);
-JarEntry entry = jarIs.getNextJarEntry();
+jarIs = new JarInputStream(isInWar);
+entry = jarIs.getNextJarEntry();
 while (entry != null &&
 !entry.getName().equals(getResource().getName())) {
 entry = jarIs.getNextJarEntry();
 }
 
 if (entry == null) {
-try {
-jarIs.close();
-} catch (IOException ioe) {
-// Ignore
-}
-try {
-warFile.close();
-} catch (IOException ioe) {
-// Ignore
-}
 return null;
 }
 
@@ -77,6 +70,19 @@ public class JarWarResource extends Abst
 getResource().getName(), getBaseUrl()), e);
 }
 return null;
+} finally {
+if (entry == null) {
+if (jarIs != null) {
+try {
+jarIs.close();
+} catch (IOException ioe) {
+// Ignore
+}
+}
+if (warFile != null) {
+getArchiveResourceSet().closeJarFile();
+}
+}
 }
 }
 

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1731055&r1=1731054&r2=1731055&view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Thu Feb 18 12:26:50 2016
@@ -84,6 +84,10 @@
 Refactor the web application class loader to reduce the impact of JAR
 scanning on the memory footprint of the web application. (markt)
   
+  
+Fix some resource leaks in the error handling for accessing files from
+JARs and WARs. (markt)
+  
 
   
   



---

svn commit: r1731056 - in /tomcat/tc8.0.x/trunk: ./ java/org/apache/catalina/webresources/JarResource.java java/org/apache/catalina/webresources/JarWarResource.java webapps/docs/changelog.xml

2016-02-18 Thread markt
Author: markt
Date: Thu Feb 18 12:28:15 2016
New Revision: 1731056

URL: http://svn.apache.org/viewvc?rev=1731056&view=rev
Log:
Fix some resource leaks in the error handling for accessing files from JARs and 
WARs.

Modified:
tomcat/tc8.0.x/trunk/   (props changed)
tomcat/tc8.0.x/trunk/java/org/apache/catalina/webresources/JarResource.java

tomcat/tc8.0.x/trunk/java/org/apache/catalina/webresources/JarWarResource.java
tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc8.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Feb 18 12:28:15 2016
@@ -1 +1 @@
-/tomcat/trunk:1636524,1637156,1637176,1637188,1637331,1637684,1637695,1637890,1637892,1638720-1638725,1639653,1640010,1640083-1640084,1640088,1640275,1640322,1640347,1640361,1640365,1640403,1640410,1640652,1640655-1640658,1640688,1640700-1640883,1640903,1640976,1640978,1641000,1641026,1641038-1641039,1641051-1641052,1641058,1641064,1641300,1641369,1641374,1641380,1641486,1641634,1641656-1641692,1641704,1641707-1641718,1641720-1641722,1641735,1641981,1642233,1642280,1642554,1642564,1642595,1642606,1642668,1642679,1642697,1642699,1642766,1643002,1643045,1643054-1643055,1643066,1643121,1643128,1643206,1643209-1643210,1643216,1643249,1643270,1643283,1643309-1643310,1643323,1643365-1643366,1643370-1643371,1643465,1643474,1643536,1643570,1643634,1643649,1643651,1643654,1643675,1643731,1643733-1643734,1643761,1643766,1643814,1643937,1643963,1644017,1644169,1644201-1644203,1644321,1644323,1644516,1644523,1644529,1644535,1644730,1644768,1644784-1644785,1644790,1644793,1644815,1644884,1644886
 
,1644890,1644892,1644910,1644924,1644929-1644930,1644935,1644989,1645011,1645247,1645355,1645357-1645358,1645455,1645465,1645469,1645471,1645473,1645475,1645486-1645488,1645626,1645641,1645685,1645743,1645763,1645951-1645953,1645955,1645993,1646098-1646106,1646178,1646220,1646302,1646304,1646420,1646470-1646471,1646476,1646559,1646717-1646723,1646773,1647026,1647042,1647530,1647655,1648304,1648815,1648907,1649973,1650081,1650365,1651116,1651120,1651280,1651470,1652938,1652970,1653041,1653471,1653550,1653574,1653797,1653815-1653816,1653819,1653840,1653857,1653888,1653972,1654013,1654030,1654050,1654123,1654148,1654159,1654513,1654515,1654517,1654522,1654524,1654725,1654735,1654766,1654785,1654851-1654852,1654978,1655122-1655124,1655126-1655127,1655129-1655130,1655132-1655133,1655312,1655351,1655438,1655441,1655454,168,1656087,1656299,1656319,1656331,1656345,1656350,1656590,1656648-1656650,1656657,1657041,1657054,1657374,1657492,1657510,1657565,1657580,1657584,1657586,1657589,1657
 
592,1657607,1657609,1657682,1657907,1658207,1658734,1658781,1658790,1658799,1658802,1658804,1658833,1658840,1658966,1659043,1659053,1659059,1659174,1659184,1659188-1659189,1659216,1659263,1659293,1659304,1659306-1659307,1659382,1659384,1659428,1659471,1659486,1659505,1659516,1659521,1659524,1659559,1659562,1659803,1659806,1659814,1659833,1659862,1659905,1659919,1659948,1659967,1659983-1659984,1660060,1660074,1660077,1660133,1660168,1660331-1660332,1660353,1660358,1660924,1661386,1661770,1661867,1661972,1661990,1662200,1662308-1662309,1662548,1662614,1662696,1662736,1662985,1662988-1662989,1663264,1663277,1663298,1663534,1663562,1663676,1663715,1663754,1663768,1663772,1663781,1663893,1663995,1664143,1664163,1664174,1664301,1664317,1664347,1664657,1664659,1664710,1664863-1664864,1664866,1665085,1665292,1665559,1665653,1665661,1665672,1665694,1665697,1665736,1665779,1665976-1665977,1665980-1665981,1665985-1665986,1665989,1665998,1666004,1666008,1666013,1666017,1666024,1666116,1666386-1
 
666387,1666494,1666496,1666552,1666569,1666579,137,149,1666757,1666966,1666972,1666985,1666995,1666997,1667292,1667402,1667406,1667546,1667615,1667630,1667636,1667688,1667764,1667871,1668026,1668135,1668193,1668593,1668596,1668630,1668639,1668843,1669353,1669370,1669451,1669800,1669838,1669876,1669882,1670394,1670433,1670591,1670598-1670600,1670610,1670631,1670719,1670724,1670726,1670730,1670940,1671112,1672272,1672284,1673754,1674294,1675461,1675486,1675594,1675830,1676231,1676250-1676251,1676364,1676381,1676393,1676479,1676525,1676552,1676615,1676630,1676634,1676721,1676926,1676943,1677140,1677802,1678011,1678162,1678174,1678339,1678426-1678427,1678694,1678701,1679534,1679708,1679710,1679716,1680034,1680246,1681056,1681123,1681138,1681280,1681283,1681286,1681450,1681697,1681699,1681701,1681729,1681770,1681779,1681793,1681807,1681837-1681838,1681854,1681862,1681958,1682028,1682033,1682311,1682315,1682317,1682320,1682324,1682330,1682842,1684172,1684366,1684383,1684526-168452
 
7,1684549-1684550,1685556,1685591,1685739,1685744,1685772,1685816,1685826,1685891,1687242,1687261,1687268,1687340,1687551,1688563,1688841,1688878,165,1688896,1688901,1689345-1689346,1689357,1689656,1689675-1689677,1689679,1689687,1689825,1689856,1689918,1690011,1690021,1690054,1690080,1690209,1691134,1691487,

buildbot success in on tomcat-trunk

2016-02-18 Thread buildbot
The Buildbot has detected a restored build on builder tomcat-trunk while 
building . Full details are available at:
https://ci.apache.org/builders/tomcat-trunk/builds/1079

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

Buildslave for this Build: silvanus_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-commit' 
triggered this build
Build Source Stamp: [branch tomcat/trunk] 1731055
Blamelist: markt

Build succeeded!

Sincerely,
 -The Buildbot




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



svn commit: r1731079 - in /tomcat/trunk: java/org/apache/catalina/webresources/ webapps/docs/

2016-02-18 Thread markt
Author: markt
Date: Thu Feb 18 14:49:17 2016
New Revision: 1731079

URL: http://svn.apache.org/viewvc?rev=1731079&view=rev
Log:
Refactor the JAR and JAR-in-WAR resource handling to reduce the memory 
footprint of the web application.

Modified:

tomcat/trunk/java/org/apache/catalina/webresources/AbstractArchiveResourceSet.java
tomcat/trunk/java/org/apache/catalina/webresources/JarResourceSet.java
tomcat/trunk/java/org/apache/catalina/webresources/JarWarResourceSet.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: 
tomcat/trunk/java/org/apache/catalina/webresources/AbstractArchiveResourceSet.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/webresources/AbstractArchiveResourceSet.java?rev=1731079&r1=1731078&r2=1731079&view=diff
==
--- 
tomcat/trunk/java/org/apache/catalina/webresources/AbstractArchiveResourceSet.java
 (original)
+++ 
tomcat/trunk/java/org/apache/catalina/webresources/AbstractArchiveResourceSet.java
 Thu Feb 18 14:49:17 2016
@@ -23,6 +23,7 @@ import java.net.URL;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Iterator;
+import java.util.Map;
 import java.util.Set;
 import java.util.jar.JarEntry;
 import java.util.jar.JarFile;
@@ -34,12 +35,12 @@ import org.apache.catalina.util.Resource
 
 public abstract class AbstractArchiveResourceSet extends AbstractResourceSet {
 
-private final HashMap jarFileEntries = new HashMap<>();
 private URL baseUrl;
 private String baseUrlString;
 
 private JarFile archive = null;
-private final Object archiveLock = new Object();
+protected HashMap archiveEntries = null;
+protected final Object archiveLock = new Object();
 private long archiveUseCount = 0;
 
 
@@ -61,10 +62,6 @@ public abstract class AbstractArchiveRes
 return baseUrlString;
 }
 
-protected final HashMap getJarFileEntries() {
-return jarFileEntries;
-}
-
 
 @Override
 public final String[] list(String path) {
@@ -79,7 +76,7 @@ public abstract class AbstractArchiveRes
 if (pathInJar.length() > 0 && pathInJar.charAt(0) == '/') {
 pathInJar = pathInJar.substring(1);
 }
-Iterator entries = jarFileEntries.keySet().iterator();
+Iterator entries = 
getArchiveEntries(false).keySet().iterator();
 while (entries.hasNext()) {
 String name = entries.next();
 if (name.length() > pathInJar.length() &&
@@ -138,7 +135,7 @@ public abstract class AbstractArchiveRes
 }
 }
 
-Iterator entries = jarFileEntries.keySet().iterator();
+Iterator entries = 
getArchiveEntries(false).keySet().iterator();
 while (entries.hasNext()) {
 String name = entries.next();
 if (name.length() > pathInJar.length() &&
@@ -169,6 +166,34 @@ public abstract class AbstractArchiveRes
 return result;
 }
 
+
+/**
+ * Obtain the map of entries in the archive. May return null in which case
+ * {@link #getArchiveEntry(String)} should be used.
+ *
+ * @param single Is this request being make to support a single lookup? If
+ *   false, a map will always be returned. If true,
+ *   implementations may use this as a hint in determining the
+ *   optimum way to respond.
+ *
+ * @return The archives entries mapped to their names or null if
+ * {@link #getArchiveEntry(String)} should be used.
+ */
+protected abstract HashMap getArchiveEntries(boolean 
single);
+
+
+/**
+ * Obtain a single entry from the archive. For performance reasons,
+ * {@link #getArchiveEntries(boolean)} should always be called first and 
the
+ * archive entry looked up in the map if one is returned. Only if that call
+ * returns null should this method be used.
+ *
+ * @param pathInArchive The path in the archive of the entry required
+ *
+ * @return The specified archive entry or null if it does not exist
+ */
+protected abstract JarEntry getArchiveEntry(String pathInArchive);
+
 @Override
 public final boolean mkdir(String path) {
 checkPath(path);
@@ -228,15 +253,24 @@ public abstract class AbstractArchiveRes
 return new JarResourceRoot(root, new File(getBase()),
 baseUrlString, path);
 } else {
+Map jarEntries = getArchiveEntries(true);
 JarEntry jarEntry = null;
 if (!(pathInJar.charAt(pathInJar.length() - 1) == '/')) {
-jarEntry = jarFileEntries.get(pathInJar + '/');
+if (jarEntries == null) {
+jarEntry = getArchiveEntry(pathInJar + '/');
+} else {
+jarEntry = jarEntries.get(pathInJar + '/

svn commit: r1731080 - in /tomcat/tc8.0.x/trunk: ./ java/org/apache/catalina/webresources/ webapps/docs/

2016-02-18 Thread markt
Author: markt
Date: Thu Feb 18 15:04:09 2016
New Revision: 1731080

URL: http://svn.apache.org/viewvc?rev=1731080&view=rev
Log:
Refactor the JAR and JAR-in-WAR resource handling to reduce the memory 
footprint of the web application.

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

tomcat/tc8.0.x/trunk/java/org/apache/catalina/webresources/AbstractArchiveResourceSet.java

tomcat/tc8.0.x/trunk/java/org/apache/catalina/webresources/JarResourceSet.java

tomcat/tc8.0.x/trunk/java/org/apache/catalina/webresources/JarWarResourceSet.java
tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc8.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Feb 18 15:04:09 2016
@@ -1 +1 @@
-/tomcat/trunk:1636524,1637156,1637176,1637188,1637331,1637684,1637695,1637890,1637892,1638720-1638725,1639653,1640010,1640083-1640084,1640088,1640275,1640322,1640347,1640361,1640365,1640403,1640410,1640652,1640655-1640658,1640688,1640700-1640883,1640903,1640976,1640978,1641000,1641026,1641038-1641039,1641051-1641052,1641058,1641064,1641300,1641369,1641374,1641380,1641486,1641634,1641656-1641692,1641704,1641707-1641718,1641720-1641722,1641735,1641981,1642233,1642280,1642554,1642564,1642595,1642606,1642668,1642679,1642697,1642699,1642766,1643002,1643045,1643054-1643055,1643066,1643121,1643128,1643206,1643209-1643210,1643216,1643249,1643270,1643283,1643309-1643310,1643323,1643365-1643366,1643370-1643371,1643465,1643474,1643536,1643570,1643634,1643649,1643651,1643654,1643675,1643731,1643733-1643734,1643761,1643766,1643814,1643937,1643963,1644017,1644169,1644201-1644203,1644321,1644323,1644516,1644523,1644529,1644535,1644730,1644768,1644784-1644785,1644790,1644793,1644815,1644884,1644886
 
,1644890,1644892,1644910,1644924,1644929-1644930,1644935,1644989,1645011,1645247,1645355,1645357-1645358,1645455,1645465,1645469,1645471,1645473,1645475,1645486-1645488,1645626,1645641,1645685,1645743,1645763,1645951-1645953,1645955,1645993,1646098-1646106,1646178,1646220,1646302,1646304,1646420,1646470-1646471,1646476,1646559,1646717-1646723,1646773,1647026,1647042,1647530,1647655,1648304,1648815,1648907,1649973,1650081,1650365,1651116,1651120,1651280,1651470,1652938,1652970,1653041,1653471,1653550,1653574,1653797,1653815-1653816,1653819,1653840,1653857,1653888,1653972,1654013,1654030,1654050,1654123,1654148,1654159,1654513,1654515,1654517,1654522,1654524,1654725,1654735,1654766,1654785,1654851-1654852,1654978,1655122-1655124,1655126-1655127,1655129-1655130,1655132-1655133,1655312,1655351,1655438,1655441,1655454,168,1656087,1656299,1656319,1656331,1656345,1656350,1656590,1656648-1656650,1656657,1657041,1657054,1657374,1657492,1657510,1657565,1657580,1657584,1657586,1657589,1657
 
592,1657607,1657609,1657682,1657907,1658207,1658734,1658781,1658790,1658799,1658802,1658804,1658833,1658840,1658966,1659043,1659053,1659059,1659174,1659184,1659188-1659189,1659216,1659263,1659293,1659304,1659306-1659307,1659382,1659384,1659428,1659471,1659486,1659505,1659516,1659521,1659524,1659559,1659562,1659803,1659806,1659814,1659833,1659862,1659905,1659919,1659948,1659967,1659983-1659984,1660060,1660074,1660077,1660133,1660168,1660331-1660332,1660353,1660358,1660924,1661386,1661770,1661867,1661972,1661990,1662200,1662308-1662309,1662548,1662614,1662696,1662736,1662985,1662988-1662989,1663264,1663277,1663298,1663534,1663562,1663676,1663715,1663754,1663768,1663772,1663781,1663893,1663995,1664143,1664163,1664174,1664301,1664317,1664347,1664657,1664659,1664710,1664863-1664864,1664866,1665085,1665292,1665559,1665653,1665661,1665672,1665694,1665697,1665736,1665779,1665976-1665977,1665980-1665981,1665985-1665986,1665989,1665998,1666004,1666008,1666013,1666017,1666024,1666116,1666386-1
 
666387,1666494,1666496,1666552,1666569,1666579,137,149,1666757,1666966,1666972,1666985,1666995,1666997,1667292,1667402,1667406,1667546,1667615,1667630,1667636,1667688,1667764,1667871,1668026,1668135,1668193,1668593,1668596,1668630,1668639,1668843,1669353,1669370,1669451,1669800,1669838,1669876,1669882,1670394,1670433,1670591,1670598-1670600,1670610,1670631,1670719,1670724,1670726,1670730,1670940,1671112,1672272,1672284,1673754,1674294,1675461,1675486,1675594,1675830,1676231,1676250-1676251,1676364,1676381,1676393,1676479,1676525,1676552,1676615,1676630,1676634,1676721,1676926,1676943,1677140,1677802,1678011,1678162,1678174,1678339,1678426-1678427,1678694,1678701,1679534,1679708,1679710,1679716,1680034,1680246,1681056,1681123,1681138,1681280,1681283,1681286,1681450,1681697,1681699,1681701,1681729,1681770,1681779,1681793,1681807,1681837-1681838,1681854,1681862,1681958,1682028,1682033,1682311,1682315,1682317,1682320,1682324,1682330,1682842,1684172,1684366,1684383,1684526-168452
 
7,1684549-1684550,1685556,1685591,1685739,1685744,1685772,1685816,1685826,1685891,1687242,1687261,1687268,1687340,1687551,1688563,1688841,1688878,165,1688896,1688901,1689345-1689346,168935

[Bug 59027] New: Tomcat Virtual Host Manager application doesn't persist newly created virtual hosts

2016-02-18 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59027

Bug ID: 59027
   Summary: Tomcat Virtual Host Manager application doesn't
persist newly created virtual hosts
   Product: Tomcat 8
   Version: trunk
  Hardware: All
OS: All
Status: NEW
  Severity: enhancement
  Priority: P2
 Component: Manager
  Assignee: dev@tomcat.apache.org
  Reporter: csuth...@redhat.com
CC: psko...@gmail.com, wesley.ache...@gmail.com
Depends on: 48674

Created attachment 33569
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=33569&action=edit
Rough patch proposal

+++ This bug was initially created as a clone of Bug #48674 +++

If one create virtual host using /host-manager application all work as
expected. Start/Stop/Remove actions.
But newly created host is not persistently added to the Tomcat configuration.
After restart of Tomcat there is only localhost host listed.

-- 
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 48674] Tomcat Virtual Host Manager application doesn't persist newly created virtual hosts

2016-02-18 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=48674

csutherl  changed:

   What|Removed |Added

 Blocks||59027

-- 
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 59027] Tomcat Virtual Host Manager application doesn't persist newly created virtual hosts

2016-02-18 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59027

Mark Thomas  changed:

   What|Removed |Added

 Depends on|48674   |

-- 
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 48674] Tomcat Virtual Host Manager application doesn't persist newly created virtual hosts

2016-02-18 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=48674

Mark Thomas  changed:

   What|Removed |Added

 Blocks|59027   |

-- 
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 59027] Tomcat Virtual Host Manager application doesn't persist newly created virtual hosts

2016-02-18 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59027

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #1 from Mark Thomas  ---


*** This bug has been marked as a duplicate of bug 48674 ***

-- 
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 48674] Tomcat Virtual Host Manager application doesn't persist newly created virtual hosts

2016-02-18 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=48674

Mark Thomas  changed:

   What|Removed |Added

 CC||csuth...@redhat.com

--- Comment #6 from Mark Thomas  ---
*** Bug 59027 has been marked as a duplicate of this bug. ***

-- 
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 59027] Tomcat Virtual Host Manager application doesn't persist newly created virtual hosts

2016-02-18 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59027

--- Comment #2 from csutherl  ---
This enhancement was brought to my attention and seemed like a relatively easy
thing to add, so I gave it a shot. Instead of using the patch from the original
bug I re-implemented the request using StoreConfig. This makes the changes a
lot smaller and prevented functional duplication of code that already existed
in StoreConfig. Note that this patch isn't 100% complete; I'm looking for some
feedback on how I can resolve a couple of things before I would consider it
complete.

My original thought was to add a button next to each host that would be
available to persist the host's configuration, however I think the StoreConfig
interface Impl needs some changes to make that happen, so I'm just using
storeConfig to save the complete configuration. I left the button on the host
row because I couldn't figure out where else to put it (feedback please). Maybe
it should be a link at the top? I also just noticed when I was doing some
testing that there is no way to remove a host and persist that, so that
furthers the idea that the button should be somewhere else on the page.

If StoreConfig isn't enabled when you click the persist button it will provide
a failure message that suggests enabling it by catching the InstanceNotFound
exception.

-- 
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 48674] Tomcat Virtual Host Manager application doesn't persist newly created virtual hosts

2016-02-18 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=48674

--- Comment #7 from Mark Thomas  ---
Patch based on StoreConfig attached to Bug 59027.

-- 
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 59010] Disabling socketBuffer with "-1" doesn't cause exception on linux

2016-02-18 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59010

--- Comment #2 from Christopher Schultz  ---
This looks like a JVM bug to me: error code 0 is usually considered "success".
It could also be some other networking component (e.g. software firewall,
virus-scanner, etc.) interfering with the channel.

Do you have anything like that running that might unexpectedly close a network
connection, or otherwise cause data to refuse to write?

A similar issue closed INVALID based upon the assumption that it's a problem
with the OS (more likely the JVM, but possibly the OS):
https://issues.apache.org/jira/browse/HTTPCLIENT-957

Another similar issue (no JVM involved, I think), claiming that the problem is
with a firewall (seems like a sketchy explanation to me):
http://www-01.ibm.com/support/docview.wss?uid=swg21968078

-- 
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 48674] Tomcat Virtual Host Manager application doesn't persist newly created virtual hosts

2016-02-18 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=48674

--- Comment #8 from Remy Maucherat  ---
I had a request for this item, and since we already have a component
responsible for persisting the configuration, I figured it should be used
rather than add a lot of specific code which would have similar issues.

The location of the store config button is open for discussion though, but
normally the regular manager doesn't need 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



svn commit: r1731091 - /tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java

2016-02-18 Thread markt
Author: markt
Date: Thu Feb 18 16:21:23 2016
New Revision: 1731091

URL: http://svn.apache.org/viewvc?rev=1731091&view=rev
Log:
Align with trunk to simplify diffs. No functional change.

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

Modified: tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=1731091&r1=1731090&r2=1731091&view=diff
==
--- tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java 
(original)
+++ tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Thu 
Feb 18 16:21:23 2016
@@ -1140,7 +1140,8 @@ public class NioEndpoint extends Abstrac
 return result;
 }
 
-public boolean processSendfile(SelectionKey sk, KeyAttachment 
attachment, boolean event) {
+public boolean processSendfile(SelectionKey sk, KeyAttachment 
attachment,
+boolean calledByProcessor) {
 NioChannel sc = null;
 try {
 unreg(sk, attachment, sk.readyOps());
@@ -1150,10 +1151,10 @@ public class NioEndpoint extends Abstrac
 log.trace("Processing send file for: " + sd.fileName);
 }
 
-//setup the file channel
-if ( sd.fchannel == null ) {
+if (sd.fchannel == null) {
+// Setup the file channel
 File f = new File(sd.fileName);
-if ( !f.exists() ) {
+if (!f.exists()) {
 cancelledKey(sk,SocketStatus.ERROR);
 return false;
 }
@@ -1162,19 +1163,19 @@ public class NioEndpoint extends Abstrac
 sd.fchannel = fis.getChannel();
 }
 
-//configure output channel
+// Configure output channel
 sc = attachment.getSocket();
-//ssl channel is slightly different
+// TLS/SSL channel is slightly different
 WritableByteChannel wc = ((sc instanceof 
SecureNioChannel)?sc:sc.getIOChannel());
 
-//we still have data in the buffer
+// We still have data in the buffer
 if (sc.getOutboundRemaining()>0) {
 if (sc.flushOutbound()) {
 attachment.access();
 }
 } else {
 long written = sd.fchannel.transferTo(sd.pos,sd.length,wc);
-if ( written > 0 ) {
+if (written > 0) {
 sd.pos += written;
 sd.length -= written;
 attachment.access();
@@ -1187,7 +1188,7 @@ public class NioEndpoint extends Abstrac
 }
 }
 }
-if ( sd.length <= 0 && sc.getOutboundRemaining()<=0) {
+if (sd.length <= 0 && sc.getOutboundRemaining()<=0) {
 if (log.isDebugEnabled()) {
 log.debug("Send file complete for: "+sd.fileName);
 }
@@ -1200,7 +1201,7 @@ public class NioEndpoint extends Abstrac
 if (log.isDebugEnabled()) {
 log.debug("Connection is keep alive, 
registering back for OP_READ");
 }
-if (event) {
+if (calledByProcessor) {
 
this.add(attachment.getSocket(),SelectionKey.OP_READ);
 } else {
 reg(sk,attachment,SelectionKey.OP_READ);
@@ -1216,7 +1217,7 @@ public class NioEndpoint extends Abstrac
 if (log.isDebugEnabled()) {
 log.debug("OP_WRITE for sendfile: " + sd.fileName);
 }
-if (event) {
+if (calledByProcessor) {
 add(attachment.getSocket(),SelectionKey.OP_WRITE);
 } else {
 reg(sk,attachment,SelectionKey.OP_WRITE);



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



Re: Context path: any technical reason to ignore it?

2016-02-18 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Romain,

On 2/18/16 6:00 AM, Romain Manni-Bucau wrote:
> On a personal side i tend to agree and like to have filesystem
> aligned with the deployment but I have to admit I saw path usage in
> META-INF/context.xml being quite large (in real deployments or in
> tooling integration).

My preference would be to refuse to deploy an application with a
"path" attribute in a context.xml file. I haven't studied the code
well enough to know if it's possible (or reasonable) to know whether
the context is being configured based upon a context.xml file or from
within server.xml.

> I understand your example but it is true at each level including 
> conflicting names in conf/* or server.xml.
> 
> Now 90% of the usages are to strip the version from the war name
> (most build tools generate mywar-1.2.3[.QUALIFIER].

You mean when parallel deployment is NOT in use?

> Maybe a flag to strip it on tomcat side would solve most of the
> cases and don't encourage that much the risk you refer to?
> 
> Something like:
> 
> 

I think this can still lead to undefined behavior when different web
applications overlap. We would have to either throw up our hands and
say "caveat deployor" or do a whole bunch of work to cover this edge cas
e.

My vote would be to make users follow the existing rules. Removing a
version number from a WAR is easy: use conf/[engine]/[host]/[app].xml
and point it to the WAR file outside of the appbase. Done.

- -chris
-BEGIN PGP SIGNATURE-
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlbF7zoACgkQ9CaO5/Lv0PDdmwCgvFBMRFCb0OcnSpbX0G85JtUf
JoMAn3o31j2N4buEDStCSy8ikVAtMQ70
=N+M6
-END PGP SIGNATURE-

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



Re: Context path: any technical reason to ignore it?

2016-02-18 Thread Romain Manni-Bucau
2016-02-18 17:20 GMT+01:00 Christopher Schultz :

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Romain,
>
> On 2/18/16 6:00 AM, Romain Manni-Bucau wrote:
> > On a personal side i tend to agree and like to have filesystem
> > aligned with the deployment but I have to admit I saw path usage in
> > META-INF/context.xml being quite large (in real deployments or in
> > tooling integration).
>
> My preference would be to refuse to deploy an application with a
> "path" attribute in a context.xml file. I haven't studied the code
> well enough to know if it's possible (or reasonable) to know whether
> the context is being configured based upon a context.xml file or from
> within server.xml.
>
>
It is possible AFAIK since the context.xml is created from a file in this
case so we know which one.


> > I understand your example but it is true at each level including
> > conflicting names in conf/* or server.xml.
> >
> > Now 90% of the usages are to strip the version from the war name
> > (most build tools generate mywar-1.2.3[.QUALIFIER].
>
> You mean when parallel deployment is NOT in use?
>
>
Yep, parallel deployment would just add another suffix not influencing the
path so the user doesnt care for the purpose of this thread.


> > Maybe a flag to strip it on tomcat side would solve most of the
> > cases and don't encourage that much the risk you refer to?
> >
> > Something like:
> >
> > 
>
> I think this can still lead to undefined behavior when different web
> applications overlap. We would have to either throw up our hands and
> say "caveat deployor" or do a whole bunch of work to cover this edge cas
> e.
>
> My vote would be to make users follow the existing rules. Removing a
> version number from a WAR is easy: use conf/[engine]/[host]/[app].xml
> and point it to the WAR file outside of the appbase. Done.
>
>

Ok, now let's assume you control only the content of the .war you deploy
(not the name since it is in a continuous deployment (or test) tooling, not
the conf/ since it is a shared instance where you team doesnt have access.

I think the cost of handling path - without breaking current conflicting
name feature, just need few code changes - is worth the headache the users
have.

That said if really an issue for tomcat can you at least:

- log an error (warn maybe?) saying path is ignored. Since there is a
setter it  is swallowed silently.
- open a way to force it from the webapp even if it logs a warning (maybe a
flag userForced). Today even forcing it manually through a listener it is
ignored (= there is no real good moment in a prod instance - with other
advanced listeners we don't control - to do so). Worse case having a
server.xml flag can be a degraded option which can maybe be enough in
practise.



> - -chris
> -BEGIN PGP SIGNATURE-
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iEYEARECAAYFAlbF7zoACgkQ9CaO5/Lv0PDdmwCgvFBMRFCb0OcnSpbX0G85JtUf
> JoMAn3o31j2N4buEDStCSy8ikVAtMQ70
> =N+M6
> -END PGP SIGNATURE-
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
>
>


svn commit: r1731093 - in /tomcat/tc8.0.x/trunk: java/org/apache/tomcat/util/net/NioEndpoint.java webapps/docs/changelog.xml

2016-02-18 Thread markt
Author: markt
Date: Thu Feb 18 16:46:44 2016
New Revision: 1731093

URL: http://svn.apache.org/viewvc?rev=1731093&view=rev
Log:
Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=58646
Correct a problem with sendfile that resulted in a Processor being added to the 
cache twice leading to broken responses.

Modified:
tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml

Modified: tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=1731093&r1=1731092&r2=1731093&view=diff
==
--- tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java 
(original)
+++ tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Thu 
Feb 18 16:46:44 2016
@@ -1197,21 +1197,22 @@ public class NioEndpoint extends Abstrac
 sd.fchannel.close();
 } catch (Exception ignore) {
 }
-if ( sd.keepAlive ) {
+// For calls from outside the Poller, the caller is
+// responsible for registering the socket for the
+// appropriate event(s) if sendfile completes.
+if (!calledByProcessor) {
+if (sd.keepAlive) {
 if (log.isDebugEnabled()) {
 log.debug("Connection is keep alive, 
registering back for OP_READ");
 }
-if (calledByProcessor) {
-
this.add(attachment.getSocket(),SelectionKey.OP_READ);
-} else {
-reg(sk,attachment,SelectionKey.OP_READ);
+reg(sk,attachment,SelectionKey.OP_READ);
+} else {
+if (log.isDebugEnabled()) {
+log.debug("Send file connection is being 
closed");
 }
-} else {
-if (log.isDebugEnabled()) {
-log.debug("Send file connection is being closed");
+cancelledKey(sk,SocketStatus.STOP);
+return false;
 }
-cancelledKey(sk,SocketStatus.STOP);
-return false;
 }
 } else {
 if (log.isDebugEnabled()) {

Modified: tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml?rev=1731093&r1=1731092&r2=1731093&view=diff
==
--- tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml Thu Feb 18 16:46:44 2016
@@ -90,6 +90,15 @@
   
 
   
+  
+
+  
+58646: Correct a problem with sendfile that resulted in a
+Processor being added to the cache twice leading to broken responses.
+(markt)
+  
+
+  
   
 
   



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



[Bug 58646] NullPointerException in InternalNioOutputBuffer

2016-02-18 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=58646

Mark Thomas  changed:

   What|Removed |Added

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

--- Comment #27 from Mark Thomas  ---
Thanks for all your research. Once I knew it was sendfile, tracking it down was
fairly simple. I have fixed this in 8.0.x for 8.0.33. Please test and feel free
to re-open if it isn't 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



buildbot failure in on tomcat-8-trunk

2016-02-18 Thread buildbot
The Buildbot has detected a new failure on builder tomcat-8-trunk while 
building . Full details are available at:
https://ci.apache.org/builders/tomcat-8-trunk/builds/459

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

Buildslave for this Build: silvanus_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-8-commit' 
triggered this build
Build Source Stamp: [branch tomcat/tc8.0.x/trunk] 1731091
Blamelist: markt

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



svn commit: r1731105 - /tomcat/trunk/java/org/apache/catalina/storeconfig/ConnectorSF.java

2016-02-18 Thread schultz
Author: schultz
Date: Thu Feb 18 18:16:01 2016
New Revision: 1731105

URL: http://svn.apache.org/viewvc?rev=1731105&view=rev
Log:
Fix typo
s/storeConnectorAttribtues/storeConnectorAttributes/g

Modified:
tomcat/trunk/java/org/apache/catalina/storeconfig/ConnectorSF.java

Modified: tomcat/trunk/java/org/apache/catalina/storeconfig/ConnectorSF.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/storeconfig/ConnectorSF.java?rev=1731105&r1=1731104&r2=1731105&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/storeconfig/ConnectorSF.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/storeconfig/ConnectorSF.java Thu Feb 
18 18:16:01 2016
@@ -51,11 +51,11 @@ public class ConnectorSF extends StoreFa
 StoreDescription aDesc) throws Exception {
 aWriter.print("<");
 aWriter.print(aDesc.getTag());
-storeConnectorAttribtues(aWriter, indent, bean, aDesc);
+storeConnectorAttributes(aWriter, indent, bean, aDesc);
 aWriter.println(">");
 }
 
-protected void storeConnectorAttribtues(PrintWriter aWriter, int indent,
+protected void storeConnectorAttributes(PrintWriter aWriter, int indent,
 Object bean, StoreDescription aDesc) throws Exception {
 if (aDesc.isAttributes()) {
 getStoreAppender().printAttributes(aWriter, indent, false, bean,
@@ -67,7 +67,7 @@ public class ConnectorSF extends StoreFa
 StoreDescription aDesc) throws Exception {
 aWriter.print("<");
 aWriter.print(aDesc.getTag());
-storeConnectorAttribtues(aWriter, indent, bean, aDesc);
+storeConnectorAttributes(aWriter, indent, bean, aDesc);
 aWriter.println("/>");
 }
 



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



[GitHub] tomcat-maven-plugin pull request: Ensure that resource paths begin...

2016-02-18 Thread rupert654
Github user rupert654 closed the pull request at:

https://github.com/apache/tomcat-maven-plugin/pull/21


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[jira] [Commented] (MTOMCAT-302) Tomcat 8: Invalid resource paths added when scanning for TLDs

2016-02-18 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on MTOMCAT-302:


Github user rupert654 closed the pull request at:

https://github.com/apache/tomcat-maven-plugin/pull/21


> Tomcat 8: Invalid resource paths added when scanning for TLDs
> -
>
> Key: MTOMCAT-302
> URL: https://issues.apache.org/jira/browse/MTOMCAT-302
> Project: Apache Tomcat Maven Plugin
>  Issue Type: Dependency upgrade
>Reporter: Rupert Madden-Abbott
>Assignee: Olivier Lamy (*$^¨%`£)
>Priority: Blocker
> Fix For: 3.0
>
>
> Tomcat 8 now requires that all resource paths begin with "/".
> However, in org.apache.tomcat.maven.plugin.tomcat8.run.RunMojo, there is an 
> anonymous class extending 
> org.apache.tomcat.maven.plugin.tomcat8.run.AbstractRunMojo.MyDirContext.
> This overrides the method listWebAppPaths and the implementation will return 
> file names, which do not begin with "/".
> This will result in an error if you place a tld file in your WEB-INF 
> directory. Doing this will cause listWebAppPaths to return your tld file, 
> which then causes an error as the path is not valid.
> One solution would be to alter this method so it appended the path relative 
> to the classpath, to each file. This seems to be how the equivalent method in 
> org.apache.catalina.webresources.DirResourceSet works.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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



[Bug 48674] Tomcat Virtual Host Manager application doesn't persist newly created virtual hosts

2016-02-18 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=48674

--- Comment #9 from Christopher Schultz  ---
This can be a dangerous feature, for a couple of reasons.

1. A bad configuration or vulnerability in the host-manager allows a remote
party to write to the filesystem, rather than just trash an in-memory
configuration
2. Important information in the file may be overwritten inadvertently
3. NOP configuration information in the file (e.g. comments) will likely be
lost when the file is saved

I had a look at the StoreConfig-based patch, and I must admit that I got lost
in the whole architecture at the point that I started reading code in the
o.a.c.storeconfig package. There is very little javadoc explaining what the
heck is going on. It looks quite over-engineered and has a lot of code that
looks very similar across classes.

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

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



[GUMP@vmgump]: Project tomcat-tc7.0.x-test-nio (in module tomcat-7.0.x) failed

2016-02-18 Thread Bill Barker
To whom it may engage...

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

Project tomcat-tc7.0.x-test-nio has an issue affecting its community 
integration.
This issue affects 1 projects.
The current state of this project is 'Failed', with reason 'Build Failed'.
For reference only, the following projects are affected by this:
- tomcat-tc7.0.x-test-nio :  Tomcat 7.x, a web server implementing Java 
Servlet 3.0,
...


Full details are available at:

http://vmgump.apache.org/gump/public/tomcat-7.0.x/tomcat-tc7.0.x-test-nio/index.html

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were 
provided:
 -DEBUG- Dependency on tomcat-tc7.0.x-dbcp exists, no need to add for property 
tomcat-dbcp-src.jar.
 -DEBUG- Dependency on commons-daemon exists, no need to add for property 
commons-daemon.native.src.tgz.
 -DEBUG- Dependency on commons-daemon exists, no need to add for property 
tomcat-native.tar.gz.
 -DEBUG- Dependency on tomcat-tc7.0.x-dbcp exists, no need to add for property 
tomcat-dbcp.home.
 -INFO- Failed with reason build failed
 -INFO- Project Reports in: 
/srv/gump/public/workspace/tomcat-7.0.x/output/logs-NIO
 -INFO- Project Reports in: 
/srv/gump/public/workspace/tomcat-7.0.x/output/test-tmp-NIO/logs



The following work was performed:
http://vmgump.apache.org/gump/public/tomcat-7.0.x/tomcat-tc7.0.x-test-nio/gump_work/build_tomcat-7.0.x_tomcat-tc7.0.x-test-nio.html
Work Name: build_tomcat-7.0.x_tomcat-tc7.0.x-test-nio (Type: Build)
Work ended in a state of : Failed
Elapsed: 37 mins 52 secs
Command Line: /usr/lib/jvm/java-8-oracle/bin/java -Djava.awt.headless=true 
-Dbuild.sysclasspath=only org.apache.tools.ant.Main 
-Dgump.merge=/srv/gump/public/gump/work/merge.xml 
-Dcommons-pool.home=/srv/gump/public/workspace/commons-pool-1.x 
-Dtest.temp=output/test-tmp-NIO 
-Djunit.jar=/srv/gump/public/workspace/junit/target/junit-4.13-SNAPSHOT.jar 
-Dobjenesis.jar=/srv/gump/public/workspace/objenesis/main/target/objenesis-2.3-SNAPSHOT.jar
 -Dexamples.sources.skip=true 
-Dcommons-daemon.jar=/srv/gump/public/workspace/apache-commons/daemon/dist/commons-daemon-20160218.jar
 
-Dtomcat-dbcp-src.jar=/srv/gump/public/workspace/tomcat-7.0.x/tomcat-deps/tomcat-dbcp-src.jar
 -Dtomcat-dbcp.home=/srv/gump/public/workspace/tomcat-7.0.x/tomcat-deps 
-Dtest.excludePerformance=true 
-Dhamcrest.jar=/srv/gump/packages/hamcrest/hamcrest-core-1.3.jar 
-Dcommons-dbcp.home=/srv/gump/public/workspace/commons-dbcp-1.x 
-Dexecute.test.apr=false -Dexecute.test.bio=false 
-Dcommons-daemon.native.src.tgz=/srv/gump/public/w
 
orkspace/apache-commons/daemon/dist/bin/commons-daemon-20160218-native-src.tar.gz
 -Dtest.reports=output/logs-NIO 
-Dtomcat-native.tar.gz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-20160218-native-src.tar.gz
 -Djdt.jar=/srv/gump/packages/eclipse/plugins/R-4.5-201506032000/ecj-4.5.jar 
-Dexecute.test.nio=true -Dtest.accesslog=true 
-Dtomcat-dbcp.jar=/srv/gump/public/workspace/tomcat-7.0.x/tomcat-deps/tomcat-dbcp-20160218.jar
 
-Deasymock.jar=/srv/gump/public/workspace/easymock/core/target/easymock-3.5-SNAPSHOT.jar
 -Dcglib.jar=/srv/gump/packages/cglib/cglib-nodep-2.2.jar test 
[Working Directory: /srv/gump/public/workspace/tomcat-7.0.x]
CLASSPATH: 
/usr/lib/jvm/java-8-oracle/lib/tools.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/webapps/examples/WEB-INF/classes:/srv/gump/public/workspace/tomcat-7.0.x/output/testclasses:/srv/gump/public/workspace/ant/dist/lib/ant.jar:/srv/gump/public/workspace/ant/dist/lib/ant-launcher.jar:/srv/gump/public/workspace/ant/dist/lib/ant-jmf.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit4.jar:/srv/gump/public/workspace/ant/dist/lib/ant-swing.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-resolver.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-xalan2.jar:/srv/gump/public/workspace/xml-commons/java/build/resolver.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/bin/bootstrap.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/bin/tomcat-juli.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/annotations-api.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/servlet-api.ja
 
r:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/jsp-api.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/el-api.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/catalina.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/catalina-ant.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/tomcat-coyote.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/jasper.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/jasper-el.jar:/srv/gump/public/workspace/tomca

Re: Context path: any technical reason to ignore it?

2016-02-18 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Romain,

On 2/18/16 11:36 AM, Romain Manni-Bucau wrote:
> 2016-02-18 17:20 GMT+01:00 Christopher Schultz
> > :
> 
> Romain,
> 
> On 2/18/16 6:00 AM, Romain Manni-Bucau wrote:
 On a personal side i tend to agree and like to have
 filesystem aligned with the deployment but I have to admit I
 saw path usage in META-INF/context.xml being quite large (in
 real deployments or in tooling integration).
> 
> My preference would be to refuse to deploy an application with a 
> "path" attribute in a context.xml file. I haven't studied the code 
> well enough to know if it's possible (or reasonable) to know
> whether the context is being configured based upon a context.xml
> file or from within server.xml.
> 
> 
>> It is possible AFAIK since the context.xml is created from a file
>> in this case so we know which one.

Okay. But Tomcat's configuration component won't currently veto a
 with a path under any circumstances. I'm proposing that it
DOES veto  + path when it's being loaded from a file (and not
server.xml).

 I understand your example but it is true at each level
 including conflicting names in conf/* or server.xml.
 
 Now 90% of the usages are to strip the version from the war
 name (most build tools generate mywar-1.2.3[.QUALIFIER].
> 
> You mean when parallel deployment is NOT in use?
> 
> 
>> Yep, parallel deployment would just add another suffix not
>> influencing the path so the user doesnt care for the purpose of
>> this thread.

Okay.

 Maybe a flag to strip it on tomcat side would solve most of
 the cases and don't encourage that much the risk you refer
 to?
 
 Something like:
 
 
> 
> I think this can still lead to undefined behavior when different
> web applications overlap. We would have to either throw up our
> hands and say "caveat deployor" or do a whole bunch of work to
> cover this edge cas e.
> 
> My vote would be to make users follow the existing rules. Removing
> a version number from a WAR is easy: use
> conf/[engine]/[host]/[app].xml and point it to the WAR file outside
> of the appbase. Done.
> 
> 
> 
>> Ok, now let's assume you control only the content of the .war you
>> deploy (not the name since it is in a continuous deployment (or
>> test) tooling, not the conf/ since it is a shared instance where
>> you team doesnt have access.

I would say that if you want to upgrade to a recent version of Tomcat,
you'll have to change your deployment. Supporting risky and broken
configurations just because customers used to misuse them is not
something that makes any sense for Tomcat to do.

>> I think the cost of handling path - without breaking current
>> conflicting name feature, just need few code changes - is worth
>> the headache the users have.

The headaches will go away if they deploy "properly". The tools are
all there. Supporting a configuration that is 10 years old simply for
continuity is not a good idea. Those people also probably still have
debug="0" and  in their config files. The whole
conf/server.xml needs to be re-done with every major release, so this
should not be a great barrier for admins who want to upgrade.

>> That said if really an issue for tomcat can you at least:
> 
>> - log an error (warn maybe?) saying path is ignored. Since there
>> is a setter it  is swallowed silently.

+1

If we aren't going to refuse to load the context, we may as well
complain about it. So many people post to the list asking about how to
"fix" INFO messages in their log... maybe we'll get people to clean-up
their configurations /that/ way.

>> - open a way to force it from the webapp even if it logs a
>> warning (maybe a flag userForced).

$ mv file.war realpath.war?

Or use the file under conf/etc.

I don't understand why this is so onerous for users. Also, now many
TomEE users have 10-year-old deployments? (I ask about TomEE because
you usually post here relating to TomEE-based requests.)

>> Today even forcing it manually through a listener it is ignored
>> (= there is no real good moment in a prod instance - with other 
>> advanced listeners we don't control - to do so). Worse case
>> having a server.xml flag can be a degraded option which can maybe
>> be enough in practise.

I still don't hear a compelling reason to modify the current
configuration options.

- -chris
-BEGIN PGP SIGNATURE-
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlbGF/4ACgkQ9CaO5/Lv0PD3hACfVT6dckd098MVflchD8j+5T9Y
A5IAnRR4k520KiFWRq6LOx4Urx6ni+X4
=1+4o
-END PGP SIGNATURE-

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



svn commit: r1731119 - in /tomcat/tc7.0.x/trunk: java/org/apache/tomcat/util/net/NioEndpoint.java webapps/docs/changelog.xml

2016-02-18 Thread markt
Author: markt
Date: Thu Feb 18 19:14:16 2016
New Revision: 1731119

URL: http://svn.apache.org/viewvc?rev=1731119&view=rev
Log:
Correct a problem with sendfile that resulted in a Processor being added to the 
cache twice leading to broken responses.

Modified:
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=1731119&r1=1731118&r2=1731119&view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Thu 
Feb 18 19:14:16 2016
@@ -1385,21 +1385,22 @@ public class NioEndpoint extends Abstrac
 sd.fchannel.close();
 } catch (Exception ignore) {
 }
-if ( sd.keepAlive ) {
-if (log.isDebugEnabled()) {
-log.debug("Connection is keep alive, 
registering back for OP_READ");
-}
-if (event) {
-
this.add(attachment.getChannel(),SelectionKey.OP_READ);
-} else {
+// For calls from outside the Poller, the caller is
+// responsible for registering the socket for the
+// appropriate event(s) if sendfile completes.
+if (!event) {
+if ( sd.keepAlive ) {
+if (log.isDebugEnabled()) {
+log.debug("Connection is keep alive, 
registering back for OP_READ");
+}
 reg(sk,attachment,SelectionKey.OP_READ);
+} else {
+if (log.isDebugEnabled()) {
+log.debug("Send file connection is being 
closed");
 }
-} else {
-if (log.isDebugEnabled()) {
-log.debug("Send file connection is being closed");
+cancelledKey(sk,SocketStatus.STOP,false);
+return false;
 }
-cancelledKey(sk,SocketStatus.STOP,false);
-return false;
 }
 } else {
 if (log.isDebugEnabled()) {

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=1731119&r1=1731118&r2=1731119&view=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Thu Feb 18 19:14:16 2016
@@ -66,6 +66,15 @@
   
 
   
+  
+
+  
+58646: Correct a problem with sendfile that resulted in a
+Processor being added to the cache twice leading to broken responses.
+(markt)
+  
+
+  
 
 
   



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



[Bug 58646] NullPointerException in InternalNioOutputBuffer

2016-02-18 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=58646

--- Comment #28 from Mark Thomas  ---
Fix back-ported to 7.0.x for 7.0.69 onwards and to 6.0.x for 6.0.46 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: r1731120 - in /tomcat/tc6.0.x/trunk: ./ java/org/apache/tomcat/util/net/NioEndpoint.java webapps/docs/changelog.xml

2016-02-18 Thread markt
Author: markt
Date: Thu Feb 18 19:17:55 2016
New Revision: 1731120

URL: http://svn.apache.org/viewvc?rev=1731120&view=rev
Log:
Correct a problem with sendfile that resulted in a Processor being added to the 
cache twice leading to broken responses.

Modified:
tomcat/tc6.0.x/trunk/   (props changed)
tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc6.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Feb 18 19:17:55 2016
@@ -1,3 +1,3 @@
-/tomcat/tc7.0.x/trunk:1190476,1224802,1243045,1298635,1304471,1311997,1312007,1331772,1333164,1333176,1348992,1354866,1371298,1371302,1371620,1402110,1409014,1413553,1413557,1413563,1430083,1438415,1446641-1446660,1447013,1453106,1453119,1484919,1486877,1500065,1503852,1505844,1513151,1521040,1526470,1536524,1539176-1539177,1544469,1544473,1552805,1558894,1558917,1561368,1561382,1561386,1561552,1561561,1561636,1561641,1561643,1561737,1562748,1564317,1568922,1570163,1577328,1577464-1577465,1578814,1586659,1586897,1586960,1588199,1588997,1589740,1589851,1589997,1590019,1590028,1590337,1590492,1590651,1590838,1590845,1590848,1590912,1593262,1593288,1593371,1593835,1594230,1595174,1595366,1600956,1601333,1601856,1601909,1609079,1609606,1617364,1617374,1617433,1617457-1617458,1624249,1626579,1627420,1627469,1632586,1637686,1637711,1640675,1642045,1643515,1643540,1643572,1643585-1643586,1643642,1643647,1644019,1648817,1656301,1658815,1659523,1659564,1664001,1664176,1665087,1666968,1666989
 
,1668541,1668635,1669802,1676557,1681183,1681841,1681865,1681867,1685829,1693109,1694293,1694433,1694875,1696381,1701945,1710353,1712656,1713873,1714000,1714005,1714540,1715213,1716221,1716417,1717107,1717210,1717212,1720236,1720398,1720443,1720464,1721814,1721883,1722645,1722801,1723151,1724435,1724553,1724675,1724797,1724806,1725931,1726631,1726808,1726813,1726815,1726817,1726819,1726917,1726919,1726922-1726924,1727031,1727034,1727043,1727158,1727672,1727903,1728450,1729363,1731010
+/tomcat/tc7.0.x/trunk:1190476,1224802,1243045,1298635,1304471,1311997,1312007,1331772,1333164,1333176,1348992,1354866,1371298,1371302,1371620,1402110,1409014,1413553,1413557,1413563,1430083,1438415,1446641-1446660,1447013,1453106,1453119,1484919,1486877,1500065,1503852,1505844,1513151,1521040,1526470,1536524,1539176-1539177,1544469,1544473,1552805,1558894,1558917,1561368,1561382,1561386,1561552,1561561,1561636,1561641,1561643,1561737,1562748,1564317,1568922,1570163,1577328,1577464-1577465,1578814,1586659,1586897,1586960,1588199,1588997,1589740,1589851,1589997,1590019,1590028,1590337,1590492,1590651,1590838,1590845,1590848,1590912,1593262,1593288,1593371,1593835,1594230,1595174,1595366,1600956,1601333,1601856,1601909,1609079,1609606,1617364,1617374,1617433,1617457-1617458,1624249,1626579,1627420,1627469,1632586,1637686,1637711,1640675,1642045,1643515,1643540,1643572,1643585-1643586,1643642,1643647,1644019,1648817,1656301,1658815,1659523,1659564,1664001,1664176,1665087,1666968,1666989
 
,1668541,1668635,1669802,1676557,1681183,1681841,1681865,1681867,1685829,1693109,1694293,1694433,1694875,1696381,1701945,1710353,1712656,1713873,1714000,1714005,1714540,1715213,1716221,1716417,1717107,1717210,1717212,1720236,1720398,1720443,1720464,1721814,1721883,1722645,1722801,1723151,1724435,1724553,1724675,1724797,1724806,1725931,1726631,1726808,1726813,1726815,1726817,1726819,1726917,1726919,1726922-1726924,1727031,1727034,1727043,1727158,1727672,1727903,1728450,1729363,1731010,1731119
 
/tomcat/tc8.0.x/trunk:1637685,1637709,1640674,1641726,1641729-1641730,1643513,1643539,1643571,1643581-1643582,1644018,1648816,1656300,1658801-1658803,1658811,1659522,1663997,1664175,1665086,1666967,1666988,1668634,1669801,1676556,1681182,1681840,1681864,1685827,1689921,1693108,1694291,1694427,1694873,1696379,1701944,1710347,1712618,1712655,1713872,1713998,1714004,1714538,1715207,1716216-1716217,1716414,1717208-1717209,1720235,1720396,1720442,1720463,1721813,1721882,1722800,1723130,1724434,1724674,1724792,1724803,1725929,1725963-1725965,1725970,1725974,1726172,1726175,1726179-1726182,1726195-1726198,1726200,1726203,1726226,1726576,1726630,1727029,1727037,1727671,1727900,1728449,1729362,1731009
 
/tomcat/trunk:601180,606992,612607,630314,640888,652744,653247,656018,666232,673796,673820,677910,683969,683982,684001,684081,684234,684269-684270,685177,687503,687645,689402,690781,691392,691805,692748,693378,694992,695053,695311,696780,696782,698012,698227,698236,698613,699427,699634,701355,709294,709811,709816,710063,710066,710125,710205,711126,711600,712461,712467,713953,714002,718360,719119,719124,719602,719626,719628,720046,720069,721040,721286,721708,721886,723404,723738,726052,727303,728032,728768,728947,729057,729567,729569,729571,729681,729809,729815,729934,730250,730590,731651,732859,732863,734734,740675,740684,742677,742697,742714,744160,744238,746321,

[Bug 48674] Tomcat Virtual Host Manager application doesn't persist newly created virtual hosts

2016-02-18 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=48674

--- Comment #10 from Mark Thomas  ---
(In reply to Christopher Schultz from comment #9)
> This can be a dangerous feature, for a couple of reasons.
> 
> 1. A bad configuration or vulnerability in the host-manager allows a remote
> party to write to the filesystem, rather than just trash an in-memory
> configuration

The remote user can almost certainly deploy applications so it is pretty much
game over anyway.

> 2. Important information in the file may be overwritten inadvertently

I think Store config saves the old version with a timestamp.

> 3. NOP configuration information in the file (e.g. comments) will likely be
> lost when the file is saved

Price you pay...

> I had a look at the StoreConfig-based patch, and I must admit that I got
> lost in the whole architecture at the point that I started reading code in
> the o.a.c.storeconfig package. There is very little javadoc explaining what
> the heck is going on. It looks quite over-engineered and has a lot of code
> that looks very similar across classes.

Saving configuration is extremely tricky. There might be some clean-up possible
but my recollection from the last time if looked at the code was that it was
fundamentally sound.

Overall, I think this is the way to go.

-- 
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 48674] Tomcat Virtual Host Manager application doesn't persist newly created virtual hosts

2016-02-18 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=48674

--- Comment #11 from Remy Maucherat  ---
(In reply to Christopher Schultz from comment #9)
> This can be a dangerous feature, for a couple of reasons.

The user has to add the storeconfig listener in his configuration to use this
patch. Then all this does is a JMX method call, which is most likely already
accessible elsewhere.

> I had a look at the StoreConfig-based patch, and I must admit that I got
> lost in the whole architecture at the point that I started reading code in
> the o.a.c.storeconfig package. There is very little javadoc explaining what
> the heck is going on. It looks quite over-engineered and has a lot of code
> that looks very similar across classes.

Maybe, but the Catalina structure is built using reflection with a lot of
special cases. It's a separate optional module, so feel free to rewrite 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 58244] two way SSL loses client certificate after a few requests

2016-02-18 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=58244

--- Comment #13 from Mark Thomas  ---
It appears to be related to session tickets. If you set
disableSessionTickets="true" the problem goes away.

Some quick background reading indicates that the session ticket should include
the client cert so my current theory is that something isn't handling the
session resumption correctly. I'll take a look but I'm not at all familiar with
the code so if someone who is wants to take a look as well ...

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

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



[Bug 58244] two way SSL loses client certificate after a few requests

2016-02-18 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=58244

--- Comment #14 from Mark Thomas  ---
OK. I think I have found the problem.

Tomcat looks for two pieces of information when looking up client certs.
>From AprSSLSupport:
int certLength = SSLSocket.getInfoI(socketRef, SSL.SSL_INFO_CLIENT_CERT_CHAIN);
byte[] clientCert = SSLSocket.getInfoB(socketRef, SSL.SSL_INFO_CLIENT_CERT);

In OpenSSL those map to
SSL_SESSION->peer_chain
SSL_SESSION->peer

The problem is that in d2i_SSL_SESSION when the session is repopulated from the
ticket, peer is populated but peer_chain is not. i2d_SSL_SESSION doesn't save
the peer certificate chain either.

RFC5077 appears to allow full certificate chains to be present in the ticket.

Some more digging has unearthed this from the OpenSSL issue tracker:
https://rt.openssl.org/Ticket/Display.html?id=2288

It looks like addressing this is not a high priority for OpenSSL.

We might be able to work-around this on the Tomcat side to expose the client
cert minus the chain and document that as a known restriction when using
session tickets.

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

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



[GUMP@vmgump]: Project tomcat-tc8.0.x-test-nio2 (in module tomcat-8.0.x) failed

2016-02-18 Thread Bill Barker
To whom it may engage...

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

Project tomcat-tc8.0.x-test-nio2 has an issue affecting its community 
integration.
This issue affects 1 projects,
 and has been outstanding for 5 runs.
The current state of this project is 'Failed', with reason 'Build Failed'.
For reference only, the following projects are affected by this:
- tomcat-tc8.0.x-test-nio2 :  Tomcat 8.x, a web server implementing the 
Java Servlet 3.1,
...


Full details are available at:

http://vmgump.apache.org/gump/public/tomcat-8.0.x/tomcat-tc8.0.x-test-nio2/index.html

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were 
provided:
 -DEBUG- Dependency on commons-daemon exists, no need to add for property 
commons-daemon.native.src.tgz.
 -DEBUG- Dependency on commons-daemon exists, no need to add for property 
tomcat-native.tar.gz.
 -INFO- Failed with reason build failed
 -INFO- Project Reports in: 
/srv/gump/public/workspace/tomcat-8.0.x/output/logs-NIO2
 -INFO- Project Reports in: 
/srv/gump/public/workspace/tomcat-8.0.x/output/test-tmp-NIO2/logs
 -WARNING- No directory 
[/srv/gump/public/workspace/tomcat-8.0.x/output/test-tmp-NIO2/logs]



The following work was performed:
http://vmgump.apache.org/gump/public/tomcat-8.0.x/tomcat-tc8.0.x-test-nio2/gump_work/build_tomcat-8.0.x_tomcat-tc8.0.x-test-nio2.html
Work Name: build_tomcat-8.0.x_tomcat-tc8.0.x-test-nio2 (Type: Build)
Work ended in a state of : Failed
Elapsed: 48 mins 20 secs
Command Line: /usr/lib/jvm/java-8-oracle/bin/java -Djava.awt.headless=true 
-Dbuild.sysclasspath=only org.apache.tools.ant.Main 
-Dgump.merge=/srv/gump/public/gump/work/merge.xml 
-Djunit.jar=/srv/gump/public/workspace/junit/target/junit-4.13-SNAPSHOT.jar 
-Dobjenesis.jar=/srv/gump/public/workspace/objenesis/main/target/objenesis-2.3-SNAPSHOT.jar
 -Dtest.reports=output/logs-NIO2 
-Dtomcat-native.tar.gz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-20160219-native-src.tar.gz
 -Dexamples.sources.skip=true 
-Djdt.jar=/srv/gump/packages/eclipse/plugins/R-4.5-201506032000/ecj-4.5.jar 
-Dcommons-daemon.jar=/srv/gump/public/workspace/apache-commons/daemon/dist/commons-daemon-20160219.jar
 
-Dcommons-daemon.native.src.tgz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-20160219-native-src.tar.gz
 -Dtest.temp=output/test-tmp-NIO2 -Dtest.accesslog=true 
-Dexecute.test.nio=false 
-Dtest.openssl.path=/srv/gump/public/workspace/openssl-1.0.2/dest-20160219/bin
 /openssl -Dexecute.test.bio=false -Dexecute.test.apr=false 
-Dtest.excludePerformance=true -Dexecute.test.nio2=true 
-Deasymock.jar=/srv/gump/public/workspace/easymock/core/target/easymock-3.5-SNAPSHOT.jar
 -Dhamcrest.jar=/srv/gump/packages/hamcrest/hamcrest-core-1.3.jar 
-Dcglib.jar=/srv/gump/packages/cglib/cglib-nodep-2.2.jar test 
[Working Directory: /srv/gump/public/workspace/tomcat-8.0.x]
CLASSPATH: 
/usr/lib/jvm/java-8-oracle/lib/tools.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/webapps/examples/WEB-INF/classes:/srv/gump/public/workspace/tomcat-8.0.x/output/testclasses:/srv/gump/public/workspace/ant/dist/lib/ant.jar:/srv/gump/public/workspace/ant/dist/lib/ant-launcher.jar:/srv/gump/public/workspace/ant/dist/lib/ant-jmf.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit4.jar:/srv/gump/public/workspace/ant/dist/lib/ant-swing.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-resolver.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-xalan2.jar:/srv/gump/public/workspace/xml-commons/java/build/resolver.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/bin/bootstrap.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/bin/tomcat-juli.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/annotations-api.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/servlet-api.ja
 
r:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/jsp-api.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/el-api.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/websocket-api.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/catalina.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/catalina-ant.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/catalina-storeconfig.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/tomcat-coyote.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/jasper.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/jasper-el.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/catalina-tribes.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/catalina-ha.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/tomcat-api.jar:/srv/gump/public

[GUMP@vmgump]: Project tomcat-tc8.0.x-test-nio (in module tomcat-8.0.x) failed

2016-02-18 Thread Bill Barker
To whom it may engage...

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

Project tomcat-tc8.0.x-test-nio has an issue affecting its community 
integration.
This issue affects 1 projects,
 and has been outstanding for 2 runs.
The current state of this project is 'Failed', with reason 'Build Timed Out'.
For reference only, the following projects are affected by this:
- tomcat-tc8.0.x-test-nio :  Tomcat 8.x, a web server implementing the Java 
Servlet 3.1,
...


Full details are available at:

http://vmgump.apache.org/gump/public/tomcat-8.0.x/tomcat-tc8.0.x-test-nio/index.html

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were 
provided:
 -DEBUG- Dependency on commons-daemon exists, no need to add for property 
commons-daemon.native.src.tgz.
 -DEBUG- Dependency on commons-daemon exists, no need to add for property 
tomcat-native.tar.gz.
 -INFO- Failed with reason build timed out
 -INFO- Project Reports in: 
/srv/gump/public/workspace/tomcat-8.0.x/output/logs-NIO
 -INFO- Project Reports in: 
/srv/gump/public/workspace/tomcat-8.0.x/output/test-tmp-NIO/logs
 -WARNING- No directory 
[/srv/gump/public/workspace/tomcat-8.0.x/output/test-tmp-NIO/logs]



The following work was performed:
http://vmgump.apache.org/gump/public/tomcat-8.0.x/tomcat-tc8.0.x-test-nio/gump_work/build_tomcat-8.0.x_tomcat-tc8.0.x-test-nio.html
Work Name: build_tomcat-8.0.x_tomcat-tc8.0.x-test-nio (Type: Build)
Work ended in a state of : Failed
Elapsed: 1 hour 10 secs
Command Line: /usr/lib/jvm/java-8-oracle/bin/java -Djava.awt.headless=true 
-Dbuild.sysclasspath=only org.apache.tools.ant.Main 
-Dgump.merge=/srv/gump/public/gump/work/merge.xml 
-Djunit.jar=/srv/gump/public/workspace/junit/target/junit-4.13-SNAPSHOT.jar 
-Dobjenesis.jar=/srv/gump/public/workspace/objenesis/main/target/objenesis-2.3-SNAPSHOT.jar
 -Dtest.reports=output/logs-NIO 
-Dtomcat-native.tar.gz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-20160219-native-src.tar.gz
 -Dexamples.sources.skip=true 
-Djdt.jar=/srv/gump/packages/eclipse/plugins/R-4.5-201506032000/ecj-4.5.jar 
-Dcommons-daemon.jar=/srv/gump/public/workspace/apache-commons/daemon/dist/commons-daemon-20160219.jar
 
-Dcommons-daemon.native.src.tgz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-20160219-native-src.tar.gz
 -Dtest.temp=output/test-tmp-NIO -Dtest.accesslog=true -Dexecute.test.nio=true 
-Dtest.openssl.path=/srv/gump/public/workspace/openssl-1.0.2/dest-20160219/bin/op
 enssl -Dexecute.test.bio=false -Dexecute.test.apr=false 
-Dtest.excludePerformance=true -Dexecute.test.nio2=false 
-Deasymock.jar=/srv/gump/public/workspace/easymock/core/target/easymock-3.5-SNAPSHOT.jar
 -Dhamcrest.jar=/srv/gump/packages/hamcrest/hamcrest-core-1.3.jar 
-Dcglib.jar=/srv/gump/packages/cglib/cglib-nodep-2.2.jar test 
[Working Directory: /srv/gump/public/workspace/tomcat-8.0.x]
CLASSPATH: 
/usr/lib/jvm/java-8-oracle/lib/tools.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/webapps/examples/WEB-INF/classes:/srv/gump/public/workspace/tomcat-8.0.x/output/testclasses:/srv/gump/public/workspace/ant/dist/lib/ant.jar:/srv/gump/public/workspace/ant/dist/lib/ant-launcher.jar:/srv/gump/public/workspace/ant/dist/lib/ant-jmf.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit4.jar:/srv/gump/public/workspace/ant/dist/lib/ant-swing.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-resolver.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-xalan2.jar:/srv/gump/public/workspace/xml-commons/java/build/resolver.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/bin/bootstrap.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/bin/tomcat-juli.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/annotations-api.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/servlet-api.ja
 
r:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/jsp-api.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/el-api.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/websocket-api.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/catalina.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/catalina-ant.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/catalina-storeconfig.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/tomcat-coyote.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/jasper.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/jasper-el.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/catalina-tribes.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/catalina-ha.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/tomcat-api.jar:/srv/gump/public/worksp

[Bug 59031] New: Tomcat 8 uninstaller entres a symbolic link and deletes its contents

2016-02-18 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59031

Bug ID: 59031
   Summary: Tomcat 8 uninstaller entres a symbolic link and
deletes its contents
   Product: Tomcat 8
   Version: trunk
  Hardware: PC
Status: NEW
  Severity: normal
  Priority: P2
 Component: Util
  Assignee: dev@tomcat.apache.org
  Reporter: birger...@gmail.com

My Tomcat 8 installation folder contained a symbolic link to a folder (A) for
some project of mine. When uninstalling tomcat, the contents of my project
folder (A) was removed.

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