Re: new module-info.class & tomcat-embed-programmatic.jar in 9.0.38 embed distribution.

2020-10-07 Thread marc . davenport

On 10/7/20 2:50 PM, Mark Thomas wrote:

On 07/10/2020 19:47, marc.davenp...@oracle.com wrote:

On 10/7/20 1:51 PM, Mark Thomas wrote:

On 07/10/2020 18:29, marc.davenp...@oracle.com wrote:

I'm doing a simple upgrade from 9.0.35 to 9.0.38 embed. I notice some
significant changes that I don't see listed in the changelog.

There are covered by the entry for bug 64540.

Ah, thank you for the clarification. I didn't understand the
implications of that note.


The annotations-api.jar module-info is using the java namespace?

open module java.annotation {
  requires java.base;

  exports javax.annotation;
  exports javax.annotation.security;
  exports javax.annotation.sql;
}




Until 9.0.37 tomcat-embed-core.jar did not have a module-info. Now in
9.0.38 it does.  This changes the modules I need to require when using
it. This may be the right way to be doing thing all along, but it does
feel like a significant change and not a simple upgrade with a version
bump.

There is also a new tomcat-embed-programmatic.jar in the
apache-tomcat-9.0.38-embed.zip distribution but it does not seem to be
available alone in maven central:
https://urldefense.com/v3/__https://mvnrepository.com/artifact/org.apache.tomcat.embed__;!!GqivPVa7Brio!Mrj4iTWd6AiGf5VPU0EyhkGtFSZfsmaM_UC7lBc_eDHuZc2GpP9iUTE2VAucYNb_A5U$


I suspect the new JAR was added to the main build script but not the
script that does the Maven upload.

That should be something we can fix for the November release round.

What is the intention for this new jar?

I believe it is intended for use in environments (Graal) where you don't
want to use reflection (i.e. standard XML configuration files) to
configure Tomcat.

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



JARS missing TLD

2020-10-07 Thread Raivo Rebane

Hello

How to add JARS missing TLD to tomcat classpath ?

Regards

Raivo



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



Re: new module-info.class & tomcat-embed-programmatic.jar in 9.0.38 embed distribution.

2020-10-07 Thread Mark Thomas
On 07/10/2020 19:47, marc.davenp...@oracle.com wrote:
> 
> On 10/7/20 1:51 PM, Mark Thomas wrote:
>>
>> On 07/10/2020 18:29, marc.davenp...@oracle.com wrote:
>>> I'm doing a simple upgrade from 9.0.35 to 9.0.38 embed. I notice some
>>> significant changes that I don't see listed in the changelog.
>> There are covered by the entry for bug 64540.
> 
> Ah, thank you for the clarification. I didn't understand the
> implications of that note.
> 
>>
>>> Until 9.0.37 tomcat-embed-core.jar did not have a module-info. Now in
>>> 9.0.38 it does.  This changes the modules I need to require when using
>>> it. This may be the right way to be doing thing all along, but it does
>>> feel like a significant change and not a simple upgrade with a version
>>> bump.
>>>
>>> There is also a new tomcat-embed-programmatic.jar in the
>>> apache-tomcat-9.0.38-embed.zip distribution but it does not seem to be
>>> available alone in maven central:
>>> https://urldefense.com/v3/__https://mvnrepository.com/artifact/org.apache.tomcat.embed__;!!GqivPVa7Brio!Mrj4iTWd6AiGf5VPU0EyhkGtFSZfsmaM_UC7lBc_eDHuZc2GpP9iUTE2VAucYNb_A5U$
>>>
>> I suspect the new JAR was added to the main build script but not the
>> script that does the Maven upload.
>>
>> That should be something we can fix for the November release round.
> 
> What is the intention for this new jar?

I believe it is intended for use in environments (Graal) where you don't
want to use reflection (i.e. standard XML configuration files) to
configure Tomcat.

Mark

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



Re: new module-info.class & tomcat-embed-programmatic.jar in 9.0.38 embed distribution.

2020-10-07 Thread marc . davenport



On 10/7/20 1:51 PM, Mark Thomas wrote:


On 07/10/2020 18:29, marc.davenp...@oracle.com wrote:

I'm doing a simple upgrade from 9.0.35 to 9.0.38 embed. I notice some
significant changes that I don't see listed in the changelog.

There are covered by the entry for bug 64540.


