Re: Tomcat shutdown process

2016-04-05 Thread Mark Thomas
On 05/04/2016 21:48, Vinicius Carvalho wrote:
> Thanks for the quick reply Mark, one final question, does tomcat return a
> 503 error in that case?

New connections will fail. Existing connections will be closed.

Mark


> 
> Regards
> 
> On Tue, Apr 5, 2016 at 4:05 PM, Mark Thomas  wrote:
> 
>> On 05/04/2016 20:54, Vinicius Carvalho wrote:
>>> Hi there, I googled this one around, but I found a big mix on exactly how
>>> tomcat operates when a shutdown is initiated. What happens when a
>> shutdown
>>> is started in regards to:
>>>
>>> - Requests that are currently being processed (if a request is waiting on
>>> an external resource such as a jdbc connection), does the container wait
>>> for all responses to be committed or it will eventually kill any pending
>>> request?
>>
>> Requests are given a configurable time to complete (default is 10s as
>> far as I recall) and then Tomcat stops anyway.
>>
>>> - New requests that arrive after the shutdown. Does the container stop
>>> accepting them?
>>
>> No new requests are accepted.
>>
>> Mark
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>
>>
> 


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



Re: Tomcat 8.5 and TLS

2016-04-05 Thread Thad Humphries
On Tue, Apr 5, 2016 at 4:25 PM, Rémy Maucherat  wrote:

> 2016-04-05 15:11 GMT-05:00 Thad Humphries :
>
> > My primary interest in Tomcat 8.5 is HTTP/2, so I must set up HTTPS and
> > TLS.
> >
> > Since I eventually must demonstrate the various HTTPS approaches to
> others,
> > I have tried both the APR and the NIO implementation, as well as the
> > different  layouts in the docs (
> >
> >
> http://tomcat.apache.org/tomcat-8.5-doc/ssl-howto.html#Edit_the_Tomcat_Configuration_File
> > ),
> > and the $CATALINA_BASE/conf/server.xml comments.  I've gotten APR is
> > working both ways, but not quite NIO.
> >
> > When I use the following connector for NIO (from the docs), my SSL works:
> >
> >  >protocol="org.apache.coyote.http11.Http11NioProtocol"
> >port="8443" maxThreads="200" compression="on"
> >scheme="https" secure="true" SSLEnabled="true"
> >keystoreFile="conf/foo.jks" keystorePass="changeit"
> >clientAuth="false" sslProtocol="TLS">
> >/>
> > 
> >
> > However when I try the approach in the server.xml comments, Tomcat does
> not
> > start:
> >
> >  > protocol="org.apache.coyote.http11.Http11NioProtocol"
> >maxThreads="200" SSLEnabled="true"
> >scheme="https" secure="true" clientAuth="false"
> >sslProtocol="TLS">
> >/>
> >   
> >  >  certificateKeystoreType="JKS"
> >  certificateKeystorePassword="changeit"
> >  certificateKeyAlias="tomcat"
> >  type="RSA" />
> >   
> > 
> >
> > The error at the top of catalina.out is below. I'm trying to understand
> > why, both for myself and so that I can explain it to others. The "Caused
> > by: java.lang.IllegalArgumentException: Multiple SSLHostConfig elements
> > were provided for the host name [_default_]. Host names must be unique."
> > has me stumped as I have only the one uncommented SSLHostConfig in
> > server.xml.
> >
> > (Once I have this second  working, I must make a write-up for
> > folks here, a write-up which I hope will be clearer and more direct than
> > the docs. I would be happy to offer that write-up to the wiki or docs.)
> >
>
> You still have some attributes which should go into SSLHostConfig, so you
> have two SNI for the default host (clientAuth and sslProtocol). BTW
> sslProtocol is really useless.
>
> Rémy
>

I'm sorry, I'm not following you. Are you saying that to make the second
 work I must remove either clientAuth or sslProtocol? (No, I
must be mistaken--remove either/or and Tomcat still fails to start).

"BTW sslProtocol is really useless." does make sense. If so, I think I'm
hearing that I should not use the sslProtocol="TLS" attribute or the

element. Is that right?

The 8.5 docs say
"As of Tomcat 9, the majority of the SSL configuration attributes in the
Connector are deprecated. If specified, they will be used to configure a
SSLHostConfig and Certificate for the sslDefaultHost. Note that if an
explicit SSLHostConfig element also exists for the sslDefaultHost then that
will be treated as a configuration error. It is expected that Tomcat 10
will drop support for the SSL configuration attributes in the Connector."

