[GUMP@vmgump]: Project tomcat-trunk-test-apr (in module tomcat-trunk) failed

2015-11-15 Thread Bill Barker
To whom it may engage...

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

Project tomcat-trunk-test-apr 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 Failed'.
For reference only, the following projects are affected by this:
- tomcat-trunk-test-apr :  Tomcat 9.x, a web server implementing the Java 
Servlet 4.0,
...


Full details are available at:

http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-test-apr/index.html

That said, some information snippets are provided here.

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



The following work was performed:
http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-test-apr/gump_work/build_tomcat-trunk_tomcat-trunk-test-apr.html
Work Name: build_tomcat-trunk_tomcat-trunk-test-apr (Type: Build)
Work ended in a state of : Failed
Elapsed: 45 mins 30 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-APR 
-Dtomcat-native.tar.gz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-20151115-native-src.tar.gz
 -Dexamples.sources.skip=true 
-Djdt.jar=/srv/gump/packages/eclipse/plugins/R-4.5-201506032000/ecj-4.5.jar 
-Dtest.apr.loc=/srv/gump/public/workspace/tomcat-native-trunk/dest-20151115/lib 
-Dtest.relaxTiming=true 
-Dcommons-daemon.jar=/srv/gump/public/workspace/apache-commons/daemon/dist/commons-daemon-20151115.jar
 
-Dcommons-daemon.native.src.tgz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-20151115-native-src.tar.gz
 -Dtest.temp=output/test-tmp-APR -Dtest.accesslog=true -
 Dexecute.test.nio=false 
-Dtest.openssl.path=/srv/gump/public/workspace/openssl-master/dest-20151115/bin/openssl
 -Dexecute.test.apr=true -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-trunk]
CLASSPATH: 
/usr/lib/jvm/java-8-oracle/lib/tools.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/webapps/examples/WEB-INF/classes:/srv/gump/public/workspace/tomcat-trunk/output/testclasses:/srv/gump/public/workspace/ant/dist/lib/ant.jar:/srv/gump/public/workspace/ant/dist/lib/ant-launcher.jar:/srv/gump/public/workspace/ant/dist/lib/ant-jmf.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit4.jar:/srv/gump/public/workspace/ant/dist/lib/ant-swing.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-resolver.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-xalan2.jar:/srv/gump/public/workspace/xml-commons/java/build/resolver.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/bin/bootstrap.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/bin/tomcat-juli.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/annotations-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/servlet-api.ja
 
r:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/jsp-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/el-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/websocket-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/jaspic-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-ant.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-storeconfig.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/tomcat-coyote.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/jasper.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/jasper-el.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-tribes.jar:/srv/gump/public/workspace

[Bug 58610] Oracle DB connections not releasing from connection pool in Tomcat 8

2015-11-15 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=58610

RajKaruna  changed:

   What|Removed |Added

 OS||Windows Server 2008
 CC||rajakarunan...@gmail.com

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

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



[Bug 58610] New: Oracle DB connections not releasing from connection pool in Tomcat 8

2015-11-15 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=58610

Bug ID: 58610
   Summary: Oracle DB connections not releasing from connection
pool in Tomcat 8
   Product: Tomcat 8
   Version: 8.0.26
  Hardware: PC
Status: NEW
  Severity: major
  Priority: P2
 Component: Manager
  Assignee: dev@tomcat.apache.org
  Reporter: rajakarunan...@gmail.com

We are migrating Tomcat6, java 6 and Oracle 10g web-applications to Tomcat 8,
Java 8 and Oracle 10g. Our applications working fine after migrated, but
initial connections (initialSize="5") available in connection pool not released
after Tomcat shut down. When second time starting tomcat, its creating 5 more
initial connections to pool. I am using below resource configuration in
server.xml


And below resource link configuration in application META_INF/context.xml


I am using ojdbc7.jar for oracle driver. Please help whether i missed any
configuration..

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

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



Re: Issues when building Tomcat 9 + tcnative

2015-11-15 Thread Rainer Jung

Am 15.11.2015 um 13:59 schrieb Martin Grigorov:

On Sun, Nov 15, 2015 at 1:35 PM, Martin Grigorov 
wrote:



To setup HTTP2 I follow the steps done by Konstantin Kolinko at
https://bz.apache.org/bugzilla/show_bug.cgi?id=58605
But here it fails with:

15-Nov-2015 13:40:37.505 INFO [main]
org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR
based Apache Tomcat Native library 1.2.2 using APR version 1.5.2.
15-Nov-2015 13:40:37.506 INFO [main]
org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR
capabilities: IPv6 [true], sendfile [true], accept filters [false], random
[true].
15-Nov-2015 13:40:37.508 INFO [main]
org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL
successfully initialized (OpenSSL 1.0.2d 9 Jul 2015)
15-Nov-2015 13:40:37.612 INFO [main]
org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler
["http-apr-8080"]
15-Nov-2015 13:40:37.619 INFO [main]
org.apache.coyote.http11.AbstractHttp11Protocol.configureUpgradeProtocol
The ["https-apr-8443"] connector has been configured to support negotiation
to [h2] via ALPN
15-Nov-2015 13:40:37.620 INFO [main]
org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler
["https-apr-8443"]
15-Nov-2015 13:40:37.622 SEVERE [main]
org.apache.coyote.AbstractProtocol.init Failed to initialize end point
associated with ProtocolHandler ["https-apr-8443"]
  java.lang.Exception: Unable to load certificate key
/tmp/tc9/apache-tomcat-9.0.0.M1/conf/localhost-key.pem (error:0906D06C:PEM
routines:PEM_read_bio:no start line)
 at org.apache.tomcat.jni.SSLContext.setCertificate(Native Method)

...