Ah, thank you for the clarification. I didn't understand the 
implications of that note.





Until 9.0.37 tomcat-embed-core.jar did not have a module-info. Now in
9.0.38 it does.  This changes the modules I need to require when using
it. This may be the right way to be doing thing all along, but it does
feel like a significant change and not a simple upgrade with a version
bump.

There is also a new tomcat-embed-programmatic.jar in the
apache-tomcat-9.0.38-embed.zip distribution but it does not seem to be
available alone in maven central:
https://urldefense.com/v3/__https://mvnrepository.com/artifact/org.apache.tomcat.embed__;!!GqivPVa7Brio!Mrj4iTWd6AiGf5VPU0EyhkGtFSZfsmaM_UC7lBc_eDHuZc2GpP9iUTE2VAucYNb_A5U$

I suspect the new JAR was added to the main build script but not the
script that does the Maven upload.

That should be something we can fix for the November release round.


What is the intention for this new jar?




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



At least one JAR was scanned for TLDs yet contained no TLDs.

2020-10-07 Thread Raivo Rebane

Hello

If I start Tomcat9 I got following:

[main] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR 
was scanned for TLDs yet contained no TLDs. Enable debug logging for 
this logger for a complete list of JARs that were scanned but no TLDs 
were found in them.


 I would like to know which JARS is mentioned

I add following lines to catalina.properies:

org.apache.jasper.compiler.TldLocationsCache.level = ALL
org.apache.jasper.servlet.TldScanner.level = ALL

But I dont have list of these JARS

And how to add these JARS to classpath anyway ?

Regards

Raivo




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



Re: new module-info.class & tomcat-embed-programmatic.jar in 9.0.38 embed distribution.

2020-10-07 Thread Mark Thomas



On 07/10/2020 18:29, marc.davenp...@oracle.com wrote:
> I'm doing a simple upgrade from 9.0.35 to 9.0.38 embed. I notice some
> significant changes that I don't see listed in the changelog.

There are covered by the entry for bug 64540.

> Until 9.0.37 tomcat-embed-core.jar did not have a module-info. Now in
> 9.0.38 it does.  This changes the modules I need to require when using
> it. This may be the right way to be doing thing all along, but it does
> feel like a significant change and not a simple upgrade with a version
> bump.
> 
> There is also a new tomcat-embed-programmatic.jar in the
> apache-tomcat-9.0.38-embed.zip distribution but it does not seem to be
> available alone in maven central:
> https://mvnrepository.com/artifact/org.apache.tomcat.embed

I suspect the new JAR was added to the main build script but not the
script that does the Maven upload.

That should be something we can fix for the November release round.

Mark

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



new module-info.class & tomcat-embed-programmatic.jar in 9.0.38 embed distribution.

2020-10-07 Thread marc . davenport
I'm doing a simple upgrade from 9.0.35 to 9.0.38 embed. I notice some 
significant changes that I don't see listed in the changelog.


Until 9.0.37 tomcat-embed-core.jar did not have a module-info. Now in 
9.0.38 it does.  This changes the modules I need to require when using 
it. This may be the right way to be doing thing all along, but it does 
feel like a significant change and not a simple upgrade with a version bump.


There is also a new tomcat-embed-programmatic.jar in the 
apache-tomcat-9.0.38-embed.zip distribution but it does not seem to be 
available alone in maven central: 
https://mvnrepository.com/artifact/org.apache.tomcat.embed



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



Re: completely automated (for real) Let's Encrypt on embedded Tomcat

2020-10-07 Thread Garret Wilson
As always thanks for the discussion, Chris. More replies and a new idea 
below:


On 10/6/2020 2:45 PM, Christopher Schultz wrote:

…
What if your Docker container would just run certbot on launch?


But then I'm back to being a sysadmin, because the Docker container is 
like a little OS and I have to set up the OS, update it, install certbot 
if needed (based on the OS version!), ensure it's the certbot that has 
the bugfixes I want and behaves as I expect, install Tomcat on the OS, 
etc. I have to set up certbot with systemd or or whatever to run 
periodically. All that stuff goes into my Dockerfile. So I'm really 
doing the same thing as I would on a VM, except that Docker makes it 
easier to reproduce. But it's conceptually not much different than being 
sysadmin on a VM, then freezing the VM and duplicating that.