This confuses me. The 8.5 server.xml uses  in its commented
examples while the 8.0 server.xml does not. And if SSL* attributes are
going away, why is  now the example? And without SSL*, how
do I specify the certificates in an APR connector like this one (which is
the first I got working):


  



>
> >
> > 05-Apr-2016 15:32:42.642 SEVERE [main]
> > org.apache.tomcat.util.digester.Digester.endElement End event threw
> > exception
> >  java.lang.reflect.InvocationTargetException
> > 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:498)
> > at
> >
> >
> org.apache.tomcat.util.IntrospectionUtils.callMethod1(IntrospectionUtils.java:377)
> > at org.apache.tomcat.util.digester.SetNextRule.end(SetNextRule.java:145)
> > at org.apache.tomcat.util.digester.Digester.endElement(Digester.java:966)
> > at
> >
> >
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:609)
> > at
> >
> >
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1783)
> > at
> >
> >
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2970)
> > at
> >
> >
> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
> > at
> >
> >
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmen

Re: Tomcat shutdown process

2016-04-05 Thread Vinicius Carvalho
Thanks for the quick reply Mark, one final question, does tomcat return a
503 error in that case?

Regards

On Tue, Apr 5, 2016 at 4:05 PM, Mark Thomas  wrote:

> On 05/04/2016 20:54, Vinicius Carvalho wrote:
> > Hi there, I googled this one around, but I found a big mix on exactly how
> > tomcat operates when a shutdown is initiated. What happens when a
> shutdown
> > is started in regards to:
> >
> > - Requests that are currently being processed (if a request is waiting on
> > an external resource such as a jdbc connection), does the container wait
> > for all responses to be committed or it will eventually kill any pending
> > request?
>
> Requests are given a configurable time to complete (default is 10s as
> far as I recall) and then Tomcat stops anyway.
>
> > - New requests that arrive after the shutdown. Does the container stop
> > accepting them?
>
> No new requests are accepted.
>
> Mark
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Tomcat 8.5 and TLS

2016-04-05 Thread Rémy Maucherat
2016-04-05 15:11 GMT-05:00 Thad Humphries :

> My primary interest in Tomcat 8.5 is HTTP/2, so I must set up HTTPS and
> TLS.
>
> Since I eventually must demonstrate the various HTTPS approaches to others,
> I have tried both the APR and the NIO implementation, as well as the
> different  layouts in the docs (
>
> http://tomcat.apache.org/tomcat-8.5-doc/ssl-howto.html#Edit_the_Tomcat_Configuration_File
> ),
> and the $CATALINA_BASE/conf/server.xml comments.  I've gotten APR is
> working both ways, but not quite NIO.
>
> When I use the following connector for NIO (from the docs), my SSL works:
>
> protocol="org.apache.coyote.http11.Http11NioProtocol"
>port="8443" maxThreads="200" compression="on"
>scheme="https" secure="true" SSLEnabled="true"
>keystoreFile="conf/foo.jks" keystorePass="changeit"
>clientAuth="false" sslProtocol="TLS">
>   
> 
>
> However when I try the approach in the server.xml comments, Tomcat does not
> start:
>
>  protocol="org.apache.coyote.http11.Http11NioProtocol"
>maxThreads="200" SSLEnabled="true"
>scheme="https" secure="true" clientAuth="false"
>sslProtocol="TLS">
>   
>   
>   certificateKeystoreType="JKS"
>  certificateKeystorePassword="changeit"
>  certificateKeyAlias="tomcat"
>  type="RSA" />
>   
> 
>
> The error at the top of catalina.out is below. I'm trying to understand
> why, both for myself and so that I can explain it to others. The "Caused
> by: java.lang.IllegalArgumentException: Multiple SSLHostConfig elements
> were provided for the host name [_default_]. Host names must be unique."
> has me stumped as I have only the one uncommented SSLHostConfig in
> server.xml.
>
> (Once I have this second  working, I must make a write-up for
> folks here, a write-up which I hope will be clearer and more direct than
> the docs. I would be happy to offer that write-up to the wiki or docs.)
>

You still have some attributes which should go into SSLHostConfig, so you
have two SNI for the default host (clientAuth and sslProtocol). BTW
sslProtocol is really useless.

Rémy

