Re: Tomcat 10.x over 9.x

2024-07-12 Thread Rémy Maucherat
On Fri, Jul 12, 2024 at 1:04 PM Dimitris Soumis  wrote:
>
> Hello,
>
> Regarding the end-of-life date for Tomcat 9.0.x, you can find the relevant
> information in this link, which contains an email from the mailing list: End
> of Lifecycle for Tomcat 9.0.x
> .
>
> As for the necessity of upgrading to Tomcat 10.1.x from 9.0.x, please note
> that there are no immediate security concerns, as Tomcat 9 continues to
> receive all necessary fixes for new CVEs. However, upgrading to Tomcat
> 10.1.x allows you to take advantage of the latest standards and APIs with
> Jakarta EE 10 specification support. This can be beneficial for staying
> up-to-date with current technologies and potentially improving performance
> and compatibility with other modern applications and frameworks.

Most likely some users will never be able to migrate to jakarta.*. We
know it, so the Tomcat 9.x EOL is a long time away. Maybe 10.1 gets
EOLed before since there's no incentive for not EOLing this one
according to the usual schedule.

I just ported the OpenSSL FFM support to 9.0, which was a big missing
feature compared to 10.1 and 11. This sort of porting likely extends
the usefulness of 9.0. Also keeping branches closer helps long term
maintenance.

As for 9.12 (.x is supposed to match the corresponding major version;
since we do not need a .x now, it means it's not going to be .10, and
.11 seems unlikely as well since we are likely ok for the next 2-3
years), the rationale would be:
- Drop the APR connector.
- Bump the base Java version to at least 17 (likely 21 or 25). The
Java 8 release target is a long term problem since it looks like Java
25 will not have it (Java 22 has now started showing removal
warnings). Developers will thus have to use Java 21 to build Tomcat
9.0. The flexibility of Ant seems to allow navigating everything
relatively easily however.
- Bump dependencies. Thankfully no runtime related dependencies that
we cannot maintain ourselves so this is likely not critical.
- Sync APIs with the corresponding .x to ease maintenance. Most likely
this last one would cause issues.

At this point 9.12 does not look inevitable to me. We'll see !

Rémy

> Best regards,
>
> Dimitris
>
> On Fri, Jul 12, 2024 at 1:41 PM Sai Charan Teja Pratti
>  wrote:
>
> > Hi,
> >
> > Can you please share the end of lifecycle date for tomcat 9.x.
> > Also, please share the necessity of upgrading tomcat to 10.1.x from 9.x
> >
> > Thanks,
> > Sai
> >
> > This electronic communication and the information and any files
> > transmitted with it, or attached to it, are confidential and are intended
> > solely for the use of the individual or entity to whom it is addressed and
> > may contain information that is confidential, legally privileged, protected
> > by privacy laws, or otherwise restricted from disclosure to anyone else. If
> > you are not the intended recipient or the person responsible for delivering
> > the e-mail to the intended recipient, you are hereby notified that any use,
> > copying, distributing, dissemination, forwarding, printing, or copying of
> > this e-mail is strictly prohibited. If you received this e-mail in error,
> > please return the e-mail to the sender, delete it from your computer, and
> > destroy any printed copy of it.

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



Re: Tomcat 10.x over 9.x

2024-07-12 Thread Dimitris Soumis
Hello,

Regarding the end-of-life date for Tomcat 9.0.x, you can find the relevant
information in this link, which contains an email from the mailing list: End
of Lifecycle for Tomcat 9.0.x
.

As for the necessity of upgrading to Tomcat 10.1.x from 9.0.x, please note
that there are no immediate security concerns, as Tomcat 9 continues to
receive all necessary fixes for new CVEs. However, upgrading to Tomcat
10.1.x allows you to take advantage of the latest standards and APIs with
Jakarta EE 10 specification support. This can be beneficial for staying
up-to-date with current technologies and potentially improving performance
and compatibility with other modern applications and frameworks.

Best regards,

Dimitris

On Fri, Jul 12, 2024 at 1:41 PM Sai Charan Teja Pratti
 wrote:

> Hi,
>
> Can you please share the end of lifecycle date for tomcat 9.x.
> Also, please share the necessity of upgrading tomcat to 10.1.x from 9.x
>
> Thanks,
> Sai
>
> This electronic communication and the information and any files
> transmitted with it, or attached to it, are confidential and are intended
> solely for the use of the individual or entity to whom it is addressed and
> may contain information that is confidential, legally privileged, protected
> by privacy laws, or otherwise restricted from disclosure to anyone else. If
> you are not the intended recipient or the person responsible for delivering
> the e-mail to the intended recipient, you are hereby notified that any use,
> copying, distributing, dissemination, forwarding, printing, or copying of
> this e-mail is strictly prohibited. If you received this e-mail in error,
> please return the e-mail to the sender, delete it from your computer, and
> destroy any printed copy of it.


Re: Tomcat 10.x over 9.x

2024-07-12 Thread i...@flyingfischer.ch

Hi

https://googlethatforyou.com?q=tomcat%20lifecycle

Result: https://endoflife.date/tomcat

Regarding "necessity of upgrading tomcat to 10.1.x from 9.x":

https://tomcat.apache.org/whichversion.html

Specifically:

 * Apache Tomcat 9.x builds on Tomcat 8.0.x and 8.5.x and implements
   the Servlet 4.0, JSP 2.3, EL 3.0, WebSocket 1.1 and JASPIC 1.1
   specifications *(the versions required by Java EE 8 platform)*.
 * Apache Tomcat 10.0.x builds on Tomcat 9.0.x and implements the
   Servlet 5.0, JSP 3.0, EL 4.0, WebSocket 2.0 and Authentication 2.0
   specifications *(the versions required by Jakarta EE 9 platform)*.


Markus


Am 12.07.24 um 12:35 schrieb Sai Charan Teja Pratti:

Hi,

Can you please share the end of lifecycle date for tomcat 9.x.
Also, please share the necessity of upgrading tomcat to 10.1.x from 9.x

Thanks,
Sai

This electronic communication and the information and any files 
transmitted with it, or attached to it, are confidential and are 
intended solely for the use of the individual or entity to whom it is 
addressed and may contain information that is confidential, legally 
privileged, protected by privacy laws, or otherwise restricted from 
disclosure to anyone else. If you are not the intended recipient or 
the person responsible for delivering the e-mail to the intended 
recipient, you are hereby notified that any use, copying, 
distributing, dissemination, forwarding, printing, or copying of this 
e-mail is strictly prohibited. If you received this e-mail in error, 
please return the e-mail to the sender, delete it from your computer, 
and destroy any printed copy of it. 

Tomcat 10.x over 9.x

2024-07-12 Thread Sai Charan Teja Pratti
Hi,

Can you please share the end of lifecycle date for tomcat 9.x.
Also, please share the necessity of upgrading tomcat to 10.1.x from 9.x

Thanks,
Sai

-- 
This electronic communication and the information and any files transmitted 
with it, or attached to it, are confidential and are intended solely for 
the use of the individual or entity to whom it is addressed and may contain 
information that is confidential, legally privileged, protected by privacy 
laws, or otherwise restricted from disclosure to anyone else. If you are 
not the intended recipient or the person responsible for delivering the 
e-mail to the intended recipient, you are hereby notified that any use, 
copying, distributing, dissemination, forwarding, printing, or copying of 
this e-mail is strictly prohibited. If you received this e-mail in error, 
please return the e-mail to the sender, delete it from your computer, and 
destroy any printed copy of it.


smime.p7s
Description: S/MIME Cryptographic Signature


Re: Configuration of Certificate Verification on Tomcat 10

2024-06-19 Thread Christopher Schultz

Mark,

On 6/19/24 10:14, Mark Thomas wrote:

On 18/06/2024 23:30, Christopher Schultz wrote:

Izek,