The connector config is:

 
 
 
 
 

Ideas what could be wrong ?


Shooting from the hip:

/tmp/tc9/apache-tomcat-9.0.0.M1/conf/localhost-key.pem 
(error:0906D06C:PEM routines:PEM_read_bio:no start line)


sounds like the key file is not in valid PEM format, ie. it doesn't 
start with a


-BEGIN RSA PRIVATE KEY-

line. Could you check, what the format of that file is?

You can also use the openssl command from the same openssl installation 
that was used to build your tcnative and read the key file contents 
using it:


/path/to/openssl rsa -inform pem -in 
/tmp/tc9/apache-tomcat-9.0.0.M1/conf/localhost-key.pem -text


Finally, could it be, that your Tomcat runtime user can not read the file?

Regards,

Rainer

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



Re: Issues when building Tomcat 9 + tcnative

2015-11-15 Thread Martin Grigorov
On Sun, Nov 15, 2015 at 3:10 PM, Rainer Jung 
wrote:

> Am 15.11.2015 um 13:59 schrieb Martin Grigorov:
>
>> On Sun, Nov 15, 2015 at 1:35 PM, Martin Grigorov 
>> wrote:
>>
>
> To setup HTTP2 I follow the steps done by Konstantin Kolinko at
>> https://bz.apache.org/bugzilla/show_bug.cgi?id=58605
>> But here it fails with:
>>
>> 15-Nov-2015 13:40:37.505 INFO [main]
>> org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR
>> based Apache Tomcat Native library 1.2.2 using APR version 1.5.2.
>> 15-Nov-2015 13:40:37.506 INFO [main]
>> org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR
>> capabilities: IPv6 [true], sendfile [true], accept filters [false], random
>> [true].
>> 15-Nov-2015 13:40:37.508 INFO [main]
>> org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL
>> successfully initialized (OpenSSL 1.0.2d 9 Jul 2015)
>> 15-Nov-2015 13:40:37.612 INFO [main]
>> org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler
>> ["http-apr-8080"]
>> 15-Nov-2015 13:40:37.619 INFO [main]
>> org.apache.coyote.http11.AbstractHttp11Protocol.configureUpgradeProtocol
>> The ["https-apr-8443"] connector has been configured to support
>> negotiation
>> to [h2] via ALPN
>> 15-Nov-2015 13:40:37.620 INFO [main]
>> org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler
>> ["https-apr-8443"]
>> 15-Nov-2015 13:40:37.622 SEVERE [main]
>> org.apache.coyote.AbstractProtocol.init Failed to initialize end point
>> associated with ProtocolHandler ["https-apr-8443"]
>>   java.lang.Exception: Unable to load certificate key
>> /tmp/tc9/apache-tomcat-9.0.0.M1/conf/localhost-key.pem (error:0906D06C:PEM
>> routines:PEM_read_bio:no start line)
>>  at org.apache.tomcat.jni.SSLContext.setCertificate(Native Method)
>>
> ...
>
> The connector config is:
>> > protocol="org.apache.coyote.http11.Http11AprProtocol" maxThreads="150"
>> SSLEnabled="true" >
>>  > className="org.apache.coyote.http2.Http2Protocol"
>> />
>>  
>>  >   certificateFile="conf/localhost-cert.pem"
>>   type="RSA" />
>>  
>>  
>>
>> Ideas what could be wrong ?
>>
>
> Shooting from the hip:
>
> /tmp/tc9/apache-tomcat-9.0.0.M1/conf/localhost-key.pem (error:0906D06C:PEM
> routines:PEM_read_bio:no start line)
>
> sounds like the key file is not in valid PEM format, ie. it doesn't start
> with a
>
> -BEGIN RSA PRIVATE KEY-
>

Thanks, Rainer!
Somehow I messed up my Tomcat SVN working dir here and both
localhost-cert.pem and localhost-key.pem had the same content!
svn revert + copy again the -key.pem file to conf/ fixed the issue!


> line. Could you check, what the format of that file is?
>
> You can also use the openssl command from the same openssl installation
> that was used to build your tcnative and read the key file contents using
> it:
>
> /path/to/openssl rsa -inform pem -in
> /tmp/tc9/apache-tomcat-9.0.0.M1/conf/localhost-key.pem -text
>
> Finally, could it be, that your Tomcat runtime user can not read the file?
>
> Regards,
>
> Rainer



Overall everything looks good now!
Tomcat default apps run OK. Both Firefox and Google Chrome report H2.

It is just my own application that doesn't work in HTTP2 mode.
http://localhost:8080/wicket-websocket/ works fine
But https://localhost:8443/wicket-websocket/ redirects immediately with 302
to http://localhost/wicket-websocket/ (and Tomcat is not responsible for
port 80 here)
I've changed the name of the app (i.e. the .war) but it behaves the same
way. I'll try to debug it.



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


Re: [VOTE] Release Apache Tomcat 9.0.0.M1

2015-11-15 Thread Martin Grigorov
On Fri, Nov 13, 2015 at 1:12 AM, Mark Thomas  wrote:

> The proposed Apache Tomcat 9.0.0.M1 release is now available for voting.
>
> This is the first milestone release for the 9.0.x branch. It should be
> noted that, as a milestone release:
> - Servlet 4.0 is not finalised
> - The EGs have not started work on JSP 2.4, EL 3.1 or WebSocket 1.2/2.0
>
> The major changes compared to the 8.0.x branch are:
> - Requires Java 8
> - BIO, Comet and Windows Itanium support have been removed
> - Support for TLS virtual hosting, ALPN, HTTP/2 and OpenSSL with
>   NIO/NIO2 has been added
> - Lots of internal refactoring to support the above changes
>
> For full details, see the changelog:
> http://svn.us.apache.org/repos/asf/tomcat/trunk/webapps/docs/changelog.xml
>
> It can be obtained from:
> https://dist.apache.org/repos/dist/dev/tomcat/tomcat-9/v9.0.0.M1/
> The Maven staging repo is:
> https://repository.apache.org/content/repositories/orgapachetomcat-1054/
> The svn tag is:
> http://svn.apache.org/repos/asf/tomcattags/TOMCAT_9_0_0_M1/
>
> The proposed 9.0.0.M1 release is:
> [ ] Broken - do not release
> [ X ] Alpha - go ahead and release as 9.0.0.M1
>