>
> 05-Apr-2016 15:32:42.642 SEVERE [main]
> org.apache.tomcat.util.digester.Digester.endElement End event threw
> exception
>  java.lang.reflect.InvocationTargetException
> 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:498)
> at
>
> org.apache.tomcat.util.IntrospectionUtils.callMethod1(IntrospectionUtils.java:377)
> at org.apache.tomcat.util.digester.SetNextRule.end(SetNextRule.java:145)
> at org.apache.tomcat.util.digester.Digester.endElement(Digester.java:966)
> at
>
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:609)
> at
>
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1783)
> at
>
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2970)
> at
>
> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
> at
>
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
> at
>
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)
> at
>
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
> at
>
> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
> at
>
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
> at
>
> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643)
> at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1461)
> at org.apache.catalina.startup.Catalina.load(Catalina.java:578)
> at org.apache.catalina.startup.Catalina.load(Catalina.java:629)
> 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:498)
> at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:311)
> at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:494)
> Caused by: java.lang.IllegalArgumentException: Multiple SSLHostConfig
> elements were provided for the host name [_default_]. Host names must be
> unique.
> at
>
> org.apache.tomcat.util.net.AbstractEndpoint.addSslHostConfig(Abstra

Tomcat 8.5 and TLS

2016-04-05 Thread Thad Humphries
My primary interest in Tomcat 8.5 is HTTP/2, so I must set up HTTPS and TLS.

Since I eventually must demonstrate the various HTTPS approaches to others,
I have tried both the APR and the NIO implementation, as well as the
different  layouts in the docs (
http://tomcat.apache.org/tomcat-8.5-doc/ssl-howto.html#Edit_the_Tomcat_Configuration_File),
and the $CATALINA_BASE/conf/server.xml comments.  I've gotten APR is
working both ways, but not quite NIO.

When I use the following connector for NIO (from the docs), my SSL works:


  


However when I try the approach in the server.xml comments, Tomcat does not
start:


  
  

  


The error at the top of catalina.out is below. I'm trying to understand
why, both for myself and so that I can explain it to others. The "Caused
by: java.lang.IllegalArgumentException: Multiple SSLHostConfig elements
were provided for the host name [_default_]. Host names must be unique."
has me stumped as I have only the one uncommented SSLHostConfig in
server.xml.

(Once I have this second  working, I must make a write-up for
folks here, a write-up which I hope will be clearer and more direct than
the docs. I would be happy to offer that write-up to the wiki or docs.)

05-Apr-2016 15:32:42.642 SEVERE [main]
org.apache.tomcat.util.digester.Digester.endElement End event threw
exception
 java.lang.reflect.InvocationTargetException
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:498)
at
org.apache.tomcat.util.IntrospectionUtils.callMethod1(IntrospectionUtils.java:377)
at org.apache.tomcat.util.digester.SetNextRule.end(SetNextRule.java:145)
at org.apache.tomcat.util.digester.Digester.endElement(Digester.java:966)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:609)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1783)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2970)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
at
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643)
at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1461)
at org.apache.catalina.startup.Catalina.load(Catalina.java:578)
at org.apache.catalina.startup.Catalina.load(Catalina.java:629)
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:498)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:311)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:494)
Caused by: java.lang.IllegalArgumentException: Multiple SSLHostConfig
elements were provided for the host name [_default_]. Host names must be
unique.
at
org.apache.tomcat.util.net.AbstractEndpoint.addSslHostConfig(AbstractEndpoint.java:201)
at
org.apache.coyote.http11.AbstractHttp11Protocol.addSslHostConfig(AbstractHttp11Protocol.java:398)
at
org.apache.catalina.connector.Connector.addSslHostConfig(Connector.java:876)
... 26 more


-- 
"Hell hath no limits, nor is circumscrib'd In one self-place; but where we
are is hell, And where hell is, there must we ever be" --Christopher
Marlowe, *Doctor Faustus* (v. 121-24)


Re: Tomcat shutdown process

2016-04-05 Thread Mark Thomas
On 05/04/2016 20:54, Vinicius Carvalho wrote:
> Hi there, I googled this one around, but I found a big mix on exactly how
> tomcat operates when a shutdown is initiated. What happens when a shutdown
> is started in regards to:
> 
> - Requests that are currently being processed (if a request is waiting on
> an external resource such as a jdbc connection), does the container wait
> for all responses to be committed or it will eventually kill any pending
> request?

Requests are given a configurable time to complete (default is 10s as
far as I recall) and then Tomcat stops anyway.