If you build the keystore in-memory, I'm not exactly sure what you'd
need to do in order to get Tomcat to bounce the SSLSocketFactory in that
way.


OK, I'll look into it. But it boggles my mind that an SSLSocketFactory 
would have a harder time using actual bytes of a certificate than it 
would loading it from disk. Because once it loads it from disk, it has 
the bytes in memory, no? So the only problem would be the API—whether it 
was built to unnecessarily require disk storage, or if it allows a 
"hook" to provide the bytes at the point in the logic between 
loading-from-disk and using-the-cert.





I have no idea what a PEM-encoded DER file is, but I'll certainly learn.

This:

-BEGIN CERTIFICATE-
stuff
-END CERTIFICATE-

Ooh, that stuff. Yeah, I've definitely used that. I just never knew what 
it was. I never really got into the deep murky depths of certificates, 
but I guess now I'll have, seeing as that no one else in the last 20 
years has really made this easy.



I still don't get why files have to be involved. I pulled a DER file
from S3.

Sorry. I think of that as a "file".


Ah, there's an important distinction to be made here. As developers we 
often say "file" when we talk about a bunch of bytes that has some 
coherent format — a JPEG file, an Ogg Vorbis file, a JSON file. But (and 
the specs only really started making this clear around the time XML 
became a spec, as least as far as I know) from another view it's only a 
file if it's stored in a file system. (I'll explain why below.) So 
really we can talk about an "XML document", for example, that may never 
be stored in a file — we may construct an XML DOM tree completely in 
memory and pass it to some other method.




So your web server is S3.


Ah, no!

S3 is a database. It could be PostgreSQL or Cassandra. It's a data 
store. In particular it's a key-value store. It stores things. It has a 
feature that allows you to set a configuration so that some web server 
will automatically serve the BLOBs from the S3 data store, along with 
some metadata. But is the web server "part of" S3? I'll bet not. Surely 
there is some pool of workers that pull data from the S3 data store and 
serves the data. I could probably write my own web server to do the same 
thing. But AWS makes it transparent; it's part of the infrastucture. I 
just provide the data and declaratively tell it what I want served. Then 
it is served. I don't have to configure a server. There is some server 
in the cloud.


But there's actually another step! Since I'm serving the site via 
CloudFront, the CloudFront layer (servers around the world in different 
countries!) actually connects to the web site serving the S3 data and 
/copies it to CloudFront/! So my data is actually being served to the 
end user by some CloudFront server, in some country closest to the user. 
Is this Tomcat? Is it NGINX? Is it Apache? I don't know. Do I care what 
it is? No. In fact, I'd rather not know, because I want to configure the 
distribution and serving /independent from any server implementation/.


So my web server is something on some CloudFront deployment in some 
country. For all I know different CloudFront local deployments use 
different server types. I don't know and I don't care.




ELB ~= CloudFront, right?


Sort of. It is equivalent in that 1) it is the direct endpoint 
connection with the user, and 2) I can configure it to use the AWS 
managed certificates.




If CloudFront handles your SSL for you, why
not let ELB do it for you in this context?



That's what I'm doing now! And that's what I would prefer doing. And 
that's what I would need to do for a large application!


But the problem (going back to the motivation for all this) is that the 
ELB costs a lot of money. I don't absolutely need an ELB for a small app 
that I'm testing, or an app that will have 10 users, or an app that I 
don't care that crashes and immediately gets restarted. Why should I pay 
$16 or more per month for an ELB if I don't need it? When I have five 
little apps I want to deploy?


Think about the thousands of little apps people want to deploy around 
the world. Is 

Static context from server.xml no longer working after upgrade to tomcat 9.0.37

2020-10-07 Thread Haddix, Linda
We are in the process of upgrading from Tomcat 8.0.36 to Tomcat 9.0.37 for the 
samesite cookie issue.  We found very few differences in the version except for
a context (static)  in server.xml for static content now gives a 404 in tomcat. 
 I have checked the logs and it is getting past apache 2.4 to tomcat.
I have tried adding crossContext="true" to all applications including static 
but it did not help.

The only change made to server.xml is secretRequired="false"


I have seen a number of posts where other people have the same issue but I have 
not found any replies to the question.