Environment: Ubuntu 15.10, Firefox 42.0, Google Chrome 46

Tested:
- Apache Wicket WebSocket demo application (uses JSR 356 web sockets) with
HTTP2.
- Apache Wicket examples application

The only problem I faced was with Wicket-Atmosphere integration (Atmosphere
ver. 2.2.8):

1)
ERROR - AtmosphereFramework- AtmosphereFramework exception
java.lang.IllegalStateException: A filter or servlet of the current chain
does not support asynchronous operations.
at org.apache.catalina.connector.Request.startAsync(Request.java:1571)
at
org.apache.catalina.connector.RequestFacade.startAsync(RequestFacade.java:1037)
at
org.atmosphere.cpr.AtmosphereRequest.startAsync(AtmosphereRequest.java:723)
at
org.atmosphere.container.Servlet30CometSupport.suspend(Servlet30CometSupport.java:93)
at
org.atmosphere.container.Servlet30CometSupport.service(Servlet30CometSupport.java:68)
at
org.atmosphere.cpr.AtmosphereFramework.doCometSupport(AtmosphereFramework.java:2078)
at org.atmosphere.cpr.AtmosphereServlet.doPost(AtmosphereServlet.java:198)

Is it a good idea (and possible) to print which filter or servlet is not
properly configured? For better debug info.

2)
java.lang.NullPointerException
at
org.apache.catalina.connector.Request.getServletContext(Request.java:1559)
at org.apache.catalina.connector.Request.getContextPath(Request.java:1894)
at
org.apache.catalina.connector.RequestFacade.getContextPath(RequestFacade.java:783)
at
org.atmosphere.cpr.AtmosphereRequest.getContextPath(AtmosphereRequest.java:359)
at
javax.servlet.http.HttpServletRequestWrapper.getContextPath(HttpServletRequestWrapper.java:150)
at org.apache.wicket.atmosphere.EventBus$2.getContextPath(EventBus.java:473)
at
org.apache.wicket.protocol.http.servlet.ServletWebRequest.getContextRelativeUrl(ServletWebRequest.java:184)
at
org.apache.wicket.protocol.http.servlet.ServletWebRequest.(ServletWebRequest.java:112)
at
org.apache.wicket.protocol.http.servlet.ServletWebRequest.(ServletWebRequest.java:82)

I believe this issue has been discussed before. Either here or in
Atmosphere forums.


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


Re: Issues when building Tomcat 9 + tcnative

2015-11-15 Thread Martin Grigorov
On Sun, Nov 15, 2015 at 1:35 PM, Mark Thomas  wrote:

> On 15/11/2015 11:54, Martin Grigorov wrote:
>
> 
>
> > Running just 'ant' downloads tomcat-native.tar.gz (1.2.2) to base.path.
> > But this file is just copied in ./output/build/bin/, it is not untar-ed.
>
> Correct. The source ships in that directory for the Tomcat .tar.gz
> distro. Users of that distro are expected to build tc-native themselves.
>
> > So I've checked in build.xml and saw that at line 1927 it copies the .dll
> > files, as part of "dist-static" target. Executing "ant dist-target" leads
> > to:
> 
> > Why win32 ?!
> > Later I see the Unix versions being downloaded too, so maybe it just
> > download everything and then decides which ones to actually use. Not a
> big
> > issue.
>
> Because the Tomcat binary distros for Windows ship with the pre-built
> tc-native binaries.
>
> > 2) at step "extras-commons-logging" it fails with:
>
> Looks like you are using a version of Ant with known issues.
>
> Mark
>

I was using Ant 1.9.4. Upgraded it to 1.9.6 and the problem is gone!

Thanks!


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


Issues when building Tomcat 9 + tcnative

2015-11-15 Thread Martin Grigorov
Hi devs,

I'm trying to build 9.0.0.M1 from sources to test the HTTP2 functionalities.
I haven't built Tomcat + tcnative before so I may be doing something
wrong...

I run Ubuntu 15.10 here.

Running just 'ant' downloads tomcat-native.tar.gz (1.2.2) to base.path.
But this file is just copied in ./output/build/bin/, it is not untar-ed.

So I've checked in build.xml and saw that at line 1927 it copies the .dll
files, as part of "dist-static" target. Executing "ant dist-target" leads
to:

1) trydownload:
  [get] Getting:
http://www.apache.org/dist/tomcat/tomcat-connectors/native/1.2.2/binaries/tomcat-native-1.2.2-win32-bin.zip

and

testexist:
 [echo] Testing  for /tmp/tc9/commons-daemon-1.0.15/windows/prunmgr.exe

and

trydownload:
  [get] Getting:
http://www.apache.org/dist/commons/daemon/binaries/windows/commons-daemon-1.0.15-bin-windows-signed.zip
  [get] To: /tmp/tc9/download-530232362.zip

and the same for makensis.exe

Why win32 ?!
Later I see the Unix versions being downloaded too, so maybe it just
download everything and then decides which ones to actually use. Not a big
issue.


2) at step "extras-commons-logging" it fails with:

extras-commons-logging:
   [gunzip] Expanding