> - New requests that arrive after the shutdown. Does the container stop
> accepting them?

No new requests are accepted.

Mark


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



Tomcat shutdown process

2016-04-05 Thread Vinicius Carvalho
Hi there, I googled this one around, but I found a big mix on exactly how
tomcat operates when a shutdown is initiated. What happens when a shutdown
is started in regards to:

- Requests that are currently being processed (if a request is waiting on
an external resource such as a jdbc connection), does the container wait
for all responses to be committed or it will eventually kill any pending
request?
- New requests that arrive after the shutdown. Does the container stop
accepting them?

Regards


Re: Tomcat 9.0.0M4 (and trunk) issue with Websockets (bug?)

2016-04-05 Thread Mark Thomas
On 04/04/2016 18:01, Francesco Bassi wrote:
> Hello everybody.
> 
> Tomcat 9 has a different behaviour than Tomcat 8, during the management of
> MessageHandler.onMessage:
> 
> - in Tomcat 8:
>   Thread.currentThread().getContextClassLoader() returns an instance of
> org.apache.catalina.loader.WebappClassLoader
> 
> - in Tomcat 9
>   Thread.currentThread().getContextClassLoader() returns an instance of
> java.net.URLClassLoader
>   (which doesn't resolve the WEB-INF/lib/* classes)
> 
> It seems to be related to the switch to ParallelWebappClassLoader.
> Is it a bug or and intended behaviour?

It looks like a bug. I need to dig deeper to figure out the root cause.

Mark


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



Re: Tomcat 8.0.X - findService("Catalina").getContainer() deprecated. How to retrieve StandardEngine

2016-04-05 Thread Mark Thomas
On 05/04/2016 18:30, Mariano López wrote:
> Hi all, I'm working with Tomcat 8.0.32 after migrating from 7.0.X.
> 
> When I want to get the host object in Tomcat 7 I did:
> 
>MBeanServer mBeanServer =
> MBeanServerFactory.findMBeanServer(null).get(0);
> ObjectName catalinaNombre = null;
> try {
> catalinaNombre = new ObjectName("Catalina","type","Server");
> servidorTomcat = (Server) mBeanServer.getAttribute(
> catalinaNombre, "managedResource");
>StandardEngine engineTomcat = (StandardEngine)
> servidorTomcat.findService("Catalina").getContainer();
>hostTomcat = (Host) engineTomcat.findChild( "localhost" );
> }
> ...
> 
> Now findService("Catalina").getContainer() is deprecated and don't know how
> to do it.
> 
> Nothing found after long search about this.
> 
> Could anybody help me please ?

You don't need to change anything. Look at the Javadocs for an
explanation of the deprecation.

Mark


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



Tomcat 8.0.X - findService("Catalina").getContainer() deprecated. How to retrieve StandardEngine

2016-04-05 Thread Mariano López
Hi all, I'm working with Tomcat 8.0.32 after migrating from 7.0.X.

When I want to get the host object in Tomcat 7 I did:

   MBeanServer mBeanServer =
MBeanServerFactory.findMBeanServer(null).get(0);
ObjectName catalinaNombre = null;
try {
catalinaNombre = new ObjectName("Catalina","type","Server");
servidorTomcat = (Server) mBeanServer.getAttribute(
catalinaNombre, "managedResource");
   StandardEngine engineTomcat = (StandardEngine)
servidorTomcat.findService("Catalina").getContainer();
   hostTomcat = (Host) engineTomcat.findChild( "localhost" );
}
...

Now findService("Catalina").getContainer() is deprecated and don't know how
to do it.

Nothing found after long search about this.

Could anybody help me please ?

Regards,

Mriano


Re: Apache Tomcat 9.0.0-M4 and http/2 on Mac OS X 10.11.4

2016-04-05 Thread Tobias Soloschenko
I missed to answer some of the other questions:

1. I start tomcat with the startup.sh
2. The files in the ../1.5.2/libexec/lib can be derived from the ln -s commands 
(see below)
3. TCNATIVE_PRIV_INCLUDES is default I didn't changed here anything.
4. I posted a step by step guide - I think if I run configure with the args 
"--prefix=" the native libraries are placed into the lib folder.

kind regards

Tobias

> Am 05.04.2016 um 05:00 schrieb Christopher Schultz 
> :
> 
> Tobias,
> 
>> On 4/4/16 4:49 AM, Tobias Soloschenko wrote:
>> I just figured out that this issue might depend on the file names of APR
>> 1.5.2 - if I create links in the lib folder that reflects the names of
>> 1.4.8 - tomcat throws an exception that the version of APR can not be
>> resolved:
>> 
>> ln -s libapr-1.0.dylib libtcnative-1.0.dylib
>> 
>> ln -s libapr-1.a libtcnative-1.a
>> 
>> ln -s libapr-1.dylib libtcnative-1.dylib
>> 
>> ln -s libapr-1.la libtcnative-1.la
>> 
>> 
>> Exception:
>> 
>> 04-Apr-2016 10:42:39.579 WARNING [main]
>> org.apache.catalina.core.AprLifecycleListener.init The APR based Apache
>> Tomcat Native library failed to load. The error reported was
>> [org.apache.tomcat.jni.Library.version(I)I]
> 
> That wasn't going to work.
> 
> APR and tcnative are different libraries. Copying one to the other is
> about as useful as trying to load your /etc/passwd file as a shared library.
> 
> When you set JAVA_OPTS:
> 
>> "export
>> JAVA_OPTS=-Djava.library.path=/usr/local/Cellar/apr/1.5.2/libexec/lib"
>> 
>> but Tomcat can not find it at this location.
> 
> How did you start Tomcat after that? What files are in
> .../1.5.2/libexec/lib? What is in your "TCNATIVE_PRIV_INCLUDES"
> directory? Where do you configure that for loading into Tomcat?
> 
> -chris
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 

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



Re: Tomcat 8.5 documentation question

2016-04-05 Thread Thad Humphries
On Tue, Apr 5, 2016 at 2:53 AM, Mark Thomas  wrote:

> On 04/04/2016 23:10, Thad Humphries wrote:
> > In docs/config/http.xml, lines #1430 and #1648 use
> "certificateValidation".
> > However when I go to "#SSL_Support_-_SSLHostConfig" I find the attribute
> > "certificateVerification", *not *"certificate*Validation*".  I think one
> or
> > the other is an error (and I think "certificateVerification" is the
> correct
> > attribute based on the "certificateVerificationDepth" attribute name).
>
> Thanks for pointing that out.
>
> I've fixed this for 9.0.x and 8.5.x and it will be included in the next
> release of both.
>
> For the record, certificateVerification was the correct one.
>
> Mark
>

You're welcome. I would have put it in a pull request, but I was unsure
which was which.

-- 
"Hell hath no limits, nor is circumscrib'd In one self-place; but where we
are is hell, And where hell is, there must we ever be" --Christopher
Marlowe, *Doctor Faustus* (v. 121-24)


Re: Apache Tomcat 9.0.0-M4 and http/2 on Mac OS X 10.11.4

2016-04-05 Thread Tobias Soloschenko
Hi

> Am 05.04.2016 um 05:00 schrieb Christopher Schultz 
> :
> 
> Tobias,
> 
>> On 4/4/16 4:49 AM, Tobias Soloschenko wrote:
>> I just figured out that this issue might depend on the file names of APR
>> 1.5.2 - if I create links in the lib folder that reflects the names of
>> 1.4.8 - tomcat throws an exception that the version of APR can not be
>> resolved:
>> 
>> ln -s libapr-1.0.dylib libtcnative-1.0.dylib
>> 
>> ln -s libapr-1.a libtcnative-1.a
>> 
>> ln -s libapr-1.dylib libtcnative-1.dylib
>> 
>> ln -s libapr-1.la libtcnative-1.la
>> 
>> 
>> Exception:
>> 
>> 04-Apr-2016 10:42:39.579 WARNING [main]
>> org.apache.catalina.core.AprLifecycleListener.init The APR based Apache
>> Tomcat Native library failed to load. The error reported was
>> [org.apache.tomcat.jni.Library.version(I)I]
> 
> That wasn't going to work.
> 
> APR and tcnative are different libraries. Copying one to the other is
> about as useful as trying to load your /etc/passwd file as a shared library.

I don't mix the libraries. I had a look into the apr version installed by 
default /usr/local/apr/lib (1.4.8) and the files in that directory are named 
that way - so I linked those of APR 1.5.8 the same - then tomcat greps them up 
and try to find the version which causes the exception.

> 
> When you set JAVA_OPTS:
> 
>> "export
>> JAVA_OPTS=-Djava.library.path=/usr/local/Cellar/apr/1.5.2/libexec/lib"
>> 
>> but Tomcat can not find it at this location.
> 
> How did you start Tomcat after that? What files are in
> .../1.5.2/libexec/lib? What is in your "TCNATIVE_PRIV_INCLUDES"
> directory? Where do you configure that for loading into Tomcat?
> 

As you can see in my first post (the log extract) tomcat uses the folder as 
expected, because when I switch to /usr/local/apr/lib it takes 1.4.8 - but this 
does not work for 1.5.2. 

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

kind regards

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



Re: Exception Both the UrlPattern and value attribute were set for the WebServlet annotation on class ...

2016-04-05 Thread Violeta Georgieva
2016-04-05 9:10 GMT+03:00 basilk :
>
> Hi.
>
> Thanks for the answer.  But i didn't quite catch, what i should do?
> Eclipse refused to start Tomcat. I don't have any annotations i my
application.
>

Check the settings for the project. In Eclipse the web app is executed
directly from the project so it may appear that you linked some additional
sources.

Regards,
Violeta

> Basil.
>
>
> From: Violeta Georgieva
> Sent: Monday, April 04, 2016 10:30 AM
> To: Tomcat Users List
> Subject: Re: Exception Both the UrlPattern and value attribute were set
for the WebServlet annotation on class ...
>
>
> Hi,
>
> 2016-04-04 9:53 GMT+03:00 basilk :
>>
>>
>> Hi.
>>
>> I try to start tomcat 8.0.33 in debug mode under Eclipse Mars.2.
>> I get the following errors:
>>
>> SEVERE: A child container failed during start
>> java.util.concurrent.ExecutionException:
>
> org.apache.catalina.LifecycleException: Failed to start component
>
[StandardEngine[Catalina].StandardHost[localhost].StandardContext[/isogdquery]]
>>
>> at java.util.concurrent.FutureTask.report(FutureTask.java:122)
>> at java.util.concurrent.FutureTask.get(FutureTask.java:192)
>> at
>
>
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:916)
>>
>> at
>
> org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:871)
>>
>> at
>
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
>>
>> at
>
>
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)
>>
>> at
>
>
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)
>>
>> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>> at
>
>
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>>
>> at
>
>
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>>
>> at java.lang.Thread.run(Thread.java:745)
>> Caused by: org.apache.catalina.LifecycleException: Failed to start
>
> component
>
[StandardEngine[Catalina].StandardHost[localhost].StandardContext[/isogdquery]]
>>
>> at
>
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:153)
>>
>> ... 6 more
>> Caused by: java.lang.IllegalArgumentException: Both the UrlPattern and
>
> value attribute were set for the WebServlet annotation on class
> [test.org.apache.catalina.startup.DuplicateMappingParamFilter]
>>
>> at
>
>
org.apache.catalina.startup.ContextConfig.processAnnotationWebFilter(ContextConfig.java:2426)
>>
>> at
>
>
org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2057)
>>
>> at
>
>
org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:1940)
>>
>> at
>
>
org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:1934)
>>
>> at
>
>
org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:1934)
>>
>> at
>
>
org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:1934)
>>
>> at
>
>
org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:1934)
>>
>> at
>
>
org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:1934)
>>
>> at
>
>
org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1147)
>>
>> at
>
>
org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:779)
>>
>> at
>
>
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:306)
>>
>> at
>
>
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:95)
>>
>> at
>
>
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
>>
>> at
>
>
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5150)
>>
>> at
>
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
>>
>> ... 6 more
>
>
> This exception means that the filter with
> class test.org.apache.catalina.startup.DuplicateMappingParamFilter has
> wrong annotation i.e. the @WebFilter annotation is used with both "value"
> and "urlPatterns" which is wrong.
> If this filter is the one from Tomcat tests sources it is stated clearly
in
> the javadoc that this class is used for testing wrong annotations.
>
> About the message itself, it needs some rewording because the problem is
> not with @WebServlet but with @WebFilter.
> I'll fix that.
>
> Regards,
> Violeta
>
>
>> When i start tomcat as service in Windows everything is ok.
>>
>> What seems to be a problem?
>>
>> Thank you.
>>
>> Basil.
>>
>>
>>
>> ---
>> Это сообщение проверено на вирусы антивирусом Avast.
>> https://www.avast.com/antivirus
>
>
>
> ---
> Это сообщение проверено на вирусы антивирусом Avast.
> https://www.avast.com/antivirus
>
>
> -
> To unsubscribe, e-mail: users-unsubscr