On 6/18/24 13:49, Izek Hornbeck wrote:
I am creating a Java web app (Java v17, 2021-09-14) that runs on a 
Tomcat
10.1.23 server. I need to authenticate users by verifying their 
certificate
from a smart card. (This Stack Overflow question I posted gives some 
good

context: "
https://stackoverflow.com/questions/78387597/what-is-the-standard-modern-way-to-use-cac-piv-card-authentication-in-java-tomca
".)

Through all the research I have done, the best way to solve this is by
using the server configuration in "server.xml". I am very new to Tomcat,
but I will try to explain everything as best as I can.

This authentication must occur after the user has entered their
credentials, so I'm thinking the best way is to redirect the user to 
a new

port (e.g., from 8443 to 8444) with the appropriate settings. And some
users will not be required to authenticate with a smart card 
certificate. I

asked another question on Stack Overflow ("
https://stackoverflow.com/questions/78624062/how-to-get-the-popup-menu-to-select-user-certificate-in-tomcat-10-server";)
that describes more of the things that I have tried specific to the 
server

config.

I added the command "-Djavax.net.debug=ssl" to see more details about 
what

was happening during the SSL handshake; I get the following:
  - javax.net.ssl|ALL|F3|https-jsse-nio-8444-exec-6|2024-06-18 
10:25:02.564

MDT|X509Authentication.java:304|No X.509 cert selected for EC (and also
for EdDSA, RSA, and RSASSA-PSS)
  - javax.net.ssl|ERROR|E3|https-jsse-nio-8444-exec-5|2024-06-18
10:25:02.524 MDT|TransportContext.java:363|Fatal (BAD_CERTIFICATE): 
Empty

client certificate chain
  - javax.net.ssl|ERROR|E2|https-jsse-nio-8443-exec-1|2024-06-18
10:25:02.532 MDT|TransportContext.java:363|Fatal (BAD_CERTIFICATE):
Received fatal alert: bad_certificate

According to some sources (like "
https://stackoverflow.com/a/11803823/1587";) this happens because 
some

certificates have not yet been added to the keystore/truststore. I have
ensured that the test client certificates and the server certificate 
have

been successfully added to the stores.

The two major questions I have are these:
  1) How can I get the popup menu for the user to select their 
certificate
and enter the smart cards pin? (Both to set up their account and for 
later

logins.)
  2) How do I configure my server to accept the clients' certificates?

Let me know what more information would be useful.


Starting from your SO post:

 >  protocol="org.apache.coyote.http11.Http11NioProtocol"
 > port="8444" maxThreads="150" SSLEnabled="true"
 > maxParameterCount="1000" secure="true" scheme="https" >
 >
 >  sslProtocol="TLSv1.2"
 > certificateVerification="true"

You don't actually want certificateVerification="true" here, unless 
you want every single connection to require a certificate to be 
presented. Since you mentioned you need to be able to support "sign 
up" and also first request some other kind of authentication 
(username/password?) and also some resources without client-certs, 
this setting *must* be set to something else.


I suspect you want clientAuth="false" which is counterintuitive, but 
it means that the web application gets to set the policy for if/when 
client certs are requested.


That means that your WEB-INF/web.xml file needs to declare one or more 
web-resource-collection elements as requiring CLIENT-CERT authentication.


I *think* that if you have clientAuth="false" you will get the 
behavior you want, but you are going to have to set up some places in 
your application where client certs are required versus not-required. 
Since you are building a new application and not trying to retrofit an 
old one, this may be relatively easy. Here's my recommendation:


This won't work. You can only have 1 authentication mechanism per web 
application. You might need to split functionality between multiple web 
applications.


Yeah... something sounded not-quite-right as I was writing that.

Izek, you will have to use something like FORM authentication as your 
base-level authentication and then use 
certificateVerification="optional". This will request a certificate from 
the client but not fail if they do not provide one. Then your 
application will have to fetch the certificate from the request and 
perform its own authentication and authorization based on that.


-chris


1. Unauthenticated web-resource-collection

This basically has your login informational resources that never 
require any authentication in order to view. That includes images, 
CSS, etc. No need to define any authentication constraints.


2. Semi-authenticated web-res

Re: Configuration of Certificate Verification on Tomcat 10

2024-06-19 Thread Mark Thomas

On 18/06/2024 23:30, Christopher Schultz wrote:

Izek,

On 6/18/24 13:49, Izek Hornbeck wrote:

I am creating a Java web app (Java v17, 2021-09-14) that runs on a Tomcat
10.1.23 server. I need to authenticate users by verifying their 
certificate

from a smart card. (This Stack Overflow question I posted gives some good
context: "
https://stackoverflow.com/questions/78387597/what-is-the-standard-modern-way-to-use-cac-piv-card-authentication-in-java-tomca
".)

Through all the research I have done, the best way to solve this is by
using the server configuration in "server.xml". I am very new to Tomcat,
but I will try to explain everything as best as I can.

This authentication must occur after the user has entered their
credentials, so I'm thinking the best way is to redirect the user to a 
new

port (e.g., from 8443 to 8444) with the appropriate settings. And some
users will not be required to authenticate with a smart card 
certificate. I

asked another question on Stack Overflow ("
https://stackoverflow.com/questions/78624062/how-to-get-the-popup-menu-to-select-user-certificate-in-tomcat-10-server";)
that describes more of the things that I have tried specific to the 
server

config.

I added the command "-Djavax.net.debug=ssl" to see more details about 
what

was happening during the SSL handshake; I get the following:
  - javax.net.ssl|ALL|F3|https-jsse-nio-8444-exec-6|2024-06-18 
10:25:02.564

MDT|X509Authentication.java:304|No X.509 cert selected for EC (and also
for EdDSA, RSA, and RSASSA-PSS)
  - javax.net.ssl|ERROR|E3|https-jsse-nio-8444-exec-5|2024-06-18
10:25:02.524 MDT|TransportContext.java:363|Fatal (BAD_CERTIFICATE): Empty
client certificate chain
  - javax.net.ssl|ERROR|E2|https-jsse-nio-8443-exec-1|2024-06-18
10:25:02.532 MDT|TransportContext.java:363|Fatal (BAD_CERTIFICATE):
Received fatal alert: bad_certificate

According to some sources (like "
https://stackoverflow.com/a/11803823/1587";) this happens because some
certificates have not yet been added to the keystore/truststore. I have
ensured that the test client certificates and the server certificate have
been successfully added to the stores.

The two major questions I have are these:
  1) How can I get the popup menu for the user to select their 
certificate
and enter the smart cards pin? (Both to set up their account and for 
later

logins.)
  2) How do I configure my server to accept the clients' certificates?

Let me know what more information would be useful.


Starting from your SO post:

 >  protocol="org.apache.coyote.http11.Http11NioProtocol"
 > port="8444" maxThreads="150" SSLEnabled="true"
 > maxParameterCount="1000" secure="true" scheme="https" >
 >
 >  sslProtocol="TLSv1.2"
 > certificateVerification="true"

You don't actually want certificateVerification="true" here, unless you 
want every single connection to require a certificate to be presented. 
Since you mentioned you need to be able to support "sign up" and also 
first request some other kind of authentication (username/password?) and 
also some resources without client-certs, this setting *must* be set to 
something else.


I suspect you want clientAuth="false" which is counterintuitive, but it 
means that the web application gets to set the policy for if/when client 
certs are requested.


That means that your WEB-INF/web.xml file needs to declare one or more 
web-resource-collection elements as requiring CLIENT-CERT authentication.


I *think* that if you have clientAuth="false" you will get the behavior 
you want, but you are going to have to set up some places in your 
application where client certs are required versus not-required. Since 
you are building a new application and not trying to retrofit an old 
one, this may be relatively easy. Here's my recommendation:


This won't work. You can only have 1 authentication mechanism per web 
application. You might need to split functionality between multiple web 
applications.


Mark



1. Unauthenticated web-resource-collection

This basically has your login informational resources that never require 
any authentication in order to view. That includes images, CSS, etc. No 
need to define any authentication constraints.


2. Semi-authenticated web-resource-collection

This is only accessible to users who have successfully logged-in using 
your "easy" criteria such as username+password. Probably also any pages 
you need to display that say "okay, now you need to register your client 
certificate with your account" or whatever.


For this, you must set the user-roles you will allow to view these 
resources. You can use any combination of roles (I recommend "*"), 
because unauthenticated users have no roles. You can probably 

Re: Configuration of Certificate Verification on Tomcat 10

2024-06-18 Thread Christopher Schultz

Izek,

On 6/18/24 13:49, Izek Hornbeck wrote:

I am creating a Java web app (Java v17, 2021-09-14) that runs on a Tomcat
10.1.23 server. I need to authenticate users by verifying their certificate
from a smart card. (This Stack Overflow question I posted gives some good
context: "
https://stackoverflow.com/questions/78387597/what-is-the-standard-modern-way-to-use-cac-piv-card-authentication-in-java-tomca
".)

Through all the research I have done, the best way to solve this is by
using the server configuration in "server.xml". I am very new to Tomcat,
but I will try to explain everything as best as I can.

This authentication must occur after the user has entered their
credentials, so I'm thinking the best way is to redirect the user to a new
port (e.g., from 8443 to 8444) with the appropriate settings. And some
users will not be required to authenticate with a smart card certificate. I
asked another question on Stack Overflow ("
https://stackoverflow.com/questions/78624062/how-to-get-the-popup-menu-to-select-user-certificate-in-tomcat-10-server";)
that describes more of the things that I have tried specific to the server
config.

I added the command "-Djavax.net.debug=ssl" to see more details about what
was happening during the SSL handshake; I get the following:
  - javax.net.ssl|ALL|F3|https-jsse-nio-8444-exec-6|2024-06-18 10:25:02.564
MDT|X509Authentication.java:304|No X.509 cert selected for EC (and also
for EdDSA, RSA, and RSASSA-PSS)
  - javax.net.ssl|ERROR|E3|https-jsse-nio-8444-exec-5|2024-06-18
10:25:02.524 MDT|TransportContext.java:363|Fatal (BAD_CERTIFICATE): Empty
client certificate chain
  - javax.net.ssl|ERROR|E2|https-jsse-nio-8443-exec-1|2024-06-18
10:25:02.532 MDT|TransportContext.java:363|Fatal (BAD_CERTIFICATE):
Received fatal alert: bad_certificate

According to some sources (like "
https://stackoverflow.com/a/11803823/1587";) this happens because some
certificates have not yet been added to the keystore/truststore. I have
ensured that the test client certificates and the server certificate have
been successfully added to the stores.

The two major questions I have are these:
  1) How can I get the popup menu for the user to select their certificate
and enter the smart cards pin? (Both to set up their account and for later
logins.)
  2) How do I configure my server to accept the clients' certificates?

Let me know what more information would be useful.


Starting from your SO post:

>  protocol="org.apache.coyote.http11.Http11NioProtocol"
> port="8444" maxThreads="150" SSLEnabled="true"
> maxParameterCount="1000" secure="true" scheme="https" >
>
>  sslProtocol="TLSv1.2"
> certificateVerification="true"

You don't actually want certificateVerification="true" here, unless you 
want every single connection to require a certificate to be presented. 
Since you mentioned you need to be able to support "sign up" and also 
first request some other kind of authentication (username/password?) and 
also some resources without client-certs, this setting *must* be set to 
something else.


I suspect you want clientAuth="false" which is counterintuitive, but it 
means that the web application gets to set the policy for if/when client 
certs are requested.


That means that your WEB-INF/web.xml file needs to declare one or more 
web-resource-collection elements as requiring CLIENT-CERT authentication.


I *think* that if you have clientAuth="false" you will get the behavior 
you want, but you are going to have to set up some places in your 
application where client certs are required versus not-required. Since 
you are building a new application and not trying to retrofit an old 
one, this may be relatively easy. Here's my recommendation:


1. Unauthenticated web-resource-collection

This basically has your login informational resources that never require 
any authentication in order to view. That includes images, CSS, etc. No 
need to define any authentication constraints.


2. Semi-authenticated web-resource-collection

This is only accessible to users who have successfully logged-in using 
your "easy" criteria such as username+password. Probably also any pages 
you need to display that say "okay, now you need to register your client 
certificate with your account" or whatever.


For this, you must set the user-roles you will allow to view these 
resources. You can use any combination of roles (I recommend "*"), 
because unauthenticated users have no roles. You can probably use "FORM" 
as the authentication type if you are using e.g. username+password.


3. Fully-protected web-resource-collection

These resources are only accessible using a client certificate. After 
registration, or after you

Configuration of Certificate Verification on Tomcat 10

2024-06-18 Thread Izek Hornbeck
I am creating a Java web app (Java v17, 2021-09-14) that runs on a Tomcat
10.1.23 server. I need to authenticate users by verifying their certificate
from a smart card. (This Stack Overflow question I posted gives some good
context: "
https://stackoverflow.com/questions/78387597/what-is-the-standard-modern-way-to-use-cac-piv-card-authentication-in-java-tomca
".)

Through all the research I have done, the best way to solve this is by
using the server configuration in "server.xml". I am very new to Tomcat,
but I will try to explain everything as best as I can.

This authentication must occur after the user has entered their
credentials, so I'm thinking the best way is to redirect the user to a new
port (e.g., from 8443 to 8444) with the appropriate settings. And some
users will not be required to authenticate with a smart card certificate. I
asked another question on Stack Overflow ("
https://stackoverflow.com/questions/78624062/how-to-get-the-popup-menu-to-select-user-certificate-in-tomcat-10-server";)
that describes more of the things that I have tried specific to the server
config.

I added the command "-Djavax.net.debug=ssl" to see more details about what
was happening during the SSL handshake; I get the following:
 - javax.net.ssl|ALL|F3|https-jsse-nio-8444-exec-6|2024-06-18 10:25:02.564
MDT|X509Authentication.java:304|No X.509 cert selected for EC (and also
for EdDSA, RSA, and RSASSA-PSS)
 - javax.net.ssl|ERROR|E3|https-jsse-nio-8444-exec-5|2024-06-18
10:25:02.524 MDT|TransportContext.java:363|Fatal (BAD_CERTIFICATE): Empty
client certificate chain
 - javax.net.ssl|ERROR|E2|https-jsse-nio-8443-exec-1|2024-06-18
10:25:02.532 MDT|TransportContext.java:363|Fatal (BAD_CERTIFICATE):
Received fatal alert: bad_certificate

According to some sources (like "
https://stackoverflow.com/a/11803823/1587";) this happens because some
certificates have not yet been added to the keystore/truststore. I have
ensured that the test client certificates and the server certificate have
been successfully added to the stores.

The two major questions I have are these:
 1) How can I get the popup menu for the user to select their certificate
and enter the smart cards pin? (Both to set up their account and for later
logins.)
 2) How do I configure my server to accept the clients' certificates?

Let me know what more information would be useful.

Thanks,
Izek Hornbeck


RE: [EXT]Re: [EXT]Re: [EXT]Re: Tomcat 10 skipping state transfer. No members active in cluster group

2024-04-23 Thread Rick Noel
Chuck, to get rid of the warnings...

3-Apr-2024 08:30:22.970 WARNING [Tribes-Task-Receiver[station-Channel]-1] 
org.apache.catalina.ha.session.ClusterSessionListener.messageReceived Context 
manager doesn't exist:[##0001]

I moved my  Manager element form the server.xml to the context.xml

 

That got rid of those warnings
But Now cat log shows these new warnings

23-Apr-2024 09:19:16.288 WARNING [Tribes-Task-Receiver[station-Channel]-5] 
org.apache.catalina.ha.session.DeltaManager.deserializeSessions overload 
existing session [729421EC1DD658816E953C9A0DE4267A]

Do I need to configure something different?  Some how allow more 
deserializeSessions?




23-Apr-2024 09:19:16.243 INFO [main] 
org.apache.catalina.ha.session.DeltaManager.startInternal Starting clustering 
manager at [##0001]
23-Apr-2024 09:19:16.246 INFO [main] 
org.apache.catalina.ha.session.DeltaManager.getAllClusterSessions Manager 
[##0001], requesting session state from 
[org.apache.catalina.tribes.membership.MemberImpl[tcp://{192, 168, 47, 
157}:4001,{192, 168, 47, 157},4001, alive=3249463, securePort=-1, UDP Port=-1, 
id={-32 -57 -12 119 64 42 67 56 -69 51 -113 -64 -68 -78 -99 74 }, payload={}, 
command={}, domain={}]]. This operation will timeout if no session state has 
been received within [60] seconds.
23-Apr-2024 09:19:16.250 INFO 
[MessageDispatchInterceptor.MessageDispatchThread[station-Channel]1] 
org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor.report 
ThroughputInterceptor Report[
Tx Msg:1 messages
Sent:0.00 MiB (total)
Sent:0.00 MiB (application)
Time:0.00 seconds
Tx Speed:0.15 MiB/s (total)
Tx Speed:0.15 MiB/s (application)
Error Msg:0
Rx Msg:10 messages
Rx Speed:0.00 MiB/s (since 1st msg)
Received:0.01 MiB]

23-Apr-2024 09:19:16.288 WARNING [Tribes-Task-Receiver[station-Channel]-5] 
org.apache.catalina.ha.session.DeltaManager.deserializeSessions overload 
existing session [729421EC1DD658816E953C9A0DE4267A]
23-Apr-2024 09:19:16.289 WARNING [Tribes-Task-Receiver[station-Channel]-5] 
org.apache.catalina.ha.session.DeltaManager.deserializeSessions overload 
existing session [A2196B2A82F1D0873769053130EA3E7A]
23-Apr-2024 09:19:16.290 WARNING [Tribes-Task-Receiver[station-Channel]-5] 
org.apache.catalina.ha.session.DeltaManager.deserializeSessions overload 
existing session [EDC2F576615781AD8CC138E8D8029EB9]
23-Apr-2024 09:19:16.296 WARNING [Tribes-Task-Receiver[station-Channel]-5] 
org.apache.catalina.ha.session.DeltaManager.deserializeSessions overload 
existing session [12A38E4D987184560911DC3C43A50410]
23-Apr-2024 09:19:16.354 INFO [main] 
org.apache.catalina.ha.session.DeltaManager.waitForSendAllSessions Manager 
[##0001]; session state sent at [4/23/24, 9:19 AM] received in [104] ms.

Rick Noel
Systems Programmer | Westwood One
rn...@westwoodone.com

-Original Message-
From: Rick Noel
Sent: Tuesday, April 23, 2024 8:56 AM
To: Tomcat Users List 
Cc: Voodoo nmulcahy gmail ; Rob Kowald 

Subject: RE: [EXT]Re: [EXT]Re: [EXT]Re: Tomcat 10 skipping state transfer. No 
members active in cluster group

Your suggestion worked Chuck, Thank you!

I now see this in cat log..
23-Apr-2024 08:30:10.969 INFO [Catalina-utility-1] 
org.apache.catalina.ha.tcp.SimpleTcpCluster.memberAdded Replication member 
added:[org.apache.catalina.tribes.membership.MemberImpl[tcp://{192, 168, 47, 
157}:4001,{192, 168, 47, 157},4001, alive=304632, securePort=-1, UDP Port=-1, 
id={-32 -57 -12 119 64 42 67 56 -69 51 -113 -64 -68 -78 -99 74 }, payload={}, 
command={}, domain={}]]


INFO: Starting clustering manager at [##0001] Apr 23, 2024 8:30:46 AM 
org.apache.catalina.ha.session.DeltaManager getAllClusterSessions
INFO: Manager [##0001], requesting session state from 
[org.apache.catalina.tribes.membership.MemberImpl[tcp://{192, 168, 47, 
157}:4001,{192, 168, 47, 157},4001, alive=340143, securePort=-1, UDP Port=-1, 
id={-32 -57 -12 119 64 42 67 56 -69 51 -113 -64 -68 -78 -99 74 }, payload={}, 
command={}, domain={}]]. This operation will timeout if no session state has 
been received within [60] seconds.
23-Apr-2024 08:30:46.492 INFO 
[MessageDispatchInterceptor.MessageDispatchThread[station-Channel]1] 
org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor.report 
ThroughputInterceptor Report[
Tx Msg:1 messages
Sent:0.00 MiB (total)
Sent:0.00 MiB (application)
Time:0.00 seconds
Tx Speed:0.15 MiB/s (total)
Tx Speed:0.15 MiB/s (application)
Error Msg:0
Rx Msg:10 messages
Rx Speed:0.00 MiB/s (since 1st msg)
Received:0.01 MiB]

Apr 23, 2024 8:30:46 AM org.apache.catalina.ha.session.DeltaManager 
waitForSendAllSessions
INFO: Manager [##0001]; session state sent at [4/23/24, 8:30 AM] received in 
[104] ms.


But  could you now explain why I get these new warnings

3-Apr-2024 08:30:22.970 WARNING [Tribes-Task-Receiver[station-Chann

RE: [EXT]Re: [EXT]Re: [EXT]Re: Tomcat 10 skipping state transfer. No members active in cluster group

2024-04-23 Thread Rick Noel
Your suggestion worked Chuck, Thank you!

I now see this in cat log..
23-Apr-2024 08:30:10.969 INFO [Catalina-utility-1] 
org.apache.catalina.ha.tcp.SimpleTcpCluster.memberAdded Replication member 
added:[org.apache.catalina.tribes.membership.MemberImpl[tcp://{192, 168, 47, 
157}:4001,{192, 168, 47, 157},4001, alive=304632, securePort=-1, UDP Port=-1, 
id={-32 -57 -12 119 64 42 67 56 -69 51 -113 -64 -68 -78 -99 74 }, payload={}, 
command={}, domain={}]]


INFO: Starting clustering manager at [##0001]
Apr 23, 2024 8:30:46 AM org.apache.catalina.ha.session.DeltaManager 
getAllClusterSessions
INFO: Manager [##0001], requesting session state from 
[org.apache.catalina.tribes.membership.MemberImpl[tcp://{192, 168, 47, 
157}:4001,{192, 168, 47, 157},4001, alive=340143, securePort=-1, UDP Port=-1, 
id={-32 -57 -12 119 64 42 67 56 -69 51 -113 -64 -68 -78 -99 74 }, payload={}, 
command={}, domain={}]]. This operation will timeout if no session state has 
been received within [60] seconds.
23-Apr-2024 08:30:46.492 INFO 
[MessageDispatchInterceptor.MessageDispatchThread[station-Channel]1] 
org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor.report 
ThroughputInterceptor Report[
Tx Msg:1 messages
Sent:0.00 MiB (total)
Sent:0.00 MiB (application)
Time:0.00 seconds
Tx Speed:0.15 MiB/s (total)
Tx Speed:0.15 MiB/s (application)
Error Msg:0
Rx Msg:10 messages
Rx Speed:0.00 MiB/s (since 1st msg)
Received:0.01 MiB]

Apr 23, 2024 8:30:46 AM org.apache.catalina.ha.session.DeltaManager 
waitForSendAllSessions
INFO: Manager [##0001]; session state sent at [4/23/24, 8:30 AM] received in 
[104] ms.


But  could you now explain why I get these new warnings

3-Apr-2024 08:30:22.970 WARNING [Tribes-Task-Receiver[station-Channel]-1] 
org.apache.catalina.ha.session.ClusterSessionListener.messageReceived Context 
manager doesn't exist:[##0001]
23-Apr-2024 08:30:22.972 WARNING [Tribes-Task-Receiver[station-Channel]-2] 
org.apache.catalina.ha.session.ClusterSessionListener.messageReceived Context 
manager doesn't exist:[##0001]
23-Apr-2024 08:30:32.978 WARNING [Tribes-Task-Receiver[station-Channel]-4] 
org.apache.catalina.ha.session.ClusterSessionListener.messageReceived Context 
manager doesn't exist:[##0001]
23-Apr-2024 08:30:32.980 WARNING [Tribes-Task-Receiver[station-Channel]-3] 
org.apache.catalina.ha.session.ClusterSessionListener.messageReceived Context 
manager doesn't exist:[##0001]
23-Apr-2024 08:30:42.988 WARNING [Tribes-Task-Receiver[station-Channel]-5] 
org.apache.catalina.ha.session.ClusterSessionListener.messageReceived Context 
manager doesn't exist:[##0001]
23-Apr-2024 08:30:42.990 WARNING [Tribes-Task-Receiver[station-Channel]-6] 
org.apache.catalina.ha.session.ClusterSessionListener.messageReceived Context 
manager doesn't exist:[##0001]
Apr 23, 2024 8:30:46 AM org.apache.catalina.util.SessionIdGeneratorBase 
createSecureRandom
WARNING: Creation of SecureRandom instance for session ID generation using 
[SHA1PRNG] took [32,646] milliseconds.






Rick Noel
Systems Programmer | Westwood One
rn...@westwoodone.com

-Original Message-
From: Chuck Caldarale 
Sent: Monday, April 22, 2024 10:08 PM
To: Tomcat Users List 
Subject: [EXT]Re: [EXT]Re: [EXT]Re: Tomcat 10 skipping state transfer. No 
members active in cluster group


> On Apr 22, 2024, at 18:48, Rick Noel  wrote:
>
> So you mean we use the VM's  IP as the address value below
> Instead or using the value of   auto  ?
>
> address="auto"
>port="4001"
>   autoBind="100"
>   selectorTimeout="5000"
>   maxThreads="6"/>


Correct. To quote from the Tomcat doc:

The IP broadcasted is java.net.InetAddress.getLocalHost().getHostAddress() 
(make sure you don't broadcast 127.0.0.1, this is a common error)

Unless the two JVMs are deployed on the same VM, you cannot use 127.0.0.1 and 
expect them to be able to communicate with each other.

Here's an old e-mail describing the issue and one way of addressing it:

https://marc.info/?l=tomcat-user&m=118764351104059&w=2

The gist of it is this:

1. check what name the command `hostname` spits out 2. make sure that 
/etc/hosts contains that hostname and IP address

This must be done on each VM, of course.

Returning localhost is typical for systems that use DHCP to obtain their IP 
addresses, such as my MacBook:

jshell> java.net.InetAddress.getLocalHost().getHostAddress();
$1 ==> "127.0.0.1"

  - Chuck

CAUTION: This email originated from outside of the organization. Do not click 
links or open attachments unless you know the sender and you are sure the 
content is safe. Please report the message using the Report Message feature in 

Re: [EXT]Re: [EXT]Re: Tomcat 10 skipping state transfer. No members active in cluster group

2024-04-22 Thread Chuck Caldarale

> On Apr 22, 2024, at 18:48, Rick Noel  wrote:
> 
> So you mean we use the VM's  IP as the address value below
> Instead or using the value of   auto  ?
> 
> address="auto"
>port="4001"
>   autoBind="100"
>   selectorTimeout="5000"
>   maxThreads="6"/>


Correct. To quote from the Tomcat doc:

The IP broadcasted is java.net.InetAddress.getLocalHost().getHostAddress() 
(make sure you don't broadcast 127.0.0.1, this is a common error)

Unless the two JVMs are deployed on the same VM, you cannot use 127.0.0.1 and 
expect them to be able to communicate with each other.

Here’s an old e-mail describing the issue and one way of addressing it:

https://marc.info/?l=tomcat-user&m=118764351104059&w=2

The gist of it is this:

1. check what name the command `hostname` spits out
2. make sure that /etc/hosts contains that hostname and IP address

This must be done on each VM, of course. 

Returning localhost is typical for systems that use DHCP to obtain their IP 
addresses, such as my MacBook:

jshell> java.net.InetAddress.getLocalHost().getHostAddress();
$1 ==> "127.0.0.1"

  - Chuck



RE: [EXT]Re: [EXT]Re: Tomcat 10 skipping state transfer. No members active in cluster group

2024-04-22 Thread Rick Noel
Chuck,

So you mean we use the VM's  IP as the address value below
Instead or using the value of   auto  ?






Rick Noel
Systems Programmer | Westwood One
rn...@westwoodone.com

-Original Message-
From: Chuck Caldarale  
Sent: Monday, April 22, 2024 6:20 PM
To: Tomcat Users List 
Subject: [EXT]Re: [EXT]Re: Tomcat 10 skipping state transfer. No members active 
in cluster group


> On Apr 22, 2024, at 16:33, Rick Noel  wrote:
>
> Tomcats are two different VMs


Which explains why they can’t talk to each other over 127.0.0.1.


> What do you mean each containers published IP


Each VM or container will have an assigned, individual IP address so it can 
communicate with networks outside of the VM (eg, the host machine or real 
world). You must use each VM’s assigned IP address - not 127.0.0.1 - in the 
clustering configuration to allow the two VMs to communicate with each other.

  - Chuck

CAUTION: This email originated from outside of the organization. Do not click 
links or open attachments unless you know the sender and you are sure the 
content is safe. Please report the message using the Report Message feature in 
your email client if you believe the email is suspicious.


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



Re: [EXT]Re: Tomcat 10 skipping state transfer. No members active in cluster group

2024-04-22 Thread Chuck Caldarale

> On Apr 22, 2024, at 16:33, Rick Noel  wrote:
> 
> Tomcats are two different VMs


Which explains why they can’t talk to each other over 127.0.0.1.


> What do you mean each containers published IP


Each VM or container will have an assigned, individual IP address so it can 
communicate with networks outside of the VM (eg, the host machine or real 
world). You must use each VM’s assigned IP address - not 127.0.0.1 - in the 
clustering configuration to allow the two VMs to communicate with each other.

  - Chuck



RE: [EXT]Re: Tomcat 10 skipping state transfer. No members active in cluster group

2024-04-22 Thread Rick Noel


Rick Noel
Systems Programmer | Westwood One
rn...@westwoodone.com

-Original Message-
From: Chuck Caldarale  
Sent: Monday, April 22, 2024 4:41 PM
To: Tomcat Users List 
Subject: [EXT]Re: Tomcat 10 skipping state transfer. No members active in 
cluster group


> On Apr 22, 2024, at 09:54, Rick Noel  wrote:
>
> Could someone please explain why I am getting the error
>
> skipping state transfer. No members active in cluster group


Need a bit more information.


> On one sever the reciever  is bound  to  
> 127.0.0.1:4002
> And on the other server the receiver is bound to   127.0.0.1:4001


Are both Tomcat instances running on the same system (VM or real)?

Tomcats are two different VMs


> But both servers report -> no active members in cluster group


Indicates they can’t see each other, so they could be on different systems or 
in separate VMs (containers).


> Apr 22, 2024 10:20:01 AM org.apache.catalina.util.SessionIdGeneratorBase 
> createSecureRandom
> WARNING: Creation of SecureRandom instance for session ID generation using 
> [SHA1PRNG] took [51,791] milliseconds.


This long random ID generation is typical for a low-entropy VM or container 
rather than a real system. If the two Tomcats are in separate containers, 
you’ll have to configure clustering to use each container’s published IP 
address rather than assuming they can share the same loopback network.

What do you mean each containers published IP

  - Chuck


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

CAUTION: This email originated from outside of the organization. Do not click 
links or open attachments unless you know the sender and you are sure the 
content is safe. Please report the message using the Report Message feature in 
your email client if you believe the email is suspicious.


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



Re: Tomcat 10 skipping state transfer. No members active in cluster group

2024-04-22 Thread Chuck Caldarale


> On Apr 22, 2024, at 09:54, Rick Noel  wrote:
> 
> Could someone please explain why I am getting the error
> 
> skipping state transfer. No members active in cluster group


Need a bit more information.


> On one sever the reciever  is bound  to  
> 127.0.0.1:4002
> And on the other server the receiver is bound to   127.0.0.1:4001


Are both Tomcat instances running on the same system (VM or real)?


> But both servers report -> no active members in cluster group


Indicates they can’t see each other, so they could be on different systems or 
in separate VMs (containers).


> Apr 22, 2024 10:20:01 AM org.apache.catalina.util.SessionIdGeneratorBase 
> createSecureRandom
> WARNING: Creation of SecureRandom instance for session ID generation using 
> [SHA1PRNG] took [51,791] milliseconds.


This long random ID generation is typical for a low-entropy VM or container 
rather than a real system. If the two Tomcats are in separate containers, 
you’ll have to configure clustering to use each container’s published IP 
address rather than assuming they can share the same loopback network.

  - Chuck


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



Re: Tomcat 10 skipping state transfer. No members active in cluster group

2024-04-22 Thread Steve Carlsen
Would you please take me off of this list

On Mon, Apr 22, 2024 at 9:01 AM Rick Noel 
wrote:

> Hello,
>
> Could someone please explain why I am getting the error
>
> skipping state transfer. No members active in cluster group
>
> On one sever the reciever  is bound  to
> 127.0.0.1:4002
> And on the other server the receiver is bound to   127.0.0.1:4001
>
> But both servers report -> no active members in cluster group
>
>
> 22-Apr-2024 10:19:06.726 INFO [main]
> org.apache.catalina.core.StandardService.startInternal Starting service
> [Station]
> 22-Apr-2024 10:19:06.727 INFO [main]
> org.apache.catalina.core.StandardEngine.startInternal Starting Servlet
> engine: [Apache Tomcat/10.1.20]
> 22-Apr-2024 10:19:06.736 INFO [main]
> org.apache.catalina.ha.tcp.SimpleTcpCluster.startInternal Cluster is about
> to start
> 22-Apr-2024 10:19:06.750 INFO [main]
> org.apache.catalina.tribes.transport.ReceiverBase.bind Receiver Server
> Socket bound to:[/127.0.0.1:4002]
> 22-Apr-2024 10:19:06.762 INFO [main]
> org.apache.catalina.tribes.membership.McastServiceImpl.setupSocket Setting
> cluster mcast soTimeout to [500]
> 22-Apr-2024 10:19:06.771 INFO [main]
> org.apache.catalina.tribes.membership.McastServiceImpl.waitForMembers
> Sleeping for [1000] milliseconds to establish cluster membership, start
> level:[4]
> 22-Apr-2024 10:19:07.771 INFO [main]
> org.apache.catalina.tribes.membership.McastServiceImpl.waitForMembers Done
> sleeping, membership established, start level:[4]
> 22-Apr-2024 10:19:07.773 INFO [main]
> org.apache.catalina.tribes.membership.McastServiceImpl.waitForMembers
> Sleeping for [1000] milliseconds to establish cluster membership, start
> level:[8]
> 22-Apr-2024 10:19:08.774 INFO [main]
> org.apache.catalina.tribes.membership.McastServiceImpl.waitForMembers Done
> sleeping, membership established, start level:[8]
> 22-Apr-2024 10:19:08.790 INFO [main]
> org.apache.catalina.ha.session.JvmRouteBinderValve.startInternal
> JvmRouteBinderValve started
> 22-Apr-2024 10:19:08.803 INFO [main]
> org.apache.catalina.startup.HostConfig.deployWAR Deploying web application
> archive [/home/web/servers/apache-tomcat-10.1.20/station/ROOT##0001.war]
> Apr 22, 2024 10:20:01 AM org.apache.catalina.util.SessionIdGeneratorBase
> createSecureRandom
> WARNING: Creation of SecureRandom instance for session ID generation using
> [SHA1PRNG] took [51,791] milliseconds.
> Apr 22, 2024 10:20:01 AM org.apache.catalina.ha.session.DeltaManager
> startInternal
> INFO: Register manager [##0001] to cluster element [Host] with name
> [station]
> Apr 22, 2024 10:20:01 AM org.apache.catalina.ha.session.DeltaManager
> startInternal
> INFO: Starting clustering manager at [##0001]
> Apr 22, 2024 10:20:01 AM org.apache.catalina.ha.session.DeltaManager
> getAllClusterSessions
> INFO: Manager [##0001]: skipping state transfer. No members active in
> cluster group.
>
>
> Here is how I have clustering set up on server one
>
>  channelSendOptions="8">
>
> className="org.apache.catalina.ha.session.DeltaManager"
>
> expireSessionsOnShutdown="false"
>
> notifyListenersOnReplication="true"
>
> sessionAttributeNameFilter="uploader_redirect|phone_tree|soundhound.campaigndata|format|employee_id|customer|customer_id|nonidentifier_call_letters|call_letters|caller_id_enabled|ivr_system|ivr_system_id|zip_code|time_zone|is_trial_customer|delete_confirmation|download_settings|clustered_admin|wall_token|employee_first_name|logged_in_user|logged_in"
>  />
>
>className="org.apache.catalina.tribes.group.GroupChannel">
>
>   className="org.apache.catalina.tribes.membership.McastService"
> address="228.0.0.4"
> port="45565"
> frequency="500"
> dropTime="3000"/>
>
>   className="org.apache.catalina.tribes.transport.nio.NioReceiver"
>   address="auto"
>   port="4002"
>  autoBind="100"
>  selectorTimeout="5000"
>  maxThreads="6"/>
>
>className="org.apache.catalina.tribes.transport.ReplicationTransmitter">
>  className="org.apache.catalina.tribes.transport.nio.PooledParallelSender"/>
>   
>
>className="org.apache.catalina.tribes.group.interceptors.TcpFailureDetector"/>
>className="org.apache.catalina.tribes.group.interceptors.MessageDispatchInterceptor"/>
> 

Tomcat 10 skipping state transfer. No members active in cluster group

2024-04-22 Thread Rick Noel
Hello,

Could someone please explain why I am getting the error

skipping state transfer. No members active in cluster group

On one sever the reciever  is bound  to  127.0.0.1:4002
And on the other server the receiver is bound to   127.0.0.1:4001

But both servers report -> no active members in cluster group


22-Apr-2024 10:19:06.726 INFO [main] 
org.apache.catalina.core.StandardService.startInternal Starting service 
[Station]
22-Apr-2024 10:19:06.727 INFO [main] 
org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: 
[Apache Tomcat/10.1.20]
22-Apr-2024 10:19:06.736 INFO [main] 
org.apache.catalina.ha.tcp.SimpleTcpCluster.startInternal Cluster is about to 
start
22-Apr-2024 10:19:06.750 INFO [main] 
org.apache.catalina.tribes.transport.ReceiverBase.bind Receiver Server Socket 
bound to:[/127.0.0.1:4002]
22-Apr-2024 10:19:06.762 INFO [main] 
org.apache.catalina.tribes.membership.McastServiceImpl.setupSocket Setting 
cluster mcast soTimeout to [500]
22-Apr-2024 10:19:06.771 INFO [main] 
org.apache.catalina.tribes.membership.McastServiceImpl.waitForMembers Sleeping 
for [1000] milliseconds to establish cluster membership, start level:[4]
22-Apr-2024 10:19:07.771 INFO [main] 
org.apache.catalina.tribes.membership.McastServiceImpl.waitForMembers Done 
sleeping, membership established, start level:[4]
22-Apr-2024 10:19:07.773 INFO [main] 
org.apache.catalina.tribes.membership.McastServiceImpl.waitForMembers Sleeping 
for [1000] milliseconds to establish cluster membership, start level:[8]
22-Apr-2024 10:19:08.774 INFO [main] 
org.apache.catalina.tribes.membership.McastServiceImpl.waitForMembers Done 
sleeping, membership established, start level:[8]
22-Apr-2024 10:19:08.790 INFO [main] 
org.apache.catalina.ha.session.JvmRouteBinderValve.startInternal 
JvmRouteBinderValve started
22-Apr-2024 10:19:08.803 INFO [main] 
org.apache.catalina.startup.HostConfig.deployWAR Deploying web application 
archive [/home/web/servers/apache-tomcat-10.1.20/station/ROOT##0001.war]
Apr 22, 2024 10:20:01 AM org.apache.catalina.util.SessionIdGeneratorBase 
createSecureRandom
WARNING: Creation of SecureRandom instance for session ID generation using 
[SHA1PRNG] took [51,791] milliseconds.
Apr 22, 2024 10:20:01 AM org.apache.catalina.ha.session.DeltaManager 
startInternal
INFO: Register manager [##0001] to cluster element [Host] with name [station]
Apr 22, 2024 10:20:01 AM org.apache.catalina.ha.session.DeltaManager 
startInternal
INFO: Starting clustering manager at [##0001]
Apr 22, 2024 10:20:01 AM org.apache.catalina.ha.session.DeltaManager 
getAllClusterSessions
INFO: Manager [##0001]: skipping state transfer. No members active in cluster 
group.


Here is how I have clustering set up on server one



   

  

 

 

  

  

  
  
  

  


On the other server I just changed  the member ship  to a different port   
port="45564"
And reciver port to   a different port also 
   port="4002"


In my application level web.xml on both servers I have included the needed tag


What am I missing here?


Rick Noel
Systems Programmer | Westwood One
rn...@westwoodone.com



Tomcat 10 clustering is not replicating session data

2024-04-16 Thread Rick Noel
Hello,

I am running Tomcat 10.1.20 with Java 17

But our session data is being lost.

Here is snippet of the clustering I have defined..





 


 

   

   


   

 

   

   

   

   

 


 



 


Notice in sessionAttributeNameFilter that one of the session attributes I want 
replicated is   -> logged_in_user
We have to include the session data we want replicated here Correct?
logged_in_user is one we want replicated, its value is a String

When I run my app this code runs ->

public class Utils {
   public static String getUserName( HttpServletRequest request )
   {

  return (String) 
request.getSession().getAttribute("logged_in_user");
   }
}

That code returns a null value, indicating that the session value is not found.

Does anyone see something wrong with how I defined the clustering?

This below comes from the Catalina.out log and indicates there is an issue with 
clustering...

SEVERE: Manager [##0001]: No session state sent at [4/16/24, 12:48 PM] 
received, timing out after [60,074] ms.
Apr 16, 2024 12:49:54 PM org.apache.catalina.ha.session.DeltaManager 
getAllClusterSessions
WARNING: Manager [##0001]: Drop message [SESSION-GET-ALL] inside 
GET_ALL_SESSIONS sync phase start date [4/16/24, 12:48 PM] message date 
[4/16/24, 12:48 PM]


Our live environment has two app server machines being fed by one loadbalancer.

In our dev environment, that has just one machine, this same session data can 
be extracted.
But not on the live 2 machine environment



Rick Noel
Systems Programmer | Westwood One
rn...@westwoodone.com



Re: [EXT]Re: [EXT]Re: Tomcat 10 session replication fails

2024-04-15 Thread Christopher Schultz

Rick,

On 4/15/24 08:12, Rick Noel wrote:

Hi Chuck,
Your suggestion did not work.

I defined Membership as suggested...


and still getting this in the logs

org.apache.catalina.ha.session.DeltaManager.startInternal Starting clustering 
manager at [##0001]
15-Apr-2024 07:55:36.744 INFO [main] 
org.apache.catalina.ha.session.DeltaManager.getAllClusterSessions Manager 
[##0001]: skipping state transfer. No members active in cluster group

Do you think the transfer is not happening because the application is only on 
one machine?
Our Production environment will have  our application on two machines but in our dev environment we 
have only one machine in the "cluster". So we really do not have a "cluster" 
environment.
Again, we would like to know is going on before we introduce clustering in our 
live environment.

We are using Java 17 and Tomcat 10


I've never set up replication in Tomcat, so I may be speaking out of turn.

But is it possible that since you have only a single node (right?), 
Tomcat is really saying "skipping state transfer. No [other] members 
active in cluster group"?


-chris


-Original Message-
From: Chuck Caldarale 
Sent: Saturday, April 13, 2024 4:00 PM
To: Tomcat Users List 
Subject: [EXT]Re: [EXT]Re: Tomcat 10 session replication fails



On Apr 11, 2024, at 09:07, Rick Noel  wrote:

We are getting closer
Changing ports from the 5000 range to the 4000 range stopped two
errors But now I get this..

INFO: Manager [##0001]: skipping state transfer. No members active in
cluster group

How to I make the member machine in the cluster active?



There’s a cluster configuration option that may be coming into play here: 
localLoopbackDisabled. Once upon a time, the JDK method:
 MulticastSocket.setLoopbackMode(boolean disable) did the opposite of 
what one might think from just the method name - passing in true disabled local 
receipt of multicast packets. That method has since been deprecated, and Tomcat 
currently uses this method:
  DatagramSocket.setOption​(SocketOption name, T value) which, at 
least in Java 21, operates as you might expect from the name - specifying true enables 
multicast loopback.

However, there’s some interesting logic in Tomcat's handling of 
localLoopbackDisabled that can inverts the config value based on the Java 
level, along with this comment:
 Java < 14, a value of true means loopback is disabled. Java 14+ a 
value of true means loopback is enabled.

Having not dug into the JRE source code for the various Java versions, I’m not yet 
convinced the version checking logic is correct. You might try setting 
localLoopbackDisabled to true in your  config to see if that 
has an effect on your dev system.

Also, let us know what Java version you’re using.

   - Chuck


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

CAUTION: This email originated from outside of the organization. Do not click 
links or open attachments unless you know the sender and you are sure the 
content is safe. Please report the message using the Report Message feature in 
your email client if you believe the email is suspicious.


-
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: [EXT]Re: [EXT]Re: Tomcat 10 session replication fails

2024-04-15 Thread Rick Noel
Hi Chuck,
Your suggestion did not work.

I defined Membership as suggested...


and still getting this in the logs

org.apache.catalina.ha.session.DeltaManager.startInternal Starting clustering 
manager at [##0001]
15-Apr-2024 07:55:36.744 INFO [main] 
org.apache.catalina.ha.session.DeltaManager.getAllClusterSessions Manager 
[##0001]: skipping state transfer. No members active in cluster group

Do you think the transfer is not happening because the application is only on 
one machine?
Our Production environment will have  our application on two machines but in 
our dev environment we have only one machine in the "cluster". So we really do 
not have a "cluster" environment.
Again, we would like to know is going on before we introduce clustering in our 
live environment.

We are using Java 17 and Tomcat 10


Rick Noel
Systems Programmer | Westwood One
rn...@westwoodone.com

-Original Message-
From: Chuck Caldarale  
Sent: Saturday, April 13, 2024 4:00 PM
To: Tomcat Users List 
Subject: [EXT]Re: [EXT]Re: Tomcat 10 session replication fails


> On Apr 11, 2024, at 09:07, Rick Noel  wrote:
>
> We are getting closer
> Changing ports from the 5000 range to the 4000 range stopped two 
> errors But now I get this..
>
> INFO: Manager [##0001]: skipping state transfer. No members active in 
> cluster group
>
> How to I make the member machine in the cluster active?


There’s a cluster configuration option that may be coming into play here: 
localLoopbackDisabled. Once upon a time, the JDK method:
MulticastSocket.setLoopbackMode(boolean disable) did the opposite of 
what one might think from just the method name - passing in true disabled local 
receipt of multicast packets. That method has since been deprecated, and Tomcat 
currently uses this method:
 DatagramSocket.setOption​(SocketOption name, T value) which, at 
least in Java 21, operates as you might expect from the name - specifying true 
enables multicast loopback.

However, there’s some interesting logic in Tomcat's handling of 
localLoopbackDisabled that can inverts the config value based on the Java 
level, along with this comment:
Java < 14, a value of true means loopback is disabled. Java 14+ a value 
of true means loopback is enabled.

Having not dug into the JRE source code for the various Java versions, I’m not 
yet convinced the version checking logic is correct. You might try setting 
localLoopbackDisabled to true in your  config to see if that 
has an effect on your dev system.

Also, let us know what Java version you’re using.

  - Chuck


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

CAUTION: This email originated from outside of the organization. Do not click 
links or open attachments unless you know the sender and you are sure the 
content is safe. Please report the message using the Report Message feature in 
your email client if you believe the email is suspicious.


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



Re: [EXT]Re: Tomcat 10 session replication fails

2024-04-13 Thread Jonathan S. Fisher
Sort of off topic, but sort of related. If you're having tremendous
trouble using the built in replication methods, we built a redis based
session manager: https://github.com/exabrial/redex-sm

Currently redex-sm only works with Tomcat 8.5, but it wouldn't be a
big leap to make it work with Tomcat 10. The advantage of using Redis
to store your sessions is it's a well trodden path to set up a
replicated Redis cluster, you have a lot of tooling around exploring
sessions stored inside there, and you can store hundreds-of-thousands
of sessions, or even set them to absurd timeouts (weeks).

I hate to see people struggle with session replication, as I think it
really is the secret to making server-side-rendering scale out.


On Sat, Apr 13, 2024 at 3:01 PM Chuck Caldarale  wrote:
>
>
> > On Apr 11, 2024, at 09:07, Rick Noel  wrote:
> >
> > We are getting closer
> > Changing ports from the 5000 range to the 4000 range stopped two errors
> > But now I get this..
> >
> > INFO: Manager [##0001]: skipping state transfer. No members active in 
> > cluster group
> >
> > How to I make the member machine in the cluster active?
>
>
> There’s a cluster configuration option that may be coming into play here: 
> localLoopbackDisabled. Once upon a time, the JDK method:
> MulticastSocket.setLoopbackMode(boolean disable)
> did the opposite of what one might think from just the method name - passing 
> in true disabled local receipt of multicast packets. That method has since 
> been deprecated, and Tomcat currently uses this method:
>  DatagramSocket.setOption(SocketOption name, T value)
> which, at least in Java 21, operates as you might expect from the name - 
> specifying true enables multicast loopback.
>
> However, there’s some interesting logic in Tomcat's handling of 
> localLoopbackDisabled that can inverts the config value based on the Java 
> level, along with this comment:
> Java < 14, a value of true means loopback is disabled. Java 14+ a 
> value of true means loopback is enabled.
>
> Having not dug into the JRE source code for the various Java versions, I’m 
> not yet convinced the version checking logic is correct. You might try 
> setting localLoopbackDisabled to true in your  config to see 
> if that has an effect on your dev system.
>
> Also, let us know what Java version you’re using.
>
>   - Chuck
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>


-- 
Jonathan | exabr...@gmail.com
Pessimists, see a jar as half empty. Optimists, in contrast, see it as
half full.
Engineers, of course, understand the glass is twice as big as it needs to be.

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



Re: [EXT]Re: Tomcat 10 session replication fails

2024-04-13 Thread Chuck Caldarale


> On Apr 11, 2024, at 09:07, Rick Noel  wrote:
> 
> We are getting closer
> Changing ports from the 5000 range to the 4000 range stopped two errors 
> But now I get this..
> 
> INFO: Manager [##0001]: skipping state transfer. No members active in cluster 
> group
> 
> How to I make the member machine in the cluster active?


There’s a cluster configuration option that may be coming into play here: 
localLoopbackDisabled. Once upon a time, the JDK method:
MulticastSocket.setLoopbackMode(boolean disable)
did the opposite of what one might think from just the method name - passing in 
true disabled local receipt of multicast packets. That method has since been 
deprecated, and Tomcat currently uses this method:
 DatagramSocket.setOption​(SocketOption name, T value)
which, at least in Java 21, operates as you might expect from the name - 
specifying true enables multicast loopback.

However, there’s some interesting logic in Tomcat's handling of 
localLoopbackDisabled that can inverts the config value based on the Java 
level, along with this comment:
Java < 14, a value of true means loopback is disabled. Java 14+ a value 
of true means loopback is enabled.

Having not dug into the JRE source code for the various Java versions, I’m not 
yet convinced the version checking logic is correct. You might try setting 
localLoopbackDisabled to true in your  config to see if that 
has an effect on your dev system.

Also, let us know what Java version you’re using.

  - Chuck


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



RE: [EXT]Re: Tomcat 10 session replication fails

2024-04-11 Thread Rick Noel
Thanks Chuck,

We are getting closer
Changing ports from the 5000 range to the 4000 range stopped two errors 
But now I get this..

INFO: Manager [##0001]: skipping state transfer. No members active in cluster 
group

How to I make the member machine in the cluster active?


Rick Noel
Systems Programmer | Westwood One
rn...@westwoodone.com

-Original Message-
From: Chuck Caldarale  
Sent: Thursday, April 11, 2024 9:14 AM
To: Tomcat Users List 
Subject: [EXT]Re: Tomcat 10 session replication fails

[You don't often get email from n82...@gmail.com. Learn why this is important 
at https://aka.ms/LearnAboutSenderIdentification ]

> On Apr 11, 2024, at 07:56, Rick Noel  wrote:
>
> We have our app running on Tomcat10 and doing clustering,but are getting the 
> following errors seen int the Catalina log...
>
> Apr 11, 2024 8:14:43 AM org.apache.catalina.ha.session.DeltaManager 
> waitForSendAllSessions
> SEVERE: Manager [##0001]: No session state sent at [4/11/24, 8:13 AM] 
> received, timing out after [60,068] ms.
> Apr 11, 2024 8:14:43 AM org.apache.catalina.ha.session.DeltaManager 
> getAllClusterSessions
> WARNING: Manager [##0001]: Drop message [SESSION-GET-ALL] inside 
> GET_ALL_SESSIONS sync phase start date [4/11/24, 8:13 AM] message date 
> [4/11/24, 8:13 AM]
> 11-Apr-2024 08:14:43.456
>
> The error, to me, indicates that the session data is not being sent out.
>
> We are running this app in our dev environment, and in this dev environment 
> the app runs on only one machine.
> In our live environment the app runs on two machines and traffic goes through 
> a load balancer.
> This may be a dumb question but are we getting these errors because we are 
> running the app on only one machine, and clustering cannot be done on one 
> machine?


Likely. From the Tomcat clustering doc:

If your Tomcat instances are running on the same machine, make sure the 
Receiver.port attribute is unique for each instance, in most cases Tomcat is 
smart enough to resolve this on it's own by autodetecting available ports in 
the range 4000-4100

You appear to have configured 5001 as the receiver port on both.


>   
>  className="org.apache.catalina.tribes.membership.McastService"
>   
> address="228.0.0.4"
>   
> port="45565"
>   
> frequency="500"
>   
> dropTime="3000"/>
>   
>  className="org.apache.catalina.tribes.transport.nio.NioReceiver"
>   
>   address="auto"
>   
>   port="5001"
>   
>   selectorTimeout="100"
>   
>   maxThreads="6"/>


  - Chuck

CAUTION: This email originated from outside of the organization. Do not click 
links or open attachments unless you know the sender and you are sure the 
content is safe. Please report the message using the Report Message feature in 
your email client if you believe the email is suspicious.


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



Re: Tomcat 10 session replication fails

2024-04-11 Thread Chuck Caldarale

> On Apr 11, 2024, at 07:56, Rick Noel  wrote:
> 
> We have our app running on Tomcat10 and doing clustering,but are getting the 
> following errors seen int the Catalina log...
> 
> Apr 11, 2024 8:14:43 AM org.apache.catalina.ha.session.DeltaManager 
> waitForSendAllSessions
> SEVERE: Manager [##0001]: No session state sent at [4/11/24, 8:13 AM] 
> received, timing out after [60,068] ms.
> Apr 11, 2024 8:14:43 AM org.apache.catalina.ha.session.DeltaManager 
> getAllClusterSessions
> WARNING: Manager [##0001]: Drop message [SESSION-GET-ALL] inside 
> GET_ALL_SESSIONS sync phase start date [4/11/24, 8:13 AM] message date 
> [4/11/24, 8:13 AM]
> 11-Apr-2024 08:14:43.456
> 
> The error, to me, indicates that the session data is not being sent out.
> 
> We are running this app in our dev environment, and in this dev environment 
> the app runs on only one machine.
> In our live environment the app runs on two machines and traffic goes through 
> a load balancer.
> This may be a dumb question but are we getting these errors because we are 
> running the app on only one machine, and clustering cannot be done on one 
> machine?


Likely. From the Tomcat clustering doc:

If your Tomcat instances are running on the same machine, make sure the 
Receiver.port attribute is unique for each instance, in most cases Tomcat is 
smart enough to resolve this on it's own by autodetecting available ports in 
the range 4000-4100

You appear to have configured 5001 as the receiver port on both.


>   
>  className="org.apache.catalina.tribes.membership.McastService"
>   
> address="228.0.0.4"
>   
> port="45565"
>   
> frequency="500"
>   
> dropTime="3000"/>
>   
>  className="org.apache.catalina.tribes.transport.nio.NioReceiver"
>   
>   address="auto"
>   
>   port="5001"
>   
>   selectorTimeout="100"
>   
>   maxThreads="6”/>


  - Chuck



Tomcat 10 session replication fails

2024-04-11 Thread Rick Noel
Hi,

We have our app running on Tomcat10 and doing clustering,but are getting the 
following errors seen int the Catalina log...

Apr 11, 2024 8:14:43 AM org.apache.catalina.ha.session.DeltaManager 
waitForSendAllSessions
SEVERE: Manager [##0001]: No session state sent at [4/11/24, 8:13 AM] received, 
timing out after [60,068] ms.
Apr 11, 2024 8:14:43 AM org.apache.catalina.ha.session.DeltaManager 
getAllClusterSessions
WARNING: Manager [##0001]: Drop message [SESSION-GET-ALL] inside 
GET_ALL_SESSIONS sync phase start date [4/11/24, 8:13 AM] message date 
[4/11/24, 8:13 AM]
11-Apr-2024 08:14:43.456

The error, to me, indicates that the session data is not being sent out.

We are running this app in our dev environment, and in this dev environment the 
app runs on only one machine.
In our live environment the app runs on two machines and traffic goes through a 
load balancer.
This may be a dumb question but are we getting these errors because we are 
running the app on only one machine, and clustering cannot be done on one 
machine?
We need to better understand these errors before we can move to tomcat 10 
clustering into our live   2 machine environment

This is how we have clustering defined in the server.xml...





  

  

  



  


 


 

   

   


   

 

   

   

   

   

 


 



 





 



  





Rick Noel
Systems Programmer | Westwood One
rn...@westwoodone.com



Re: [EXT]Re: [EXT]Re: performance tunning of Tomcat 10

2024-03-28 Thread Christopher Schultz

Rick,

On 3/28/24 15:38, Rick Noel wrote:

my bottleneck (app slowness to respond is the at the database
connection max), I am not even going to try and adjust minThreads and
maxThreads. When I tried to increase maxConnection to our database
from and existing connection max of 20, to a new connectionMax of 50,
I got errors, see attached snapshot.

This list strips most attachments including images. Please post text.


I was able to raise the maxConnection to database up to 30 with no
errors, so I am just going to deploy at that level until we upgrade our
Postgess database
We are using a really old Postgres and plan in the near to future to
upgrade that database.


It's not the software version that matters, it's the (possibly virtual) 
hardware.



BTW,
I did find and use the Apache Benchmark tool and was able to see how
our app responses with a test requests of 1 and concurrent
requests of 40 and those results look good to me with worst response
time of only 1000 miliseconds.
That's great for 40 simultaneous requests, but what happens when you 
crank it up to 300? Or 500? Or whatever?


You may want to use JMeter which is a better load-testing tool than 'ab' 
once you get beyond just throwing X requests at a site.


-chris


-Original Message-
From: Christopher Schultz 
Sent: Thursday, March 28, 2024 3:09 PM
To: users@tomcat.apache.org
Subject: [EXT]Re: [EXT]Re: performance tunning of Tomcat 10

Rick,

On 3/27/24 09:22, Rick Noel wrote:

-Original Message-
From: Christopher Schultz 
Sent: Wednesday, March 27, 2024 8:24 AM
To: Tomcat Users List ; Rick Noel

Cc: Voodoo nmulcahy gmail ; David Jung

Subject: [EXT]Re: performance tunning of Tomcat 10

Rick,

On 3/27/24 07:53, Rick Noel wrote:

I was wondering if the apache foundation has any tools we can use to
fine tune Tomcat 10. Tools to deteming how to set the best heap size
for Tomcat startup and the best connection attributes of
minSpareThreads and MaxThreads.

What is your goal?
Our application is a sip phone call handling application.(A voice
response xml application) The goal is to not have  call bottleneck at peak call 
volume.
Sometimes too many folks call at one time hit our app and calls are not handle 
correctly.


I know my application at times will reach 100 concurrent connections

   > and some times goes has high as 500 connections.

Okay.
Well I do not have actual traffic info down to the sec, But from the
application logs I know that that points in the day more than 300
calls can come in


Okay, you need to get better information. Check out this presentation on Tomcat 
monitoring:

https://tomcat.apache.org/presentations.html#latest-monitoring-with-jmx

There is a lot in there, but I do talk about checking on the request processor 
to see how many requests are in-flight at once. You can do the same with your 
database pool.

You'll want to grab samples of those things at regular intervals to see how 
they correlate. I suspect you know when your peak times are, so schedule the 
samples to be taken during that timeframe. You could even sample once per 
second if you wanted to -- the calls are pretty inexpensive.


Should I boost minSpareThreads and maxThread values of what I plan to
use below? > Or why would we not just set very high minSpareThreads
and maxThread values like minSpareThreads =300  and maxThread=1000

This is a snippet of my server.xml



 
  



Also, am I good with setting  
protocol="org.apache.coyote.http11.Http11NioProtocol"
And then setting 

That will tell Tomcat to do HTTP2 Correct?


That's the only way to enable h2. Well... you could use Http11Nio2Protocol, 
too. NIO is the default protocol so you don't even need to add that 
specifically if you don't want to.

Back to threads.

Each thread (unless you go virtual, but that's not really production-ready IMHO at this 
point unless you have very strict circumstances where it will work great for you) takes 
up a bunch of memory, so you can't just set maxThreads=1M. Threads take "time" 
to start, but it's not really that much. If starting and stopping threads is what is 
making your application slow, than you have a very high-performance application and 
environment indeed.

Your question as stated is unanswerable.

You say you are sometimes hitting 500 connections. The default maximum number of 
connections is 1 and you are only using 500. That means you aren't being flooded, 
which is a Good Thing. (BTW: How are you measuring "how many connections" you 
have? Make sure you are measuring the right thing...

I am estimating the actual connections just based on application call logs.

Is your *current* maxThreads set to 500? If so, then your thread pool maximum 
is set to your high-water mark which seems like it should be fine. If you set 
your maxThreads to 1000 you won't get any 

RE: [EXT]Re: [EXT]Re: performance tunning of Tomcat 10

2024-03-28 Thread Rick Noel
Chris,
 my bottleneck (app slowness to respond is the at the database connection max), 
I am not even going to try and adjust minThreads and maxThreads.
When I tried to increase maxConnection to our database from and existing 
connection max of 20, to a new connectionMax of 50, I got errors, see attached 
snapshot.

I was able to raise the maxConnection to database up to 30 with no errors, so I 
am just going to deploy at that level until we upgrade our Postgess database
We are using a really old Postgres and plan in the near to future to upgrade 
that database.

BTW,
I did find and use the Apache Benchmark tool and was able to see how our app 
responses with a test requests of 1 and concurrent requests of 40 and those 
results look good to me with worst response time of only  1000 miliseconds.

Rick Noel
Systems Programmer | Westwood One
rn...@westwoodone.com

-Original Message-
From: Christopher Schultz 
Sent: Thursday, March 28, 2024 3:09 PM
To: users@tomcat.apache.org
Subject: [EXT]Re: [EXT]Re: performance tunning of Tomcat 10

Rick,

On 3/27/24 09:22, Rick Noel wrote:
> -Original Message-
> From: Christopher Schultz 
> Sent: Wednesday, March 27, 2024 8:24 AM
> To: Tomcat Users List ; Rick Noel
> 
> Cc: Voodoo nmulcahy gmail ; David Jung
> 
> Subject: [EXT]Re: performance tunning of Tomcat 10
>
> Rick,
>
> On 3/27/24 07:53, Rick Noel wrote:
>> I was wondering if the apache foundation has any tools we can use to
>> fine tune Tomcat 10. Tools to deteming how to set the best heap size
>> for Tomcat startup and the best connection attributes of
>> minSpareThreads and MaxThreads.
> What is your goal?
> Our application is a sip phone call handling application.(A voice
> response xml application) The goal is to not have  call bottleneck at peak 
> call volume.
> Sometimes too many folks call at one time hit our app and calls are not 
> handle correctly.
>
>> I know my application at times will reach 100 concurrent connections
>   > and some times goes has high as 500 connections.
>
> Okay.
> Well I do not have actual traffic info down to the sec, But from the
> application logs I know that that points in the day more than 300
> calls can come in

Okay, you need to get better information. Check out this presentation on Tomcat 
monitoring:

https://tomcat.apache.org/presentations.html#latest-monitoring-with-jmx

There is a lot in there, but I do talk about checking on the request processor 
to see how many requests are in-flight at once. You can do the same with your 
database pool.

You'll want to grab samples of those things at regular intervals to see how 
they correlate. I suspect you know when your peak times are, so schedule the 
samples to be taken during that timeframe. You could even sample once per 
second if you wanted to -- the calls are pretty inexpensive.

>> Should I boost minSpareThreads and maxThread values of what I plan to
>> use below? > Or why would we not just set very high minSpareThreads
>> and maxThread values like minSpareThreads =300  and maxThread=1000
>>
>> This is a snippet of my server.xml
>>
>> >   minSpareThreads="50"
>> maxThreads="300"/>
>>
>> >executor="tomcatPhoneAppThreadPool"
>>compression="on"
>>compressionMinSize="2048"
>>
>> compressableMimeType="text/html,text/xml,text/plain,text/css,text/javascript,application/javascript,application/json,application/xml"
>>protocol="org.apache.coyote.http11.Http11NioProtocol"
>>  redirectPort="8443">
>>  > className="org.apache.coyote.http2.Http2Protocol" />
>>
>>
>>
>> Also, am I good with setting  
>> protocol="org.apache.coyote.http11.Http11NioProtocol"
>> And then setting > className="org.apache.coyote.http2.Http2Protocol" />
>>
>> That will tell Tomcat to do HTTP2 Correct?
>
> That's the only way to enable h2. Well... you could use Http11Nio2Protocol, 
> too. NIO is the default protocol so you don't even need to add that 
> specifically if you don't want to.
>
> Back to threads.
>
> Each thread (unless you go virtual, but that's not really production-ready 
> IMHO at this point unless you have very strict circumstances where it will 
> work great for you) takes up a bunch of memory, so you can't just set 
> maxThreads=1M. Threads take "time" to start, but it's not really that much. 
> I

Re: [EXT]Re: performance tunning of Tomcat 10

2024-03-28 Thread Christopher Schultz

Rick,

On 3/27/24 09:22, Rick Noel wrote:

-Original Message-
From: Christopher Schultz 
Sent: Wednesday, March 27, 2024 8:24 AM
To: Tomcat Users List ; Rick Noel 

Cc: Voodoo nmulcahy gmail ; David Jung 

Subject: [EXT]Re: performance tunning of Tomcat 10

Rick,

On 3/27/24 07:53, Rick Noel wrote:

I was wondering if the apache foundation has any tools we can use to
fine tune Tomcat 10. Tools to deteming how to set the best heap size
for Tomcat startup and the best connection attributes of
minSpareThreads and MaxThreads.

What is your goal?
Our application is a sip phone call handling application.(A voice response xml 
application)
The goal is to not have  call bottleneck at peak call volume.
Sometimes too many folks call at one time hit our app and calls are not handle 
correctly.


I know my application at times will reach 100 concurrent connections

  > and some times goes has high as 500 connections.

Okay.
Well I do not have actual traffic info down to the sec,
But from the application logs I know that that points in the day more than 300 
calls can come in


Okay, you need to get better information. Check out this presentation on 
Tomcat monitoring:


https://tomcat.apache.org/presentations.html#latest-monitoring-with-jmx

There is a lot in there, but I do talk about checking on the request 
processor to see how many requests are in-flight at once. You can do the 
same with your database pool.


You'll want to grab samples of those things at regular intervals to see 
how they correlate. I suspect you know when your peak times are, so 
schedule the samples to be taken during that timeframe. You could even 
sample once per second if you wanted to -- the calls are pretty inexpensive.



Should I boost minSpareThreads and maxThread values of what I plan to
use below? > Or why would we not just set very high minSpareThreads
and maxThread values like minSpareThreads =300  and maxThread=1000

This is a snippet of my server.xml




 

   

Also, am I good with setting  
protocol="org.apache.coyote.http11.Http11NioProtocol"
And then setting 

That will tell Tomcat to do HTTP2 Correct?


That's the only way to enable h2. Well... you could use Http11Nio2Protocol, 
too. NIO is the default protocol so you don't even need to add that 
specifically if you don't want to.

Back to threads.

Each thread (unless you go virtual, but that's not really production-ready IMHO at this 
point unless you have very strict circumstances where it will work great for you) takes 
up a bunch of memory, so you can't just set maxThreads=1M. Threads take "time" 
to start, but it's not really that much. If starting and stopping threads is what is 
making your application slow, than you have a very high-performance application and 
environment indeed.

Your question as stated is unanswerable.

You say you are sometimes hitting 500 connections. The default maximum number of 
connections is 1 and you are only using 500. That means you aren't being flooded, 
which is a Good Thing. (BTW: How are you measuring "how many connections" you 
have? Make sure you are measuring the right thing...

I am estimating the actual connections just based on application call logs.

Is your *current* maxThreads set to 500? If so, then your thread pool maximum 
is set to your high-water mark which seems like it should be fine. If you set 
your maxThreads to 1000 you won't get any benefit because only 500 requests are 
ever being sent at once, right?

What else does your application do?
Our application is a sip phone call handling application.(A voice response xml 
application)

For example, if you have a thread-pool max-threads of 1000 and your application 
uses an RDBMS for every request but your db connection pool size is more like 
10, then many threads waiting on a small number of connections gets you 
absolutely no benefit. You'd have to make changes elsewhere in your application 
in order to make use of those extra threads.

Similarly, if you have a big thread pool and a big db connection pool, but your 
database performs slowly, then having all that power on the application server 
doesn't really help you.

Yes our app is using a database  (we use Postres)
And yes I assume that is our bottleneck
Our tomcat context.xml defines that database maxConnction to be only 
maxTotal="20"


So if you are allowing up to 300 or 500 threads and most of them need a 
database connection, then you are really limiting yourself to more like 
20 simultaneous requests served.


You will likely need to increase that db connection pool size.


We have other apps  and that hit this same database, so we define low maxTotal  
on each  server so each server can have only limit connection access to the 
database


Well...


I am thinkingit would be best to try and NOT optimize  minSpareThreads and 
maxThread

RE: [EXT]Re: performance tunning of Tomcat 10

2024-03-27 Thread Rick Noel


Rick Noel
Systems Programmer | Westwood One
rn...@westwoodone.com

-Original Message-
From: Christopher Schultz  
Sent: Wednesday, March 27, 2024 8:24 AM
To: Tomcat Users List ; Rick Noel 

Cc: Voodoo nmulcahy gmail ; David Jung 

Subject: [EXT]Re: performance tunning of Tomcat 10

Rick,

On 3/27/24 07:53, Rick Noel wrote:
> I was wondering if the apache foundation has any tools we can use to 
> fine tune Tomcat 10. Tools to deteming how to set the best heap size 
> for Tomcat startup and the best connection attributes of 
> minSpareThreads and MaxThreads.
What is your goal?
Our application is a sip phone call handling application.(A voice response xml 
application)
The goal is to not have  call bottleneck at peak call volume.
Sometimes too many folks call at one time hit our app and calls are not handle 
correctly.

> I know my application at times will reach 100 concurrent connections
 > and some times goes has high as 500 connections.

Okay.
Well I do not have actual traffic info down to the sec,
But from the application logs I know that that points in the day more than 300 
calls can come in

> Should I boost minSpareThreads and maxThread values of what I plan to 
> use below? > Or why would we not just set very high minSpareThreads 
> and maxThread values like minSpareThreads =300  and maxThread=1000
>
> This is a snippet of my server.xml
>
>   minSpareThreads="50"
>maxThreads="300"/>
>
>   executor="tomcatPhoneAppThreadPool"
>   compression="on"
>   compressionMinSize="2048"
>   
> compressableMimeType="text/html,text/xml,text/plain,text/css,text/javascript,application/javascript,application/json,application/xml"
>   protocol="org.apache.coyote.http11.Http11NioProtocol"
> redirectPort="8443">
>  className="org.apache.coyote.http2.Http2Protocol" />
>
>   
>
> Also, am I good with setting  
> protocol="org.apache.coyote.http11.Http11NioProtocol"
> And then setting  className="org.apache.coyote.http2.Http2Protocol" />
>
> That will tell Tomcat to do HTTP2 Correct?

That's the only way to enable h2. Well... you could use Http11Nio2Protocol, 
too. NIO is the default protocol so you don't even need to add that 
specifically if you don't want to.

Back to threads.

Each thread (unless you go virtual, but that's not really production-ready IMHO 
at this point unless you have very strict circumstances where it will work 
great for you) takes up a bunch of memory, so you can't just set maxThreads=1M. 
Threads take "time" to start, but it's not really that much. If starting and 
stopping threads is what is making your application slow, than you have a very 
high-performance application and environment indeed.

Your question as stated is unanswerable.

You say you are sometimes hitting 500 connections. The default maximum number 
of connections is 1 and you are only using 500. That means you aren't being 
flooded, which is a Good Thing. (BTW: How are you measuring "how many 
connections" you have? Make sure you are measuring the right thing...

I am estimating the actual connections just based on application call logs.

Is your *current* maxThreads set to 500? If so, then your thread pool maximum 
is set to your high-water mark which seems like it should be fine. If you set 
your maxThreads to 1000 you won't get any benefit because only 500 requests are 
ever being sent at once, right?

What else does your application do?
Our application is a sip phone call handling application.(A voice response xml 
application)

For example, if you have a thread-pool max-threads of 1000 and your application 
uses an RDBMS for every request but your db connection pool size is more like 
10, then many threads waiting on a small number of connections gets you 
absolutely no benefit. You'd have to make changes elsewhere in your application 
in order to make use of those extra threads.

Similarly, if you have a big thread pool and a big db connection pool, but your 
database performs slowly, then having all that power on the application server 
doesn't really help you.

Yes our app is using a database  (we use Postres)
And yes I assume that is our bottleneck
Our tomcat context.xml defines that database maxConnction to be only 
maxTotal="20"
We have other apps  and that hit this same database, so we define low maxTotal  
on each  server so each server can have only limit connection access to the 
database
I am thinkingit would be best to try and NOT optimize  minSpareThreads and 
maxThreads but in

Re: performance tunning of Tomcat 10

2024-03-27 Thread Christopher Schultz

Rick,

On 3/27/24 07:53, Rick Noel wrote:

I was wondering if the apache foundation has any tools we can use to
fine tune Tomcat 10. Tools to deteming how to set the best heap size
for Tomcat startup and the best connection attributes of
minSpareThreads and MaxThreads.

What is your goal?


I know my application at times will reach 100 concurrent connections

> and some times goes has high as 500 connections.

Okay.


Should I boost minSpareThreads and maxThread values of what I plan to
use below? >
Or why would we not just set very high minSpareThreads and maxThread values
like minSpareThreads =300  and maxThread=1000

This is a snippet of my server.xml



   


  

Also, am I good with setting  
protocol="org.apache.coyote.http11.Http11NioProtocol"
And then setting 

That will tell Tomcat to do HTTP2 Correct?


That's the only way to enable h2. Well... you could use 
Http11Nio2Protocol, too. NIO is the default protocol so you don't even 
need to add that specifically if you don't want to.


Back to threads.

Each thread (unless you go virtual, but that's not really 
production-ready IMHO at this point unless you have very strict 
circumstances where it will work great for you) takes up a bunch of 
memory, so you can't just set maxThreads=1M. Threads take "time" to 
start, but it's not really that much. If starting and stopping threads 
is what is making your application slow, than you have a very 
high-performance application and environment indeed.


Your question as stated is unanswerable.

You say you are sometimes hitting 500 connections. The default maximum 
number of connections is 1 and you are only using 500. That means 
you aren't being flooded, which is a Good Thing. (BTW: How are you 
measuring "how many connections" you have? Make sure you are measuring 
the right thing...


Is your *current* maxThreads set to 500? If so, then your thread pool 
maximum is set to your high-water mark which seems like it should be 
fine. If you set your maxThreads to 1000 you won't get any benefit 
because only 500 requests are ever being sent at once, right?


What else does your application do?

For example, if you have a thread-pool max-threads of 1000 and your 
application uses an RDBMS for every request but your db connection pool 
size is more like 10, then many threads waiting on a small number of 
connections gets you absolutely no benefit. You'd have to make changes 
elsewhere in your application in order to make use of those extra threads.


Similarly, if you have a big thread pool and a big db connection pool, 
but your database performs slowly, then having all that power on the 
application server doesn't really help you.


So anyone trying to answer "how big should be thread pool be" really 
needs to understand the nature of your application and the other things 
happening in your environment.


Sometimes the answer is "just add more threads/CPUs/memory" and 
sometimes the answer is "re-think your application architecture".


-chris

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



performance tunning of Tomcat 10

2024-03-27 Thread Rick Noel
Hello,

I was wondering if the apache foundation has any tools we can use to fine tune 
Tomcat 10.
Tools to deteming how to set the best heap size for Tomcat startup and the best 
connection attributes of minSpareThreads and MaxThreads.

I know my application at times will reach 100 concurrent connections and some 
times goes has high as 500 connections.
Should I boost minSpareThreads and maxThread values of what I plan to use below?

Or why would we not just set very high minSpareThreads and maxThread values
like minSpareThreads =300  and maxThread=1000

This is a snippet of my server.xml



  
   

 

Also, am I good with setting  
protocol="org.apache.coyote.http11.Http11NioProtocol"
And then setting 

That will tell Tomcat to do HTTP2 Correct?

Rick Noel
Systems Programmer | Westwood One
rn...@westwoodone.com



RE: [EXT]Re: [EXT]Re: Tomcat 10 waning that expireSessionsOnShutdown is not set

2024-03-22 Thread Rick Noel
Thanks Chuck  great link to lots of good stuff

Rick Noel
Systems Programmer | Westwood One
rn...@westwoodone.com

-Original Message-
From: Chuck Caldarale 
Sent: Thursday, March 21, 2024 4:00 PM
To: Tomcat Users List 
Subject: [EXT]Re: [EXT]Re: Tomcat 10 waning that expireSessionsOnShutdown is 
not set

[You don't often get email from n82...@gmail.com. Learn why this is important 
at https://aka.ms/LearnAboutSenderIdentification ]

> On Mar 21, 2024, at 14:50, Rick Noel  wrote:
>
> Do you have a  feel if DeltaManager is better than BackupManager?


Depends on what your needs are. There are some presentations on the subject 
that you might want to look at:
https://tomcat.apache.org/presentations.html

ApacheCon 2018 NA: Deep dive into Tomcat Clustering, Keiichi Fujino

TomcatCon London 2017: Reverse Proxies, Load-Balancing & Clustering, Mark Thomas

  - Chuck

CAUTION: This email originated from outside of the organization. Do not click 
links or open attachments unless you know the sender and you are sure the 
content is safe. Please report the message using the Report Message feature in 
your email client if you believe the email is suspicious.


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



Re: [EXT]Re: Tomcat 10 waning that expireSessionsOnShutdown is not set

2024-03-21 Thread Chuck Caldarale

> On Mar 21, 2024, at 14:50, Rick Noel  wrote:
> 
> Do you have a  feel if DeltaManager is better than BackupManager?


Depends on what your needs are. There are some presentations on the subject 
that you might want to look at:
https://tomcat.apache.org/presentations.html

ApacheCon 2018 NA: Deep dive into Tomcat Clustering, Keiichi Fujino

TomcatCon London 2017: Reverse Proxies, Load-Balancing & Clustering, Mark Thomas

  - Chuck



RE: [EXT]Re: Tomcat 10 waning that expireSessionsOnShutdown is not set

2024-03-21 Thread Rick Noel
Thank you Chuck

Do you have a  feel if DeltaManager is better than BackupManager?



Rick Noel
Systems Programmer | Westwood One
rn...@westwoodone.com

-Original Message-
From: Chuck Caldarale 
Sent: Thursday, March 21, 2024 3:37 PM
To: Tomcat Users List 
Subject: [EXT]Re: Tomcat 10 waning that expireSessionsOnShutdown is not set

[You don't often get email from n82...@gmail.com. Learn why this is important 
at https://aka.ms/LearnAboutSenderIdentification ]

> On Mar 21, 2024, at 14:23, Rick Noel  wrote:
>
> Could someone tell me why I would get the below waning about 
> expireSessionsOnShutdown not being set
>
> WARNING [main] org.apache.tomcat.util.digester.SetPropertiesRule.begin Match 
> [Server/Service/Engine/Host/Cluster/Manager] failed to set property 
> [expireSessionsOnShutdown] to [false]
>
> I am using Tomcat 10.1.19 and trying to get clusting set up so session data 
> is not lost because of web app being deployed on two servers and service by a 
> load balancer
>
> Here is my server.xml  snippet...
>
>
> channelSendOptions="6">
>
>className="org.apache.catalina.ha.session.BackupManager"
>
> expireSessionsOnShutdown="false"
>
> notifyListenersOnReplication="true"
>
> mapSendOptions="6"/>


The expireSessionsOnShutdown attribute is only available for the DeltaManager, 
not the BackupManager. See:
https://tomcat.apache.org/tomcat-10.1-doc/config/cluster-manager.html

  - Chuck

CAUTION: This email originated from outside of the organization. Do not click 
links or open attachments unless you know the sender and you are sure the 
content is safe. Please report the message using the Report Message feature in 
your email client if you believe the email is suspicious.


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



Re: Tomcat 10 waning that expireSessionsOnShutdown is not set

2024-03-21 Thread Chuck Caldarale

> On Mar 21, 2024, at 14:23, Rick Noel  wrote:
> 
> Could someone tell me why I would get the below waning about 
> expireSessionsOnShutdown not being set
> 
> WARNING [main] org.apache.tomcat.util.digester.SetPropertiesRule.begin Match 
> [Server/Service/Engine/Host/Cluster/Manager] failed to set property 
> [expireSessionsOnShutdown] to [false]
> 
> I am using Tomcat 10.1.19 and trying to get clusting set up so session data 
> is not lost because of web app being deployed on two servers and service by a 
> load balancer
> 
> Here is my server.xml  snippet...
> 
>
> channelSendOptions="6">
> 
>className="org.apache.catalina.ha.session.BackupManager"
>
> expireSessionsOnShutdown="false"
>
> notifyListenersOnReplication="true"
>
> mapSendOptions="6"/>


The expireSessionsOnShutdown attribute is only available for the DeltaManager, 
not the BackupManager. See:
https://tomcat.apache.org/tomcat-10.1-doc/config/cluster-manager.html

  - Chuck



Tomcat 10 waning that expireSessionsOnShutdown is not set

2024-03-21 Thread Rick Noel
Hello,

Could someone tell me why I would get the below waning about 
expireSessionsOnShutdown not being set

WARNING [main] org.apache.tomcat.util.digester.SetPropertiesRule.begin Match 
[Server/Service/Engine/Host/Cluster/Manager] failed to set property 
[expireSessionsOnShutdown] to [false]

I am using Tomcat 10.1.19 and trying to get clusting set up so session data is 
not lost because of web app being deployed on two servers and service by a load 
balancer

Here is my server.xml  snippet...




   


  

   

   
 
 

 
   
 
 
 
 
   

   



   



And in my application web.xml I have. the needed





Rick Noel
Systems Programmer | Westwood One
rn...@westwoodone.com



Re: need features list that were removed in tomcat 10 while moving from tomcat 9

2023-12-26 Thread Christopher Schultz

Rajendra,

On 12/22/23 04:31, Rathore, Rajendra wrote:

We are migrating from tomcat 9 to tomcat 10, we run the migration
tool on our codebase, that work perfectly, can you please share the
changes from 9 to 10, we are interested in removed API or features
that we can fix manually as migrator tool not take care of such
changes.


Can you give an example?

There are 2 major changes in Tomcat 10 with respect to Tomcat 9 due to 
the migration from Java EE -> Jakarta EE:


1. All package names have changes usually from javax.* to jakarta.*

2. Old deprecated classes, methods, etc. from the Java EE specs
   have finally been removed from the APIs

The migration tool can help with #1; it's basically a massive recursive 
search-and-replace for the migrated packages. I would look to see if 
your application uses any deprecated methods or classes from Java EE and 
fix those to use their modern equivalents right now, because after 
migration, they will not work at all if they currently have deprecation 
warnings.


If your application works well on Tomcat 10 using the auto-migration 
auto-deployment process, then in order to "upgrade" your application 
from Tomcat 9 to Tomcat 10, you should take (roughly) the following steps:


1. Run the migration tool on your *source code* to replace package names 
in sources.


2. Note any compiler errors due to libraries that fail to link properly. 
Search for updated versions of these libraries that support Jakarta EE 
instead of Java EE and use those.


3. Any libraries with no support for Jakarta EE will have to be 
manually-migrated using the migration tool on the library *only*. Store 
those manually-migrated libraries next to your source code for builds 
and deployments.


-chris

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



need features list that were removed in tomcat 10 while moving from tomcat 9

2023-12-22 Thread Rathore, Rajendra
Hi,

We are migrating from tomcat 9 to tomcat 10, we run the migration tool on our 
codebase, that work perfectly, can you please share the changes from 9 to 10, 
we are interested in removed API or features that we can fix manually as 
migrator tool not take care of such changes.

Thanks and Regards,
Rajendra Rathore
9922701491



Re: tomcat 10

2023-11-08 Thread Christopher Schultz

直以来,

On 11/6/23 06:25, 一直以来 wrote:

What can I do to see that the request is reused, using what settings?


What problem are you trying to solve?

-chris


-- Original --
From: Mark Thomas 

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



Re: tomcat 10

2023-11-06 Thread Mark Thomas

On 06/11/2023 06:46, 一直以来 wrote:

Why do I print System. out. println (request) as different objects in the 
servlet for the request in tomcat10? Is the request object not reused in 
tomcat10?


There is a pool of cached request objects. Each request is also accessed 
via a facade (which is probably what you are seeing). Depending on 
settings, those facades may be reused or discarded between requests.


Mark

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



Re: [External]Re: Tomcat 10 on RHEL 8 with Java 17

2023-09-28 Thread Mark Thomas

n 28/09/2023 00:22, Christopher Bland wrote:

Hi Everyone,

I’m making progress.  I started from scratch again adding pieces back one by 
one.  It seems like I am seeing the following errors with my configuration

Could not load Logmanager "org.apache.logging.log4j.jul.LogManager"
java.lang.ClassNotFoundException: org.apache.logging.log4j.jul.LogManager

I came across documentation saying I need tomcat-juli-adapters.jar but cannot 
find it for Tomcat v10.  I am also seeing


That JAR is not provided with Tomcat 10. It was for use with log4j 1.x 
which is now unsupported. If you want to use log4j for Tomcat's internal 
logging you'll need to use log4j 2.x with the JUL adapter.



INFO: The Apache Tomcat Native library which allows using OpenSSL was not found 
on the java.library.path: 
[/usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib]


That means that the OpenSSL implementation won't be available for TLS. 
Only JSSE will be available. If you don't want/need to use OpenSSL then 
you can ignore this informational message. If you want to stop the 
message appearing, removing (or comment out) the AprLifecycleListener in 
server.xml


Mark




Please advise,

-Chris

From: Christopher Bland 
Date: Wednesday, September 27, 2023 at 3:19 PM
To: Tomcat Users List 
Subject: Re: [External]Re: Tomcat 10 on RHEL 8 with Java 17
Hi Thomas,

I didn’t post those checks.  I ran

ps -ef | egrep -I ‘tomc|java’

as well as

netstat -tlpn

I did not see any indication that Tomcat had started.

@Stephanie

Hi Stephanie,

I checked the ownership and permissions plus ran chown -R tomcat:tomcat 
/usr/local/tomcat

-Chris

From: Thomas Hoffmann (Speed4Trade GmbH) 

Date: Wednesday, September 27, 2023 at 2:25 PM
To: Tomcat Users List 
Subject: AW: [External]Re: Tomcat 10 on RHEL 8 with Java 17
Hi Chris,


-Ursprüngliche Nachricht-
Von: Christopher Bland 
Gesendet: Mittwoch, 27. September 2023 19:19
An: Tomcat Users List 
Betreff: Re: [External]Re: Tomcat 10 on RHEL 8 with Java 17

Hi Chris,

I didn’t get the error message.  Tomcat still isn’t starting

# ./catalina.sh run
Using CATALINA_BASE:   /usr/local/tomcat
Using CATALINA_HOME:   /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME:/usr/lib/jvm/java-17-openjdk-17.0.8.0.7-2.el8.x86_64
Using CLASSPATH:
/usr/local/tomcat/bin/*:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomc
at/bin/tomcat-juli.jar
Using CATALINA_OPTS:   -XX:+UseG1GC -Xmx3000m

# ps -ef | grep tomc
root  104975  104815  0 13:08 pts/000:00:00 grep --color=auto tomc


You grep for tomcat. The file starts a java-process. Maybe it doesn’t catch the 
right process.
Could you check whether java processes are running?

Or check "netstat -tulpen" if something is listening on the specified port 
(according to server.xml).



@Darryl

Hi Darryl,

Just checked, permissions look correct

# ls -ld /var/log/tomcat/ /usr/local/tomcat/logs/ drwxr-x---. 2 tomcat tomcat
26 Sep 26 20:14 /usr/local/tomcat/logs/ drwxr-xr-x. 2 tomcat tomcat  6 Sep 26
19:48 /var/log/tomcat/


-Chris


From: Darryl Baker 
Date: Wednesday, September 27, 2023 at 12:59 PM
To: Tomcat Users List 
Subject: [External]Re: Tomcat 10 on RHEL 8 with Java 17 [You don't often get
email from darryl.ba...@northwestern.edu. Learn why this is important at
https://aka.ms/LearnAboutSenderIdentification ]

Chris,
 With no logs at all check the permissions on the log directories and 
make
sure that the user Tomcat is running as has write permissions there.  This
sounds very much like what I ran into my first time setting up Tomcat from
scratch.

Darryl Baker, GSEC, GCLD (he/him/his)
Sr. System Administrator
Distributed Application Platform Services Northwestern University 4th Floor
2020 Ridge Avenue
Evanston, IL 60208-0801
darryl.ba...@northwestern.edu <mailto:darryl.ba...@northwestern.edu>
(847) 467-6674 




On 9/27/23, 9:31 AM, "Christopher Bland" mailto:ch...@fdu.edu>> wrote:


Hi All,


I just deployed Tomcat v10.1.13 on a new machine. When I start Tomcat it
says it has started but I don’t see the daemon running and I don’t have any
logs. I tried running Catalina.sh directly.


# ./catalina.sh start
Using CATALINA_BASE: /usr/local/tomcat
Using CATALINA_HOME: /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp Using JRE_HOME:
/usr/lib/jvm/java-17-openjdk-17.0.8.0.7-2.el8.x86_64
Using CLASSPATH:
/usr/local/tomcat/bin/*:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomc
at/bin/tomcat-juli.jar
Using CATALINA_OPTS: -XX:+UseG1GC -Xmx3000m Tomcat started.


Not running – No Daemon + No Logs


# ./catalina.sh debug
Using CATALINA_BASE: /usr/local/tomcat
Using CATALINA_HOME: /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp Using JAVA_HOME:
/usr/lib/jvm/java-17-openjdk-17.0.8.0.7-2.el8.x86_64
Using CLASSPATH:
/usr/local/tomcat/bin/*:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomc
at/bin/tomcat-juli.jar
Using

Re: [External]Re: Tomcat 10 on RHEL 8 with Java 17

2023-09-27 Thread Christopher Bland
Hi Everyone,

I’m making progress.  I started from scratch again adding pieces back one by 
one.  It seems like I am seeing the following errors with my configuration

Could not load Logmanager "org.apache.logging.log4j.jul.LogManager"
java.lang.ClassNotFoundException: org.apache.logging.log4j.jul.LogManager

I came across documentation saying I need tomcat-juli-adapters.jar but cannot 
find it for Tomcat v10.  I am also seeing

INFO: The Apache Tomcat Native library which allows using OpenSSL was not found 
on the java.library.path: 
[/usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib]

Please advise,

-Chris

From: Christopher Bland 
Date: Wednesday, September 27, 2023 at 3:19 PM
To: Tomcat Users List 
Subject: Re: [External]Re: Tomcat 10 on RHEL 8 with Java 17
Hi Thomas,

I didn’t post those checks.  I ran

ps -ef | egrep -I ‘tomc|java’

as well as

netstat -tlpn

I did not see any indication that Tomcat had started.

@Stephanie

Hi Stephanie,

I checked the ownership and permissions plus ran chown -R tomcat:tomcat 
/usr/local/tomcat

-Chris

From: Thomas Hoffmann (Speed4Trade GmbH) 

Date: Wednesday, September 27, 2023 at 2:25 PM
To: Tomcat Users List 
Subject: AW: [External]Re: Tomcat 10 on RHEL 8 with Java 17
Hi Chris,

> -Ursprüngliche Nachricht-
> Von: Christopher Bland 
> Gesendet: Mittwoch, 27. September 2023 19:19
> An: Tomcat Users List 
> Betreff: Re: [External]Re: Tomcat 10 on RHEL 8 with Java 17
>
> Hi Chris,
>
> I didn’t get the error message.  Tomcat still isn’t starting
>
> # ./catalina.sh run
> Using CATALINA_BASE:   /usr/local/tomcat
> Using CATALINA_HOME:   /usr/local/tomcat
> Using CATALINA_TMPDIR: /usr/local/tomcat/temp
> Using JRE_HOME:/usr/lib/jvm/java-17-openjdk-17.0.8.0.7-2.el8.x86_64
> Using CLASSPATH:
> /usr/local/tomcat/bin/*:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomc
> at/bin/tomcat-juli.jar
> Using CATALINA_OPTS:   -XX:+UseG1GC -Xmx3000m
>
> # ps -ef | grep tomc
> root  104975  104815  0 13:08 pts/000:00:00 grep --color=auto tomc

You grep for tomcat. The file starts a java-process. Maybe it doesn’t catch the 
right process.
Could you check whether java processes are running?

Or check "netstat -tulpen" if something is listening on the specified port 
(according to server.xml).


> @Darryl
>
> Hi Darryl,
>
> Just checked, permissions look correct
>
> # ls -ld /var/log/tomcat/ /usr/local/tomcat/logs/ drwxr-x---. 2 tomcat tomcat
> 26 Sep 26 20:14 /usr/local/tomcat/logs/ drwxr-xr-x. 2 tomcat tomcat  6 Sep 26
> 19:48 /var/log/tomcat/
>
>
> -Chris
>
>
> From: Darryl Baker 
> Date: Wednesday, September 27, 2023 at 12:59 PM
> To: Tomcat Users List 
> Subject: [External]Re: Tomcat 10 on RHEL 8 with Java 17 [You don't often get
> email from darryl.ba...@northwestern.edu. Learn why this is important at
> https://aka.ms/LearnAboutSenderIdentification ]
>
> Chris,
> With no logs at all check the permissions on the log directories and 
> make
> sure that the user Tomcat is running as has write permissions there.  This
> sounds very much like what I ran into my first time setting up Tomcat from
> scratch.
>
> Darryl Baker, GSEC, GCLD (he/him/his)
> Sr. System Administrator
> Distributed Application Platform Services Northwestern University 4th Floor
> 2020 Ridge Avenue
> Evanston, IL 60208-0801
> darryl.ba...@northwestern.edu <mailto:darryl.ba...@northwestern.edu>
> (847) 467-6674 
>
>
>
>
> On 9/27/23, 9:31 AM, "Christopher Bland"  <mailto:ch...@fdu.edu>> wrote:
>
>
> Hi All,
>
>
> I just deployed Tomcat v10.1.13 on a new machine. When I start Tomcat it
> says it has started but I don’t see the daemon running and I don’t have any
> logs. I tried running Catalina.sh directly.
>
>
> # ./catalina.sh start
> Using CATALINA_BASE: /usr/local/tomcat
> Using CATALINA_HOME: /usr/local/tomcat
> Using CATALINA_TMPDIR: /usr/local/tomcat/temp Using JRE_HOME:
> /usr/lib/jvm/java-17-openjdk-17.0.8.0.7-2.el8.x86_64
> Using CLASSPATH:
> /usr/local/tomcat/bin/*:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomc
> at/bin/tomcat-juli.jar
> Using CATALINA_OPTS: -XX:+UseG1GC -Xmx3000m Tomcat started.
>
>
> Not running – No Daemon + No Logs
>
>
> # ./catalina.sh debug
> Using CATALINA_BASE: /usr/local/tomcat
> Using CATALINA_HOME: /usr/local/tomcat
> Using CATALINA_TMPDIR: /usr/local/tomcat/temp Using JAVA_HOME:
> /usr/lib/jvm/java-17-openjdk-17.0.8.0.7-2.el8.x86_64
> Using CLASSPATH:
> /usr/local/tomcat/bin/*:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomc
> at/bin/tomcat-juli.jar
> Using CATALINA_OPTS: -XX:+UseG1GC -Xmx3000m invalid option: --add-
> opens=java.base/java.lang=ALL-UNNAMED
>
>
> Usage: jdb   
>
>

Re: [External]Re: Tomcat 10 on RHEL 8 with Java 17

2023-09-27 Thread Christopher Bland
Hi Thomas,

I didn’t post those checks.  I ran

ps -ef | egrep -I ‘tomc|java’

as well as

netstat -tlpn

I did not see any indication that Tomcat had started.

@Stephanie

Hi Stephanie,

I checked the ownership and permissions plus ran chown -R tomcat:tomcat 
/usr/local/tomcat

-Chris

From: Thomas Hoffmann (Speed4Trade GmbH) 

Date: Wednesday, September 27, 2023 at 2:25 PM
To: Tomcat Users List 
Subject: AW: [External]Re: Tomcat 10 on RHEL 8 with Java 17
Hi Chris,

> -Ursprüngliche Nachricht-
> Von: Christopher Bland 
> Gesendet: Mittwoch, 27. September 2023 19:19
> An: Tomcat Users List 
> Betreff: Re: [External]Re: Tomcat 10 on RHEL 8 with Java 17
>
> Hi Chris,
>
> I didn’t get the error message.  Tomcat still isn’t starting
>
> # ./catalina.sh run
> Using CATALINA_BASE:   /usr/local/tomcat
> Using CATALINA_HOME:   /usr/local/tomcat
> Using CATALINA_TMPDIR: /usr/local/tomcat/temp
> Using JRE_HOME:/usr/lib/jvm/java-17-openjdk-17.0.8.0.7-2.el8.x86_64
> Using CLASSPATH:
> /usr/local/tomcat/bin/*:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomc
> at/bin/tomcat-juli.jar
> Using CATALINA_OPTS:   -XX:+UseG1GC -Xmx3000m
>
> # ps -ef | grep tomc
> root  104975  104815  0 13:08 pts/000:00:00 grep --color=auto tomc

You grep for tomcat. The file starts a java-process. Maybe it doesn’t catch the 
right process.
Could you check whether java processes are running?

Or check "netstat -tulpen" if something is listening on the specified port 
(according to server.xml).


> @Darryl
>
> Hi Darryl,
>
> Just checked, permissions look correct
>
> # ls -ld /var/log/tomcat/ /usr/local/tomcat/logs/ drwxr-x---. 2 tomcat tomcat
> 26 Sep 26 20:14 /usr/local/tomcat/logs/ drwxr-xr-x. 2 tomcat tomcat  6 Sep 26
> 19:48 /var/log/tomcat/
>
>
> -Chris
>
>
> From: Darryl Baker 
> Date: Wednesday, September 27, 2023 at 12:59 PM
> To: Tomcat Users List 
> Subject: [External]Re: Tomcat 10 on RHEL 8 with Java 17 [You don't often get
> email from darryl.ba...@northwestern.edu. Learn why this is important at
> https://aka.ms/LearnAboutSenderIdentification ]
>
> Chris,
> With no logs at all check the permissions on the log directories and 
> make
> sure that the user Tomcat is running as has write permissions there.  This
> sounds very much like what I ran into my first time setting up Tomcat from
> scratch.
>
> Darryl Baker, GSEC, GCLD (he/him/his)
> Sr. System Administrator
> Distributed Application Platform Services Northwestern University 4th Floor
> 2020 Ridge Avenue
> Evanston, IL 60208-0801
> darryl.ba...@northwestern.edu <mailto:darryl.ba...@northwestern.edu>
> (847) 467-6674 
>
>
>
>
> On 9/27/23, 9:31 AM, "Christopher Bland"  <mailto:ch...@fdu.edu>> wrote:
>
>
> Hi All,
>
>
> I just deployed Tomcat v10.1.13 on a new machine. When I start Tomcat it
> says it has started but I don’t see the daemon running and I don’t have any
> logs. I tried running Catalina.sh directly.
>
>
> # ./catalina.sh start
> Using CATALINA_BASE: /usr/local/tomcat
> Using CATALINA_HOME: /usr/local/tomcat
> Using CATALINA_TMPDIR: /usr/local/tomcat/temp Using JRE_HOME:
> /usr/lib/jvm/java-17-openjdk-17.0.8.0.7-2.el8.x86_64
> Using CLASSPATH:
> /usr/local/tomcat/bin/*:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomc
> at/bin/tomcat-juli.jar
> Using CATALINA_OPTS: -XX:+UseG1GC -Xmx3000m Tomcat started.
>
>
> Not running – No Daemon + No Logs
>
>
> # ./catalina.sh debug
> Using CATALINA_BASE: /usr/local/tomcat
> Using CATALINA_HOME: /usr/local/tomcat
> Using CATALINA_TMPDIR: /usr/local/tomcat/temp Using JAVA_HOME:
> /usr/lib/jvm/java-17-openjdk-17.0.8.0.7-2.el8.x86_64
> Using CLASSPATH:
> /usr/local/tomcat/bin/*:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomc
> at/bin/tomcat-juli.jar
> Using CATALINA_OPTS: -XX:+UseG1GC -Xmx3000m invalid option: --add-
> opens=java.base/java.lang=ALL-UNNAMED
>
>
> Usage: jdb   
>
>
> where options include:
>
>
> There are several of the --add-opens statements that cause startup to fail in
> catalina.sh
>
>
> # Add the module start-up parameters required by Tomcat
> JAVA_OPTS="$JAVA_OPTS --add-opens=java.base/java.lang=ALL-
> UNNAMED"
> JAVA_OPTS="$JAVA_OPTS --add-opens=java.base/java.io=ALL-UNNAMED"
> JAVA_OPTS="$JAVA_OPTS --add-opens=java.base/java.util=ALL-
> UNNAMED"
> JAVA_OPTS="$JAVA_OPTS --add-opens=java.base/java.util.concurrent=ALL-
> UNNAMED"
> JAVA_OPTS="$JAVA_OPTS --add-opens=java.rmi/sun.rmi.transport=ALL-
> UNNAMED"
>
>
>
>
> Not sure what to do.
>
>
> -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


AW: [External]Re: Tomcat 10 on RHEL 8 with Java 17

2023-09-27 Thread Thomas Hoffmann (Speed4Trade GmbH)
Hi Chris,

> -Ursprüngliche Nachricht-
> Von: Christopher Bland 
> Gesendet: Mittwoch, 27. September 2023 19:19
> An: Tomcat Users List 
> Betreff: Re: [External]Re: Tomcat 10 on RHEL 8 with Java 17
> 
> Hi Chris,
> 
> I didn’t get the error message.  Tomcat still isn’t starting
> 
> # ./catalina.sh run
> Using CATALINA_BASE:   /usr/local/tomcat
> Using CATALINA_HOME:   /usr/local/tomcat
> Using CATALINA_TMPDIR: /usr/local/tomcat/temp
> Using JRE_HOME:/usr/lib/jvm/java-17-openjdk-17.0.8.0.7-2.el8.x86_64
> Using CLASSPATH:
> /usr/local/tomcat/bin/*:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomc
> at/bin/tomcat-juli.jar
> Using CATALINA_OPTS:   -XX:+UseG1GC -Xmx3000m
> 
> # ps -ef | grep tomc
> root  104975  104815  0 13:08 pts/000:00:00 grep --color=auto tomc
 
You grep for tomcat. The file starts a java-process. Maybe it doesn’t catch the 
right process.
Could you check whether java processes are running?

Or check "netstat -tulpen" if something is listening on the specified port 
(according to server.xml).


> @Darryl
> 
> Hi Darryl,
> 
> Just checked, permissions look correct
> 
> # ls -ld /var/log/tomcat/ /usr/local/tomcat/logs/ drwxr-x---. 2 tomcat tomcat
> 26 Sep 26 20:14 /usr/local/tomcat/logs/ drwxr-xr-x. 2 tomcat tomcat  6 Sep 26
> 19:48 /var/log/tomcat/
> 
> 
> -Chris
> 
> 
> From: Darryl Baker 
> Date: Wednesday, September 27, 2023 at 12:59 PM
> To: Tomcat Users List 
> Subject: [External]Re: Tomcat 10 on RHEL 8 with Java 17 [You don't often get
> email from darryl.ba...@northwestern.edu. Learn why this is important at
> https://aka.ms/LearnAboutSenderIdentification ]
> 
> Chris,
> With no logs at all check the permissions on the log directories and 
> make
> sure that the user Tomcat is running as has write permissions there.  This
> sounds very much like what I ran into my first time setting up Tomcat from
> scratch.
> 
> Darryl Baker, GSEC, GCLD (he/him/his)
> Sr. System Administrator
> Distributed Application Platform Services Northwestern University 4th Floor
> 2020 Ridge Avenue
> Evanston, IL 60208-0801
> darryl.ba...@northwestern.edu <mailto:darryl.ba...@northwestern.edu>
> (847) 467-6674 
> 
> 
> 
> 
> On 9/27/23, 9:31 AM, "Christopher Bland"  <mailto:ch...@fdu.edu>> wrote:
> 
> 
> Hi All,
> 
> 
> I just deployed Tomcat v10.1.13 on a new machine. When I start Tomcat it
> says it has started but I don’t see the daemon running and I don’t have any
> logs. I tried running Catalina.sh directly.
> 
> 
> # ./catalina.sh start
> Using CATALINA_BASE: /usr/local/tomcat
> Using CATALINA_HOME: /usr/local/tomcat
> Using CATALINA_TMPDIR: /usr/local/tomcat/temp Using JRE_HOME:
> /usr/lib/jvm/java-17-openjdk-17.0.8.0.7-2.el8.x86_64
> Using CLASSPATH:
> /usr/local/tomcat/bin/*:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomc
> at/bin/tomcat-juli.jar
> Using CATALINA_OPTS: -XX:+UseG1GC -Xmx3000m Tomcat started.
> 
> 
> Not running – No Daemon + No Logs
> 
> 
> # ./catalina.sh debug
> Using CATALINA_BASE: /usr/local/tomcat
> Using CATALINA_HOME: /usr/local/tomcat
> Using CATALINA_TMPDIR: /usr/local/tomcat/temp Using JAVA_HOME:
> /usr/lib/jvm/java-17-openjdk-17.0.8.0.7-2.el8.x86_64
> Using CLASSPATH:
> /usr/local/tomcat/bin/*:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomc
> at/bin/tomcat-juli.jar
> Using CATALINA_OPTS: -XX:+UseG1GC -Xmx3000m invalid option: --add-
> opens=java.base/java.lang=ALL-UNNAMED
> 
> 
> Usage: jdb   
> 
> 
> where options include:
> 
> 
> There are several of the --add-opens statements that cause startup to fail in
> catalina.sh
> 
> 
> # Add the module start-up parameters required by Tomcat
> JAVA_OPTS="$JAVA_OPTS --add-opens=java.base/java.lang=ALL-
> UNNAMED"
> JAVA_OPTS="$JAVA_OPTS --add-opens=java.base/java.io=ALL-UNNAMED"
> JAVA_OPTS="$JAVA_OPTS --add-opens=java.base/java.util=ALL-
> UNNAMED"
> JAVA_OPTS="$JAVA_OPTS --add-opens=java.base/java.util.concurrent=ALL-
> UNNAMED"
> JAVA_OPTS="$JAVA_OPTS --add-opens=java.rmi/sun.rmi.transport=ALL-
> UNNAMED"
> 
> 
> 
> 
> Not sure what to do.
> 
> 
> -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: [External]Re: Tomcat 10 on RHEL 8 with Java 17

2023-09-27 Thread Stephanie Panah
I am late to this conversation, and I did not read all the thread.
But, I had something similar to this, about six months ago.
The solution to get Tomcat running was to "enter" the directory that tomcat
is housed in:
eg; c:\program files\apache tomcat..
simply opening the directory helped to get tomcat running.
I had a Tomcat-Eclipse-JavaJDK issue, and opening that directory was the
key.
I hope that this helps.


On Wed, Sep 27, 2023 at 10:19 AM Christopher Bland  wrote:

> Hi Chris,
>
> I didn’t get the error message.  Tomcat still isn’t starting
>
> # ./catalina.sh run
> Using CATALINA_BASE:   /usr/local/tomcat
> Using CATALINA_HOME:   /usr/local/tomcat
> Using CATALINA_TMPDIR: /usr/local/tomcat/temp
> Using JRE_HOME:/usr/lib/jvm/java-17-openjdk-17.0.8.0.7-2.el8.x86_64
> Using CLASSPATH:
>  
> /usr/local/tomcat/bin/*:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar
> Using CATALINA_OPTS:   -XX:+UseG1GC -Xmx3000m
>
> # ps -ef | grep tomc
> root  104975  104815  0 13:08 pts/000:00:00 grep --color=auto tomc
>
> @Darryl
>
> Hi Darryl,
>
> Just checked, permissions look correct
>
> # ls -ld /var/log/tomcat/ /usr/local/tomcat/logs/
> drwxr-x---. 2 tomcat tomcat 26 Sep 26 20:14 /usr/local/tomcat/logs/
> drwxr-xr-x. 2 tomcat tomcat  6 Sep 26 19:48 /var/log/tomcat/
>
>
> -Chris
>
>
> From: Darryl Baker 
> Date: Wednesday, September 27, 2023 at 12:59 PM
> To: Tomcat Users List 
> Subject: [External]Re: Tomcat 10 on RHEL 8 with Java 17
> [You don't often get email from darryl.ba...@northwestern.edu. Learn why
> this is important at https://aka.ms/LearnAboutSenderIdentification ]
>
> Chris,
> With no logs at all check the permissions on the log directories
> and make sure that the user Tomcat is running as has write permissions
> there.  This sounds very much like what I ran into my first time setting up
> Tomcat from scratch.
>
> Darryl Baker, GSEC, GCLD (he/him/his)
> Sr. System Administrator
> Distributed Application Platform Services
> Northwestern University
> 4th Floor
> 2020 Ridge Avenue
> Evanston, IL 60208-0801
> darryl.ba...@northwestern.edu <mailto:darryl.ba...@northwestern.edu>
> (847) 467-6674 
>
>
>
>
> On 9/27/23, 9:31 AM, "Christopher Bland"  ch...@fdu.edu>> wrote:
>
>
> Hi All,
>
>
> I just deployed Tomcat v10.1.13 on a new machine. When I start Tomcat it
> says it has started but I don’t see the daemon running and I don’t have any
> logs. I tried running Catalina.sh directly.
>
>
> # ./catalina.sh start
> Using CATALINA_BASE: /usr/local/tomcat
> Using CATALINA_HOME: /usr/local/tomcat
> Using CATALINA_TMPDIR: /usr/local/tomcat/temp
> Using JRE_HOME: /usr/lib/jvm/java-17-openjdk-17.0.8.0.7-2.el8.x86_64
> Using CLASSPATH:
> /usr/local/tomcat/bin/*:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar
> Using CATALINA_OPTS: -XX:+UseG1GC -Xmx3000m
> Tomcat started.
>
>
> Not running – No Daemon + No Logs
>
>
> # ./catalina.sh debug
> Using CATALINA_BASE: /usr/local/tomcat
> Using CATALINA_HOME: /usr/local/tomcat
> Using CATALINA_TMPDIR: /usr/local/tomcat/temp
> Using JAVA_HOME: /usr/lib/jvm/java-17-openjdk-17.0.8.0.7-2.el8.x86_64
> Using CLASSPATH:
> /usr/local/tomcat/bin/*:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar
> Using CATALINA_OPTS: -XX:+UseG1GC -Xmx3000m
> invalid option: --add-opens=java.base/java.lang=ALL-UNNAMED
>
>
> Usage: jdb   
>
>
> where options include:
>
>
> There are several of the --add-opens statements that cause startup to fail
> in catalina.sh
>
>
> # Add the module start-up parameters required by Tomcat
> JAVA_OPTS="$JAVA_OPTS --add-opens=java.base/java.lang=ALL-UNNAMED"
> JAVA_OPTS="$JAVA_OPTS --add-opens=java.base/java.io=ALL-UNNAMED"
> JAVA_OPTS="$JAVA_OPTS --add-opens=java.base/java.util=ALL-UNNAMED"
> JAVA_OPTS="$JAVA_OPTS
> --add-opens=java.base/java.util.concurrent=ALL-UNNAMED"
> JAVA_OPTS="$JAVA_OPTS --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED"
>
>
>
>
> Not sure what to do.
>
>
> -Chris
>
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>


Re: [External]Re: Tomcat 10 on RHEL 8 with Java 17

2023-09-27 Thread Christopher Bland
Hi Chris,

I didn’t get the error message.  Tomcat still isn’t starting

# ./catalina.sh run
Using CATALINA_BASE:   /usr/local/tomcat
Using CATALINA_HOME:   /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME:/usr/lib/jvm/java-17-openjdk-17.0.8.0.7-2.el8.x86_64
Using CLASSPATH:   
/usr/local/tomcat/bin/*:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar
Using CATALINA_OPTS:   -XX:+UseG1GC -Xmx3000m

# ps -ef | grep tomc
root  104975  104815  0 13:08 pts/000:00:00 grep --color=auto tomc

@Darryl

Hi Darryl,

Just checked, permissions look correct

# ls -ld /var/log/tomcat/ /usr/local/tomcat/logs/
drwxr-x---. 2 tomcat tomcat 26 Sep 26 20:14 /usr/local/tomcat/logs/
drwxr-xr-x. 2 tomcat tomcat  6 Sep 26 19:48 /var/log/tomcat/


-Chris


From: Darryl Baker 
Date: Wednesday, September 27, 2023 at 12:59 PM
To: Tomcat Users List 
Subject: [External]Re: Tomcat 10 on RHEL 8 with Java 17
[You don't often get email from darryl.ba...@northwestern.edu. Learn why this 
is important at https://aka.ms/LearnAboutSenderIdentification ]

Chris,
With no logs at all check the permissions on the log directories and 
make sure that the user Tomcat is running as has write permissions there.  This 
sounds very much like what I ran into my first time setting up Tomcat from 
scratch.

Darryl Baker, GSEC, GCLD (he/him/his)
Sr. System Administrator
Distributed Application Platform Services
Northwestern University
4th Floor
2020 Ridge Avenue
Evanston, IL 60208-0801
darryl.ba...@northwestern.edu <mailto:darryl.ba...@northwestern.edu>
(847) 467-6674 




On 9/27/23, 9:31 AM, "Christopher Bland" mailto:ch...@fdu.edu>> wrote:


Hi All,


I just deployed Tomcat v10.1.13 on a new machine. When I start Tomcat it says 
it has started but I don’t see the daemon running and I don’t have any logs. I 
tried running Catalina.sh directly.


# ./catalina.sh start
Using CATALINA_BASE: /usr/local/tomcat
Using CATALINA_HOME: /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME: /usr/lib/jvm/java-17-openjdk-17.0.8.0.7-2.el8.x86_64
Using CLASSPATH: 
/usr/local/tomcat/bin/*:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar
Using CATALINA_OPTS: -XX:+UseG1GC -Xmx3000m
Tomcat started.


Not running – No Daemon + No Logs


# ./catalina.sh debug
Using CATALINA_BASE: /usr/local/tomcat
Using CATALINA_HOME: /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JAVA_HOME: /usr/lib/jvm/java-17-openjdk-17.0.8.0.7-2.el8.x86_64
Using CLASSPATH: 
/usr/local/tomcat/bin/*:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar
Using CATALINA_OPTS: -XX:+UseG1GC -Xmx3000m
invalid option: --add-opens=java.base/java.lang=ALL-UNNAMED


Usage: jdb   


where options include:


There are several of the --add-opens statements that cause startup to fail in 
catalina.sh


# Add the module start-up parameters required by Tomcat
JAVA_OPTS="$JAVA_OPTS --add-opens=java.base/java.lang=ALL-UNNAMED"
JAVA_OPTS="$JAVA_OPTS --add-opens=java.base/java.io=ALL-UNNAMED"
JAVA_OPTS="$JAVA_OPTS --add-opens=java.base/java.util=ALL-UNNAMED"
JAVA_OPTS="$JAVA_OPTS --add-opens=java.base/java.util.concurrent=ALL-UNNAMED"
JAVA_OPTS="$JAVA_OPTS --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED"




Not sure what to do.


-Chris




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


Re: Tomcat 10 on RHEL 8 with Java 17

2023-09-27 Thread Darryl Baker
Chris,
With no logs at all check the permissions on the log directories and 
make sure that the user Tomcat is running as has write permissions there.  This 
sounds very much like what I ran into my first time setting up Tomcat from 
scratch.

Darryl Baker, GSEC, GCLD (he/him/his) 
Sr. System Administrator 
Distributed Application Platform Services 
Northwestern University 
4th Floor 
2020 Ridge Avenue 
Evanston, IL 60208-0801 
darryl.ba...@northwestern.edu  
(847) 467-6674  




On 9/27/23, 9:31 AM, "Christopher Bland" mailto:ch...@fdu.edu>> wrote:


Hi All,


I just deployed Tomcat v10.1.13 on a new machine. When I start Tomcat it says 
it has started but I don’t see the daemon running and I don’t have any logs. I 
tried running Catalina.sh directly.


# ./catalina.sh start
Using CATALINA_BASE: /usr/local/tomcat
Using CATALINA_HOME: /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME: /usr/lib/jvm/java-17-openjdk-17.0.8.0.7-2.el8.x86_64
Using CLASSPATH: 
/usr/local/tomcat/bin/*:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar
Using CATALINA_OPTS: -XX:+UseG1GC -Xmx3000m
Tomcat started.


Not running – No Daemon + No Logs


# ./catalina.sh debug
Using CATALINA_BASE: /usr/local/tomcat
Using CATALINA_HOME: /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JAVA_HOME: /usr/lib/jvm/java-17-openjdk-17.0.8.0.7-2.el8.x86_64
Using CLASSPATH: 
/usr/local/tomcat/bin/*:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar
Using CATALINA_OPTS: -XX:+UseG1GC -Xmx3000m
invalid option: --add-opens=java.base/java.lang=ALL-UNNAMED


Usage: jdb   


where options include:


There are several of the --add-opens statements that cause startup to fail in 
catalina.sh


# Add the module start-up parameters required by Tomcat
JAVA_OPTS="$JAVA_OPTS --add-opens=java.base/java.lang=ALL-UNNAMED"
JAVA_OPTS="$JAVA_OPTS --add-opens=java.base/java.io=ALL-UNNAMED"
JAVA_OPTS="$JAVA_OPTS --add-opens=java.base/java.util=ALL-UNNAMED"
JAVA_OPTS="$JAVA_OPTS --add-opens=java.base/java.util.concurrent=ALL-UNNAMED"
JAVA_OPTS="$JAVA_OPTS --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED"




Not sure what to do.


-Chris




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



Re: Tomcat 10 on RHEL 8 with Java 17

2023-09-27 Thread Christopher Schultz

Chris,

On 9/27/23 10:30, Christopher Bland wrote:

Hi All,

I just deployed Tomcat v10.1.13  on a new machine.  When I start Tomcat it says 
it has started but I don’t see the daemon running and I don’t have any logs.  I 
tried running Catalina.sh directly.

# ./catalina.sh start
Using CATALINA_BASE:   /usr/local/tomcat
Using CATALINA_HOME:   /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME:/usr/lib/jvm/java-17-openjdk-17.0.8.0.7-2.el8.x86_64
Using CLASSPATH:   
/usr/local/tomcat/bin/*:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar
Using CATALINA_OPTS:   -XX:+UseG1GC -Xmx3000m
Tomcat started.

Not running – No Daemon + No Logs

# ./catalina.sh debug
Using CATALINA_BASE:   /usr/local/tomcat
Using CATALINA_HOME:   /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JAVA_HOME:   /usr/lib/jvm/java-17-openjdk-17.0.8.0.7-2.el8.x86_64
Using CLASSPATH:   
/usr/local/tomcat/bin/*:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar
Using CATALINA_OPTS:   -XX:+UseG1GC -Xmx3000m
invalid option: --add-opens=java.base/java.lang=ALL-UNNAMED

Usage: jdb   

where options include:

There are several of the --add-opens statements that cause startup to fail in 
catalina.sh

# Add the module start-up parameters required by Tomcat
JAVA_OPTS="$JAVA_OPTS --add-opens=java.base/java.lang=ALL-UNNAMED"
JAVA_OPTS="$JAVA_OPTS --add-opens=java.base/java.io=ALL-UNNAMED"
JAVA_OPTS="$JAVA_OPTS --add-opens=java.base/java.util=ALL-UNNAMED"
JAVA_OPTS="$JAVA_OPTS --add-opens=java.base/java.util.concurrent=ALL-UNNAMED"
JAVA_OPTS="$JAVA_OPTS --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED"


Not sure what to do.


Try:

$ ./catalina.sh run

and post the output if it's not obvious what's happening.

-chris

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



Tomcat 10 on RHEL 8 with Java 17

2023-09-27 Thread Christopher Bland
Hi All,

I just deployed Tomcat v10.1.13  on a new machine.  When I start Tomcat it says 
it has started but I don’t see the daemon running and I don’t have any logs.  I 
tried running Catalina.sh directly.

# ./catalina.sh start
Using CATALINA_BASE:   /usr/local/tomcat
Using CATALINA_HOME:   /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME:/usr/lib/jvm/java-17-openjdk-17.0.8.0.7-2.el8.x86_64
Using CLASSPATH:   
/usr/local/tomcat/bin/*:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar
Using CATALINA_OPTS:   -XX:+UseG1GC -Xmx3000m
Tomcat started.

Not running – No Daemon + No Logs

# ./catalina.sh debug
Using CATALINA_BASE:   /usr/local/tomcat
Using CATALINA_HOME:   /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JAVA_HOME:   /usr/lib/jvm/java-17-openjdk-17.0.8.0.7-2.el8.x86_64
Using CLASSPATH:   
/usr/local/tomcat/bin/*:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar
Using CATALINA_OPTS:   -XX:+UseG1GC -Xmx3000m
invalid option: --add-opens=java.base/java.lang=ALL-UNNAMED

Usage: jdb   

where options include:

There are several of the --add-opens statements that cause startup to fail in 
catalina.sh

# Add the module start-up parameters required by Tomcat
JAVA_OPTS="$JAVA_OPTS --add-opens=java.base/java.lang=ALL-UNNAMED"
JAVA_OPTS="$JAVA_OPTS --add-opens=java.base/java.io=ALL-UNNAMED"
JAVA_OPTS="$JAVA_OPTS --add-opens=java.base/java.util=ALL-UNNAMED"
JAVA_OPTS="$JAVA_OPTS --add-opens=java.base/java.util.concurrent=ALL-UNNAMED"
JAVA_OPTS="$JAVA_OPTS --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED"


Not sure what to do.

-Chris


Re: Enable two way SSL in Apache Tomcat 10 Version 10.0.27

2023-08-20 Thread Kaushal Shriyan
On Sun, Aug 20, 2023 at 4:25 PM  wrote:

> Kaushal,
>
> please check the new configuration method with SSLHostConfig - your's is
> probably from an older version, right? In the working version you already
> use it.
>
> see my (redacted) config:
>
>  protocol="org.apache.coyote.http11.Http11Nio2Protocol"
>
>  sslImplementationName="org.apache.tomcat.util.net.jsse.JSSEImplementation"
>allowTrace="false"
>maxThreads="150"
>SSLEnabled="true"
>compression="off"
>scheme="https"
>server="Apache Tomcat"
>secure="true"
>defaultSSLHostConfigName="example.com" >
>  compression="on" />
>hostName="example.com"
>   honorCipherOrder="true"
>   protocols="+TLSv1.2,+TLSv1.3"
>   certificateVerification="required"
> 
>   truststoreFile="${catalina.base}/conf/ssl/cacerts.jks"
>   truststorePassword="changeit"
>
> ciphers="TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:!DSS">
> certificateKeystoreFile="${catalina.base}/conf/ssl/tomcat.p12"
> certificateKeystorePassword="changeit"
> certificateKeyAlias="tomcat"
> type="RSA" />
> 
> 
>
>
> Hope this helps
>
> Peter
>
>
Thanks Peter for the quick email response and appreciate it. It worked like
a charm. Thanks once again.

Best Regards,

Kaushal


Re: Enable two way SSL in Apache Tomcat 10 Version 10.0.27

2023-08-20 Thread logo
Kaushal,

please check the new configuration method with SSLHostConfig - your's is 
probably from an older version, right? In the working version you already use 
it. 

see my (redacted) config:

 


  truststoreFile="${catalina.base}/conf/ssl/cacerts.jks"
  truststorePassword="changeit"
  
ciphers="TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:!DSS">
   




Hope this helps

Peter


> Am 20.08.2023 um 05:47 schrieb Kaushal Shriyan :
> 
> Hi,
> 
> I am attaching both server.xml for one way SSL and Two Way SSL 
> 
> One way SSL /opt/tomcat10/conf/server.xml -> 
> tomcat10serverworkingonewaytls.xml (working)
> Two way SSL /opt/tomcat10/conf/server.xml -> 
> tomcat10serverworkingtwowaytls.xml (Not working) 
> 
> Please comment. Thanks in advance.
> 
> Best Regards,
> 
> Kaushal
> 
> On Sun, Aug 20, 2023 at 6:48 AM Kaushal Shriyan  <mailto:kaushalshri...@gmail.com>> wrote:
>> 
>> 
>> On Thu, Aug 10, 2023 at 11:29 AM Christopher Schultz 
>> mailto:ch...@christopherschultz.net>> wrote:
>>> Kaushal,
>>> 
>>> On 8/7/23 22:23, Kaushal Shriyan wrote:
>>> > Hi,
>>> > 
>>> > I have gone through 
>>> > https://tomcat.apache.org/tomcat-10.0-doc/ssl-howto.html.
>>> > Is there a way to enable two way SSL (mutual) in Apache Tomcat 10 Version
>>> > 10.0.27?
>>> > 
>>> > Please guide me.
>>> > 
>>> > Thanks in Advance.
>>> 
>>> I see you have "gone through" the SSL Howto, but could you be specific 
>>> about what you have actually done? For example, what does your 
>>>  in server.xml look like, what does your web.xml look like, 
>>> and what files do you have on the disk?
>>> 
>>> -chris
>>> 
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org 
>>> <mailto:users-unsubscr...@tomcat.apache.org>
>>> For additional commands, e-mail: users-h...@tomcat.apache.org 
>>> <mailto:users-h...@tomcat.apache.org>
>>> 
>> 
>> 
>> Hi Chris,
>> 
>> Apologies for the delay in replying. Thanks in advance. I am trying to 
>> enable Mutual two way SSL using tomcat 10.0.27 on Red Hat Enterprise Linux 
>> release 8.8 (Ootpa). Currently I am encountering the below issue. 
>> 
>> 20-Aug-2023 06:40:25.183 SEVERE [main] 
>> org.apache.catalina.util.LifecycleBase.handleSubClassException Failed to 
>> initialize component [Connector[HTTP/1.1-10443]]
>> org.apache.catalina.LifecycleException: Protocol handler initialization 
>> failed 
>> 
>> Caused by: java.lang.IllegalArgumentException: No SSLHostConfig element was 
>> found with the hostName [_default_] to match the defaultSSLHostConfigName 
>> for the connector [https-openssl-nio-10443] 
>> 
>> #cat /etc/redhat-release
>> Red Hat Enterprise Linux release 8.8 (Ootpa)
>> # /opt/tomcat10/bin/version.sh
>> Using CATALINA_BASE:   /opt/tomcat10
>> Using CATALINA_HOME:   /opt/tomcat10
>> Using CATALINA_TMPDIR: /opt/tomcat10/temp
>> Using JRE_HOME:/usr
>> Using CLASSPATH:   
>> /opt/tomcat10/bin/bootstrap.jar:/opt/tomcat10/bin/tomcat-juli.jar
>> Using CATALINA_OPTS:
>> Server version: Apache Tomcat/10.0.27
>> Server built:   Oct 3 2022 14:18:31 UTC
>> Server number:  10.0.27.0
>> OS Name:Linux
>> OS Version: 4.18.0-477.15.1.el8_8.x86_64
>> Architecture:   amd64
>> JVM Version:1.8.0_382-b05
>> JVM Vendor: Red Hat, Inc.
>> #
>> 
>> #cat catalina.out
>> 20-Aug-2023 06:40:24.753 WARNING [main] 
>> org.apache.tomcat.util.digester.SetPropertiesRule.begin Match 
>> [Server/Service/Connector] failed to set property [clientAuth] to [want]
>> 20-Aug-2023 06:40:24.756 WARNING [main] 
>> org.apache.tomcat.util.digester.SetPropertiesRule.begin Match 
>> [Server/Se

Re: Enable two way SSL in Apache Tomcat 10 Version 10.0.27

2023-08-19 Thread Kaushal Shriyan
Hi,

I am attaching both server.xml for one way SSL and Two Way SSL

One way SSL
/opt/tomcat10/conf/server.xml -> tomcat10serverworkingonewaytls.xml
(working)
Two way SSL /opt/tomcat10/conf/server.xml
-> tomcat10serverworkingtwowaytls.xml (Not working)

Please comment. Thanks in advance.

Best Regards,

Kaushal

On Sun, Aug 20, 2023 at 6:48 AM Kaushal Shriyan 
wrote:

>
>
> On Thu, Aug 10, 2023 at 11:29 AM Christopher Schultz <
> ch...@christopherschultz.net> wrote:
>
>> Kaushal,
>>
>> On 8/7/23 22:23, Kaushal Shriyan wrote:
>> > Hi,
>> >
>> > I have gone through
>> https://tomcat.apache.org/tomcat-10.0-doc/ssl-howto.html.
>> > Is there a way to enable two way SSL (mutual) in Apache Tomcat 10
>> Version
>> > 10.0.27?
>> >
>> > Please guide me.
>> >
>> > Thanks in Advance.
>>
>> I see you have "gone through" the SSL Howto, but could you be specific
>> about what you have actually done? For example, what does your
>>  in server.xml look like, what does your web.xml look like,
>> and what files do you have on the disk?
>>
>> -chris
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>
>>
>
> Hi Chris,
>
> Apologies for the delay in replying. Thanks in advance. I am trying to
> enable Mutual two way SSL using tomcat 10.0.27 on Red Hat Enterprise Linux
> release 8.8 (Ootpa). Currently I am encountering the below issue.
>
> 20-Aug-2023 06:40:25.183 SEVERE [main]
> org.apache.catalina.util.LifecycleBase.handleSubClassException Failed to
> initialize component [Connector[HTTP/1.1-10443]]
> org.apache.catalina.LifecycleException: Protocol handler initialization
> failed
>
> Caused by: java.lang.IllegalArgumentException: No SSLHostConfig element
> was found with the hostName [_default_] to match the
> defaultSSLHostConfigName for the connector [https-openssl-nio-10443]
>
> #cat /etc/redhat-release
>
> *Red Hat Enterprise Linux release 8.8 (Ootpa)*
> # /opt/tomcat10/bin/version.sh
> Using CATALINA_BASE:   /opt/tomcat10
> Using CATALINA_HOME:   /opt/tomcat10
> Using CATALINA_TMPDIR: /opt/tomcat10/temp
> Using JRE_HOME:/usr
> Using CLASSPATH:
> /opt/tomcat10/bin/bootstrap.jar:/opt/tomcat10/bin/tomcat-juli.jar
> Using CATALINA_OPTS:
> Server version: Apache Tomcat/10.0.27
> Server built:   Oct 3 2022 14:18:31 UTC
> Server number:  10.0.27.0
> OS Name:Linux
> OS Version: 4.18.0-477.15.1.el8_8.x86_64
> Architecture:   amd64
> JVM Version:1.8.0_382-b05
> JVM Vendor: Red Hat, Inc.
> #
>
> #*cat catalina.out*
> 20-Aug-2023 06:40:24.753 WARNING [main]
> org.apache.tomcat.util.digester.SetPropertiesRule.begin Match
> [Server/Service/Connector] failed to set property [clientAuth] to [want]
> 20-Aug-2023 06:40:24.756 WARNING [main]
> org.apache.tomcat.util.digester.SetPropertiesRule.begin Match
> [Server/Service/Connector] failed to set property [sslProtocol] to [TLS]
> 20-Aug-2023 06:40:24.756 WARNING [main]
> org.apache.tomcat.util.digester.SetPropertiesRule.begin Match
> [Server/Service/Connector] failed to set property [keystoreFile] to
> [/opt/tomcat10/ssl/keystore.jks]
> 20-Aug-2023 06:40:24.756 WARNING [main]
> org.apache.tomcat.util.digester.SetPropertiesRule.begin Match
> [Server/Service/Connector] failed to set property [keystorePass] to [apigee]
> 20-Aug-2023 06:40:24.757 WARNING [main]
> org.apache.tomcat.util.digester.SetPropertiesRule.begin Match
> [Server/Service/Connector] failed to set property [truststoreFile] to
> [/opt/tomcat10/ssl/clienttrustore.jks]
> 20-Aug-2023 06:40:24.757 WARNING [main]
> org.apache.tomcat.util.digester.SetPropertiesRule.begin Match
> [Server/Service/Connector] failed to set property [truststorePass] to
> [apigee]
> 20-Aug-2023 06:40:24.809 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log Server version name:
>   Apache Tomcat/10.0.27
> 20-Aug-2023 06:40:24.809 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log Server built:
>  Oct 3 2022 14:18:31 UTC
> 20-Aug-2023 06:40:24.809 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log Server version
> number: 10.0.27.0
> 20-Aug-2023 06:40:24.809 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log OS Name:
>   Linux
> 20-Aug-2023 06:40:24.810 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log OS Version:
>  4.18.0-477.15.1.el8_8.x86_64
> 20-Aug-2023 06:40:24.810 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log Ar

Re: Enable two way SSL in Apache Tomcat 10 Version 10.0.27

2023-08-19 Thread Kaushal Shriyan
On Thu, Aug 10, 2023 at 11:29 AM Christopher Schultz <
ch...@christopherschultz.net> wrote:

> Kaushal,
>
> On 8/7/23 22:23, Kaushal Shriyan wrote:
> > Hi,
> >
> > I have gone through
> https://tomcat.apache.org/tomcat-10.0-doc/ssl-howto.html.
> > Is there a way to enable two way SSL (mutual) in Apache Tomcat 10 Version
> > 10.0.27?
> >
> > Please guide me.
> >
> > Thanks in Advance.
>
> I see you have "gone through" the SSL Howto, but could you be specific
> about what you have actually done? For example, what does your
>  in server.xml look like, what does your web.xml look like,
> and what files do you have on the disk?
>
> -chris
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

Hi Chris,

Apologies for the delay in replying. Thanks in advance. I am trying to
enable Mutual two way SSL using tomcat 10.0.27 on Red Hat Enterprise Linux
release 8.8 (Ootpa). Currently I am encountering the below issue.

20-Aug-2023 06:40:25.183 SEVERE [main]
org.apache.catalina.util.LifecycleBase.handleSubClassException Failed to
initialize component [Connector[HTTP/1.1-10443]]
org.apache.catalina.LifecycleException: Protocol handler initialization
failed

Caused by: java.lang.IllegalArgumentException: No SSLHostConfig element was
found with the hostName [_default_] to match the defaultSSLHostConfigName
for the connector [https-openssl-nio-10443]

#cat /etc/redhat-release

*Red Hat Enterprise Linux release 8.8 (Ootpa)*
# /opt/tomcat10/bin/version.sh
Using CATALINA_BASE:   /opt/tomcat10
Using CATALINA_HOME:   /opt/tomcat10
Using CATALINA_TMPDIR: /opt/tomcat10/temp
Using JRE_HOME:/usr
Using CLASSPATH:
/opt/tomcat10/bin/bootstrap.jar:/opt/tomcat10/bin/tomcat-juli.jar
Using CATALINA_OPTS:
Server version: Apache Tomcat/10.0.27
Server built:   Oct 3 2022 14:18:31 UTC
Server number:  10.0.27.0
OS Name:Linux
OS Version: 4.18.0-477.15.1.el8_8.x86_64
Architecture:   amd64
JVM Version:1.8.0_382-b05
JVM Vendor: Red Hat, Inc.
#

#*cat catalina.out*
20-Aug-2023 06:40:24.753 WARNING [main]
org.apache.tomcat.util.digester.SetPropertiesRule.begin Match
[Server/Service/Connector] failed to set property [clientAuth] to [want]
20-Aug-2023 06:40:24.756 WARNING [main]
org.apache.tomcat.util.digester.SetPropertiesRule.begin Match
[Server/Service/Connector] failed to set property [sslProtocol] to [TLS]
20-Aug-2023 06:40:24.756 WARNING [main]
org.apache.tomcat.util.digester.SetPropertiesRule.begin Match
[Server/Service/Connector] failed to set property [keystoreFile] to
[/opt/tomcat10/ssl/keystore.jks]
20-Aug-2023 06:40:24.756 WARNING [main]
org.apache.tomcat.util.digester.SetPropertiesRule.begin Match
[Server/Service/Connector] failed to set property [keystorePass] to [apigee]
20-Aug-2023 06:40:24.757 WARNING [main]
org.apache.tomcat.util.digester.SetPropertiesRule.begin Match
[Server/Service/Connector] failed to set property [truststoreFile] to
[/opt/tomcat10/ssl/clienttrustore.jks]
20-Aug-2023 06:40:24.757 WARNING [main]
org.apache.tomcat.util.digester.SetPropertiesRule.begin Match
[Server/Service/Connector] failed to set property [truststorePass] to
[apigee]
20-Aug-2023 06:40:24.809 INFO [main]
org.apache.catalina.startup.VersionLoggerListener.log Server version name:
  Apache Tomcat/10.0.27
20-Aug-2023 06:40:24.809 INFO [main]
org.apache.catalina.startup.VersionLoggerListener.log Server built:
 Oct 3 2022 14:18:31 UTC
20-Aug-2023 06:40:24.809 INFO [main]
org.apache.catalina.startup.VersionLoggerListener.log Server version
number: 10.0.27.0
20-Aug-2023 06:40:24.809 INFO [main]
org.apache.catalina.startup.VersionLoggerListener.log OS Name:
  Linux
20-Aug-2023 06:40:24.810 INFO [main]
org.apache.catalina.startup.VersionLoggerListener.log OS Version:
 4.18.0-477.15.1.el8_8.x86_64
20-Aug-2023 06:40:24.810 INFO [main]
org.apache.catalina.startup.VersionLoggerListener.log Architecture:
 amd64
20-Aug-2023 06:40:24.810 INFO [main]
org.apache.catalina.startup.VersionLoggerListener.log Java Home:
  /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.382.b05-2.el8.x86_64/jre
20-Aug-2023 06:40:24.810 INFO [main]
org.apache.catalina.startup.VersionLoggerListener.log JVM Version:
  1.8.0_382-b05
20-Aug-2023 06:40:24.810 INFO [main]
org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:
 Red Hat, Inc.
20-Aug-2023 06:40:24.810 INFO [main]
org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:
  /opt/tomcat10
20-Aug-2023 06:40:24.810 INFO [main]
org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:
  /opt/tomcat10
20-Aug-2023 06:40:24.811 INFO [main]
org.apache.catalina.startup.VersionLoggerListener.log Command line
argument:
-Djava.util.logging.config.file=/opt/tomcat10/conf/logging.properties
20-Aug-2023 06:40:24

Re: Enable two way SSL in Apache Tomcat 10 Version 10.0.27

2023-08-09 Thread Christopher Schultz

Kaushal,

On 8/7/23 22:23, Kaushal Shriyan wrote:

Hi,

I have gone through https://tomcat.apache.org/tomcat-10.0-doc/ssl-howto.html.
Is there a way to enable two way SSL (mutual) in Apache Tomcat 10 Version
10.0.27?

Please guide me.

Thanks in Advance.


I see you have "gone through" the SSL Howto, but could you be specific 
about what you have actually done? For example, what does your 
 in server.xml look like, what does your web.xml look like, 
and what files do you have on the disk?


-chris

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



Enable two way SSL in Apache Tomcat 10 Version 10.0.27

2023-08-07 Thread Kaushal Shriyan
Hi,

I have gone through https://tomcat.apache.org/tomcat-10.0-doc/ssl-howto.html.
Is there a way to enable two way SSL (mutual) in Apache Tomcat 10 Version
10.0.27?

Please guide me.

Thanks in Advance.

Best Regards,

Kaushal


Re: Re-Cannot upload an image file from a deployed JSP page in Tomcat 10

2023-06-12 Thread Christopher Schultz

Lauri,

On 6/10/23 03:18, Lauri wrote:

Hi,
Thanks for all the tips.
It is solved.
I managed to create such a working page in Tomcat 9 (without any specific 
configuration).
I just deployed that same page in Tomcat 10(also without any specific 
configuration), and it works.
For the rest, I will wait for Tomcat 11. I guess it will be a more stable 
version.


Tomcat 10 is very stable, and will likely behave the same as Tomcat 11 
will. The problem is that you are fighting against the API-switchover 
from Java EE to Jakarta EE which is confusing to everybody. The good 
news is that Tomcat supports that switchover in a very elegant fashion.


-chris


From: Christopher Schultz 
Sent: Friday, June 2, 2023 4:45 PM
To: users@tomcat.apache.org 
Subject: Re: Re-Cannot upload an image file from a deployed JSP page in Tomcat 
10

Lauri,

On 6/2/23 02:58, Lauri wrote:

@Thomas:

I have made a test using the request.getParts() API, as mentioned here:
https://docs.oracle.com/javaee/6/tutorial/doc/glrbb.html

The test upload application has been modified as:

-- web.xml
---
http://xmlns.jcp.org/xml/ns/javaee";
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
   xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
   
http://xmlns.jcp.org/xml/ns/javaee/web-app_5_0.xsd";



If you want to use Tomcat 10, these are the wrong XML schema references.
You want the Jakarta ones.


<%@ page import="java.io.*, java.util.*, javax.servlet.*, javax.servlet.http.*" 
%>


If you want to use Tomcat 10, these are the wrong packages. You want the
Jakarta ones.

-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: Re-Cannot upload an image file from a deployed JSP page in Tomcat 10

2023-06-10 Thread Lauri
Hi,
Thanks for all the tips.
It is solved.
I managed to create such a working page in Tomcat 9 (without any specific 
configuration).
I just deployed that same page in Tomcat 10(also without any specific 
configuration), and it works.
For the rest, I will wait for Tomcat 11. I guess it will be a more stable 
version.
Kind Regards,
Lauri


From: Christopher Schultz 
Sent: Friday, June 2, 2023 4:45 PM
To: users@tomcat.apache.org 
Subject: Re: Re-Cannot upload an image file from a deployed JSP page in Tomcat 
10

Lauri,

On 6/2/23 02:58, Lauri wrote:
> @Thomas:
>
> I have made a test using the request.getParts() API, as mentioned here:
> https://docs.oracle.com/javaee/6/tutorial/doc/glrbb.html
>
> The test upload application has been modified as:
>
> -- web.xml
> ---
> http://xmlns.jcp.org/xml/ns/javaee";
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>   xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
>   
> http://xmlns.jcp.org/xml/ns/javaee/web-app_5_0.xsd";


If you want to use Tomcat 10, these are the wrong XML schema references.
You want the Jakarta ones.

> <%@ page import="java.io.*, java.util.*, javax.servlet.*, 
> javax.servlet.http.*" %>

If you want to use Tomcat 10, these are the wrong packages. You want the
Jakarta ones.

-chris

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



Re: Re-Cannot upload an image file from a deployed JSP page in Tomcat 10

2023-06-02 Thread Christopher Schultz

Lauri,

On 6/2/23 02:58, Lauri wrote:

@Thomas:

I have made a test using the request.getParts() API, as mentioned here:
https://docs.oracle.com/javaee/6/tutorial/doc/glrbb.html

The test upload application has been modified as:

-- web.xml
---
http://xmlns.jcp.org/xml/ns/javaee";
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
  
http://xmlns.jcp.org/xml/ns/javaee/web-app_5_0.xsd";



If you want to use Tomcat 10, these are the wrong XML schema references. 
You want the Jakarta ones.



<%@ page import="java.io.*, java.util.*, javax.servlet.*, javax.servlet.http.*" 
%>


If you want to use Tomcat 10, these are the wrong packages. You want the 
Jakarta ones.


-chris

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



AW: AW: Re-Cannot upload an image file from a deployed JSP page in Tomcat 10

2023-06-02 Thread Thomas Hoffmann (Speed4Trade GmbH)
Hello Mark,

> -Ursprüngliche Nachricht-
> Von: Mark Thomas 
> Gesendet: Freitag, 2. Juni 2023 14:18
> An: users@tomcat.apache.org
> Betreff: Re: AW: Re-Cannot upload an image file from a deployed JSP page in
> Tomcat 10
> 
> On 02/06/2023 08:20, Thomas Hoffmann (Speed4Trade GmbH) wrote:
> > Hello Lauri,
> >
> >> -Ursprüngliche Nachricht-
> >> Von: Lauri 
> >> Gesendet: Freitag, 2. Juni 2023 08:58
> >> An: Tomcat Users List 
> >> Betreff: Re-Cannot upload an image file from a deployed JSP page in
> >> Tomcat
> >> 10
> >>
> >> @Thomas:
> >>
> >> I have made a test using the request.getParts() API, as mentioned here:
> >> https://docs.oracle.com/javaee/6/tutorial/doc/glrbb.html
> >>
> >> The test upload application has been modified as:
> >>
> >> -- web.xml
> >> ---
> >> http://xmlns.jcp.org/xml/ns/javaee";
> >>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> >>   xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
> >>   
> >> http://xmlns.jcp.org/xml/ns/javaee/web-app_5_0.xsd";
> >>   version="5.0">
> >> 
> >> ---
> >>
> >> -- index.html
> >> ---
> >> 
> >> 
> >> 
> >> 
> >> Upload Text File
> >> 
> >> 
> >>  Upload File
> >>  
> >>  
> >>  
> >>  
> >> 
> >> 
> >> ---
> >>
> >> -- upload.jsp
> >> ---
> >> <%@ page import="java.io.*, java.util.*, javax.servlet.*,
> javax.servlet.http.*"
> >> %> <%
> >>Part part = request.getPart("file");
> >>if (part != null) {
> >>  InputStream stream = part.getInputStream();
> >>  File file = new File("/tmp/" + part.getSubmittedFileName());
> >>  FileOutputStream outputStream = new FileOutputStream(file);
> >>  byte[] buffer = new byte[4096];
> >>  int bytesRead = -1;
> >>  while ((bytesRead = stream.read(buffer)) != -1) {
> >>outputStream.write(buffer, 0, bytesRead);
> >>  }
> >>  outputStream.close();
> >>  stream.close();
> >>} else {
> >>  out.println("No file uploaded.");
> >>}
> >> %>
> >> ---
> >>
> >> The @MultipartConfig is defined in the HTML file.
> >
> > The @MultipartConfig must be used in the servlet.
> > Here are examples:
> > https://stackoverflow.com/questions/19145489/multipartconfig-override-
> > in-web-xml Multipart-Upload with the mentioned methods can't be done
> > with JSP-Files solely as far as I can see.
> 
> That is not correct. You CAN use multi-part upload with JSP files.
> Rather than using the annotation, you have to define the upload in web.xml.
> See an earlier post from me in this thread for some links to some examples.

Thanks for the correction!
Now I understand the example in your link.

The trick is:
   
   /temp
   

> Mark
> 
> -


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



Re: AW: Re-Cannot upload an image file from a deployed JSP page in Tomcat 10

2023-06-02 Thread Mark Thomas

On 02/06/2023 08:20, Thomas Hoffmann (Speed4Trade GmbH) wrote:

Hello Lauri,


-Ursprüngliche Nachricht-
Von: Lauri 
Gesendet: Freitag, 2. Juni 2023 08:58
An: Tomcat Users List 
Betreff: Re-Cannot upload an image file from a deployed JSP page in Tomcat
10

@Thomas:

I have made a test using the request.getParts() API, as mentioned here:
https://docs.oracle.com/javaee/6/tutorial/doc/glrbb.html

The test upload application has been modified as:

-- web.xml
---
http://xmlns.jcp.org/xml/ns/javaee";
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
  
http://xmlns.jcp.org/xml/ns/javaee/web-app_5_0.xsd";
  version="5.0">

---

-- index.html
---




Upload Text File


 Upload File
 
 
 
 


---

-- upload.jsp
---
<%@ page import="java.io.*, java.util.*, javax.servlet.*, javax.servlet.http.*"
%> <%
   Part part = request.getPart("file");
   if (part != null) {
 InputStream stream = part.getInputStream();
 File file = new File("/tmp/" + part.getSubmittedFileName());
 FileOutputStream outputStream = new FileOutputStream(file);
 byte[] buffer = new byte[4096];
 int bytesRead = -1;
 while ((bytesRead = stream.read(buffer)) != -1) {
   outputStream.write(buffer, 0, bytesRead);
 }
 outputStream.close();
 stream.close();
   } else {
 out.println("No file uploaded.");
   }
%>
---

The @MultipartConfig is defined in the HTML file.


The @MultipartConfig must be used in the servlet.
Here are examples: 
https://stackoverflow.com/questions/19145489/multipartconfig-override-in-web-xml
Multipart-Upload with the mentioned methods can't be done with JSP-Files solely 
as far as I can see.


That is not correct. You CAN use multi-part upload with JSP files. 
Rather than using the annotation, you have to define the upload in 
web.xml. See an earlier post from me in this thread for some links to 
some examples.


Mark

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



AW: Re-Cannot upload an image file from a deployed JSP page in Tomcat 10

2023-06-02 Thread Thomas Hoffmann (Speed4Trade GmbH)
Hello Lauri,

> -Ursprüngliche Nachricht-
> Von: Lauri 
> Gesendet: Freitag, 2. Juni 2023 08:58
> An: Tomcat Users List 
> Betreff: Re-Cannot upload an image file from a deployed JSP page in Tomcat
> 10
> 
> @Thomas:
> 
> I have made a test using the request.getParts() API, as mentioned here:
> https://docs.oracle.com/javaee/6/tutorial/doc/glrbb.html
> 
> The test upload application has been modified as:
> 
> -- web.xml
> ---
> http://xmlns.jcp.org/xml/ns/javaee";
>  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>  xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
>  
> http://xmlns.jcp.org/xml/ns/javaee/web-app_5_0.xsd";
>  version="5.0">
> 
> ---
> 
> -- index.html
> ---
> 
> 
> 
> 
> Upload Text File
> 
> 
> Upload File
> 
> 
> 
> 
> 
> 
> ---
> 
> -- upload.jsp
> ---
> <%@ page import="java.io.*, java.util.*, javax.servlet.*, 
> javax.servlet.http.*"
> %> <%
>   Part part = request.getPart("file");
>   if (part != null) {
> InputStream stream = part.getInputStream();
> File file = new File("/tmp/" + part.getSubmittedFileName());
> FileOutputStream outputStream = new FileOutputStream(file);
> byte[] buffer = new byte[4096];
> int bytesRead = -1;
> while ((bytesRead = stream.read(buffer)) != -1) {
>   outputStream.write(buffer, 0, bytesRead);
> }
> outputStream.close();
> stream.close();
>   } else {
> out.println("No file uploaded.");
>   }
> %>
> ---
> 
> The @MultipartConfig is defined in the HTML file.

The @MultipartConfig must be used in the servlet.
Here are examples: 
https://stackoverflow.com/questions/19145489/multipartconfig-override-in-web-xml
 
Multipart-Upload with the mentioned methods can't be done with JSP-Files solely 
as far as I can see.
Only Servlets can be annotated or declared with MultipartConfig

I suggest to read some pages about servlets and also take a look at 
try-with-ressource.
Your topic is more about servlet and jsp programming and less about tomcat.



> When deployed in Tomcat 10, I still get these errors:
> 
> ---
> org.apache.jasper.JasperException: An exception occurred processing
> [/upload.jsp] at line [3]
> 
> 1: <%@ page import="java.io.*, java.util.*, javax.servlet.*,
> javax.servlet.http.*" %>
> 2: <%
> 3:   Part part = request.getPart("file");
> 4:   if (part != null) {
> 5: InputStream stream = part.getInputStream();
> 6: File file = new File("/tmp/" + part.getSubmittedFileName());
> ---
> 
> @Mark:
> 
> Refering to:
> https://stackoverflow.com/questions/37965890/add-annotation-to-jsp
> 
> I do not upload a (image) file to the database, but on the server (/tmp).
> 
> Kind Regards
> 
> 
> From: Mark Thomas 
> Sent: Thursday, June 1, 2023 11:29 AM
> To: users@tomcat.apache.org 
> Subject: Re: Re-Cannot upload an image file from a deployed JSP page in
> Tomcat 10
> 
> On 01/06/2023 10:18, Torsten Krah wrote:
> > Am Donnerstag, dem 01.06.2023 um 08:52 + schrieb Lauri:
> >>> You mention a servlet part, but I do not use a servlet.
> >>> All the code is contained in the JSP page.
> >
> > You need to divide that code in a JSP and in your upload servlet as
> > you need to provide the @MultipartConfig on that servlet which handles
> > your upload.
> > Without that you will get:
> >
> > Unable to process parts as no multi-part configuration has been
> > provided
> >
> > as an exception when accessing the request.getParts() API.
> >
> > The whole thing is all written there btw:
> >
> > https://docs.oracle.com/javaee/6/tutorial/doc/glrbb.html
> >
> > I don't know - maybe Mark does - if you can annotate a JSP page, had
> > never seen it or read about that so my best guess is, you can't do
> > that and you need to use a servlet + jsp unless you want to overwrite
> > the JspServlet from Tomcat with a custom one which does have that
> > annotation and handles the Jsp stuff.
> 
> You can do this via web.xml. See the following SO question for an example
> specific to this question:
> 
> https://stackoverflow.com/questions/37965890/add-annotation-to-jsp
> 
> For some more general examples:
> 
> https://github.com/apache/tomcat/blob/main/test/webapp/WEB-
> INF/web.xml
> 
> Search for ""
> 
> 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-Cannot upload an image file from a deployed JSP page in Tomcat 10

2023-06-01 Thread Lauri
@Thomas:

I have made a test using the request.getParts() API, as mentioned here:
https://docs.oracle.com/javaee/6/tutorial/doc/glrbb.html

The test upload application has been modified as:

-- web.xml
---
http://xmlns.jcp.org/xml/ns/javaee";
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
 xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
 http://xmlns.jcp.org/xml/ns/javaee/web-app_5_0.xsd";
 version="5.0">

---

-- index.html
---




Upload Text File


Upload File






---

-- upload.jsp
---
<%@ page import="java.io.*, java.util.*, javax.servlet.*, javax.servlet.http.*" 
%>
<%
  Part part = request.getPart("file");
  if (part != null) {
InputStream stream = part.getInputStream();
File file = new File("/tmp/" + part.getSubmittedFileName());
FileOutputStream outputStream = new FileOutputStream(file);
byte[] buffer = new byte[4096];
int bytesRead = -1;
while ((bytesRead = stream.read(buffer)) != -1) {
  outputStream.write(buffer, 0, bytesRead);
}
outputStream.close();
stream.close();
  } else {
out.println("No file uploaded.");
  }
%>
---

The @MultipartConfig is defined in the HTML file.

When deployed in Tomcat 10, I still get these errors:

---
org.apache.jasper.JasperException: An exception occurred processing 
[/upload.jsp] at line [3]

1: <%@ page import="java.io.*, java.util.*, javax.servlet.*, 
javax.servlet.http.*" %>
2: <%
3:   Part part = request.getPart("file");
4:   if (part != null) {
5: InputStream stream = part.getInputStream();
6: File file = new File("/tmp/" + part.getSubmittedFileName());
---

@Mark:

Refering to:
https://stackoverflow.com/questions/37965890/add-annotation-to-jsp

I do not upload a (image) file to the database, but on the server (/tmp).

Kind Regards


From: Mark Thomas 
Sent: Thursday, June 1, 2023 11:29 AM
To: users@tomcat.apache.org 
Subject: Re: Re-Cannot upload an image file from a deployed JSP page in Tomcat 
10

On 01/06/2023 10:18, Torsten Krah wrote:
> Am Donnerstag, dem 01.06.2023 um 08:52 + schrieb Lauri:
>>> You mention a servlet part, but I do not use a servlet.
>>> All the code is contained in the JSP page.
>
> You need to divide that code in a JSP and in your upload servlet as you
> need to provide the @MultipartConfig on that servlet which handles your
> upload.
> Without that you will get:
>
> Unable to process parts as no multi-part configuration has been provided
>
> as an exception when accessing the request.getParts() API.
>
> The whole thing is all written there btw:
>
> https://docs.oracle.com/javaee/6/tutorial/doc/glrbb.html
>
> I don't know - maybe Mark does - if you can annotate a JSP page, had
> never seen it or read about that so my best guess is, you can't do that
> and you need to use a servlet + jsp unless you want to overwrite the
> JspServlet from Tomcat with a custom one which does have that
> annotation and handles the Jsp stuff.

You can do this via web.xml. See the following SO question for an
example specific to this question:

https://stackoverflow.com/questions/37965890/add-annotation-to-jsp

For some more general examples:

https://github.com/apache/tomcat/blob/main/test/webapp/WEB-INF/web.xml

Search for ""

Mark

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



Re: Re-Cannot upload an image file from a deployed JSP page in Tomcat 10

2023-06-01 Thread Mark Thomas

On 01/06/2023 10:18, Torsten Krah wrote:

Am Donnerstag, dem 01.06.2023 um 08:52 + schrieb Lauri:

You mention a servlet part, but I do not use a servlet.
All the code is contained in the JSP page.


You need to divide that code in a JSP and in your upload servlet as you
need to provide the @MultipartConfig on that servlet which handles your
upload.
Without that you will get:

Unable to process parts as no multi-part configuration has been provided

as an exception when accessing the request.getParts() API.

The whole thing is all written there btw:

https://docs.oracle.com/javaee/6/tutorial/doc/glrbb.html

I don't know - maybe Mark does - if you can annotate a JSP page, had
never seen it or read about that so my best guess is, you can't do that
and you need to use a servlet + jsp unless you want to overwrite the
JspServlet from Tomcat with a custom one which does have that
annotation and handles the Jsp stuff.


You can do this via web.xml. See the following SO question for an 
example specific to this question:


https://stackoverflow.com/questions/37965890/add-annotation-to-jsp

For some more general examples:

https://github.com/apache/tomcat/blob/main/test/webapp/WEB-INF/web.xml

Search for ""

Mark

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



AW: Re-Cannot upload an image file from a deployed JSP page in Tomcat 10

2023-06-01 Thread Thomas Hoffmann (Speed4Trade GmbH)
Hello,

> -Ursprüngliche Nachricht-
> Von: Torsten Krah 
> Gesendet: Donnerstag, 1. Juni 2023 11:18
> An: users@tomcat.apache.org
> Betreff: Re: Re-Cannot upload an image file from a deployed JSP page in
> Tomcat 10
> 
> Am Donnerstag, dem 01.06.2023 um 08:52 + schrieb Lauri:
> > > You mention a servlet part, but I do not use a servlet.
> > > All the code is contained in the JSP page.
> 
> You need to divide that code in a JSP and in your upload servlet as you need
> to provide the @MultipartConfig on that servlet which handles your upload.
> Without that you will get:
> 
> Unable to process parts as no multi-part configuration has been provided
> 
> as an exception when accessing the request.getParts() API.
> 
> The whole thing is all written there btw:
> 
> https://docs.oracle.com/javaee/6/tutorial/doc/glrbb.html
> 
> I don't know - maybe Mark does - if you can annotate a JSP page, had never
> seen it or read about that so my best guess is, you can't do that and you need
> to use a servlet + jsp unless you want to overwrite the JspServlet from
> Tomcat with a custom one which does have that annotation and handles the
> Jsp stuff.
> 
> kind regards
> 
> Torsten
> 

In general it is good practice to separate logic and layout.
JSP are usually for providing the view / layout.
Logic / java code should be used in servlets and other java classes (e.g. 
models).

So it is recommended anyway to move java code from JSP to java classes.
See https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller 

Greetings,
Thomas
 



Re: Re-Cannot upload an image file from a deployed JSP page in Tomcat 10

2023-06-01 Thread Torsten Krah
Am Donnerstag, dem 01.06.2023 um 08:52 + schrieb Lauri:
> > You mention a servlet part, but I do not use a servlet.
> > All the code is contained in the JSP page.

You need to divide that code in a JSP and in your upload servlet as you
need to provide the @MultipartConfig on that servlet which handles your
upload.
Without that you will get:

Unable to process parts as no multi-part configuration has been provided

as an exception when accessing the request.getParts() API.

The whole thing is all written there btw:

https://docs.oracle.com/javaee/6/tutorial/doc/glrbb.html

I don't know - maybe Mark does - if you can annotate a JSP page, had
never seen it or read about that so my best guess is, you can't do that
and you need to use a servlet + jsp unless you want to overwrite the
JspServlet from Tomcat with a custom one which does have that
annotation and handles the Jsp stuff.

kind regards

Torsten

-- 


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



Re-Cannot upload an image file from a deployed JSP page in Tomcat 10

2023-06-01 Thread Lauri
I don't ask to fix the code. I wish to understand what is wrong how it can be 
possibly solved keeping the format of a JSP page.
You mention a servlet part, but I do not use a servlet.
All the code is contained in the JSP page.

From: Torsten Krah 
Sent: Wednesday, May 31, 2023 11:53 AM
To: users@tomcat.apache.org 
Subject: Re: Re-Cannot upload an image file from a deployed JSP page in Tomcat 
10

Am Mittwoch, dem 31.05.2023 um 09:42 + schrieb Lauri:
> But my initial question remains, what should have to modify on my
> posted JSP page ?

We already posted you with the docs where you can read about the
necessary changes you need to make to your page, it is all written
there (just call getParts() or getPart(..) on the servlet request
object).

You can ask about specific failures again if you have errors etc. but
at least I don't fix your code to make it work - you can do that
yourself and ask again if something isn't working like expected, after
reading the docs we pointed you to and adapting your page.

That's my 2 cents about it.

kind regards

Torsten
--

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



Re: Re-Cannot upload an image file from a deployed JSP page in Tomcat 10

2023-05-31 Thread Torsten Krah
Am Mittwoch, dem 31.05.2023 um 09:42 + schrieb Lauri:
> But my initial question remains, what should have to modify on my
> posted JSP page ?

We already posted you with the docs where you can read about the
necessary changes you need to make to your page, it is all written
there (just call getParts() or getPart(..) on the servlet request
object).

You can ask about specific failures again if you have errors etc. but
at least I don't fix your code to make it work - you can do that
yourself and ask again if something isn't working like expected, after
reading the docs we pointed you to and adapting your page.

That's my 2 cents about it.

kind regards

Torsten
-- 

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



Re-Cannot upload an image file from a deployed JSP page in Tomcat 10

2023-05-31 Thread Lauri
Of course, I would prefer to work with Jakarta (that's anyway the trend).
But my initial question remains, what should have to modify on my posted JSP 
page ?

Kind Regards,

Lauri


From: Torsten Krah 
Sent: Wednesday, May 31, 2023 11:25 AM
To: users@tomcat.apache.org 
Subject: Re: Re-Cannot upload an image file from a deployed JSP page in Tomcat 
10

Am Mittwoch, dem 31.05.2023 um 09:14 + schrieb Lauri:
> So, I guess I need to re-write my JSP page as if it was for Java EE
> for Tomcat 9 (or earlier versions) for instance, correct?

Why would you want to do that? Just rewrite it to work with the jakarta
api and it will work with tomcat 10.

kind regards

Torsten

--

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



Re: Re-Cannot upload an image file from a deployed JSP page in Tomcat 10

2023-05-31 Thread Torsten Krah
Am Mittwoch, dem 31.05.2023 um 09:14 + schrieb Lauri:
> So, I guess I need to re-write my JSP page as if it was for Java EE
> for Tomcat 9 (or earlier versions) for instance, correct?

Why would you want to do that? Just rewrite it to work with the jakarta
api and it will work with tomcat 10.

kind regards

Torsten

-- 

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



Re: Re-Cannot upload an image file from a deployed JSP page in Tomcat 10

2023-05-31 Thread Torsten Krah
Am Mittwoch, dem 31.05.2023 um 09:18 + schrieb Thomas Hoffmann
(Speed4Trade GmbH):
> http://www.java2s.com/example/java-api/javax/servlet/http/httpservletrequest/getparts-0-0.html

There is also a whole example app on the link you already provided
Thomas:

https://docs.oracle.com/javaee/6/tutorial/doc/glraq.html

You just need to read though ;-).

kind regards

Torsten

-- 

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



AW: Re-Cannot upload an image file from a deployed JSP page in Tomcat 10

2023-05-31 Thread Thomas Hoffmann (Speed4Trade GmbH)
Hello,

> -Ursprüngliche Nachricht-
> Von: Lauri 
> Gesendet: Mittwoch, 31. Mai 2023 11:04
> An: Tomcat Users List 
> Betreff: Re-Cannot upload an image file from a deployed JSP page in Tomcat
> 10
> 
> Ho Thomas,
> 
> I still do not understand everything.
> 
> I understood the following:
> 
> 1)
> From Tomcat 10 and onwards there has been a move from Java EE to Jakarta
> EE as part of the transfer of Java EE to the Eclipse Foundation, the primary
> package for all implemented APIs has changed from javax.* to jakarta.*.
> 
> 2)
> I understood from your post that the package commons-fileupload has
> dependencies to the old javax package.
> 
> 3)
> I can remove the commons-fileupload-* jar files from my application
> (because of what has been said above):
> /u01/tomcat/base/middleware/tomcat10/webapps/TESTS/WEB-INF/lib:
> commons-fileupload-1.5-test-sources.jar
> commons-fileupload-1.5-tests.jar
> commons-fileupload-1.5-sources.jar
> commons-fileupload-1.5-javadoc.jar
> commons-fileupload-1.5.jar
> 
> Can you tell me what I should modify on the JSP file that I have posted if I
> want to upload a binary file (image,...) ?
> What modules should I use if these are wrong ?
> 
> <%@ page import="org.apache.commons.fileupload.*" %> => TO REMOVE
> <%@ page import="org.apache.commons.fileupload.disk.*" %> => TO
> REMOVE <%@ page import="org.apache.commons.fileupload.servlet.*" %>
> => TO REMOVE <%@ page import="java.io.*" %> <%@ page
> import="java.util.*" %> <%@ page import="jakarta.servlet.*" %> <%@ page
> import="jakarta.servlet.http.*" %> <%@ page import="javax.servlet.http.*"
> %> <%@ page import="jakarta.sql.*" %> <%@ page import="java.sql.*" %>
> <%@ page
> import="org.apache.commons.fileupload.disk.DiskFileItemFactory" %> =>
> TO REMOVE <%@ page
> import="org.apache.commons.fileupload.FileItemFactory" %> => TO
> REMOVE
> 
> Kind Regards,
> 
> Lauri

You can access the file-stream like:
Part part = request.getPart("file");
InputStream stream = part.getInputStream();

Here are some examples:
http://www.java2s.com/example/java-api/javax/servlet/http/httpservletrequest/getparts-0-0.html

Greetings,
Thomas


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



Re-Cannot upload an image file from a deployed JSP page in Tomcat 10

2023-05-31 Thread Lauri
Ho Mark,

I still do not understand everything.

I understood the following:

1)
>From Tomcat 10 and onwards there has been a move from Java EE to Jakarta EE as 
>part of the transfer of Java EE to the Eclipse Foundation, the primary package 
>for all implemented APIs has changed from javax.* to jakarta.*.

2)
The package commons-fileupload has dependencies to the old javax package.

3) I can remove the commons-fileupload-* jar files from my application:
/u01/tomcat/base/middleware/tomcat10/webapps/TESTS/WEB-INF/lib:
commons-fileupload-1.5-test-sources.jar
commons-fileupload-1.5-tests.jar
commons-fileupload-1.5-sources.jar
commons-fileupload-1.5-javadoc.jar
commons-fileupload-1.5.jar

4)
I do not need a specific configuration for Tomcat 10.

5)
I can use the already available servlet-api jar package from Tomcat 10.



I can go for Option 2.
So, I guess I need to re-write my JSP page as if it was for Java EE for Tomcat 
9 (or earlier versions) for instance, correct?
You wrote "Write your web application using the Java EE APIs and then deploy it 
to webapps-javaee rather than webapps and Tomcat will use the migration
tool to convert your web application for you".
What is webapps-javaee ? How can I use it if I have a JSP page for Java EE.

Kind Regards,

Lauri

From: Mark Thomas 
Sent: Tuesday, May 30, 2023 9:22 AM
To: users@tomcat.apache.org 
Subject: Re: Re-Cannot upload an image file from a deployed JSP page in Tomcat 
10

On 30/05/2023 07:17, Lauri wrote:
> Hi Mark,
>
> If I understand well:
>
> a) I should remove the commons*.jar files from my 
> /u01/tomcat/base/middleware/tomcat10/webapps/TESTS/WEB-INF/lib.

No. commons-fileupload-1.5.jar (in some form) can stay (see option 1).

> b) I do not need to have a specific configuration for Tomcat 10 to use 
> servlet-api and jakarta EE packages.

Correct.

> I still do not understand the following:
>
> c) Do I use the correct servlet-api jar package ?

Yes.

> You answered:
> If you are using Tomcat 10, you need to use the Jakarta EE package
> names. You can't use the Java EE package names. You can't use any
> library that uses the Java EE package names.
>
> But the servlet-api is already included in the Tomcat 10 lib.
> What's wrong with this ?

commons-fileupload-1.5.jar uses the Java EE API. It will not work with
Tomcat 10.

> I use these modules in the JSP page:
> <%@ page import="org.apache.commons.fileupload.*" %>
> <%@ page import="org.apache.commons.fileupload.disk.*" %>
> <%@ page import="org.apache.commons.fileupload.servlet.*" %>
> <%@ page import="java.io.*" %>
> <%@ page import="java.util.*" %>
> <%@ page import="jakarta.servlet.*" %>
> <%@ page import="jakarta.servlet.http.*" %>
> <%@ page import="jakarta.sql.*" %>
> <%@ page import="java.sql.*" %>
> <%@ page import="org.apache.commons.fileupload.disk.DiskFileItemFactory" %>
> <%@ page import="org.apache.commons.fileupload.FileItemFactory" %>
>
> What's wrong with this ?

See above.

> e) Option 1, 2, 3
>
> The JSP page has not been migrated from Tomcat X to Tomcat 10.
> It has been directly deployed in Tomcat 10.
>
> What is wrong in the code of my JSP page ?
> Thanks by advance for any indications.

There is nothing wrong with the code in the JSP page but the library you
are trying to use (commons-fileupload-1.5.jar) will not work with Tomcat 10.

The quickest fix is probably option 1:
Use the Tomcat migration tool for Jakarta EE to convert
commons-fileupload-1.5.jar from from Java EE to Jakarta EE and then use
the converted JAR rather than the original.

The best solution is probably the one Thomas pointed out:

Option 4:
Stop using commons-fileupload-1.5.jar and use the methods provided by
the Servlet API to handle file uploads.

Mark


>
> Kind Regards,
>
> Lauri
>
> 
> From: Mark Thomas 
> Sent: Monday, May 29, 2023 5:44 PM
> To: users@tomcat.apache.org 
> Subject: Re: Cannot upload an image file from a deployed JSP page in Tomcat 10
>
> On 29/05/2023 10:36, Lauri wrote:
>
>>   From Tomcat 10 and onwards there has been a move from Java EE to Jakarta 
>> EE as part of the transfer of Java EE to the Eclipse Foundation, the primary 
>> package for all implemented APIs has changed from javax.* to jakarta.*.
>
> Note the above.
>
> 
>
>> I have these libraries for the TESTS application:
>> /u01/tomcat/base/middleware/tomcat10/webapps/TESTS/WEB-INF/lib:
>> commons-fileupload-1.5-test-sources.jar
>> commons-fileupload-1.5-tests.jar
>> commons-fileupload-1.5-sources.jar
>> commons-fileupload-1.5-ja

Re: Re-Cannot upload an image file from a deployed JSP page in Tomcat 10

2023-05-31 Thread Torsten Krah
Am Mittwoch, dem 31.05.2023 um 09:04 + schrieb Lauri:
> What modules should I use if these are wrong ?

None, it is already included in the servlet api. Like already written,
please read e.g.:

https://docs.oracle.com/javaee/6/tutorial/doc/gmhba.html

kind regards

Torsten

-- 

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



Re-Cannot upload an image file from a deployed JSP page in Tomcat 10

2023-05-31 Thread Lauri
Ho Thomas,

I still do not understand everything.

I understood the following:

1)
>From Tomcat 10 and onwards there has been a move from Java EE to Jakarta EE as 
>part of the transfer of Java EE to the Eclipse Foundation, the primary package 
>for all implemented APIs has changed from javax.* to jakarta.*.

2)
I understood from your post that the package commons-fileupload has 
dependencies to the old javax package.

3)
I can remove the commons-fileupload-* jar files from my application (because of 
what has been said above):
/u01/tomcat/base/middleware/tomcat10/webapps/TESTS/WEB-INF/lib:
commons-fileupload-1.5-test-sources.jar
commons-fileupload-1.5-tests.jar
commons-fileupload-1.5-sources.jar
commons-fileupload-1.5-javadoc.jar
commons-fileupload-1.5.jar

Can you tell me what I should modify on the JSP file that I have posted if I 
want to upload a binary file (image,...) ?
What modules should I use if these are wrong ?

<%@ page import="org.apache.commons.fileupload.*" %> => TO REMOVE
<%@ page import="org.apache.commons.fileupload.disk.*" %> => TO REMOVE
<%@ page import="org.apache.commons.fileupload.servlet.*" %> => TO REMOVE
<%@ page import="java.io.*" %>
<%@ page import="java.util.*" %>
<%@ page import="jakarta.servlet.*" %>
<%@ page import="jakarta.servlet.http.*" %>
<%@ page import="javax.servlet.http.*" %>
<%@ page import="jakarta.sql.*" %>
<%@ page import="java.sql.*" %>
<%@ page import="org.apache.commons.fileupload.disk.DiskFileItemFactory" %> => 
TO REMOVE
<%@ page import="org.apache.commons.fileupload.FileItemFactory" %> => TO REMOVE

Kind Regards,

Lauri

____
From: Thomas Hoffmann (Speed4Trade GmbH) 

Sent: Tuesday, May 30, 2023 8:24 AM
To: Tomcat Users List 
Subject: AW: Re-Cannot upload an image file from a deployed JSP page in Tomcat 
10

Hello Lauri,

> -Ursprüngliche Nachricht-
> Von: Lauri 
> Gesendet: Dienstag, 30. Mai 2023 08:20
> An: Tomcat Users List 
> Betreff: Re-Cannot upload an image file from a deployed JSP page in Tomcat
> 10
>
> Hi Thomas,
>
> I get returned "Page no found" when I navigate through:
> https://www.linuxquestions.org/questions/linux-server-73/fileupload-class-
>
> I don't understand the relation between the code in my JSP page and the link
> you provided me:
> https://docs.oracle.com/javaee/6/tutorial/doc/gmhba.html
>
> What do you mean exactly ?
>
> Thanks by advance for any indications.
>
> Kind Regards,
>
> Lauri
> 
> From: Thomas Hoffmann (Speed4Trade GmbH)
> 
> Sent: Monday, May 29, 2023 8:39 PM
> To: Tomcat Users List 
> Subject: AW: Cannot upload an image file from a deployed JSP page in
> Tomcat 10
>
> Hallo Lauri,
>
> > -Ursprüngliche Nachricht-
> > Von: Lauri 
> > Gesendet: Montag, 29. Mai 2023 11:36
> > An: users@tomcat.apache.org
> > Betreff: Cannot upload an image file from a deployed JSP page in
> > Tomcat 10
> >
> > 1) Summary of the problem:
> >
> > From Tomcat 10 and onwards there has been a move from Java EE to
> > Jakarta EE as part of the transfer of Java EE to the Eclipse
> > Foundation, the primary package for all implemented APIs has changed
> from javax.* to jakarta.*.
> >
> > I have a JSP page deployed in Tomcat 10 that is intended to upload a
> > file from the desktop (Windows 10) to the server where Tomcat 10 is
> > running (OEL 8).
> > I am unable to upload an image, and I get this error:
> > -
> > org.apache.jasper.JasperException: Unable to compile class for JSP:
> > An error occurred at line: [24] in the jsp file: [/index.jsp] The type
> > javax.servlet.http.HttpServletRequest cannot be resolved. It is
> > indirectly referenced from required type
> > org.apache.commons.fileupload.servlet.ServletFileUpload
> > 21: ServletFileUpload upload = new ServletFileUpload(factory);
> > 22:
> > 23: // Parse the request
> > 24: List items = upload.parseRequest(request);
> > 25:
> > 26: // Process the uploaded items
> > 27: Iterator iter = items.iterator();
> > -
> >
> > My application name: TESTS
> > I have these libraries for the TESTS application:
> > /u01/tomcat/base/middleware/tomcat10/webapps/TESTS/WEB-INF/lib:
> > commons-fileupload-1.5-test-sources.jar
> > commons-fileupload-1.5-tests.jar
> > commons-fileupload-1.5-sources.jar
> > commons-fileupload-1.5-javadoc.jar
> > commons-fileupload-1.5.jar
> >
> > I have in my Tomcat 10 this library:
> &

Re: Re-Cannot upload an image file from a deployed JSP page in Tomcat 10

2023-05-30 Thread Mark Thomas

On 30/05/2023 07:17, Lauri wrote:

Hi Mark,

If I understand well:

a) I should remove the commons*.jar files from my 
/u01/tomcat/base/middleware/tomcat10/webapps/TESTS/WEB-INF/lib.


No. commons-fileupload-1.5.jar (in some form) can stay (see option 1).


b) I do not need to have a specific configuration for Tomcat 10 to use 
servlet-api and jakarta EE packages.


Correct.


I still do not understand the following:

c) Do I use the correct servlet-api jar package ?


Yes.


You answered:
If you are using Tomcat 10, you need to use the Jakarta EE package
names. You can't use the Java EE package names. You can't use any
library that uses the Java EE package names.

But the servlet-api is already included in the Tomcat 10 lib.
What's wrong with this ?


commons-fileupload-1.5.jar uses the Java EE API. It will not work with 
Tomcat 10.



I use these modules in the JSP page:
<%@ page import="org.apache.commons.fileupload.*" %>
<%@ page import="org.apache.commons.fileupload.disk.*" %>
<%@ page import="org.apache.commons.fileupload.servlet.*" %>
<%@ page import="java.io.*" %>
<%@ page import="java.util.*" %>
<%@ page import="jakarta.servlet.*" %>
<%@ page import="jakarta.servlet.http.*" %>
<%@ page import="jakarta.sql.*" %>
<%@ page import="java.sql.*" %>
<%@ page import="org.apache.commons.fileupload.disk.DiskFileItemFactory" %>
<%@ page import="org.apache.commons.fileupload.FileItemFactory" %>

What's wrong with this ?


See above.


e) Option 1, 2, 3

The JSP page has not been migrated from Tomcat X to Tomcat 10.
It has been directly deployed in Tomcat 10.

What is wrong in the code of my JSP page ?
Thanks by advance for any indications.


There is nothing wrong with the code in the JSP page but the library you 
are trying to use (commons-fileupload-1.5.jar) will not work with Tomcat 10.


The quickest fix is probably option 1:
Use the Tomcat migration tool for Jakarta EE to convert 
commons-fileupload-1.5.jar from from Java EE to Jakarta EE and then use 
the converted JAR rather than the original.


The best solution is probably the one Thomas pointed out:

Option 4:
Stop using commons-fileupload-1.5.jar and use the methods provided by 
the Servlet API to handle file uploads.


Mark




Kind Regards,

Lauri


From: Mark Thomas 
Sent: Monday, May 29, 2023 5:44 PM
To: users@tomcat.apache.org 
Subject: Re: Cannot upload an image file from a deployed JSP page in Tomcat 10

On 29/05/2023 10:36, Lauri wrote:


  From Tomcat 10 and onwards there has been a move from Java EE to Jakarta EE 
as part of the transfer of Java EE to the Eclipse Foundation, the primary 
package for all implemented APIs has changed from javax.* to jakarta.*.


Note the above.




I have these libraries for the TESTS application:
/u01/tomcat/base/middleware/tomcat10/webapps/TESTS/WEB-INF/lib:
commons-fileupload-1.5-test-sources.jar
commons-fileupload-1.5-tests.jar
commons-fileupload-1.5-sources.jar
commons-fileupload-1.5-javadoc.jar


You should not have any of the above in your web application.


commons-fileupload-1.5.jar


That library uses the Java EE APIs so it won't work with Tomcat 10 as
you have discovered.


Does someone know if this is related to a bug ?


No. There is no bug.


Do I use the correct servlet-api jar package ?


If you are using Tomcat 10, you need to use the Jakarta EE package
names. You can't use the Java EE package names. You can't use any
library that uses the Java EE package names.


Do Tomcat 10 need to be specifically configured for using servlet-api and 
jakarta EE packages ?


No.


Does someone know what can be the problem ?


See above. You are trying to use a Java EE library with Jakarta EE.


Thanks by advance for any tip(s) and/or suggestion(s).


Option 1.
Write your web application using the Jakarta EE APIs.
Use the Tomcat migration tool for Jakarta EE to convert
commons-fileupload-1.5.jar from from Java EE to Jakarta EE (and any
other libraries using the Java EE APIs).
Deploy your web application with the converted JARs.

Option 2.
Write your web application using the Java EE APIs and then deploy it to
webapps-javaee rather than webapps and Tomcat will use the migration
tool to convert your web application for you.

Option 3.
Write your web application using the Java EE APIs and convert it to
Jkarata EE using the migration tool. Once converted, deploy it to the
webapps directory.

Note: If you use any deprecated Java EE APIs you may still see failures
after conversion as Jakarta EE 10 most of the deprecated APIs.

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



AW: Re-Cannot upload an image file from a deployed JSP page in Tomcat 10

2023-05-29 Thread Thomas Hoffmann (Speed4Trade GmbH)
Hello Lauri,

> -Ursprüngliche Nachricht-
> Von: Lauri 
> Gesendet: Dienstag, 30. Mai 2023 08:20
> An: Tomcat Users List 
> Betreff: Re-Cannot upload an image file from a deployed JSP page in Tomcat
> 10
> 
> Hi Thomas,
> 
> I get returned "Page no found" when I navigate through:
> https://www.linuxquestions.org/questions/linux-server-73/fileupload-class-
> 
> I don't understand the relation between the code in my JSP page and the link
> you provided me:
> https://docs.oracle.com/javaee/6/tutorial/doc/gmhba.html
> 
> What do you mean exactly ?
> 
> Thanks by advance for any indications.
> 
> Kind Regards,
> 
> Lauri
> 
> From: Thomas Hoffmann (Speed4Trade GmbH)
> 
> Sent: Monday, May 29, 2023 8:39 PM
> To: Tomcat Users List 
> Subject: AW: Cannot upload an image file from a deployed JSP page in
> Tomcat 10
> 
> Hallo Lauri,
> 
> > -Ursprüngliche Nachricht-
> > Von: Lauri 
> > Gesendet: Montag, 29. Mai 2023 11:36
> > An: users@tomcat.apache.org
> > Betreff: Cannot upload an image file from a deployed JSP page in
> > Tomcat 10
> >
> > 1) Summary of the problem:
> >
> > From Tomcat 10 and onwards there has been a move from Java EE to
> > Jakarta EE as part of the transfer of Java EE to the Eclipse
> > Foundation, the primary package for all implemented APIs has changed
> from javax.* to jakarta.*.
> >
> > I have a JSP page deployed in Tomcat 10 that is intended to upload a
> > file from the desktop (Windows 10) to the server where Tomcat 10 is
> > running (OEL 8).
> > I am unable to upload an image, and I get this error:
> > -
> > org.apache.jasper.JasperException: Unable to compile class for JSP:
> > An error occurred at line: [24] in the jsp file: [/index.jsp] The type
> > javax.servlet.http.HttpServletRequest cannot be resolved. It is
> > indirectly referenced from required type
> > org.apache.commons.fileupload.servlet.ServletFileUpload
> > 21: ServletFileUpload upload = new ServletFileUpload(factory);
> > 22:
> > 23: // Parse the request
> > 24: List items = upload.parseRequest(request);
> > 25:
> > 26: // Process the uploaded items
> > 27: Iterator iter = items.iterator();
> > -
> >
> > My application name: TESTS
> > I have these libraries for the TESTS application:
> > /u01/tomcat/base/middleware/tomcat10/webapps/TESTS/WEB-INF/lib:
> > commons-fileupload-1.5-test-sources.jar
> > commons-fileupload-1.5-tests.jar
> > commons-fileupload-1.5-sources.jar
> > commons-fileupload-1.5-javadoc.jar
> > commons-fileupload-1.5.jar
> >
> > I have in my Tomcat 10 this library:
> > /u01/tomcat/base/middleware/tomcat10/lib:
> > -rw-r--r--. 1 tomcat tomcat 365905 Apr 25 12:16 servlet-api.jar
> >
> > 2) The deployed JSP page:
> >
> > -
> > <%@ page import="org.apache.commons.fileupload.*" %> <%@ page
> > import="org.apache.commons.fileupload.disk.*" %> <%@ page
> > import="org.apache.commons.fileupload.servlet.*" %> <%@ page
> > import="java.io.*" %> <%@ page import="java.util.*" %> <%@ page
> > import="jakarta.servlet.*" %> <%@ page import="jakarta.servlet.http.*"
> > %> <%@ page import="jakarta.sql.*" %> <%@ page import="java.sql.*" %>
> > <%@ page
> > import="org.apache.commons.fileupload.disk.DiskFileItemFactory" %>
> <%@
> > page import="org.apache.commons.fileupload.FileItemFactory" %>
> >
> > <%
> > // Set the upload directory
> > String uploadDir = "/tmp/";
> >
> > // Create a factory for disk-based file items FileItemFactory factory
> > = new DiskFileItemFactory();
> >
> > // Create a new file upload handler
> > ServletFileUpload upload = new ServletFileUpload(factory);
> >
> > // Parse the request
> > List items = upload.parseRequest(request);
> >
> > // Process the uploaded items
> > Iterator iter = items.iterator(); while (iter.hasNext()) {
> > FileItem item = iter.next();
> >
> > // If the item is a file, save it to the upload directory
> > if (!item.isFormField()) {
> > String fileName = new File(item.getName()).getName();
> > String filePath = uploadDir + fileName;
> > File uploadedFile = new File(filePath);
> > item.write(uploadedFile);
> > }
> > }
> > %>
> > 
> > 
> > File Upload Examp

Re-Cannot upload an image file from a deployed JSP page in Tomcat 10

2023-05-29 Thread Lauri
Hi Thomas,

I get returned "Page no found" when I navigate through: 
https://www.linuxquestions.org/questions/linux-server-73/fileupload-class-

I don't understand the relation between the code in my JSP page and the link 
you provided me:
https://docs.oracle.com/javaee/6/tutorial/doc/gmhba.html

What do you mean exactly ?

Thanks by advance for any indications.

Kind Regards,

Lauri

From: Thomas Hoffmann (Speed4Trade GmbH) 

Sent: Monday, May 29, 2023 8:39 PM
To: Tomcat Users List 
Subject: AW: Cannot upload an image file from a deployed JSP page in Tomcat 10

Hallo Lauri,

> -Ursprüngliche Nachricht-
> Von: Lauri 
> Gesendet: Montag, 29. Mai 2023 11:36
> An: users@tomcat.apache.org
> Betreff: Cannot upload an image file from a deployed JSP page in Tomcat 10
>
> 1) Summary of the problem:
>
> From Tomcat 10 and onwards there has been a move from Java EE to Jakarta
> EE as part of the transfer of Java EE to the Eclipse Foundation, the primary
> package for all implemented APIs has changed from javax.* to jakarta.*.
>
> I have a JSP page deployed in Tomcat 10 that is intended to upload a file
> from the desktop (Windows 10) to the server where Tomcat 10 is running
> (OEL 8).
> I am unable to upload an image, and I get this error:
> -
> org.apache.jasper.JasperException: Unable to compile class for JSP:
> An error occurred at line: [24] in the jsp file: [/index.jsp] The type
> javax.servlet.http.HttpServletRequest cannot be resolved. It is indirectly
> referenced from required type
> org.apache.commons.fileupload.servlet.ServletFileUpload
> 21: ServletFileUpload upload = new ServletFileUpload(factory);
> 22:
> 23: // Parse the request
> 24: List items = upload.parseRequest(request);
> 25:
> 26: // Process the uploaded items
> 27: Iterator iter = items.iterator();
> -
>
> My application name: TESTS
> I have these libraries for the TESTS application:
> /u01/tomcat/base/middleware/tomcat10/webapps/TESTS/WEB-INF/lib:
> commons-fileupload-1.5-test-sources.jar
> commons-fileupload-1.5-tests.jar
> commons-fileupload-1.5-sources.jar
> commons-fileupload-1.5-javadoc.jar
> commons-fileupload-1.5.jar
>
> I have in my Tomcat 10 this library:
> /u01/tomcat/base/middleware/tomcat10/lib:
> -rw-r--r--. 1 tomcat tomcat 365905 Apr 25 12:16 servlet-api.jar
>
> 2) The deployed JSP page:
>
> -
> <%@ page import="org.apache.commons.fileupload.*" %> <%@ page
> import="org.apache.commons.fileupload.disk.*" %> <%@ page
> import="org.apache.commons.fileupload.servlet.*" %> <%@ page
> import="java.io.*" %> <%@ page import="java.util.*" %> <%@ page
> import="jakarta.servlet.*" %> <%@ page import="jakarta.servlet.http.*" %>
> <%@ page import="jakarta.sql.*" %> <%@ page import="java.sql.*" %>
> <%@ page
> import="org.apache.commons.fileupload.disk.DiskFileItemFactory" %> <%@
> page import="org.apache.commons.fileupload.FileItemFactory" %>
>
> <%
> // Set the upload directory
> String uploadDir = "/tmp/";
>
> // Create a factory for disk-based file items FileItemFactory factory = new
> DiskFileItemFactory();
>
> // Create a new file upload handler
> ServletFileUpload upload = new ServletFileUpload(factory);
>
> // Parse the request
> List items = upload.parseRequest(request);
>
> // Process the uploaded items
> Iterator iter = items.iterator(); while (iter.hasNext()) {
> FileItem item = iter.next();
>
> // If the item is a file, save it to the upload directory
> if (!item.isFormField()) {
> String fileName = new File(item.getName()).getName();
> String filePath = uploadDir + fileName;
> File uploadedFile = new File(filePath);
> item.write(uploadedFile);
> }
> }
> %>
> 
> 
> File Upload Example
> 
> 
> File Upload Example
> 
> 
> 
> 
> 
> 
> 
> -
>
> I have found that it looks like:
> https://www.linuxquestions.org/questions/linux-server-73/fileupload-class-
> not-working-with-tomcat-10-a-4175710078/
> But in my situation, it seems to be a different problem.
>
> Does someone know if this is related to a bug ?
> Do I use the correct servlet-api jar package ?
> Do Tomcat 10 need to be specifically configured for using servlet-api and
> jakarta EE packages ?
> Does someone know what can be the problem ?
>
> Thanks by advance for any tip(s) and/or suggestion(s).

I had the same issue because I used internal Tomcat classes.
In the past the servlet specification didn't have methods to deal with 
multipart uploads.
Since Servlet 3.0 there are methods for retrieving the uploads:
https://docs.oracle.com/javaee/6/tutorial/doc/gmhba.html

I replace the ServletFileUpload and used standard methods like getParts().
This worked for me.

Greetings,
Thomas

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



Re-Cannot upload an image file from a deployed JSP page in Tomcat 10

2023-05-29 Thread Lauri
Hi Mark,

If I understand well:

a) I should remove the commons*.jar files from my 
/u01/tomcat/base/middleware/tomcat10/webapps/TESTS/WEB-INF/lib.
b) I do not need to have a specific configuration for Tomcat 10 to use 
servlet-api and jakarta EE packages.

I still do not understand the following:

c) Do I use the correct servlet-api jar package ?
You answered:
If you are using Tomcat 10, you need to use the Jakarta EE package
names. You can't use the Java EE package names. You can't use any
library that uses the Java EE package names.

But the servlet-api is already included in the Tomcat 10 lib.
What's wrong with this ?

d) Does someone know what can be the problem ?
You answered:
See above. You are trying to use a Java EE library with Jakarta EE.

I use these modules in the JSP page:
<%@ page import="org.apache.commons.fileupload.*" %>
<%@ page import="org.apache.commons.fileupload.disk.*" %>
<%@ page import="org.apache.commons.fileupload.servlet.*" %>
<%@ page import="java.io.*" %>
<%@ page import="java.util.*" %>
<%@ page import="jakarta.servlet.*" %>
<%@ page import="jakarta.servlet.http.*" %>
<%@ page import="jakarta.sql.*" %>
<%@ page import="java.sql.*" %>
<%@ page import="org.apache.commons.fileupload.disk.DiskFileItemFactory" %>
<%@ page import="org.apache.commons.fileupload.FileItemFactory" %>

What's wrong with this ?

e) Option 1, 2, 3

The JSP page has not been migrated from Tomcat X to Tomcat 10.
It has been directly deployed in Tomcat 10.

What is wrong in the code of my JSP page ?
Thanks by advance for any indications.

Kind Regards,

Lauri


From: Mark Thomas 
Sent: Monday, May 29, 2023 5:44 PM
To: users@tomcat.apache.org 
Subject: Re: Cannot upload an image file from a deployed JSP page in Tomcat 10

On 29/05/2023 10:36, Lauri wrote:

>  From Tomcat 10 and onwards there has been a move from Java EE to Jakarta EE 
> as part of the transfer of Java EE to the Eclipse Foundation, the primary 
> package for all implemented APIs has changed from javax.* to jakarta.*.

Note the above.



> I have these libraries for the TESTS application:
> /u01/tomcat/base/middleware/tomcat10/webapps/TESTS/WEB-INF/lib:
> commons-fileupload-1.5-test-sources.jar
> commons-fileupload-1.5-tests.jar
> commons-fileupload-1.5-sources.jar
> commons-fileupload-1.5-javadoc.jar

You should not have any of the above in your web application.

> commons-fileupload-1.5.jar

That library uses the Java EE APIs so it won't work with Tomcat 10 as
you have discovered.

> Does someone know if this is related to a bug ?

No. There is no bug.

> Do I use the correct servlet-api jar package ?

If you are using Tomcat 10, you need to use the Jakarta EE package
names. You can't use the Java EE package names. You can't use any
library that uses the Java EE package names.

> Do Tomcat 10 need to be specifically configured for using servlet-api and 
> jakarta EE packages ?

No.

> Does someone know what can be the problem ?

See above. You are trying to use a Java EE library with Jakarta EE.

> Thanks by advance for any tip(s) and/or suggestion(s).

Option 1.
Write your web application using the Jakarta EE APIs.
Use the Tomcat migration tool for Jakarta EE to convert
commons-fileupload-1.5.jar from from Java EE to Jakarta EE (and any
other libraries using the Java EE APIs).
Deploy your web application with the converted JARs.

Option 2.
Write your web application using the Java EE APIs and then deploy it to
webapps-javaee rather than webapps and Tomcat will use the migration
tool to convert your web application for you.

Option 3.
Write your web application using the Java EE APIs and convert it to
Jkarata EE using the migration tool. Once converted, deploy it to the
webapps directory.

Note: If you use any deprecated Java EE APIs you may still see failures
after conversion as Jakarta EE 10 most of the deprecated APIs.

Mark

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



AW: Cannot upload an image file from a deployed JSP page in Tomcat 10

2023-05-29 Thread Thomas Hoffmann (Speed4Trade GmbH)
Hallo Lauri,

> -Ursprüngliche Nachricht-
> Von: Lauri 
> Gesendet: Montag, 29. Mai 2023 11:36
> An: users@tomcat.apache.org
> Betreff: Cannot upload an image file from a deployed JSP page in Tomcat 10
> 
> 1) Summary of the problem:
> 
> From Tomcat 10 and onwards there has been a move from Java EE to Jakarta
> EE as part of the transfer of Java EE to the Eclipse Foundation, the primary
> package for all implemented APIs has changed from javax.* to jakarta.*.
> 
> I have a JSP page deployed in Tomcat 10 that is intended to upload a file
> from the desktop (Windows 10) to the server where Tomcat 10 is running
> (OEL 8).
> I am unable to upload an image, and I get this error:
> -
> org.apache.jasper.JasperException: Unable to compile class for JSP:
> An error occurred at line: [24] in the jsp file: [/index.jsp] The type
> javax.servlet.http.HttpServletRequest cannot be resolved. It is indirectly
> referenced from required type
> org.apache.commons.fileupload.servlet.ServletFileUpload
> 21: ServletFileUpload upload = new ServletFileUpload(factory);
> 22:
> 23: // Parse the request
> 24: List items = upload.parseRequest(request);
> 25:
> 26: // Process the uploaded items
> 27: Iterator iter = items.iterator();
> -
> 
> My application name: TESTS
> I have these libraries for the TESTS application:
> /u01/tomcat/base/middleware/tomcat10/webapps/TESTS/WEB-INF/lib:
> commons-fileupload-1.5-test-sources.jar
> commons-fileupload-1.5-tests.jar
> commons-fileupload-1.5-sources.jar
> commons-fileupload-1.5-javadoc.jar
> commons-fileupload-1.5.jar
> 
> I have in my Tomcat 10 this library:
> /u01/tomcat/base/middleware/tomcat10/lib:
> -rw-r--r--. 1 tomcat tomcat 365905 Apr 25 12:16 servlet-api.jar
> 
> 2) The deployed JSP page:
> 
> -
> <%@ page import="org.apache.commons.fileupload.*" %> <%@ page
> import="org.apache.commons.fileupload.disk.*" %> <%@ page
> import="org.apache.commons.fileupload.servlet.*" %> <%@ page
> import="java.io.*" %> <%@ page import="java.util.*" %> <%@ page
> import="jakarta.servlet.*" %> <%@ page import="jakarta.servlet.http.*" %>
> <%@ page import="jakarta.sql.*" %> <%@ page import="java.sql.*" %>
> <%@ page
> import="org.apache.commons.fileupload.disk.DiskFileItemFactory" %> <%@
> page import="org.apache.commons.fileupload.FileItemFactory" %>
> 
> <%
> // Set the upload directory
> String uploadDir = "/tmp/";
> 
> // Create a factory for disk-based file items FileItemFactory factory = new
> DiskFileItemFactory();
> 
> // Create a new file upload handler
> ServletFileUpload upload = new ServletFileUpload(factory);
> 
> // Parse the request
> List items = upload.parseRequest(request);
> 
> // Process the uploaded items
> Iterator iter = items.iterator(); while (iter.hasNext()) {
> FileItem item = iter.next();
> 
> // If the item is a file, save it to the upload directory
> if (!item.isFormField()) {
> String fileName = new File(item.getName()).getName();
> String filePath = uploadDir + fileName;
> File uploadedFile = new File(filePath);
> item.write(uploadedFile);
> }
> }
> %>
> 
> 
> File Upload Example
> 
> 
> File Upload Example
> 
> 
> 
> 
> 
> 
> 
> -
> 
> I have found that it looks like:
> https://www.linuxquestions.org/questions/linux-server-73/fileupload-class-
> not-working-with-tomcat-10-a-4175710078/
> But in my situation, it seems to be a different problem.
> 
> Does someone know if this is related to a bug ?
> Do I use the correct servlet-api jar package ?
> Do Tomcat 10 need to be specifically configured for using servlet-api and
> jakarta EE packages ?
> Does someone know what can be the problem ?
> 
> Thanks by advance for any tip(s) and/or suggestion(s).

I had the same issue because I used internal Tomcat classes.
In the past the servlet specification didn't have methods to deal with 
multipart uploads.
Since Servlet 3.0 there are methods for retrieving the uploads:
https://docs.oracle.com/javaee/6/tutorial/doc/gmhba.html

I replace the ServletFileUpload and used standard methods like getParts().
This worked for me.

Greetings,
Thomas

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



Re: Cannot upload an image file from a deployed JSP page in Tomcat 10

2023-05-29 Thread Mark Thomas

On 29/05/2023 10:36, Lauri wrote:


 From Tomcat 10 and onwards there has been a move from Java EE to Jakarta EE as 
part of the transfer of Java EE to the Eclipse Foundation, the primary package 
for all implemented APIs has changed from javax.* to jakarta.*.


Note the above.




I have these libraries for the TESTS application:
/u01/tomcat/base/middleware/tomcat10/webapps/TESTS/WEB-INF/lib:
commons-fileupload-1.5-test-sources.jar
commons-fileupload-1.5-tests.jar
commons-fileupload-1.5-sources.jar
commons-fileupload-1.5-javadoc.jar


You should not have any of the above in your web application.


commons-fileupload-1.5.jar


That library uses the Java EE APIs so it won't work with Tomcat 10 as 
you have discovered.



Does someone know if this is related to a bug ?


No. There is no bug.


Do I use the correct servlet-api jar package ?


If you are using Tomcat 10, you need to use the Jakarta EE package 
names. You can't use the Java EE package names. You can't use any 
library that uses the Java EE package names.



Do Tomcat 10 need to be specifically configured for using servlet-api and 
jakarta EE packages ?


No.


Does someone know what can be the problem ?


See above. You are trying to use a Java EE library with Jakarta EE.


Thanks by advance for any tip(s) and/or suggestion(s).


Option 1.
Write your web application using the Jakarta EE APIs.
Use the Tomcat migration tool for Jakarta EE to convert 
commons-fileupload-1.5.jar from from Java EE to Jakarta EE (and any 
other libraries using the Java EE APIs).

Deploy your web application with the converted JARs.

Option 2.
Write your web application using the Java EE APIs and then deploy it to 
webapps-javaee rather than webapps and Tomcat will use the migration 
tool to convert your web application for you.


Option 3.
Write your web application using the Java EE APIs and convert it to 
Jkarata EE using the migration tool. Once converted, deploy it to the 
webapps directory.


Note: If you use any deprecated Java EE APIs you may still see failures 
after conversion as Jakarta EE 10 most of the deprecated APIs.


Mark

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



Cannot upload an image file from a deployed JSP page in Tomcat 10

2023-05-29 Thread Lauri
1) Summary of the problem:

>From Tomcat 10 and onwards there has been a move from Java EE to Jakarta EE as 
>part of the transfer of Java EE to the Eclipse Foundation, the primary package 
>for all implemented APIs has changed from javax.* to jakarta.*.

I have a JSP page deployed in Tomcat 10 that is intended to upload a file from 
the desktop (Windows 10) to the server where Tomcat 10 is running (OEL 8).
I am unable to upload an image, and I get this error:
-
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: [24] in the jsp file: [/index.jsp]
The type javax.servlet.http.HttpServletRequest cannot be resolved. It is 
indirectly referenced from required type 
org.apache.commons.fileupload.servlet.ServletFileUpload
21: ServletFileUpload upload = new ServletFileUpload(factory);
22:
23: // Parse the request
24: List items = upload.parseRequest(request);
25:
26: // Process the uploaded items
27: Iterator iter = items.iterator();
-

My application name: TESTS
I have these libraries for the TESTS application:
/u01/tomcat/base/middleware/tomcat10/webapps/TESTS/WEB-INF/lib:
commons-fileupload-1.5-test-sources.jar
commons-fileupload-1.5-tests.jar
commons-fileupload-1.5-sources.jar
commons-fileupload-1.5-javadoc.jar
commons-fileupload-1.5.jar

I have in my Tomcat 10 this library:
/u01/tomcat/base/middleware/tomcat10/lib:
-rw-r--r--. 1 tomcat tomcat 365905 Apr 25 12:16 servlet-api.jar

2) The deployed JSP page:

-
<%@ page import="org.apache.commons.fileupload.*" %>
<%@ page import="org.apache.commons.fileupload.disk.*" %>
<%@ page import="org.apache.commons.fileupload.servlet.*" %>
<%@ page import="java.io.*" %>
<%@ page import="java.util.*" %>
<%@ page import="jakarta.servlet.*" %>
<%@ page import="jakarta.servlet.http.*" %>
<%@ page import="jakarta.sql.*" %>
<%@ page import="java.sql.*" %>
<%@ page import="org.apache.commons.fileupload.disk.DiskFileItemFactory" %>
<%@ page import="org.apache.commons.fileupload.FileItemFactory" %>

<%
// Set the upload directory
String uploadDir = "/tmp/";

// Create a factory for disk-based file items
FileItemFactory factory = new DiskFileItemFactory();

// Create a new file upload handler
ServletFileUpload upload = new ServletFileUpload(factory);

// Parse the request
List items = upload.parseRequest(request);

// Process the uploaded items
Iterator iter = items.iterator();
while (iter.hasNext()) {
FileItem item = iter.next();

// If the item is a file, save it to the upload directory
if (!item.isFormField()) {
String fileName = new File(item.getName()).getName();
String filePath = uploadDir + fileName;
File uploadedFile = new File(filePath);
item.write(uploadedFile);
}
}
%>


File Upload Example


File Upload Example







-

I have found that it looks like:
https://www.linuxquestions.org/questions/linux-server-73/fileupload-class-not-working-with-tomcat-10-a-4175710078/
But in my situation, it seems to be a different problem.

Does someone know if this is related to a bug ?
Do I use the correct servlet-api jar package ?
Do Tomcat 10 need to be specifically configured for using servlet-api and 
jakarta EE packages ?
Does someone know what can be the problem ?

Thanks by advance for any tip(s) and/or suggestion(s).



Re: ClassNotFound after upgrade to tomcat 10

2023-04-20 Thread Kevin Huntly
I chose option 1 and re-wrote everything. It was fun


Kevin Huntly
Email: kmhun...@gmail.com
Cell: 716/424-3311


-BEGIN GEEK CODE BLOCK-
Version: 1.0
GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
G++ e(+) h--- r+++ y+++*
--END GEEK CODE BLOCK--


On Thu, Apr 20, 2023 at 12:48 PM Christopher Schultz <
ch...@christopherschultz.net> wrote:

> Kevin,
>
> On 4/17/23 17:56, Kevin Huntly wrote:
> > I'm getting the following exception when I try to access my webapp:
> >
> > 17-Apr-2023 17:52:55.982 SEVERE [catalina-exec-1]
> > org.apache.catalina.core.ApplicationDispatcher.invoke Servlet.service()
> for
> > servlet [jsp] threw exception
> >  java.lang.ClassNotFoundException:
> > javax.servlet.jsp.tagext.TagLibraryValidator
>
>
> You are trying to deploy a Java EE application onto a Jakarta EE server.
>
> You have a few options:
>
> 1. Re-write your application. (Best long-term strategy)
> 2. Run the Tomcat Migration Tool on your application (WAR/dir) and
> deploy that on to Tomcat 10.1 or later
> 3. Put your application WAR/dir into Tomcat's "legacyAppBase" directory
> for your  (defaults to "webapps-javaee" next to the "webapps"
> auto-deploy directory)
>
> As for this:
>
> On 4/17/23 19:18, Kevin Huntly wrote:
> > Is there a way to get Eclipse to stop complaining about missing
> > "javax.servlet.*" dependencies? It's complaining on every JSP I
> > have...
> Every JSP you have is broken, and Eclipse is telling you that. You have
> to basically globally search-and-replace "javax.servlet" with
> jakarta.servlet" in your whole application.
>
> -chris
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: ClassNotFound after upgrade to tomcat 10

2023-04-20 Thread Christopher Schultz

Kevin,

On 4/17/23 17:56, Kevin Huntly wrote:

I'm getting the following exception when I try to access my webapp:

17-Apr-2023 17:52:55.982 SEVERE [catalina-exec-1]
org.apache.catalina.core.ApplicationDispatcher.invoke Servlet.service() for
servlet [jsp] threw exception
 java.lang.ClassNotFoundException:
javax.servlet.jsp.tagext.TagLibraryValidator



You are trying to deploy a Java EE application onto a Jakarta EE server.

You have a few options:

1. Re-write your application. (Best long-term strategy)
2. Run the Tomcat Migration Tool on your application (WAR/dir) and 
deploy that on to Tomcat 10.1 or later
3. Put your application WAR/dir into Tomcat's "legacyAppBase" directory 
for your  (defaults to "webapps-javaee" next to the "webapps" 
auto-deploy directory)


As for this:

On 4/17/23 19:18, Kevin Huntly wrote:
Is there a way to get Eclipse to stop complaining about missing 
"javax.servlet.*" dependencies? It's complaining on every JSP I

have...
Every JSP you have is broken, and Eclipse is telling you that. You have 
to basically globally search-and-replace "javax.servlet" with 
jakarta.servlet" in your whole application.


-chris

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



Re: ClassNotFound after upgrade to tomcat 10

2023-04-17 Thread Terence M. Bandoian

On 4/17/2023 6:13 PM, Kevin Huntly wrote:

Thank you, all set. I guess I wasn't googling the right things lol, either
that or I'm getting a little too used to asking on the list =(


Yes.

-Terence Bandoian


On Mon, Apr 17, 2023 at 7:03 PM Torsten Krah  wrote:


The whole thing is also well answered there btw:


https://stackoverflow.com/questions/4928271/how-to-install-jstl-the-absolute-uri-http-java-sun-com-jstl-core-cannot-be-r#4928309

Kevin Huntly  schrieb am Di., 18. Apr. 2023, 00:52:


I am now seeing this:

17-Apr-2023 18:50:44.450 SEVERE [catalina-exec-1]
org.apache.catalina.core.ApplicationDispatcher.invoke Servlet.service()

for

servlet [jsp] threw exception
 org.apache.jasper.JasperException:
/com.cws.esolutions.web.login/jsp/html/en/Login.jsp (line: [1], column:
[1]) Unable to find taglib [c] for URI: [jakarta.tags.core]

After updating the taglib imports on my jsp files


Kevin Huntly
Email: kmhun...@gmail.com
Cell: 716/424-3311


-BEGIN GEEK CODE BLOCK-
Version: 1.0
GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
G++ e(+) h--- r+++ y+++*
--END GEEK CODE BLOCK--


On Mon, Apr 17, 2023 at 6:47 PM Torsten Krah  wrote:


And update your taglib definitions, see here:

https://jakarta.ee/specifications/tags/3.0/

The old ones are deprecated/ removed:

Quote:

Rename java.sun.com taglib URIs to new jakarta.tags.* URNs.



Kevin Huntly  schrieb am Di., 18. Apr. 2023,

00:34:

Now i'm getting these:

17-Apr-2023 18:32:03.236 INFO [main]
org.apache.catalina.core.ApplicationContext.log No Spring
WebApplicationInitializer types detected on classpath
17-Apr-2023 18:32:04.904 INFO [main]
org.apache.catalina.core.ApplicationContext.log Initializing Spring
DispatcherServlet 'eSolutions'
17-Apr-2023 18:32:16.844 SEVERE [catalina-exec-1]
org.apache.catalina.core.StandardWrapperValve.invoke

Servlet.service()

for

servlet [eSolutions] in context with path [/esolutions] threw

exception

[Handler processing failed: java.lang.NoClassDefFoundError:
jakarta/servlet/jsp/jstl/core/Config] with root cause
 java.lang.ClassNotFoundException:
jakarta.servlet.jsp.jstl.core.Config

17-Apr-2023 18:32:16.986 SEVERE [catalina-exec-1]
org.apache.catalina.core.ApplicationDispatcher.invoke

Servlet.service()

for

servlet [jsp] threw exception
 org.apache.jasper.JasperException:
/theme/cws/html/en/jsp/errHandler.jsp (line: [1], column: [1]) The

absolute

uri: [http://java.sun.com/jsp/jstl/core] cannot be resolved in

either

web.xml or the jar files deployed with this application

I removed the apache taglibs dependency, clearly that was a mistake.


Kevin Huntly
Email: kmhun...@gmail.com
Cell: 716/424-3311


-BEGIN GEEK CODE BLOCK-
Version: 1.0
GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
G++ e(+) h--- r+++ y+++*
--END GEEK CODE BLOCK--


On Mon, Apr 17, 2023 at 6:26 PM Torsten Krah 

wrote:

You should only use https://jakarta.ee/specifications/tags/3.0/

and

not

the
old 1.2.5 one, remove that old one.
Why do you have both included?

Kevin Huntly  schrieb am Di., 18. Apr. 2023,

00:19:

6.0.0

1.2.5

3.0.0

3.1.1


Kevin Huntly
Email: kmhun...@gmail.com
Cell: 716/424-3311


-BEGIN GEEK CODE BLOCK-
Version: 1.0
GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
G++ e(+) h--- r+++ y+++*
--END GEEK CODE BLOCK--


On Mon, Apr 17, 2023 at 6:17 PM Torsten Krah 

wrote:

All the api ones have to be provided, not compile scope imho.

Tomcat

does

provide them, don't package them in your war file and double

check

the

versions from the guide, there is still a class referencing the

old

API

and

is causing the exception.

You missed to add the versions you used, add them here please,

the

information you provided is lacking those crucial detail.

Kevin Huntly  schrieb am Di., 18. Apr.

2023,

00:12:

Thank you for that... I have the right (I think) dependencies

in

my

pom:



org.apache.taglibs

taglibs-standard-impl

${taglibs.version}

jar

compile





jakarta.servlet.jsp.jstl

jakarta.servlet.jsp.jstl-api

${jstl.version}

jar

compile





jakarta.servlet.jsp

jakarta.servlet.jsp-api

${jsp-api.version}

jar

compile





jakarta.servlet

jakarta.servlet-api

${jakarta.servlet.version}

jar

provided




I just want to use the jstl tag libraries =(


Kevin Huntly
Email: kmhun...@gmail.com
Cell: 716/424-3311


-BEGIN GEEK CODE BLO

Re: ClassNotFound after upgrade to tomcat 10

2023-04-17 Thread Kevin Huntly
Just another quick question... and it may not be able to be answered here...

Is there a way to get Eclipse to stop bitching about missing
"javax.servlet.*" dependencies? It's complaining on every JSP I have...


Kevin Huntly
Email: kmhun...@gmail.com
Cell: 716/424-3311


-BEGIN GEEK CODE BLOCK-
Version: 1.0
GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
G++ e(+) h--- r+++ y+++*
--END GEEK CODE BLOCK--


On Mon, Apr 17, 2023 at 7:13 PM Kevin Huntly  wrote:

> Thank you, all set. I guess I wasn't googling the right things lol, either
> that or I'm getting a little too used to asking on the list =(
> 
>
> Kevin Huntly
> Email: kmhun...@gmail.com
> Cell: 716/424-3311
> 
>
> -BEGIN GEEK CODE BLOCK-
> Version: 1.0
> GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
> W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
> PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
> G++ e(+) h--- r+++ y+++*
> --END GEEK CODE BLOCK--
>
>
> On Mon, Apr 17, 2023 at 7:03 PM Torsten Krah  wrote:
>
>> The whole thing is also well answered there btw:
>>
>>
>> https://stackoverflow.com/questions/4928271/how-to-install-jstl-the-absolute-uri-http-java-sun-com-jstl-core-cannot-be-r#4928309
>>
>> Kevin Huntly  schrieb am Di., 18. Apr. 2023, 00:52:
>>
>> > I am now seeing this:
>> >
>> > 17-Apr-2023 18:50:44.450 SEVERE [catalina-exec-1]
>> > org.apache.catalina.core.ApplicationDispatcher.invoke Servlet.service()
>> for
>> > servlet [jsp] threw exception
>> > org.apache.jasper.JasperException:
>> > /com.cws.esolutions.web.login/jsp/html/en/Login.jsp (line: [1], column:
>> > [1]) Unable to find taglib [c] for URI: [jakarta.tags.core]
>> >
>> > After updating the taglib imports on my jsp files
>> > 
>> >
>> > Kevin Huntly
>> > Email: kmhun...@gmail.com
>> > Cell: 716/424-3311
>> > 
>> >
>> > -BEGIN GEEK CODE BLOCK-
>> > Version: 1.0
>> > GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
>> > W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
>> > PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
>> > G++ e(+) h--- r+++ y+++*
>> > --END GEEK CODE BLOCK--
>> >
>> >
>> > On Mon, Apr 17, 2023 at 6:47 PM Torsten Krah  wrote:
>> >
>> > > And update your taglib definitions, see here:
>> > >
>> > > https://jakarta.ee/specifications/tags/3.0/
>> > >
>> > > The old ones are deprecated/ removed:
>> > >
>> > > Quote:
>> > >
>> > > Rename java.sun.com taglib URIs to new jakarta.tags.* URNs.
>> > >
>> > >
>> > >
>> > > Kevin Huntly  schrieb am Di., 18. Apr. 2023,
>> 00:34:
>> > >
>> > > > Now i'm getting these:
>> > > >
>> > > > 17-Apr-2023 18:32:03.236 INFO [main]
>> > > > org.apache.catalina.core.ApplicationContext.log No Spring
>> > > > WebApplicationInitializer types detected on classpath
>> > > > 17-Apr-2023 18:32:04.904 INFO [main]
>> > > > org.apache.catalina.core.ApplicationContext.log Initializing Spring
>> > > > DispatcherServlet 'eSolutions'
>> > > > 17-Apr-2023 18:32:16.844 SEVERE [catalina-exec-1]
>> > > > org.apache.catalina.core.StandardWrapperValve.invoke
>> Servlet.service()
>> > > for
>> > > > servlet [eSolutions] in context with path [/esolutions] threw
>> exception
>> > > > [Handler processing failed: java.lang.NoClassDefFoundError:
>> > > > jakarta/servlet/jsp/jstl/core/Config] with root cause
>> > > > java.lang.ClassNotFoundException:
>> > > > jakarta.servlet.jsp.jstl.core.Config
>> > > >
>> > > > 17-Apr-2023 18:32:16.986 SEVERE [catalina-exec-1]
>> > > > org.apache.catalina.core.ApplicationDispatcher.invoke
>> Servlet.service()
>> > > for
>> > > > servlet [jsp] threw exception
>> > > > org.apache.jasper.JasperException:
>> > > > /theme/cws/html/en/jsp/errHandler.jsp (line: [1], column: [1]) The
>> > > absolute
>> > > > uri: [http://java.sun.com/jsp/jstl/core] cannot be resolved in
>> either
>> > > > web.xml or the jar files deployed with this application
>> > > >
>> > > > I removed the apache taglibs dependency, clearly that was a mistake.
>> > > > 
>> > > >
>> > > > Kevin Huntly
>> > > > Email: kmhun...@gmail.com
>> > > > Cell: 716/424-3311
>> > > > 
>> > > >
>> > > > -BEGIN GEEK CODE BLOCK-
>> > > > Version: 1.0
>> > > > GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
>> > > > W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
>> > > > PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
>> > > > G++ e(+) h--- r+++ y+++*
>> > > > --END GEEK CODE BLOCK--
>> > > >
>> > > >
>> > > > On Mon, Apr 17, 2023 at 6:26 PM Torsten Krah 
>> > wrote:
>> > > >
>> > > > > You should only use https://jakarta.ee/specifications/tags/3.0/
>> and
>> > > not
>> > > > > the
>> 

Re: ClassNotFound after upgrade to tomcat 10

2023-04-17 Thread Kevin Huntly
Thank you, all set. I guess I wasn't googling the right things lol, either
that or I'm getting a little too used to asking on the list =(


Kevin Huntly
Email: kmhun...@gmail.com
Cell: 716/424-3311


-BEGIN GEEK CODE BLOCK-
Version: 1.0
GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
G++ e(+) h--- r+++ y+++*
--END GEEK CODE BLOCK--


On Mon, Apr 17, 2023 at 7:03 PM Torsten Krah  wrote:

> The whole thing is also well answered there btw:
>
>
> https://stackoverflow.com/questions/4928271/how-to-install-jstl-the-absolute-uri-http-java-sun-com-jstl-core-cannot-be-r#4928309
>
> Kevin Huntly  schrieb am Di., 18. Apr. 2023, 00:52:
>
> > I am now seeing this:
> >
> > 17-Apr-2023 18:50:44.450 SEVERE [catalina-exec-1]
> > org.apache.catalina.core.ApplicationDispatcher.invoke Servlet.service()
> for
> > servlet [jsp] threw exception
> > org.apache.jasper.JasperException:
> > /com.cws.esolutions.web.login/jsp/html/en/Login.jsp (line: [1], column:
> > [1]) Unable to find taglib [c] for URI: [jakarta.tags.core]
> >
> > After updating the taglib imports on my jsp files
> > 
> >
> > Kevin Huntly
> > Email: kmhun...@gmail.com
> > Cell: 716/424-3311
> > 
> >
> > -BEGIN GEEK CODE BLOCK-
> > Version: 1.0
> > GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
> > W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
> > PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
> > G++ e(+) h--- r+++ y+++*
> > --END GEEK CODE BLOCK--
> >
> >
> > On Mon, Apr 17, 2023 at 6:47 PM Torsten Krah  wrote:
> >
> > > And update your taglib definitions, see here:
> > >
> > > https://jakarta.ee/specifications/tags/3.0/
> > >
> > > The old ones are deprecated/ removed:
> > >
> > > Quote:
> > >
> > > Rename java.sun.com taglib URIs to new jakarta.tags.* URNs.
> > >
> > >
> > >
> > > Kevin Huntly  schrieb am Di., 18. Apr. 2023,
> 00:34:
> > >
> > > > Now i'm getting these:
> > > >
> > > > 17-Apr-2023 18:32:03.236 INFO [main]
> > > > org.apache.catalina.core.ApplicationContext.log No Spring
> > > > WebApplicationInitializer types detected on classpath
> > > > 17-Apr-2023 18:32:04.904 INFO [main]
> > > > org.apache.catalina.core.ApplicationContext.log Initializing Spring
> > > > DispatcherServlet 'eSolutions'
> > > > 17-Apr-2023 18:32:16.844 SEVERE [catalina-exec-1]
> > > > org.apache.catalina.core.StandardWrapperValve.invoke
> Servlet.service()
> > > for
> > > > servlet [eSolutions] in context with path [/esolutions] threw
> exception
> > > > [Handler processing failed: java.lang.NoClassDefFoundError:
> > > > jakarta/servlet/jsp/jstl/core/Config] with root cause
> > > > java.lang.ClassNotFoundException:
> > > > jakarta.servlet.jsp.jstl.core.Config
> > > >
> > > > 17-Apr-2023 18:32:16.986 SEVERE [catalina-exec-1]
> > > > org.apache.catalina.core.ApplicationDispatcher.invoke
> Servlet.service()
> > > for
> > > > servlet [jsp] threw exception
> > > > org.apache.jasper.JasperException:
> > > > /theme/cws/html/en/jsp/errHandler.jsp (line: [1], column: [1]) The
> > > absolute
> > > > uri: [http://java.sun.com/jsp/jstl/core] cannot be resolved in
> either
> > > > web.xml or the jar files deployed with this application
> > > >
> > > > I removed the apache taglibs dependency, clearly that was a mistake.
> > > > 
> > > >
> > > > Kevin Huntly
> > > > Email: kmhun...@gmail.com
> > > > Cell: 716/424-3311
> > > > 
> > > >
> > > > -BEGIN GEEK CODE BLOCK-
> > > > Version: 1.0
> > > > GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
> > > > W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
> > > > PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
> > > > G++ e(+) h--- r+++ y+++*
> > > > --END GEEK CODE BLOCK--
> > > >
> > > >
> > > > On Mon, Apr 17, 2023 at 6:26 PM Torsten Krah 
> > wrote:
> > > >
> > > > > You should only use https://jakarta.ee/specifications/tags/3.0/
> and
> > > not
> > > > > the
> > > > > old 1.2.5 one, remove that old one.
> > > > > Why do you have both included?
> > > > >
> > > > > Kevin Huntly  schrieb am Di., 18. Apr. 2023,
> > > 00:19:
> > > > >
> > > > > > 6.0.0
> > > > > >
> > > > > > 1.2.5
> > > > > >
> > > > > > 3.0.0
> > > > > >
> > > > > > 3.1.1
> > > > > > 
> > > > > >
> > > > > > Kevin Huntly
> > > > > > Email: kmhun...@gmail.com
> > > > > > Cell: 716/424-3311
> > > > > > 
> > > > > >
> > > > > > -BEGIN GEEK CODE BLOCK-
> > > > > > Version: 1.0
> > > > > > GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
> > > > > > W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
> > > > > > PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
> > > > > > G++ e(+) h--- r+++ y+++*
> > > 

Re: ClassNotFound after upgrade to tomcat 10

2023-04-17 Thread Torsten Krah
The whole thing is also well answered there btw:

https://stackoverflow.com/questions/4928271/how-to-install-jstl-the-absolute-uri-http-java-sun-com-jstl-core-cannot-be-r#4928309

Kevin Huntly  schrieb am Di., 18. Apr. 2023, 00:52:

> I am now seeing this:
>
> 17-Apr-2023 18:50:44.450 SEVERE [catalina-exec-1]
> org.apache.catalina.core.ApplicationDispatcher.invoke Servlet.service() for
> servlet [jsp] threw exception
> org.apache.jasper.JasperException:
> /com.cws.esolutions.web.login/jsp/html/en/Login.jsp (line: [1], column:
> [1]) Unable to find taglib [c] for URI: [jakarta.tags.core]
>
> After updating the taglib imports on my jsp files
> 
>
> Kevin Huntly
> Email: kmhun...@gmail.com
> Cell: 716/424-3311
> 
>
> -BEGIN GEEK CODE BLOCK-
> Version: 1.0
> GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
> W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
> PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
> G++ e(+) h--- r+++ y+++*
> --END GEEK CODE BLOCK--
>
>
> On Mon, Apr 17, 2023 at 6:47 PM Torsten Krah  wrote:
>
> > And update your taglib definitions, see here:
> >
> > https://jakarta.ee/specifications/tags/3.0/
> >
> > The old ones are deprecated/ removed:
> >
> > Quote:
> >
> > Rename java.sun.com taglib URIs to new jakarta.tags.* URNs.
> >
> >
> >
> > Kevin Huntly  schrieb am Di., 18. Apr. 2023, 00:34:
> >
> > > Now i'm getting these:
> > >
> > > 17-Apr-2023 18:32:03.236 INFO [main]
> > > org.apache.catalina.core.ApplicationContext.log No Spring
> > > WebApplicationInitializer types detected on classpath
> > > 17-Apr-2023 18:32:04.904 INFO [main]
> > > org.apache.catalina.core.ApplicationContext.log Initializing Spring
> > > DispatcherServlet 'eSolutions'
> > > 17-Apr-2023 18:32:16.844 SEVERE [catalina-exec-1]
> > > org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service()
> > for
> > > servlet [eSolutions] in context with path [/esolutions] threw exception
> > > [Handler processing failed: java.lang.NoClassDefFoundError:
> > > jakarta/servlet/jsp/jstl/core/Config] with root cause
> > > java.lang.ClassNotFoundException:
> > > jakarta.servlet.jsp.jstl.core.Config
> > >
> > > 17-Apr-2023 18:32:16.986 SEVERE [catalina-exec-1]
> > > org.apache.catalina.core.ApplicationDispatcher.invoke Servlet.service()
> > for
> > > servlet [jsp] threw exception
> > > org.apache.jasper.JasperException:
> > > /theme/cws/html/en/jsp/errHandler.jsp (line: [1], column: [1]) The
> > absolute
> > > uri: [http://java.sun.com/jsp/jstl/core] cannot be resolved in either
> > > web.xml or the jar files deployed with this application
> > >
> > > I removed the apache taglibs dependency, clearly that was a mistake.
> > > 
> > >
> > > Kevin Huntly
> > > Email: kmhun...@gmail.com
> > > Cell: 716/424-3311
> > > 
> > >
> > > -BEGIN GEEK CODE BLOCK-
> > > Version: 1.0
> > > GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
> > > W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
> > > PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
> > > G++ e(+) h--- r+++ y+++*
> > > --END GEEK CODE BLOCK--
> > >
> > >
> > > On Mon, Apr 17, 2023 at 6:26 PM Torsten Krah 
> wrote:
> > >
> > > > You should only use https://jakarta.ee/specifications/tags/3.0/ and
> > not
> > > > the
> > > > old 1.2.5 one, remove that old one.
> > > > Why do you have both included?
> > > >
> > > > Kevin Huntly  schrieb am Di., 18. Apr. 2023,
> > 00:19:
> > > >
> > > > > 6.0.0
> > > > >
> > > > > 1.2.5
> > > > >
> > > > > 3.0.0
> > > > >
> > > > > 3.1.1
> > > > > 
> > > > >
> > > > > Kevin Huntly
> > > > > Email: kmhun...@gmail.com
> > > > > Cell: 716/424-3311
> > > > > 
> > > > >
> > > > > -BEGIN GEEK CODE BLOCK-
> > > > > Version: 1.0
> > > > > GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
> > > > > W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
> > > > > PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
> > > > > G++ e(+) h--- r+++ y+++*
> > > > > --END GEEK CODE BLOCK--
> > > > >
> > > > >
> > > > > On Mon, Apr 17, 2023 at 6:17 PM Torsten Krah 
> > > wrote:
> > > > >
> > > > > > All the api ones have to be provided, not compile scope imho.
> > Tomcat
> > > > does
> > > > > > provide them, don't package them in your war file and double
> check
> > > the
> > > > > > versions from the guide, there is still a class referencing the
> old
> > > API
> > > > > and
> > > > > > is causing the exception.
> > > > > >
> > > > > > You missed to add the versions you used, add them here please,
> the
> > > > > > information you provided is lacking those crucial detail.
> > > > > >
> > > > > > Kevin Huntly  schrieb am Di., 18. Apr. 2023,
> > > > 00:12:
> > > > > >
> > > > > > > Thank you for that... I have the right (I think) dependencies
> in
> > my
> > > > > pom:
> > > > > > >

Re: ClassNotFound after upgrade to tomcat 10

2023-04-17 Thread Torsten Krah
https://stackoverflow.com/questions/74585710/migration-to-jakarta-ee-unable-to-find-taglib-c-for-uri-jakarta-tags-core

Does that help?


Kevin Huntly  schrieb am Di., 18. Apr. 2023, 00:52:

> I am now seeing this:
>
> 17-Apr-2023 18:50:44.450 SEVERE [catalina-exec-1]
> org.apache.catalina.core.ApplicationDispatcher.invoke Servlet.service() for
> servlet [jsp] threw exception
> org.apache.jasper.JasperException:
> /com.cws.esolutions.web.login/jsp/html/en/Login.jsp (line: [1], column:
> [1]) Unable to find taglib [c] for URI: [jakarta.tags.core]
>
> After updating the taglib imports on my jsp files
> 
>
> Kevin Huntly
> Email: kmhun...@gmail.com
> Cell: 716/424-3311
> 
>
> -BEGIN GEEK CODE BLOCK-
> Version: 1.0
> GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
> W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
> PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
> G++ e(+) h--- r+++ y+++*
> --END GEEK CODE BLOCK--
>
>
> On Mon, Apr 17, 2023 at 6:47 PM Torsten Krah  wrote:
>
> > And update your taglib definitions, see here:
> >
> > https://jakarta.ee/specifications/tags/3.0/
> >
> > The old ones are deprecated/ removed:
> >
> > Quote:
> >
> > Rename java.sun.com taglib URIs to new jakarta.tags.* URNs.
> >
> >
> >
> > Kevin Huntly  schrieb am Di., 18. Apr. 2023, 00:34:
> >
> > > Now i'm getting these:
> > >
> > > 17-Apr-2023 18:32:03.236 INFO [main]
> > > org.apache.catalina.core.ApplicationContext.log No Spring
> > > WebApplicationInitializer types detected on classpath
> > > 17-Apr-2023 18:32:04.904 INFO [main]
> > > org.apache.catalina.core.ApplicationContext.log Initializing Spring
> > > DispatcherServlet 'eSolutions'
> > > 17-Apr-2023 18:32:16.844 SEVERE [catalina-exec-1]
> > > org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service()
> > for
> > > servlet [eSolutions] in context with path [/esolutions] threw exception
> > > [Handler processing failed: java.lang.NoClassDefFoundError:
> > > jakarta/servlet/jsp/jstl/core/Config] with root cause
> > > java.lang.ClassNotFoundException:
> > > jakarta.servlet.jsp.jstl.core.Config
> > >
> > > 17-Apr-2023 18:32:16.986 SEVERE [catalina-exec-1]
> > > org.apache.catalina.core.ApplicationDispatcher.invoke Servlet.service()
> > for
> > > servlet [jsp] threw exception
> > > org.apache.jasper.JasperException:
> > > /theme/cws/html/en/jsp/errHandler.jsp (line: [1], column: [1]) The
> > absolute
> > > uri: [http://java.sun.com/jsp/jstl/core] cannot be resolved in either
> > > web.xml or the jar files deployed with this application
> > >
> > > I removed the apache taglibs dependency, clearly that was a mistake.
> > > 
> > >
> > > Kevin Huntly
> > > Email: kmhun...@gmail.com
> > > Cell: 716/424-3311
> > > 
> > >
> > > -BEGIN GEEK CODE BLOCK-
> > > Version: 1.0
> > > GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
> > > W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
> > > PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
> > > G++ e(+) h--- r+++ y+++*
> > > --END GEEK CODE BLOCK--
> > >
> > >
> > > On Mon, Apr 17, 2023 at 6:26 PM Torsten Krah 
> wrote:
> > >
> > > > You should only use https://jakarta.ee/specifications/tags/3.0/ and
> > not
> > > > the
> > > > old 1.2.5 one, remove that old one.
> > > > Why do you have both included?
> > > >
> > > > Kevin Huntly  schrieb am Di., 18. Apr. 2023,
> > 00:19:
> > > >
> > > > > 6.0.0
> > > > >
> > > > > 1.2.5
> > > > >
> > > > > 3.0.0
> > > > >
> > > > > 3.1.1
> > > > > 
> > > > >
> > > > > Kevin Huntly
> > > > > Email: kmhun...@gmail.com
> > > > > Cell: 716/424-3311
> > > > > 
> > > > >
> > > > > -BEGIN GEEK CODE BLOCK-
> > > > > Version: 1.0
> > > > > GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
> > > > > W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
> > > > > PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
> > > > > G++ e(+) h--- r+++ y+++*
> > > > > --END GEEK CODE BLOCK--
> > > > >
> > > > >
> > > > > On Mon, Apr 17, 2023 at 6:17 PM Torsten Krah 
> > > wrote:
> > > > >
> > > > > > All the api ones have to be provided, not compile scope imho.
> > Tomcat
> > > > does
> > > > > > provide them, don't package them in your war file and double
> check
> > > the
> > > > > > versions from the guide, there is still a class referencing the
> old
> > > API
> > > > > and
> > > > > > is causing the exception.
> > > > > >
> > > > > > You missed to add the versions you used, add them here please,
> the
> > > > > > information you provided is lacking those crucial detail.
> > > > > >
> > > > > > Kevin Huntly  schrieb am Di., 18. Apr. 2023,
> > > > 00:12:
> > > > > >
> > > > > > > Thank you for that... I have the right (I think) dependencies
> in
> > my
> > > > > pom:
> > > > > > >
> > > > > > > 
> > > > > > >
> > > > > > 

Re: ClassNotFound after upgrade to tomcat 10

2023-04-17 Thread Kevin Huntly
I am now seeing this:

17-Apr-2023 18:50:44.450 SEVERE [catalina-exec-1]
org.apache.catalina.core.ApplicationDispatcher.invoke Servlet.service() for
servlet [jsp] threw exception
org.apache.jasper.JasperException:
/com.cws.esolutions.web.login/jsp/html/en/Login.jsp (line: [1], column:
[1]) Unable to find taglib [c] for URI: [jakarta.tags.core]

After updating the taglib imports on my jsp files


Kevin Huntly
Email: kmhun...@gmail.com
Cell: 716/424-3311


-BEGIN GEEK CODE BLOCK-
Version: 1.0
GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
G++ e(+) h--- r+++ y+++*
--END GEEK CODE BLOCK--


On Mon, Apr 17, 2023 at 6:47 PM Torsten Krah  wrote:

> And update your taglib definitions, see here:
>
> https://jakarta.ee/specifications/tags/3.0/
>
> The old ones are deprecated/ removed:
>
> Quote:
>
> Rename java.sun.com taglib URIs to new jakarta.tags.* URNs.
>
>
>
> Kevin Huntly  schrieb am Di., 18. Apr. 2023, 00:34:
>
> > Now i'm getting these:
> >
> > 17-Apr-2023 18:32:03.236 INFO [main]
> > org.apache.catalina.core.ApplicationContext.log No Spring
> > WebApplicationInitializer types detected on classpath
> > 17-Apr-2023 18:32:04.904 INFO [main]
> > org.apache.catalina.core.ApplicationContext.log Initializing Spring
> > DispatcherServlet 'eSolutions'
> > 17-Apr-2023 18:32:16.844 SEVERE [catalina-exec-1]
> > org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service()
> for
> > servlet [eSolutions] in context with path [/esolutions] threw exception
> > [Handler processing failed: java.lang.NoClassDefFoundError:
> > jakarta/servlet/jsp/jstl/core/Config] with root cause
> > java.lang.ClassNotFoundException:
> > jakarta.servlet.jsp.jstl.core.Config
> >
> > 17-Apr-2023 18:32:16.986 SEVERE [catalina-exec-1]
> > org.apache.catalina.core.ApplicationDispatcher.invoke Servlet.service()
> for
> > servlet [jsp] threw exception
> > org.apache.jasper.JasperException:
> > /theme/cws/html/en/jsp/errHandler.jsp (line: [1], column: [1]) The
> absolute
> > uri: [http://java.sun.com/jsp/jstl/core] cannot be resolved in either
> > web.xml or the jar files deployed with this application
> >
> > I removed the apache taglibs dependency, clearly that was a mistake.
> > 
> >
> > Kevin Huntly
> > Email: kmhun...@gmail.com
> > Cell: 716/424-3311
> > 
> >
> > -BEGIN GEEK CODE BLOCK-
> > Version: 1.0
> > GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
> > W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
> > PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
> > G++ e(+) h--- r+++ y+++*
> > --END GEEK CODE BLOCK--
> >
> >
> > On Mon, Apr 17, 2023 at 6:26 PM Torsten Krah  wrote:
> >
> > > You should only use https://jakarta.ee/specifications/tags/3.0/ and
> not
> > > the
> > > old 1.2.5 one, remove that old one.
> > > Why do you have both included?
> > >
> > > Kevin Huntly  schrieb am Di., 18. Apr. 2023,
> 00:19:
> > >
> > > > 6.0.0
> > > >
> > > > 1.2.5
> > > >
> > > > 3.0.0
> > > >
> > > > 3.1.1
> > > > 
> > > >
> > > > Kevin Huntly
> > > > Email: kmhun...@gmail.com
> > > > Cell: 716/424-3311
> > > > 
> > > >
> > > > -BEGIN GEEK CODE BLOCK-
> > > > Version: 1.0
> > > > GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
> > > > W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
> > > > PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
> > > > G++ e(+) h--- r+++ y+++*
> > > > --END GEEK CODE BLOCK--
> > > >
> > > >
> > > > On Mon, Apr 17, 2023 at 6:17 PM Torsten Krah 
> > wrote:
> > > >
> > > > > All the api ones have to be provided, not compile scope imho.
> Tomcat
> > > does
> > > > > provide them, don't package them in your war file and double check
> > the
> > > > > versions from the guide, there is still a class referencing the old
> > API
> > > > and
> > > > > is causing the exception.
> > > > >
> > > > > You missed to add the versions you used, add them here please, the
> > > > > information you provided is lacking those crucial detail.
> > > > >
> > > > > Kevin Huntly  schrieb am Di., 18. Apr. 2023,
> > > 00:12:
> > > > >
> > > > > > Thank you for that... I have the right (I think) dependencies in
> my
> > > > pom:
> > > > > >
> > > > > > 
> > > > > >
> > > > > > org.apache.taglibs
> > > > > >
> > > > > > taglibs-standard-impl
> > > > > >
> > > > > > ${taglibs.version}
> > > > > >
> > > > > > jar
> > > > > >
> > > > > > compile
> > > > > >
> > > > > > 
> > > > > >
> > > > > > 
> > > > > >
> > > > > > jakarta.servlet.jsp.jstl
> > > > > >
> > > > > > jakarta.servlet.jsp.jstl-api
> > > > > >
> > > > > > ${jstl.version}
> > > > > >
> > > > > > jar
> > > > > >
> > > > > > compile
> > > > > >
> > > > > > 
> > > > > >
> > > > > > 
> > > > > >
> 

Re: ClassNotFound after upgrade to tomcat 10

2023-04-17 Thread Torsten Krah
And update your taglib definitions, see here:

https://jakarta.ee/specifications/tags/3.0/

The old ones are deprecated/ removed:

Quote:

Rename java.sun.com taglib URIs to new jakarta.tags.* URNs.



Kevin Huntly  schrieb am Di., 18. Apr. 2023, 00:34:

> Now i'm getting these:
>
> 17-Apr-2023 18:32:03.236 INFO [main]
> org.apache.catalina.core.ApplicationContext.log No Spring
> WebApplicationInitializer types detected on classpath
> 17-Apr-2023 18:32:04.904 INFO [main]
> org.apache.catalina.core.ApplicationContext.log Initializing Spring
> DispatcherServlet 'eSolutions'
> 17-Apr-2023 18:32:16.844 SEVERE [catalina-exec-1]
> org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service() for
> servlet [eSolutions] in context with path [/esolutions] threw exception
> [Handler processing failed: java.lang.NoClassDefFoundError:
> jakarta/servlet/jsp/jstl/core/Config] with root cause
> java.lang.ClassNotFoundException:
> jakarta.servlet.jsp.jstl.core.Config
>
> 17-Apr-2023 18:32:16.986 SEVERE [catalina-exec-1]
> org.apache.catalina.core.ApplicationDispatcher.invoke Servlet.service() for
> servlet [jsp] threw exception
> org.apache.jasper.JasperException:
> /theme/cws/html/en/jsp/errHandler.jsp (line: [1], column: [1]) The absolute
> uri: [http://java.sun.com/jsp/jstl/core] cannot be resolved in either
> web.xml or the jar files deployed with this application
>
> I removed the apache taglibs dependency, clearly that was a mistake.
> 
>
> Kevin Huntly
> Email: kmhun...@gmail.com
> Cell: 716/424-3311
> 
>
> -BEGIN GEEK CODE BLOCK-
> Version: 1.0
> GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
> W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
> PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
> G++ e(+) h--- r+++ y+++*
> --END GEEK CODE BLOCK--
>
>
> On Mon, Apr 17, 2023 at 6:26 PM Torsten Krah  wrote:
>
> > You should only use https://jakarta.ee/specifications/tags/3.0/ and not
> > the
> > old 1.2.5 one, remove that old one.
> > Why do you have both included?
> >
> > Kevin Huntly  schrieb am Di., 18. Apr. 2023, 00:19:
> >
> > > 6.0.0
> > >
> > > 1.2.5
> > >
> > > 3.0.0
> > >
> > > 3.1.1
> > > 
> > >
> > > Kevin Huntly
> > > Email: kmhun...@gmail.com
> > > Cell: 716/424-3311
> > > 
> > >
> > > -BEGIN GEEK CODE BLOCK-
> > > Version: 1.0
> > > GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
> > > W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
> > > PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
> > > G++ e(+) h--- r+++ y+++*
> > > --END GEEK CODE BLOCK--
> > >
> > >
> > > On Mon, Apr 17, 2023 at 6:17 PM Torsten Krah 
> wrote:
> > >
> > > > All the api ones have to be provided, not compile scope imho. Tomcat
> > does
> > > > provide them, don't package them in your war file and double check
> the
> > > > versions from the guide, there is still a class referencing the old
> API
> > > and
> > > > is causing the exception.
> > > >
> > > > You missed to add the versions you used, add them here please, the
> > > > information you provided is lacking those crucial detail.
> > > >
> > > > Kevin Huntly  schrieb am Di., 18. Apr. 2023,
> > 00:12:
> > > >
> > > > > Thank you for that... I have the right (I think) dependencies in my
> > > pom:
> > > > >
> > > > > 
> > > > >
> > > > > org.apache.taglibs
> > > > >
> > > > > taglibs-standard-impl
> > > > >
> > > > > ${taglibs.version}
> > > > >
> > > > > jar
> > > > >
> > > > > compile
> > > > >
> > > > > 
> > > > >
> > > > > 
> > > > >
> > > > > jakarta.servlet.jsp.jstl
> > > > >
> > > > > jakarta.servlet.jsp.jstl-api
> > > > >
> > > > > ${jstl.version}
> > > > >
> > > > > jar
> > > > >
> > > > > compile
> > > > >
> > > > > 
> > > > >
> > > > > 
> > > > >
> > > > > jakarta.servlet.jsp
> > > > >
> > > > > jakarta.servlet.jsp-api
> > > > >
> > > > > ${jsp-api.version}
> > > > >
> > > > > jar
> > > > >
> > > > > compile
> > > > >
> > > > > 
> > > > >
> > > > > 
> > > > >
> > > > > jakarta.servlet
> > > > >
> > > > > jakarta.servlet-api
> > > > >
> > > > > ${jakarta.servlet.version}
> > > > >
> > > > > jar
> > > > >
> > > > > provided
> > > > >
> > > > > 
> > > > >
> > > > >
> > > > > I just want to use the jstl tag libraries =(
> > > > > 
> > > > >
> > > > > Kevin Huntly
> > > > > Email: kmhun...@gmail.com
> > > > > Cell: 716/424-3311
> > > > > 
> > > > >
> > > > > -BEGIN GEEK CODE BLOCK-
> > > > > Version: 1.0
> > > > > GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
> > > > > W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
> > > > > PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
> > > > > G++ e(+) h--- r+++ y+++*
> > > > > --END GEEK CODE BLOCK--
> > > > >
> > > > >
> > > > > On Mon, Apr 17, 2023 at 6:07 PM Torsten Krah 
> > > wrote:
> > > > >
> > > > > > Please read
> > >

Re: ClassNotFound after upgrade to tomcat 10

2023-04-17 Thread Mark Eggers

https://jakarta.ee/specifications/tags/3.0/tagdocs/c/tld-summary.html

 . . . just my two cents
/mde/

On 4/17/2023 3:34 PM, Kevin Huntly wrote:

Now i'm getting these:

17-Apr-2023 18:32:03.236 INFO [main]
org.apache.catalina.core.ApplicationContext.log No Spring
WebApplicationInitializer types detected on classpath
17-Apr-2023 18:32:04.904 INFO [main]
org.apache.catalina.core.ApplicationContext.log Initializing Spring
DispatcherServlet 'eSolutions'
17-Apr-2023 18:32:16.844 SEVERE [catalina-exec-1]
org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service() for
servlet [eSolutions] in context with path [/esolutions] threw exception
[Handler processing failed: java.lang.NoClassDefFoundError:
jakarta/servlet/jsp/jstl/core/Config] with root cause
 java.lang.ClassNotFoundException:
jakarta.servlet.jsp.jstl.core.Config

17-Apr-2023 18:32:16.986 SEVERE [catalina-exec-1]
org.apache.catalina.core.ApplicationDispatcher.invoke Servlet.service() for
servlet [jsp] threw exception
 org.apache.jasper.JasperException:
/theme/cws/html/en/jsp/errHandler.jsp (line: [1], column: [1]) The absolute
uri: [http://java.sun.com/jsp/jstl/core] cannot be resolved in either
web.xml or the jar files deployed with this application

I removed the apache taglibs dependency, clearly that was a mistake.


Kevin Huntly
Email: kmhun...@gmail.com
Cell: 716/424-3311


-BEGIN GEEK CODE BLOCK-
Version: 1.0
GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
G++ e(+) h--- r+++ y+++*
--END GEEK CODE BLOCK--


On Mon, Apr 17, 2023 at 6:26 PM Torsten Krah  wrote:


You should only use https://jakarta.ee/specifications/tags/3.0/ and not
the
old 1.2.5 one, remove that old one.
Why do you have both included?

Kevin Huntly  schrieb am Di., 18. Apr. 2023, 00:19:


6.0.0

1.2.5

3.0.0

3.1.1


Kevin Huntly
Email: kmhun...@gmail.com
Cell: 716/424-3311


-BEGIN GEEK CODE BLOCK-
Version: 1.0
GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
G++ e(+) h--- r+++ y+++*
--END GEEK CODE BLOCK--


On Mon, Apr 17, 2023 at 6:17 PM Torsten Krah  wrote:


All the api ones have to be provided, not compile scope imho. Tomcat

does

provide them, don't package them in your war file and double check the
versions from the guide, there is still a class referencing the old API

and

is causing the exception.

You missed to add the versions you used, add them here please, the
information you provided is lacking those crucial detail.

Kevin Huntly  schrieb am Di., 18. Apr. 2023,

00:12:



Thank you for that... I have the right (I think) dependencies in my

pom:




org.apache.taglibs

taglibs-standard-impl

${taglibs.version}

jar

compile





jakarta.servlet.jsp.jstl

jakarta.servlet.jsp.jstl-api

${jstl.version}

jar

compile





jakarta.servlet.jsp

jakarta.servlet.jsp-api

${jsp-api.version}

jar

compile





jakarta.servlet

jakarta.servlet-api

${jakarta.servlet.version}

jar

provided




I just want to use the jstl tag libraries =(


Kevin Huntly
Email: kmhun...@gmail.com
Cell: 716/424-3311


-BEGIN GEEK CODE BLOCK-
Version: 1.0
GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
G++ e(+) h--- r+++ y+++*
--END GEEK CODE BLOCK--


On Mon, Apr 17, 2023 at 6:07 PM Torsten Krah 

wrote:



Please read

https://tomcat.apache.org/migration-10.html#Server_Pages_3.0

and while you are there, read the whole guide ;-).

Kevin Huntly  schrieb am Mo., 17. Apr. 2023,

23:57:



Hello,

I'm getting the following exception when I try to access my

webapp:


17-Apr-2023 17:52:55.982 SEVERE [catalina-exec-1]
org.apache.catalina.core.ApplicationDispatcher.invoke

Servlet.service()

for

servlet [jsp] threw exception
 java.lang.ClassNotFoundException:
javax.servlet.jsp.tagext.TagLibraryValidator
 at











org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1437)

 at











org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1245)

 at

java.base/java.lang.ClassLoader.defineClass1(Native

Method)
 at


java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1013)

 at











java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150)

 at











org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2487)

 at











org.apache.cat

Re: ClassNotFound after upgrade to tomcat 10

2023-04-17 Thread Torsten Krah
The Jakarta jstl ones have to be compile scope, they are not included in
tomcat, do you have that?
See the migration guide, spec section, only those APIs listed there should
be provided scope.


Kevin Huntly  schrieb am Di., 18. Apr. 2023, 00:34:

> Now i'm getting these:
>
> 17-Apr-2023 18:32:03.236 INFO [main]
> org.apache.catalina.core.ApplicationContext.log No Spring
> WebApplicationInitializer types detected on classpath
> 17-Apr-2023 18:32:04.904 INFO [main]
> org.apache.catalina.core.ApplicationContext.log Initializing Spring
> DispatcherServlet 'eSolutions'
> 17-Apr-2023 18:32:16.844 SEVERE [catalina-exec-1]
> org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service() for
> servlet [eSolutions] in context with path [/esolutions] threw exception
> [Handler processing failed: java.lang.NoClassDefFoundError:
> jakarta/servlet/jsp/jstl/core/Config] with root cause
> java.lang.ClassNotFoundException:
> jakarta.servlet.jsp.jstl.core.Config
>
> 17-Apr-2023 18:32:16.986 SEVERE [catalina-exec-1]
> org.apache.catalina.core.ApplicationDispatcher.invoke Servlet.service() for
> servlet [jsp] threw exception
> org.apache.jasper.JasperException:
> /theme/cws/html/en/jsp/errHandler.jsp (line: [1], column: [1]) The absolute
> uri: [http://java.sun.com/jsp/jstl/core] cannot be resolved in either
> web.xml or the jar files deployed with this application
>
> I removed the apache taglibs dependency, clearly that was a mistake.
> 
>
> Kevin Huntly
> Email: kmhun...@gmail.com
> Cell: 716/424-3311
> 
>
> -BEGIN GEEK CODE BLOCK-
> Version: 1.0
> GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
> W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
> PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
> G++ e(+) h--- r+++ y+++*
> --END GEEK CODE BLOCK--
>
>
> On Mon, Apr 17, 2023 at 6:26 PM Torsten Krah  wrote:
>
> > You should only use https://jakarta.ee/specifications/tags/3.0/ and not
> > the
> > old 1.2.5 one, remove that old one.
> > Why do you have both included?
> >
> > Kevin Huntly  schrieb am Di., 18. Apr. 2023, 00:19:
> >
> > > 6.0.0
> > >
> > > 1.2.5
> > >
> > > 3.0.0
> > >
> > > 3.1.1
> > > 
> > >
> > > Kevin Huntly
> > > Email: kmhun...@gmail.com
> > > Cell: 716/424-3311
> > > 
> > >
> > > -BEGIN GEEK CODE BLOCK-
> > > Version: 1.0
> > > GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
> > > W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
> > > PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
> > > G++ e(+) h--- r+++ y+++*
> > > --END GEEK CODE BLOCK--
> > >
> > >
> > > On Mon, Apr 17, 2023 at 6:17 PM Torsten Krah 
> wrote:
> > >
> > > > All the api ones have to be provided, not compile scope imho. Tomcat
> > does
> > > > provide them, don't package them in your war file and double check
> the
> > > > versions from the guide, there is still a class referencing the old
> API
> > > and
> > > > is causing the exception.
> > > >
> > > > You missed to add the versions you used, add them here please, the
> > > > information you provided is lacking those crucial detail.
> > > >
> > > > Kevin Huntly  schrieb am Di., 18. Apr. 2023,
> > 00:12:
> > > >
> > > > > Thank you for that... I have the right (I think) dependencies in my
> > > pom:
> > > > >
> > > > > 
> > > > >
> > > > > org.apache.taglibs
> > > > >
> > > > > taglibs-standard-impl
> > > > >
> > > > > ${taglibs.version}
> > > > >
> > > > > jar
> > > > >
> > > > > compile
> > > > >
> > > > > 
> > > > >
> > > > > 
> > > > >
> > > > > jakarta.servlet.jsp.jstl
> > > > >
> > > > > jakarta.servlet.jsp.jstl-api
> > > > >
> > > > > ${jstl.version}
> > > > >
> > > > > jar
> > > > >
> > > > > compile
> > > > >
> > > > > 
> > > > >
> > > > > 
> > > > >
> > > > > jakarta.servlet.jsp
> > > > >
> > > > > jakarta.servlet.jsp-api
> > > > >
> > > > > ${jsp-api.version}
> > > > >
> > > > > jar
> > > > >
> > > > > compile
> > > > >
> > > > > 
> > > > >
> > > > > 
> > > > >
> > > > > jakarta.servlet
> > > > >
> > > > > jakarta.servlet-api
> > > > >
> > > > > ${jakarta.servlet.version}
> > > > >
> > > > > jar
> > > > >
> > > > > provided
> > > > >
> > > > > 
> > > > >
> > > > >
> > > > > I just want to use the jstl tag libraries =(
> > > > > 
> > > > >
> > > > > Kevin Huntly
> > > > > Email: kmhun...@gmail.com
> > > > > Cell: 716/424-3311
> > > > > 
> > > > >
> > > > > -BEGIN GEEK CODE BLOCK-
> > > > > Version: 1.0
> > > > > GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
> > > > > W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
> > > > > PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
> > > > > G++ e(+) h--- r+++ y+++*
> > > > > --END GEEK CODE BLOCK--
> > > > >
> > > > >
> > > > > On Mon, Apr 17, 2023 at 6:07 PM Torsten Krah 
> > > wrote:
> > > > >
> > > > > > Please read
> > > > http

Re: ClassNotFound after upgrade to tomcat 10

2023-04-17 Thread Kevin Huntly
Now i'm getting these:

17-Apr-2023 18:32:03.236 INFO [main]
org.apache.catalina.core.ApplicationContext.log No Spring
WebApplicationInitializer types detected on classpath
17-Apr-2023 18:32:04.904 INFO [main]
org.apache.catalina.core.ApplicationContext.log Initializing Spring
DispatcherServlet 'eSolutions'
17-Apr-2023 18:32:16.844 SEVERE [catalina-exec-1]
org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service() for
servlet [eSolutions] in context with path [/esolutions] threw exception
[Handler processing failed: java.lang.NoClassDefFoundError:
jakarta/servlet/jsp/jstl/core/Config] with root cause
java.lang.ClassNotFoundException:
jakarta.servlet.jsp.jstl.core.Config

17-Apr-2023 18:32:16.986 SEVERE [catalina-exec-1]
org.apache.catalina.core.ApplicationDispatcher.invoke Servlet.service() for
servlet [jsp] threw exception
org.apache.jasper.JasperException:
/theme/cws/html/en/jsp/errHandler.jsp (line: [1], column: [1]) The absolute
uri: [http://java.sun.com/jsp/jstl/core] cannot be resolved in either
web.xml or the jar files deployed with this application

I removed the apache taglibs dependency, clearly that was a mistake.


Kevin Huntly
Email: kmhun...@gmail.com
Cell: 716/424-3311


-BEGIN GEEK CODE BLOCK-
Version: 1.0
GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
G++ e(+) h--- r+++ y+++*
--END GEEK CODE BLOCK--


On Mon, Apr 17, 2023 at 6:26 PM Torsten Krah  wrote:

> You should only use https://jakarta.ee/specifications/tags/3.0/ and not
> the
> old 1.2.5 one, remove that old one.
> Why do you have both included?
>
> Kevin Huntly  schrieb am Di., 18. Apr. 2023, 00:19:
>
> > 6.0.0
> >
> > 1.2.5
> >
> > 3.0.0
> >
> > 3.1.1
> > 
> >
> > Kevin Huntly
> > Email: kmhun...@gmail.com
> > Cell: 716/424-3311
> > 
> >
> > -BEGIN GEEK CODE BLOCK-
> > Version: 1.0
> > GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
> > W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
> > PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
> > G++ e(+) h--- r+++ y+++*
> > --END GEEK CODE BLOCK--
> >
> >
> > On Mon, Apr 17, 2023 at 6:17 PM Torsten Krah  wrote:
> >
> > > All the api ones have to be provided, not compile scope imho. Tomcat
> does
> > > provide them, don't package them in your war file and double check the
> > > versions from the guide, there is still a class referencing the old API
> > and
> > > is causing the exception.
> > >
> > > You missed to add the versions you used, add them here please, the
> > > information you provided is lacking those crucial detail.
> > >
> > > Kevin Huntly  schrieb am Di., 18. Apr. 2023,
> 00:12:
> > >
> > > > Thank you for that... I have the right (I think) dependencies in my
> > pom:
> > > >
> > > > 
> > > >
> > > > org.apache.taglibs
> > > >
> > > > taglibs-standard-impl
> > > >
> > > > ${taglibs.version}
> > > >
> > > > jar
> > > >
> > > > compile
> > > >
> > > > 
> > > >
> > > > 
> > > >
> > > > jakarta.servlet.jsp.jstl
> > > >
> > > > jakarta.servlet.jsp.jstl-api
> > > >
> > > > ${jstl.version}
> > > >
> > > > jar
> > > >
> > > > compile
> > > >
> > > > 
> > > >
> > > > 
> > > >
> > > > jakarta.servlet.jsp
> > > >
> > > > jakarta.servlet.jsp-api
> > > >
> > > > ${jsp-api.version}
> > > >
> > > > jar
> > > >
> > > > compile
> > > >
> > > > 
> > > >
> > > > 
> > > >
> > > > jakarta.servlet
> > > >
> > > > jakarta.servlet-api
> > > >
> > > > ${jakarta.servlet.version}
> > > >
> > > > jar
> > > >
> > > > provided
> > > >
> > > > 
> > > >
> > > >
> > > > I just want to use the jstl tag libraries =(
> > > > 
> > > >
> > > > Kevin Huntly
> > > > Email: kmhun...@gmail.com
> > > > Cell: 716/424-3311
> > > > 
> > > >
> > > > -BEGIN GEEK CODE BLOCK-
> > > > Version: 1.0
> > > > GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
> > > > W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
> > > > PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
> > > > G++ e(+) h--- r+++ y+++*
> > > > --END GEEK CODE BLOCK--
> > > >
> > > >
> > > > On Mon, Apr 17, 2023 at 6:07 PM Torsten Krah 
> > wrote:
> > > >
> > > > > Please read
> > > https://tomcat.apache.org/migration-10.html#Server_Pages_3.0
> > > > > and while you are there, read the whole guide ;-).
> > > > >
> > > > > Kevin Huntly  schrieb am Mo., 17. Apr. 2023,
> > > 23:57:
> > > > >
> > > > > > Hello,
> > > > > >
> > > > > > I'm getting the following exception when I try to access my
> webapp:
> > > > > >
> > > > > > 17-Apr-2023 17:52:55.982 SEVERE [catalina-exec-1]
> > > > > > org.apache.catalina.core.ApplicationDispatcher.invoke
> > > Servlet.service()
> > > > > for
> > > > > > servlet [jsp] threw exception
> > > > > > java.lang.ClassNotFoundExce

Re: ClassNotFound after upgrade to tomcat 10

2023-04-17 Thread Torsten Krah
You should only use https://jakarta.ee/specifications/tags/3.0/ and not the
old 1.2.5 one, remove that old one.
Why do you have both included?

Kevin Huntly  schrieb am Di., 18. Apr. 2023, 00:19:

> 6.0.0
>
> 1.2.5
>
> 3.0.0
>
> 3.1.1
> 
>
> Kevin Huntly
> Email: kmhun...@gmail.com
> Cell: 716/424-3311
> 
>
> -BEGIN GEEK CODE BLOCK-
> Version: 1.0
> GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
> W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
> PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
> G++ e(+) h--- r+++ y+++*
> --END GEEK CODE BLOCK--
>
>
> On Mon, Apr 17, 2023 at 6:17 PM Torsten Krah  wrote:
>
> > All the api ones have to be provided, not compile scope imho. Tomcat does
> > provide them, don't package them in your war file and double check the
> > versions from the guide, there is still a class referencing the old API
> and
> > is causing the exception.
> >
> > You missed to add the versions you used, add them here please, the
> > information you provided is lacking those crucial detail.
> >
> > Kevin Huntly  schrieb am Di., 18. Apr. 2023, 00:12:
> >
> > > Thank you for that... I have the right (I think) dependencies in my
> pom:
> > >
> > > 
> > >
> > > org.apache.taglibs
> > >
> > > taglibs-standard-impl
> > >
> > > ${taglibs.version}
> > >
> > > jar
> > >
> > > compile
> > >
> > > 
> > >
> > > 
> > >
> > > jakarta.servlet.jsp.jstl
> > >
> > > jakarta.servlet.jsp.jstl-api
> > >
> > > ${jstl.version}
> > >
> > > jar
> > >
> > > compile
> > >
> > > 
> > >
> > > 
> > >
> > > jakarta.servlet.jsp
> > >
> > > jakarta.servlet.jsp-api
> > >
> > > ${jsp-api.version}
> > >
> > > jar
> > >
> > > compile
> > >
> > > 
> > >
> > > 
> > >
> > > jakarta.servlet
> > >
> > > jakarta.servlet-api
> > >
> > > ${jakarta.servlet.version}
> > >
> > > jar
> > >
> > > provided
> > >
> > > 
> > >
> > >
> > > I just want to use the jstl tag libraries =(
> > > 
> > >
> > > Kevin Huntly
> > > Email: kmhun...@gmail.com
> > > Cell: 716/424-3311
> > > 
> > >
> > > -BEGIN GEEK CODE BLOCK-
> > > Version: 1.0
> > > GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
> > > W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
> > > PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
> > > G++ e(+) h--- r+++ y+++*
> > > --END GEEK CODE BLOCK--
> > >
> > >
> > > On Mon, Apr 17, 2023 at 6:07 PM Torsten Krah 
> wrote:
> > >
> > > > Please read
> > https://tomcat.apache.org/migration-10.html#Server_Pages_3.0
> > > > and while you are there, read the whole guide ;-).
> > > >
> > > > Kevin Huntly  schrieb am Mo., 17. Apr. 2023,
> > 23:57:
> > > >
> > > > > Hello,
> > > > >
> > > > > I'm getting the following exception when I try to access my webapp:
> > > > >
> > > > > 17-Apr-2023 17:52:55.982 SEVERE [catalina-exec-1]
> > > > > org.apache.catalina.core.ApplicationDispatcher.invoke
> > Servlet.service()
> > > > for
> > > > > servlet [jsp] threw exception
> > > > > java.lang.ClassNotFoundException:
> > > > > javax.servlet.jsp.tagext.TagLibraryValidator
> > > > > at
> > > > >
> > > > >
> > > >
> > >
> >
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1437)
> > > > > at
> > > > >
> > > > >
> > > >
> > >
> >
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1245)
> > > > > at
> > java.base/java.lang.ClassLoader.defineClass1(Native
> > > > > Method)
> > > > > at
> > > > > java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1013)
> > > > > at
> > > > >
> > > > >
> > > >
> > >
> >
> java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150)
> > > > > at
> > > > >
> > > > >
> > > >
> > >
> >
> org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2487)
> > > > > at
> > > > >
> > > > >
> > > >
> > >
> >
> org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:865)
> > > > > at
> > > > >
> > > > >
> > > >
> > >
> >
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1401)
> > > > > at
> > > > >
> > > > >
> > > >
> > >
> >
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1245)
> > > > >
> > > > > it's running on AlmaLinux and tomcat 10.1.7. If I do a grep for
> > > > > "TagLibraryValidator" I can find it in my app under WEB-INF/lib, so
> > I'm
> > > > not
> > > > > sure what's going on
> > > > > 
> > > > >
> > > > > Kevin Huntly
> > > > > Email: kmhun...@gmail.com
> > > > > Cell: 716/424-3311
> > > > > 
> > > > >
> > > > > -BEGIN GEEK CODE BLOCK-
> > > > > Version: 1.0

Re: ClassNotFound after upgrade to tomcat 10

2023-04-17 Thread Kevin Huntly
6.0.0

1.2.5

3.0.0

3.1.1


Kevin Huntly
Email: kmhun...@gmail.com
Cell: 716/424-3311


-BEGIN GEEK CODE BLOCK-
Version: 1.0
GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
G++ e(+) h--- r+++ y+++*
--END GEEK CODE BLOCK--


On Mon, Apr 17, 2023 at 6:17 PM Torsten Krah  wrote:

> All the api ones have to be provided, not compile scope imho. Tomcat does
> provide them, don't package them in your war file and double check the
> versions from the guide, there is still a class referencing the old API and
> is causing the exception.
>
> You missed to add the versions you used, add them here please, the
> information you provided is lacking those crucial detail.
>
> Kevin Huntly  schrieb am Di., 18. Apr. 2023, 00:12:
>
> > Thank you for that... I have the right (I think) dependencies in my pom:
> >
> > 
> >
> > org.apache.taglibs
> >
> > taglibs-standard-impl
> >
> > ${taglibs.version}
> >
> > jar
> >
> > compile
> >
> > 
> >
> > 
> >
> > jakarta.servlet.jsp.jstl
> >
> > jakarta.servlet.jsp.jstl-api
> >
> > ${jstl.version}
> >
> > jar
> >
> > compile
> >
> > 
> >
> > 
> >
> > jakarta.servlet.jsp
> >
> > jakarta.servlet.jsp-api
> >
> > ${jsp-api.version}
> >
> > jar
> >
> > compile
> >
> > 
> >
> > 
> >
> > jakarta.servlet
> >
> > jakarta.servlet-api
> >
> > ${jakarta.servlet.version}
> >
> > jar
> >
> > provided
> >
> > 
> >
> >
> > I just want to use the jstl tag libraries =(
> > 
> >
> > Kevin Huntly
> > Email: kmhun...@gmail.com
> > Cell: 716/424-3311
> > 
> >
> > -BEGIN GEEK CODE BLOCK-
> > Version: 1.0
> > GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
> > W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
> > PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
> > G++ e(+) h--- r+++ y+++*
> > --END GEEK CODE BLOCK--
> >
> >
> > On Mon, Apr 17, 2023 at 6:07 PM Torsten Krah  wrote:
> >
> > > Please read
> https://tomcat.apache.org/migration-10.html#Server_Pages_3.0
> > > and while you are there, read the whole guide ;-).
> > >
> > > Kevin Huntly  schrieb am Mo., 17. Apr. 2023,
> 23:57:
> > >
> > > > Hello,
> > > >
> > > > I'm getting the following exception when I try to access my webapp:
> > > >
> > > > 17-Apr-2023 17:52:55.982 SEVERE [catalina-exec-1]
> > > > org.apache.catalina.core.ApplicationDispatcher.invoke
> Servlet.service()
> > > for
> > > > servlet [jsp] threw exception
> > > > java.lang.ClassNotFoundException:
> > > > javax.servlet.jsp.tagext.TagLibraryValidator
> > > > at
> > > >
> > > >
> > >
> >
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1437)
> > > > at
> > > >
> > > >
> > >
> >
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1245)
> > > > at
> java.base/java.lang.ClassLoader.defineClass1(Native
> > > > Method)
> > > > at
> > > > java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1013)
> > > > at
> > > >
> > > >
> > >
> >
> java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150)
> > > > at
> > > >
> > > >
> > >
> >
> org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2487)
> > > > at
> > > >
> > > >
> > >
> >
> org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:865)
> > > > at
> > > >
> > > >
> > >
> >
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1401)
> > > > at
> > > >
> > > >
> > >
> >
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1245)
> > > >
> > > > it's running on AlmaLinux and tomcat 10.1.7. If I do a grep for
> > > > "TagLibraryValidator" I can find it in my app under WEB-INF/lib, so
> I'm
> > > not
> > > > sure what's going on
> > > > 
> > > >
> > > > Kevin Huntly
> > > > Email: kmhun...@gmail.com
> > > > Cell: 716/424-3311
> > > > 
> > > >
> > > > -BEGIN GEEK CODE BLOCK-
> > > > Version: 1.0
> > > > GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
> > > > W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
> > > > PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
> > > > G++ e(+) h--- r+++ y+++*
> > > > --END GEEK CODE BLOCK--
> > > >
> > >
> >
>


Re: ClassNotFound after upgrade to tomcat 10

2023-04-17 Thread Torsten Krah
All the api ones have to be provided, not compile scope imho. Tomcat does
provide them, don't package them in your war file and double check the
versions from the guide, there is still a class referencing the old API and
is causing the exception.

You missed to add the versions you used, add them here please, the
information you provided is lacking those crucial detail.

Kevin Huntly  schrieb am Di., 18. Apr. 2023, 00:12:

> Thank you for that... I have the right (I think) dependencies in my pom:
>
> 
>
> org.apache.taglibs
>
> taglibs-standard-impl
>
> ${taglibs.version}
>
> jar
>
> compile
>
> 
>
> 
>
> jakarta.servlet.jsp.jstl
>
> jakarta.servlet.jsp.jstl-api
>
> ${jstl.version}
>
> jar
>
> compile
>
> 
>
> 
>
> jakarta.servlet.jsp
>
> jakarta.servlet.jsp-api
>
> ${jsp-api.version}
>
> jar
>
> compile
>
> 
>
> 
>
> jakarta.servlet
>
> jakarta.servlet-api
>
> ${jakarta.servlet.version}
>
> jar
>
> provided
>
> 
>
>
> I just want to use the jstl tag libraries =(
> 
>
> Kevin Huntly
> Email: kmhun...@gmail.com
> Cell: 716/424-3311
> 
>
> -BEGIN GEEK CODE BLOCK-
> Version: 1.0
> GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
> W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
> PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
> G++ e(+) h--- r+++ y+++*
> --END GEEK CODE BLOCK--
>
>
> On Mon, Apr 17, 2023 at 6:07 PM Torsten Krah  wrote:
>
> > Please read https://tomcat.apache.org/migration-10.html#Server_Pages_3.0
> > and while you are there, read the whole guide ;-).
> >
> > Kevin Huntly  schrieb am Mo., 17. Apr. 2023, 23:57:
> >
> > > Hello,
> > >
> > > I'm getting the following exception when I try to access my webapp:
> > >
> > > 17-Apr-2023 17:52:55.982 SEVERE [catalina-exec-1]
> > > org.apache.catalina.core.ApplicationDispatcher.invoke Servlet.service()
> > for
> > > servlet [jsp] threw exception
> > > java.lang.ClassNotFoundException:
> > > javax.servlet.jsp.tagext.TagLibraryValidator
> > > at
> > >
> > >
> >
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1437)
> > > at
> > >
> > >
> >
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1245)
> > > at java.base/java.lang.ClassLoader.defineClass1(Native
> > > Method)
> > > at
> > > java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1013)
> > > at
> > >
> > >
> >
> java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150)
> > > at
> > >
> > >
> >
> org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2487)
> > > at
> > >
> > >
> >
> org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:865)
> > > at
> > >
> > >
> >
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1401)
> > > at
> > >
> > >
> >
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1245)
> > >
> > > it's running on AlmaLinux and tomcat 10.1.7. If I do a grep for
> > > "TagLibraryValidator" I can find it in my app under WEB-INF/lib, so I'm
> > not
> > > sure what's going on
> > > 
> > >
> > > Kevin Huntly
> > > Email: kmhun...@gmail.com
> > > Cell: 716/424-3311
> > > 
> > >
> > > -BEGIN GEEK CODE BLOCK-
> > > Version: 1.0
> > > GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
> > > W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
> > > PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
> > > G++ e(+) h--- r+++ y+++*
> > > --END GEEK CODE BLOCK--
> > >
> >
>


Re: ClassNotFound after upgrade to tomcat 10

2023-04-17 Thread Kevin Huntly
Thank you for that... I have the right (I think) dependencies in my pom:



org.apache.taglibs

taglibs-standard-impl

${taglibs.version}

jar

compile





jakarta.servlet.jsp.jstl

jakarta.servlet.jsp.jstl-api

${jstl.version}

jar

compile





jakarta.servlet.jsp

jakarta.servlet.jsp-api

${jsp-api.version}

jar

compile





jakarta.servlet

jakarta.servlet-api

${jakarta.servlet.version}

jar

provided




I just want to use the jstl tag libraries =(


Kevin Huntly
Email: kmhun...@gmail.com
Cell: 716/424-3311


-BEGIN GEEK CODE BLOCK-
Version: 1.0
GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
G++ e(+) h--- r+++ y+++*
--END GEEK CODE BLOCK--


On Mon, Apr 17, 2023 at 6:07 PM Torsten Krah  wrote:

> Please read https://tomcat.apache.org/migration-10.html#Server_Pages_3.0
> and while you are there, read the whole guide ;-).
>
> Kevin Huntly  schrieb am Mo., 17. Apr. 2023, 23:57:
>
> > Hello,
> >
> > I'm getting the following exception when I try to access my webapp:
> >
> > 17-Apr-2023 17:52:55.982 SEVERE [catalina-exec-1]
> > org.apache.catalina.core.ApplicationDispatcher.invoke Servlet.service()
> for
> > servlet [jsp] threw exception
> > java.lang.ClassNotFoundException:
> > javax.servlet.jsp.tagext.TagLibraryValidator
> > at
> >
> >
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1437)
> > at
> >
> >
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1245)
> > at java.base/java.lang.ClassLoader.defineClass1(Native
> > Method)
> > at
> > java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1013)
> > at
> >
> >
> java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150)
> > at
> >
> >
> org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2487)
> > at
> >
> >
> org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:865)
> > at
> >
> >
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1401)
> > at
> >
> >
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1245)
> >
> > it's running on AlmaLinux and tomcat 10.1.7. If I do a grep for
> > "TagLibraryValidator" I can find it in my app under WEB-INF/lib, so I'm
> not
> > sure what's going on
> > 
> >
> > Kevin Huntly
> > Email: kmhun...@gmail.com
> > Cell: 716/424-3311
> > 
> >
> > -BEGIN GEEK CODE BLOCK-
> > Version: 1.0
> > GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
> > W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
> > PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
> > G++ e(+) h--- r+++ y+++*
> > --END GEEK CODE BLOCK--
> >
>


Re: ClassNotFound after upgrade to tomcat 10

2023-04-17 Thread Torsten Krah
Please read https://tomcat.apache.org/migration-10.html#Server_Pages_3.0
and while you are there, read the whole guide ;-).

Kevin Huntly  schrieb am Mo., 17. Apr. 2023, 23:57:

> Hello,
>
> I'm getting the following exception when I try to access my webapp:
>
> 17-Apr-2023 17:52:55.982 SEVERE [catalina-exec-1]
> org.apache.catalina.core.ApplicationDispatcher.invoke Servlet.service() for
> servlet [jsp] threw exception
> java.lang.ClassNotFoundException:
> javax.servlet.jsp.tagext.TagLibraryValidator
> at
>
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1437)
> at
>
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1245)
> at java.base/java.lang.ClassLoader.defineClass1(Native
> Method)
> at
> java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1013)
> at
>
> java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150)
> at
>
> org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2487)
> at
>
> org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:865)
> at
>
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1401)
> at
>
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1245)
>
> it's running on AlmaLinux and tomcat 10.1.7. If I do a grep for
> "TagLibraryValidator" I can find it in my app under WEB-INF/lib, so I'm not
> sure what's going on
> 
>
> Kevin Huntly
> Email: kmhun...@gmail.com
> Cell: 716/424-3311
> 
>
> -BEGIN GEEK CODE BLOCK-
> Version: 1.0
> GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
> W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
> PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
> G++ e(+) h--- r+++ y+++*
> --END GEEK CODE BLOCK--
>


ClassNotFound after upgrade to tomcat 10

2023-04-17 Thread Kevin Huntly
Hello,

I'm getting the following exception when I try to access my webapp:

17-Apr-2023 17:52:55.982 SEVERE [catalina-exec-1]
org.apache.catalina.core.ApplicationDispatcher.invoke Servlet.service() for
servlet [jsp] threw exception
java.lang.ClassNotFoundException:
javax.servlet.jsp.tagext.TagLibraryValidator
at
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1437)
at
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1245)
at java.base/java.lang.ClassLoader.defineClass1(Native
Method)
at
java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1013)
at
java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150)
at
org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2487)
at
org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:865)
at
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1401)
at
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1245)

it's running on AlmaLinux and tomcat 10.1.7. If I do a grep for
"TagLibraryValidator" I can find it in my app under WEB-INF/lib, so I'm not
sure what's going on


Kevin Huntly
Email: kmhun...@gmail.com
Cell: 716/424-3311


-BEGIN GEEK CODE BLOCK-
Version: 1.0
GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
G++ e(+) h--- r+++ y+++*
--END GEEK CODE BLOCK--


RE: Is Microsoft's spring-cloud-azure-starter-active-directory for Spring Boot 3 / Spring 6 compatible with Tomcat 10?

2023-04-14 Thread BRUNO MELLONI
That is the curious bit.  Nothing was needed in the previous version, and I 
found nothing mentioned for the latest version.
For my own logging (not needed before and presumably not now for the Azure 
stuff) I would use:

  org.apache.logging.log4j
  log4j-api
  ${log4j2.version}


  org.apache.logging.log4j
  log4j-core
  ${log4j2.version}


  org.apache.logging.log4j
  log4j-slf4j-impl
  ${log4j2.version}


  org.slf4j
  slf4j-api
  ${slf4j.version}


But it must have been a bug on spring-cloud-azure-starter-active-directory 
after all.  That is what was causing the logback exception, the problem would 
not happen without that dependency.   Interestingly… that particular problem 
went away this morning.  I noticed that when I did a clean build today (did not 
happen before during previous clean builds) a number of dependencies got 
downloaded/updated, and now the exception is not being thrown.

The particular problem is now solved, with no action from my part.  There are 
new issues but those I can handle.

From: Mark Thomas 
Sent: Friday, April 14, 2023 9:13 AM
To: users@tomcat.apache.org
Subject: Re: Is Microsoft's spring-cloud-azure-starter-active-directory for 
Spring Boot 3 / Spring 6 compatible with Tomcat 10?

On 13/04/2023 22: 48, BRUNO MELLONI wrote: > After further research let me ask 
the question in a different way: > > > * Tomcat 10 is configured to do log4j2 
logging. > * My log4j2 code works fine. > * 
Spring-cloud-azure-starter-active-directory
ZjQcmQRYFpfptBannerStart
CAUTION: This Message Is From an External Source
This message originated outside the Chickasaw Nation. Do not click links or 
open attachments unless you recognize the sender and know the content is safe!
Report Suspicious  
<https://us-phishalarm-ewt.proofpoint.com/EWT/v1/IMeFMrRG1GeY!Jdtf_fv6_IHaYkOnqg0ntq7dHeM9BSmziea9b8WlFE6he1r79dw1kOFTAVUsrWKem_rpgDasu8Ac-LODZyrxoDgpRNpV9mHSNwH9ASQz$>
   ‌
ZjQcmQRYFpfptBannerEnd

On 13/04/2023 22:48, BRUNO MELLONI wrote:

> After further research let me ask the question in a different way:

>

>

>*   Tomcat 10 is configured to do log4j2 logging.

>*   My log4j2 code works fine.

>*   Spring-cloud-azure-starter-active-directory seems to use logback and 
> it is incompatible with my Tomcat 10 setup.

>

> Given the above… what do I need to add to Tomcat 10 to make it handle apps 
> that use logback for logging but still use my log4j2 Tomcat configuration for 
> the actual logging?



Whatever the logback documentation says you need to add to route logging

to log4j2.



> I would swear that Tomcat had slf4j and other logging translation libraries 
> built in…



Nope. That has never been the case.



> but perhaps Tomcat 10 no longer does for some and requires adding some jars?



Tomcat's internal logging routes to java.util.logging - you can re-route

that if required. Follow the directions to do that provided with your

logging framework of choice.



Assuming you are still seeing the:



"Cannot cast

ch.qos.logback.classic.servlet.LogbackServletContainerInitializer to

jakarta.servlet.ServletContainerInitializer" error, I'll repeat my

previous question:



Which version of which JAR is that ServletContainerInitializer coming from?



Mark





>

> b.

>

> From: Mark Thomas mailto:ma...@apache.org>>

> Sent: Tuesday, April 11, 2023 2:41 PM

> To: users@tomcat.apache.org<mailto:users@tomcat.apache.org>

> Subject: Re: Is Microsoft's spring-cloud-azure-starter-active-directory for 
> Spring Boot 3 / Spring 6 compatible with Tomcat 10?

>

> On 11/04/2023 20: 28, BRUNO MELLONI wrote: > I was able to migrate 
> applications to Spring Boot 3 / Spring 6 (standalone or running on Tomcat 10) 
> so long as authentication was NOT through Azure AD. > > But when I tried to 
> migrate applications

> ZjQcmQRYFpfptBannerStart

> CAUTION: This Message Is From an External Source

> This message originated outside the Chickasaw Nation. Do not click links or 
> open attachments unless you recognize the sender and know the content is safe!

>  Report Suspicious  
> <https://us-phishalarm-ewt.proofpoint.com/EWT/v1/IMeFMrRG1GeY!JdtUXLGR9ova4gOnS-0H1iEbkX_fwvLLfLoUe-WtR-fKP3iug2CA6Got_-7FykjdaEEVaYQaX_1JDstwjD_T9laTb_I1TVa4IKmJLM79$>
>    ‌

> ZjQcmQRYFpfptBannerEnd

>

> On 11/04/2023 20:28, BRUNO MELLONI wrote:

>

>> I was able to migrate applications to Spring Boot 3 / Spring 6 (standalone 
>> or running on Tomcat 10) so long as authentication was NOT through Azure AD.

>

>>

>

>> But when I tried to migrate applications that used Microsoft's 
>> spring-cloud-azure-starter-active-directory for authentication of 2-step 
>> authenticated webapps (the preferred approach) I started to get this error 
>> during application de

  1   2   >