/tmp/tc9/commons-logging-1.1.3/commons-logging-1.1.3-src.tar.gz to
/tmp/tc9/apache-tomcat-9.0.0.M1-src/output/extras/logging/commons-logging-src.tar
[untar] Expanding:
/tmp/tc9/apache-tomcat-9.0.0.M1-src/output/extras/logging/commons-logging-src.tar
into /tmp/tc9/apache-tomcat-9.0.0.M1-src/output/extras/logging

BUILD FAILED
/tmp/tc9/apache-tomcat-9.0.0.M1-src/build.xml:1651: Error while expanding
/tmp/tc9/apache-tomcat-9.0.0.M1-src/output/extras/logging/commons-logging-src.tar
java.io.IOException: Error detected parsing the header
at org.apache.tools.tar.TarInputStream.getNextEntry(TarInputStream.java:292)
at org.apache.tools.ant.taskdefs.Untar.expandStream(Untar.java:165)
at org.apache.tools.ant.taskdefs.Untar.expandFile(Untar.java:114)
at org.apache.tools.ant.taskdefs.Expand.execute(Expand.java:132)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
at org.apache.tools.ant.Main.runBuild(Main.java:851)
at org.apache.tools.ant.Main.startAnt(Main.java:235)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Caused by: java.lang.IllegalArgumentException: Invalid byte 32 at offset 7
in '   {NUL}' len=8
at org.apache.tools.tar.TarUtils.parseOctal(TarUtils.java:134)
at org.apache.tools.tar.TarUtils.parseOctalOrBinary(TarUtils.java:172)
at org.apache.tools.tar.TarEntry.parseTarHeader(TarEntry.java:912)
at org.apache.tools.tar.TarEntry.parseTarHeader(TarEntry.java:899)
at org.apache.tools.tar.TarEntry.(TarEntry.java:323)
at org.apache.tools.tar.TarInputStream.getNextEntry(TarInputStream.java:290)
... 19 more


$ tar xvf commons-logging-src.tar
works just fine, but it seems the Java library used for untar-ing doesn't
like the content

I'll try with apache-tomcat-9.0.0.M1.tar.gz  +
http://tomcat.apache.org/native-doc/ (configure+make)


Cheers
Martin


Re: [VOTE] Release Apache Tomcat 9.0.0.M1

2015-11-15 Thread Mark Thomas
On 15/11/2015 00:29, Ognjen Blagojevic wrote:
> Mark,
> 
> On 13.11.2015 1:12, Mark Thomas wrote:
>> The proposed Apache Tomcat 9.0.0.M1 release is now available for voting.
> 
>> The proposed 9.0.0.M1 release is:
>> [ ] Broken - do not release
>> [X] Alpha - go ahead and release as 9.0.0.M1
> 
> Tested .zip distribution on Windows 7 64-bit, Oracle JDK 1.8.0_60 and
> APR/native 1.2.2:
> 
> - Tested TLS connectivity for NIO and APR connectors:
> 
>   * Thanks to Java 8 parameter (-Djdk.tls.ephemeralDHKeySize=2048) with
> NIO and Native 1.2.2 with APR, I was able to configure DH key size >=
> 2048. SSLTest is happy.
> 
>   * SSLTest also reports that APR/native does not serve full certificate
> chain; instead, it serves only server certificate. The same APR config
> serves full chain with Tomcat 8.0.28 + Native 1.2.2, so it seems to be a
> regression. Not serving full chain might be a problem for some clients
> -- browsers will probably work, but other clients may fail to establish
> TLS connection.

Hmm. I'm sure this was working at one point. I'll retest it.

> - Tested with several webapps that are in active development. Small
> nuisances:
> 
>   * It seems that it is not possible anymore to use attribute "digest"
> in realms. It would be nice if that is mentioned in release
> announcement. I guess quite a number of people uses Realms with digest,
> and they will need to adjust the config before switching to 9.0.0.

digest is marked as deprecated in the Tomcat 8 docs. We can add that to
the migration guide.

>   * Tomcat 9 uses DBCP2, so attribute names for connection pool are
> different now (e.g. maxActive -> maxTotal). It would be nice to also add
> that to the announcement.

Tomcat 8 also uses DBCP 2 so there is no change here. This is covered in
the 7.0.x to 8.0.x migration guide.

Mark


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



Re: Issues when building Tomcat 9 + tcnative

2015-11-15 Thread Martin Grigorov
On Sun, Nov 15, 2015 at 12:54 PM, Martin Grigorov 
wrote:

>
> So I've checked in build.xml and saw that at line 1927 it copies the .dll
> files, as part of "dist-static" target. Executing "ant dist-target" leads
> to:
>

Uh. Of course ".dll" means that it will deal with Windows stuff...


I have the natives properly set up! Now I'll test the HTTP2 connector.

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov


Re: Issues when building Tomcat 9 + tcnative

2015-11-15 Thread Mark Thomas
On 15/11/2015 11:54, Martin Grigorov wrote:



> Running just 'ant' downloads tomcat-native.tar.gz (1.2.2) to base.path.
> But this file is just copied in ./output/build/bin/, it is not untar-ed.

Correct. The source ships in that directory for the Tomcat .tar.gz
distro. Users of that distro are expected to build tc-native themselves.

> So I've checked in build.xml and saw that at line 1927 it copies the .dll
> files, as part of "dist-static" target. Executing "ant dist-target" leads
> to:

> Why win32 ?!
> Later I see the Unix versions being downloaded too, so maybe it just
> download everything and then decides which ones to actually use. Not a big
> issue.

Because the Tomcat binary distros for Windows ship with the pre-built
tc-native binaries.

> 2) at step "extras-commons-logging" it fails with:

Looks like you are using a version of Ant with known issues.

Mark


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