Tomcat logs
172.24.30.28 - - [07/Oct/2020:09:59:13 -0400] "GET 
/static/bp_images/5013678_RH.gif HTTP/1.1" 404 790
172.24.30.28 - - [07/Oct/2020:09:59:13 -0400] "GET 
/static/bp_images/5013682_RH.gif HTTP/1.1" 404 790
172.24.30.28 - - [07/Oct/2020:09:59:13 -0400] "GET 
/static/bp_images/5013936_RH.gif HTTP/1.1" 404 790


From server.xml

 














[cid:image001.jpg@01D2D558.FDC218C0]

Linda Haddix
Senior Developer
Blue Bird Corporation
3920 Arkwright Road, Suite 200, Macon, GA 31210
Phone 478.822.2327 | Cell 478.737.8567
linda.had...@blue-bird.com





This e-mail transmission, including any attachments, contains information of 
Blue Bird Corporation and may be confidential, proprietary, copyrighted and/or 
legally privileged. This electronic transmission is for the sole and exclusive 
use of the named individual or entity to which it is directed and may not be 
transmitted to or received by anyone other than the named addressee (or a 
person authorized to deliver it to the named addressee). Access to this email 
by anyone else is unauthorized. If you are not an intended recipient, you must 
not read, use or disseminate the information contained in the email. If you 
have received this message in error, please immediately return this by e-mail 
and delete it.
Any views expressed in this transmission are those of the individual sender and 
not the Company, unless the sender is an authorized agent of Blue Bird 
Corporation and is expressly speaking on its behalf.



Re: VersionLoggerListener

2020-10-07 Thread Martin Grigorov
On Wed, Oct 7, 2020 at 2:19 PM Raivo Rebane  wrote:

> Hello
>
> I removed  org.apache.catalina.startup.VersionLoggerListener
>
> but I got following error:
>
> java.lang.NoSuchMethodError: 'org.apache.catalina.Engine
> org.apache.catalina.Service.getContainer()'
>

I'd recommend you to download a new .zip/.tgz, or re-install Tomcat.

Martin


> Regards
>
> Raivo
>
> On 07.10.20 14:01, Martin Grigorov wrote:
> > Hi,
> >
> > On Wed, Oct 7, 2020 at 1:51 PM Raivo Rebane  wrote:
> >
> >> Hello
> >>
> >> My tomcat9 don't starts and gives error:
> >>
> >>java.lang.ClassNotFoundException:
> >> org.apache.catalina.startup.VersionLoggerListener
> >>
> >> How to resolve this problem ?
> >>
> > Download Tomcat again. Your installation must be corrupted somehow.
> > Or remove org.apache.catalina.startup.VersionLoggerListener from
> > conf/server.xml
> >
> >
> >> Regards
> >>
> >> Raivo
> >>
> >>
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> >> For additional commands, e-mail: users-h...@tomcat.apache.org
> >>
> >>
>


Re: VersionLoggerListener

2020-10-07 Thread Raivo Rebane

Hello

I removed  org.apache.catalina.startup.VersionLoggerListener

but I got following error:

java.lang.NoSuchMethodError: 'org.apache.catalina.Engine 
org.apache.catalina.Service.getContainer()'


Regards

Raivo

On 07.10.20 14:01, Martin Grigorov wrote:

Hi,

On Wed, Oct 7, 2020 at 1:51 PM Raivo Rebane  wrote:


Hello

My tomcat9 don't starts and gives error:

   java.lang.ClassNotFoundException:
org.apache.catalina.startup.VersionLoggerListener

How to resolve this problem ?


Download Tomcat again. Your installation must be corrupted somehow.
Or remove org.apache.catalina.startup.VersionLoggerListener from
conf/server.xml



Regards

Raivo



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

2020-10-07 Thread Martin Grigorov
Hi,

On Wed, Oct 7, 2020 at 1:51 PM Raivo Rebane  wrote:

> Hello
>
> My tomcat9 don't starts and gives error:
>
>   java.lang.ClassNotFoundException:
> org.apache.catalina.startup.VersionLoggerListener
>
> How to resolve this problem ?
>

Download Tomcat again. Your installation must be corrupted somehow.
Or remove org.apache.catalina.startup.VersionLoggerListener from
conf/server.xml


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


VersionLoggerListener

2020-10-07 Thread Raivo Rebane

Hello

My tomcat9 don't starts and gives error:

 java.lang.ClassNotFoundException: 
org.apache.catalina.startup.VersionLoggerListener


How to resolve this problem ?

Regards

Raivo



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