Re: Issues when building Tomcat 9 + tcnative

2015-11-15 Thread Martin Grigorov
On Sun, Nov 15, 2015 at 1:35 PM, Martin Grigorov 
wrote:

>
> On Sun, Nov 15, 2015 at 12:54 PM, Martin Grigorov 
> wrote:
>
>>
>> So I've checked in build.xml and saw that at line 1927 it copies the .dll
>> files, as part of "dist-static" target. Executing "ant dist-target" leads
>> to:
>>
>
> Uh. Of course ".dll" means that it will deal with Windows stuff...
>
>
> I have the natives properly set up! Now I'll test the HTTP2 connector.
>
>
To setup HTTP2 I follow the steps done by Konstantin Kolinko at
https://bz.apache.org/bugzilla/show_bug.cgi?id=58605
But here it fails with:

15-Nov-2015 13:40:37.505 INFO [main]
org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR
based Apache Tomcat Native library 1.2.2 using APR version 1.5.2.
15-Nov-2015 13:40:37.506 INFO [main]
org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR
capabilities: IPv6 [true], sendfile [true], accept filters [false], random
[true].
15-Nov-2015 13:40:37.508 INFO [main]
org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL
successfully initialized (OpenSSL 1.0.2d 9 Jul 2015)
15-Nov-2015 13:40:37.612 INFO [main]
org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler
["http-apr-8080"]
15-Nov-2015 13:40:37.619 INFO [main]
org.apache.coyote.http11.AbstractHttp11Protocol.configureUpgradeProtocol
The ["https-apr-8443"] connector has been configured to support negotiation
to [h2] via ALPN
15-Nov-2015 13:40:37.620 INFO [main]
org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler
["https-apr-8443"]
15-Nov-2015 13:40:37.622 SEVERE [main]
org.apache.coyote.AbstractProtocol.init Failed to initialize end point
associated with ProtocolHandler ["https-apr-8443"]
 java.lang.Exception: Unable to load certificate key
/tmp/tc9/apache-tomcat-9.0.0.M1/conf/localhost-key.pem (error:0906D06C:PEM
routines:PEM_read_bio:no start line)
at org.apache.tomcat.jni.SSLContext.setCertificate(Native Method)
at org.apache.tomcat.util.net.AprEndpoint.bind(AprEndpoint.java:487)
at
org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:790)
at
org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:544)
at
org.apache.coyote.http11.AbstractHttp11Protocol.init(AbstractHttp11Protocol.java:67)
at
org.apache.catalina.connector.Connector.initInternal(Connector.java:978)
at
org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:107)
at
org.apache.catalina.core.StandardService.initInternal(StandardService.java:569)
at
org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:107)
at
org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:851)
at
org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:107)
at org.apache.catalina.startup.Catalina.load(Catalina.java:600)
at org.apache.catalina.startup.Catalina.load(Catalina.java:623)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:310)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:484)

The connector config is:







Ideas what could be wrong ?

Martin


[GUMP@vmgump]: Project tomcat-trunk-test-nio (in module tomcat-trunk) failed

2015-11-15 Thread Bill Barker
To whom it may engage...

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

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


Full details are available at:

http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-test-nio/index.html

That said, some information snippets are provided here.

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



The following work was performed:
http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-test-nio/gump_work/build_tomcat-trunk_tomcat-trunk-test-nio.html
Work Name: build_tomcat-trunk_tomcat-trunk-test-nio (Type: Build)
Work ended in a state of : Failed
Elapsed: 46 mins 50 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-20151116-native-src.tar.gz
 -Dexamples.sources.skip=true 
-Djdt.jar=/srv/gump/packages/eclipse/plugins/R-4.5-201506032000/ecj-4.5.jar 
-Dtest.relaxTiming=true 
-Dcommons-daemon.jar=/srv/gump/public/workspace/apache-commons/daemon/dist/commons-daemon-20151116.jar
 
-Dcommons-daemon.native.src.tgz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-20151116-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-ma
 ster/dest-20151116/bin/openssl -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-trunk]
CLASSPATH: 
/usr/lib/jvm/java-8-oracle/lib/tools.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/webapps/examples/WEB-INF/classes:/srv/gump/public/workspace/tomcat-trunk/output/testclasses:/srv/gump/public/workspace/ant/dist/lib/ant.jar:/srv/gump/public/workspace/ant/dist/lib/ant-launcher.jar:/srv/gump/public/workspace/ant/dist/lib/ant-jmf.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit4.jar:/srv/gump/public/workspace/ant/dist/lib/ant-swing.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-resolver.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-xalan2.jar:/srv/gump/public/workspace/xml-commons/java/build/resolver.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/bin/bootstrap.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/bin/tomcat-juli.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/annotations-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/servlet-api.ja
 

Re: [VOTE] Release Apache Tomcat 9.0.0.M1

2015-11-15 Thread Huxing Zhang
Hi, 

I have tested tomcat 9.0.0.M1 on Mac OSX EI Capitan.

The svn link seems broken to me:
http://svn.apache.org/repos/asf/tomcattags/TOMCAT_9_0_0_M1/ 

Instead, the following url is accessible:
http://svn.apache.org/repos/asf/tomcat/tags/TOMCAT_9_0_0_M1/

Environment:
Mac OSX, jdk 1.8.0_51, apr 1.5.2, tcnative 1.2.2, OpenSSL 1.0.2d 9 Jul 2015

Test Results:
All NIO/NIO2/APR test cases have successfully passed.

Test https + apr with openssl generated self-signed certificate: ok
Smoking test on servlet/jsp/websocket examples: ok
HTTP/2 server push feature on Chrome: ok

Test https + nio/nio2 with 
sslImplementationName="org.apache.tomcat.util.net.openssl.OpenSSLImplementation"
 defined in connector
Smoking test on servlet/jsp/websocket examples: ok
HTTP/2 server push feature on Chrome: ok

Observations:
* lack of documentation of  element, should be in 
config/http.html#Nested_Components
* deprecated documentation found on docs/ssl-howto.html:
Right now the doc says:
The APR connector uses different attributes for many SSL settings, particularly 
keys and certificates. An example of an APR configuration is:


Since SSL configuration attributes in the Connector element is deprecated, it 
should be replaced by configurations in SSLHostConfig element. At least, it 
should be marked as deprecated.  
* ${catalina.base} directory appears after running unit test case, it also 
appeared in trunk, but never in tomcat8/tomcat7 trunk. I haven't looked into 
it, but I guess there is some test which forgot to set the catalina.base system 
property.
* in docs/ssl-howto.html, it might be better to provide an example of 
generating self-signed certificate using openssl, what I am using is:
/usr/local/openssl/bin/openssl req -x509 -newkey rsa:2048 -keyout key.pem -out 
cert.pem -days 365
* the documentation of docs/config/http.html#SSL_Support_-_SSLHostConfig looks 
a little confused, it might be better to separate JSSE only and Openssl only 
attributes.

Overall my conclusion is:
[ X ] Alpha - go ahead and release as 9.0.0.M1
 
--
From:Mark Thomas 
Time:2015 Nov 13 (Fri) 08:13
To:dev@tomcat.apache.org 
Subject:[VOTE] Release Apache Tomcat 9.0.0.M1


The proposed Apache Tomcat 9.0.0.M1 release is now available for voting.

This is the first milestone release for the 9.0.x branch. It should be
noted that, as a milestone release:
- Servlet 4.0 is not finalised
- The EGs have not started work on JSP 2.4, EL 3.1 or WebSocket 1.2/2.0

The major changes compared to the 8.0.x branch are:
- Requires Java 8
- BIO, Comet and Windows Itanium support have been removed
- Support for TLS virtual hosting, ALPN, HTTP/2 and OpenSSL with
  NIO/NIO2 has been added
- Lots of internal refactoring to support the above changes

For full details, see the changelog:
http://svn.us.apache.org/repos/asf/tomcat/trunk/webapps/docs/changelog.xml

It can be obtained from:
https://dist.apache.org/repos/dist/dev/tomcat/tomcat-9/v9.0.0.M1/
The Maven staging repo is:
https://repository.apache.org/content/repositories/orgapachetomcat-1054/
The svn tag is:
http://svn.apache.org/repos/asf/tomcattags/TOMCAT_9_0_0_M1/

The proposed 9.0.0.M1 release is:
[ ] Broken - do not release
[ ] Alpha - go ahead and release as 9.0.0.M1

-
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



[GUMP@vmgump]: Project tomcat-trunk-test-nio2 (in module tomcat-trunk) failed

2015-11-15 Thread Bill Barker
To whom it may engage...

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

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


Full details are available at:

http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-test-nio2/index.html

That said, some information snippets are provided here.

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



The following work was performed:
http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-test-nio2/gump_work/build_tomcat-trunk_tomcat-trunk-test-nio2.html
Work Name: build_tomcat-trunk_tomcat-trunk-test-nio2 (Type: Build)
Work ended in a state of : Failed
Elapsed: 48 mins 14 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-20151116-native-src.tar.gz
 -Dexamples.sources.skip=true 
-Djdt.jar=/srv/gump/packages/eclipse/plugins/R-4.5-201506032000/ecj-4.5.jar 
-Dtest.relaxTiming=true 
-Dcommons-daemon.jar=/srv/gump/public/workspace/apache-commons/daemon/dist/commons-daemon-20151116.jar
 
-Dcommons-daemon.native.src.tgz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-20151116-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
 -master/dest-20151116/bin/openssl -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-trunk]
CLASSPATH: 
/usr/lib/jvm/java-8-oracle/lib/tools.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/webapps/examples/WEB-INF/classes:/srv/gump/public/workspace/tomcat-trunk/output/testclasses:/srv/gump/public/workspace/ant/dist/lib/ant.jar:/srv/gump/public/workspace/ant/dist/lib/ant-launcher.jar:/srv/gump/public/workspace/ant/dist/lib/ant-jmf.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit4.jar:/srv/gump/public/workspace/ant/dist/lib/ant-swing.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-resolver.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-xalan2.jar:/srv/gump/public/workspace/xml-commons/java/build/resolver.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/bin/bootstrap.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/bin/tomcat-juli.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/annotations-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/servlet-api.ja
 

svn commit: r1714521 - /tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java

2015-11-15 Thread violetagg
Author: violetagg
Date: Mon Nov 16 07:39:41 2015
New Revision: 1714521

URL: http://svn.apache.org/viewvc?rev=1714521=rev
Log:
Use Map structure for Tomcat.pinnedLoggers. Feedback provided 
by kkolinko.

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

Modified: tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java?rev=1714521=1714520=1714521=diff
==
--- tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java Mon Nov 16 
07:39:41 2015
@@ -24,10 +24,8 @@ import java.net.URL;
 import java.security.Principal;
 import java.util.ArrayList;
 import java.util.HashMap;
-import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
-import java.util.Set;
 import java.util.Stack;
 import java.util.jar.JarEntry;
 import java.util.jar.JarFile;
@@ -131,7 +129,7 @@ public class Tomcat {
 // after Loggers are configured but before they are used. The purpose of
 // this Set is to retain strong references to explicitly configured loggers
 // so that configuration is not lost.
-private final Set pinnedLoggers = new HashSet<>();
+private final Map pinnedLoggers = new HashMap<>();
 
 // Single engine, service, server, connector - few cases need more,
 // they can use server.xml
@@ -669,7 +667,7 @@ public class Tomcat {
 public void setSilent(boolean silent) {
 for (String s : silences) {
 Logger logger = Logger.getLogger(s);
-pinnedLoggers.add(logger);
+pinnedLoggers.put(s, logger);
 if (silent) {
 logger.setLevel(Level.WARNING);
 } else {
@@ -679,8 +677,9 @@ public class Tomcat {
 }
 
 private void silence(Host host, String ctx) {
-Logger logger = Logger.getLogger(getLoggerName(host, ctx));
-pinnedLoggers.add(logger);
+String loggerName = getLoggerName(host, ctx);
+Logger logger = Logger.getLogger(loggerName);
+pinnedLoggers.put(loggerName, logger);
 logger.setLevel(Level.WARNING);
 }
 



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



svn commit: r1714522 - in /tomcat/tc8.0.x/trunk: ./ java/org/apache/catalina/startup/Tomcat.java

2015-11-15 Thread violetagg
Author: violetagg
Date: Mon Nov 16 07:44:24 2015
New Revision: 1714522

URL: http://svn.apache.org/viewvc?rev=1714522=rev
Log:
Merged revision 1714521 from tomcat/trunk:
Use Map structure for Tomcat.pinnedLoggers. Feedback provided 
by kkolinko.

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

Propchange: tomcat/tc8.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Nov 16 07:44:24 2015
@@ -1 +1 @@
-/tomcat/trunk:1636524,1637156,1637176,1637188,1637331,1637684,1637695,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,1657592,1657607,1657
 
609,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,1661867,1661972,1661990,1662200,1662308-1662309,1662548,1662614,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-1666387,1666494,1666496,1666552,1
 
666569,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,1681701,1681729,1681770,1681779,1681793,1681807,1681837-1681838,1681854,1681862,1681958,1682028,1682033,1682311,1682315,1682317,1682320,1682324,1682330,1682842,1684172,1684366,1684383,1684526-1684527,1684549-1684550,1685556,1685591,168573
 

Re: svn commit: r1714185 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/startup/Tomcat.java

2015-11-15 Thread Violeta Georgieva
Hi,

2015-11-14 6:41 GMT+02:00 Konstantin Kolinko :
>
> 2015-11-13 14:02 GMT+03:00  :
> > Author: violetagg
> > Date: Fri Nov 13 11:02:12 2015
> > New Revision: 1714185
> >
> > URL: http://svn.apache.org/viewvc?rev=1714185=rev
> > Log:
> > Merged revision 1659184 from tomcat/trunk:
> > Fix FindBugs warnings re possible Logger configuration loss
> >
> > Modified:
> > tomcat/tc7.0.x/trunk/   (props changed)
> > tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/Tomcat.java
>
> > Modified:
tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/Tomcat.java
> > URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/Tomcat.java?rev=1714185=1714184=1714185=diff
> >
==
> > --- tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/Tomcat.java
(original)
> > +++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/Tomcat.java
Fri Nov 13 11:02:12 2015
> > @@ -24,8 +24,10 @@ import java.net.URL;
> >  import java.security.Principal;
> >  import java.util.ArrayList;
> >  import java.util.HashMap;
> > +import java.util.HashSet;
> >  import java.util.List;
> >  import java.util.Map;
> > +import java.util.Set;
> >  import java.util.Stack;
> >  import java.util.jar.JarEntry;
> >  import java.util.jar.JarFile;
> > @@ -125,6 +127,13 @@ import org.apache.catalina.realm.RealmBa
> >   * @author Costin Manolache
> >   */
> >  public class Tomcat {
> > +// Some logging implementations use weak references for loggers so
there is
> > +// the possibility that logging configuration could be lost if GC
runs just
> > +// after Loggers are configured but before they are used. The
purpose of
> > +// this Sety is to retain strong references to explicitly
configured loggers
> > +// so that configuration is not lost.
> > +private final Set pinnedLoggers = new HashSet();
> > +
> >  // Single engine, service, server, connector - few cases need more,
> >  // they can use server.xml
> >  protected Server server;
> > @@ -679,16 +688,20 @@ public class Tomcat {
> >   */
> >  public void setSilent(boolean silent) {
> >  for (String s : silences) {
> > +Logger logger = Logger.getLogger(s);
> > +pinnedLoggers.add(logger);
> >  if (silent) {
> > -Logger.getLogger(s).setLevel(Level.WARNING);
> > +logger.setLevel(Level.WARNING);
> >  } else {
> > -Logger.getLogger(s).setLevel(Level.INFO);
> > +logger.setLevel(Level.INFO);
> >  }
> >  }
> >  }
> >
> >  private void silence(Host host, String ctx) {
> > -Logger.getLogger(getLoggerName(host,
ctx)).setLevel(Level.WARNING);
> > +Logger logger = Logger.getLogger(getLoggerName(host, ctx));
> > +pinnedLoggers.add(logger);
> > +logger.setLevel(Level.WARNING);
> >  }
> >
> >  private String getLoggerName(Host host, String ctx) {
>
>
> I think it would be better for "pinnedLoggers" to be a Map.
>
> My concern is that Logger.equals() is essentially Object.equals(). As
> such, there is no easy way to remove/replace a logger once it has been
> added to that set.
>
> On another hand, loggers are keyed by a string name, so I think that
> name can be used as a key.

Thanks for the review. I changes the structure to Map.

Regards,
Violeta

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


svn commit: r1714523 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/startup/Tomcat.java

2015-11-15 Thread violetagg
Author: violetagg
Date: Mon Nov 16 07:51:08 2015
New Revision: 1714523

URL: http://svn.apache.org/viewvc?rev=1714523=rev
Log:
Merged revision 1714521 from tomcat/trunk:
Use Map structure for Tomcat.pinnedLoggers. Feedback provided 
by kkolinko.

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

Propchange: tomcat/tc7.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Nov 16 07:51:08 2015
@@ -1,2 +1,2 @@
 
/tomcat/tc8.0.x/trunk:1636525,1637336,1637685,1637709,1638726,1640089,1640276,1640349,1640363,1640366,1640642,1640672,1640674,1640689,1640884,1641001,1641065,1641067,1641375,1641638,1641723,1641726,1641729-1641730,1641736,1641988,1642669-1642670,1642698,1642701,1643205,1643215,1643217,1643230,1643232,1643273,1643285,1643329-1643330,1643511,1643513,1643521,1643539,1643571,1643581-1643582,1643635,1643655,1643738,1643964,1644018,1644333,1644954,1644992,1645014,1645360,1645456,1645627,1645642,1645686,1645903-1645904,1645908-1645909,1645913,1645920,1646458,1646460-1646462,1646735,1646738-1646741,1646744,1646746,1646748-1646755,1646757,1646759-1646760,1647043,1648816,1651420-1651422,1651844,1652926,1652939-1652940,1652973,1653798,1653817,1653841,1654042,1654161,1654736,1654767,1654787,1656592,1659907,1662986,1663265,1663278,1663325,1663535,1663567,1663679,1663997,1664175,1664321,1664872,1665061,1665086,1666027,1666395,1666503,1666506,1666560,1666570,1666581,1666759,1666967,1666988,1667553
 
-1667555,1667558,1667617,1667633,1667637,1667747,1667767,1667873,1668028,1668137,1668634,1669432,1669801,1669840,1669895-1669896,1670398,1670435,1670592,1670605-1670607,1670609,1670632,1670720,1670725,1670727,1670731,1671114,1672273,1672285,1673759,1674220,1674295,1675469,1675488,1675595,1675831,1676232,1676367-1676369,1676382,1676394,1676483,1676556,1676635,1678178,1679536,1679988,1680256,1681124,1681182,1681730,1681840,1681864,1681869,1682010,1682034,1682047,1682052-1682053,1682062,1682064,1682070,1682312,1682325,1682331,1682386,1684367,1684385,1685759,1685774,1685827,1685892,1687341,1688904,1689358,1689657,1689921,1692850,1693093,1693108,1693324,1694060,1694115,1694291,1694427,1694431,1694503,1694549,1694789,1694873,1694881,1695356,1695372,1695823-1695825,1696200,1696281,1696379,1696468,1700608,1700871,1700897,1700978,1701094,1701124,1701608,1701668,1701676,1701766,1701944,1702248,1702252,1702314,1702390,1702723,1702725,1702728,1702730,1702733,1702735,1702737,1702739,1702742,1702
 
744,1702748,1702751,1702754,1702758,1702760,1702763,1702766,1708779,1708782,1708806,1709314,1709670,1710347,1710442,1710448,1710490,1710574,1710578,1712226,1712229,1712235,1712255,1712618,1712649,1712655,1712899,1712903,1712906,1712975,1713185,1713262,1713287,1713613,1713621,1713872,1713976,1713994,1713998,1714004,1714013,1714059
-/tomcat/trunk:1156115-1157160,1157162-1157859,1157862-1157942,1157945-1160347,1160349-1163716,1163718-1166689,1166691-1174340,1174342-1175596,1175598-1175611,1175613-1175932,1175934-1177783,1177785-1177980,1178006-1180720,1180722-1183094,1183096-1187753,1187755,1187775,1187801,1187806,1187809,1187826-1188312,1188314-1188401,1188646-1188840,1188842-1190176,1190178-1195223,1195225-1195953,1195955,1195957-1201238,1201240-1203345,1203347-1206623,1206625-1208046,1208073,1208096,1208114,1208145,1208772,1209194-1212125,1212127-1220291,1220293,1220295-1221321,1221323-1222329,1222332-1222401,1222405-1222795,1222850-1222950,1222969-1225326,1225328-1225463,1225465,1225627,1225629-1226534,1226536-1228908,1228911-1228923,1228927-1229532,1229534-1230766,1230768-1231625,1231627-1233414,1233419-1235207,1235209-1237425,1237427,1237429-1237977,1237981,1237985,1237995,1238070,1238073,1239024-1239048,1239050-1239062,1239135,1239256,1239258-1239485,1239785-1240046,1240101,1240106,1240109,1240112,1240114
 
,1240116,1240118,1240121,1240329,1240474-1240850,1240857,1241087,1241160,1241408-1241822,1241908-1241909,1241912-1242110,1242371-1292130,1292134-1292458,1292464-1292670,1292672-1292776,1292780-1293392,1293397-1297017,1297019-1297963,1297965-1299820,1300108,1300111-1300460,1300520-1300948,1300997,1301006,1301280,1302332,1302348,1302608-1302610,1302649,1302837,1303138,1303163,1303338,1303521,1303587,1303698,1303803,1303852,1304011,1304035,1304037,1304135,1304249,1304253,1304260,1304271,1304275,1304468,1304895,1304930-1304932,1305194,1305943,1305965,1306556,1306579-1306580,1307084,1307310,1307511-1307512,1307579,1307591,1307597,1310636,1310639-1310640,1310642,1310701,1311212,1311995,1327617,1327670,1331766,1333161,1333173,1333827,1334787,1335026,1335257,1335547,1335692,1335711,1335731,1336515,1336813,1336864,1336868,1336884,1337419,1337426,1337546,1337572,1337591-1337595,1337643,1337707,1337719,1337734,1337741,1337745,1338151-1338154,1338178,1342027,1342029,1342315,1342320,1342476,1342