Re: javax.naming.NamingException: Could not create resource instance

2023-03-23 Thread Konstantin Kolinko
пт, 24 мар. 2023 г. в 03:47, Kevin Huntly :
>
> Object
> of type [class jakarta.mail.Session] available at JNDI location
> [java:comp/env/mail/MailSession] is not assignable to [jakarta.mail.Session]

Apparently you have two copies of a "jakarta.mail.Session" class,
loaded by different classloaders.

FYI:
https://tomcat.apache.org/tomcat-10.1-doc/class-loader-howto.html

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



Re: javax.naming.NamingException: Could not create resource instance

2023-03-23 Thread Kevin Huntly
Okay, I made sure I have the jakarta.mail packages in ${catalina.home}/lib,
I've modified the context.xml from javax.mail.Session to
jakarta.mail.Session and I'm receiving this:

[Time: 23 Mar 2023 20:44:04,203][Thread: main][Log:
org.springframework.web.context.support.XmlWebApplicationContext][Level:
WARN ] - [File: AbstractApplicationContext.java:591] - Exception
encountered during context initialization - cancelling refresh attempt:
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'mailSession': Invocation of init method failed; nested
exception is org.springframework.jndi.TypeMismatchNamingException: Object
of type [class jakarta.mail.Session] available at JNDI location
[java:comp/env/mail/MailSession] is not assignable to [jakarta.mail.Session]
[Time: 23 Mar 2023 20:44:04,211][Thread: main][Log:
org.springframework.web.servlet.DispatcherServlet][Level: ERROR] - [File:
FrameworkServlet.java:534] - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'mailSession': Invocation of init method failed; nested
exception is org.springframework.jndi.TypeMismatchNamingException: Object
of type [class jakarta.mail.Session] available at JNDI location
[java:comp/env/mail/MailSession] is not assignable to [jakarta.mail.Session]


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, Mar 23, 2023 at 8:29 PM Konstantin Kolinko 
wrote:

> пт, 24 мар. 2023 г. в 03:09, Konstantin Kolinko :
> >
> > чт, 23 мар. 2023 г. в 18:38, Kevin Huntly :
> > >
> > > Hi Everyone,
> > >
> > > I just migrated one of my apps off javax.servlet and onto
> jakarta.servlet.
> > > I am getting the following exception:
> > >
> > > 
> > > [Time: 23 Mar 2023 11:31:44,134][Thread: main][Log:
> > >
> org.springframework.web.context.support.XmlWebApplicationContext][Level:
> > > WARN ] - [File: AbstractApplicationContext.java:591] - Exception
> > > encountered during context initialization - cancelling refresh attempt:
> > > org.springframework.beans.factory.BeanCreationException: Error creating
> > > bean with name 'mailSession': Invocation of init method failed; nested
> > > exception is javax.naming.NamingException: Could not create resource
> > > instance
> > > [Time: 23 Mar 2023 11:31:44,139][Thread: main][Log:
> > > org.springframework.web.servlet.DispatcherServlet][Level: ERROR] -
> [File:
> > > FrameworkServlet.java:534] - Context initialization failed
> > > org.springframework.beans.factory.BeanCreationException: Error creating
> > > bean with name 'mailSession': Invocation of init method failed; nested
> > > exception is javax.naming.NamingException: Could not create resource
> > > instance
> > > at
> > > [...]
> > > ... 59 more
> > > 
> > >
> > > I've never seen this exception before, and the same code/configuration
> > > works on Tomcat 9.0.73. This is coming from 10.1.7 on RHEL 8.7 with
> SELinux
> > > enabled. I know the exception is coming from Spring, but it is
> definitely
> > > related to the JNDI configuration for my mailsession.
> > >
> > > The base context.xml is largely unchanged, with the exception of this
> > > addition:
> >
> > (You say "the base context.xml." If you were editing the default
> > conf/context.xml file shared by all web applications, instead of the
> > one that belongs to our own web application, that is a usual
> > misunderstanding / misconfiguration. Though not relevant to your
> > error.)
> >
> > Documentation:
> >
> https://tomcat.apache.org/tomcat-10.1-doc/config/context.html#Defining_a_context
> >
> > > 
> > >  > > type="javax.mail.Session" description="E-Mail Resource"
> > > mail.debug="true" mail.transport.protocol="smtp"
> > > mail.smtp.host="localhost" mail.smtp.auth="false" />
> > > 
> > >
> > > Anyone have any ideas?
> >
> > Have you read the docs on configuring the mail session factory?
> >
> https://tomcat.apache.org/tomcat-10.1-doc/jndi-resources-howto.html#JavaMail_Sessions
> >
> > Note that
> > "4" an implementation library for Mail API is not bundled with Tomcat
> > (you have to provide the needed library),  Do you have one?
> >
> > "3" If the documentation is correct, the name of the package in
> > Jakarta EE is "jakarta.mail.", not "javax.mail." (as used in your
> > configuration),
>
> Regarding Mail API links in the documentation, see
> https://bz.apache.org/bugzilla/show_bug.cgi?id=66542
>
> Best regards,
> Konstantin Kolinko
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org

Re: javax.naming.NamingException: Could not create resource instance

2023-03-23 Thread Konstantin Kolinko
пт, 24 мар. 2023 г. в 03:09, Konstantin Kolinko :
>
> чт, 23 мар. 2023 г. в 18:38, Kevin Huntly :
> >
> > Hi Everyone,
> >
> > I just migrated one of my apps off javax.servlet and onto jakarta.servlet.
> > I am getting the following exception:
> >
> > 
> > [Time: 23 Mar 2023 11:31:44,134][Thread: main][Log:
> > org.springframework.web.context.support.XmlWebApplicationContext][Level:
> > WARN ] - [File: AbstractApplicationContext.java:591] - Exception
> > encountered during context initialization - cancelling refresh attempt:
> > org.springframework.beans.factory.BeanCreationException: Error creating
> > bean with name 'mailSession': Invocation of init method failed; nested
> > exception is javax.naming.NamingException: Could not create resource
> > instance
> > [Time: 23 Mar 2023 11:31:44,139][Thread: main][Log:
> > org.springframework.web.servlet.DispatcherServlet][Level: ERROR] - [File:
> > FrameworkServlet.java:534] - Context initialization failed
> > org.springframework.beans.factory.BeanCreationException: Error creating
> > bean with name 'mailSession': Invocation of init method failed; nested
> > exception is javax.naming.NamingException: Could not create resource
> > instance
> > at
> > [...]
> > ... 59 more
> > 
> >
> > I've never seen this exception before, and the same code/configuration
> > works on Tomcat 9.0.73. This is coming from 10.1.7 on RHEL 8.7 with SELinux
> > enabled. I know the exception is coming from Spring, but it is definitely
> > related to the JNDI configuration for my mailsession.
> >
> > The base context.xml is largely unchanged, with the exception of this
> > addition:
>
> (You say "the base context.xml." If you were editing the default
> conf/context.xml file shared by all web applications, instead of the
> one that belongs to our own web application, that is a usual
> misunderstanding / misconfiguration. Though not relevant to your
> error.)
>
> Documentation:
> https://tomcat.apache.org/tomcat-10.1-doc/config/context.html#Defining_a_context
>
> > 
> >  > type="javax.mail.Session" description="E-Mail Resource"
> > mail.debug="true" mail.transport.protocol="smtp"
> > mail.smtp.host="localhost" mail.smtp.auth="false" />
> > 
> >
> > Anyone have any ideas?
>
> Have you read the docs on configuring the mail session factory?
> https://tomcat.apache.org/tomcat-10.1-doc/jndi-resources-howto.html#JavaMail_Sessions
>
> Note that
> "4" an implementation library for Mail API is not bundled with Tomcat
> (you have to provide the needed library),  Do you have one?
>
> "3" If the documentation is correct, the name of the package in
> Jakarta EE is "jakarta.mail.", not "javax.mail." (as used in your
> configuration),

Regarding Mail API links in the documentation, see
https://bz.apache.org/bugzilla/show_bug.cgi?id=66542

Best regards,
Konstantin Kolinko

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



Re: javax.naming.NamingException: Could not create resource instance

2023-03-23 Thread Konstantin Kolinko
чт, 23 мар. 2023 г. в 18:38, Kevin Huntly :
>
> Hi Everyone,
>
> I just migrated one of my apps off javax.servlet and onto jakarta.servlet.
> I am getting the following exception:
>
> 
> [Time: 23 Mar 2023 11:31:44,134][Thread: main][Log:
> org.springframework.web.context.support.XmlWebApplicationContext][Level:
> WARN ] - [File: AbstractApplicationContext.java:591] - Exception
> encountered during context initialization - cancelling refresh attempt:
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean with name 'mailSession': Invocation of init method failed; nested
> exception is javax.naming.NamingException: Could not create resource
> instance
> [Time: 23 Mar 2023 11:31:44,139][Thread: main][Log:
> org.springframework.web.servlet.DispatcherServlet][Level: ERROR] - [File:
> FrameworkServlet.java:534] - Context initialization failed
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean with name 'mailSession': Invocation of init method failed; nested
> exception is javax.naming.NamingException: Could not create resource
> instance
> at
> [...]
> ... 59 more
> 
>
> I've never seen this exception before, and the same code/configuration
> works on Tomcat 9.0.73. This is coming from 10.1.7 on RHEL 8.7 with SELinux
> enabled. I know the exception is coming from Spring, but it is definitely
> related to the JNDI configuration for my mailsession.
>
> The base context.xml is largely unchanged, with the exception of this
> addition:

(You say "the base context.xml." If you were editing the default
conf/context.xml file shared by all web applications, instead of the
one that belongs to our own web application, that is a usual
misunderstanding / misconfiguration. Though not relevant to your
error.)

Documentation:
https://tomcat.apache.org/tomcat-10.1-doc/config/context.html#Defining_a_context

> 
>  type="javax.mail.Session" description="E-Mail Resource"
> mail.debug="true" mail.transport.protocol="smtp"
> mail.smtp.host="localhost" mail.smtp.auth="false" />
> 
>
> Anyone have any ideas?

Have you read the docs on configuring the mail session factory?
https://tomcat.apache.org/tomcat-10.1-doc/jndi-resources-howto.html#JavaMail_Sessions

Note that
"4" an implementation library for Mail API is not bundled with Tomcat
(you have to provide the needed library),  Do you have one?

"3" If the documentation is correct, the name of the package in
Jakarta EE is "jakarta.mail.", not "javax.mail." (as used in your
configuration),

Best regards,
Konstantin Kolinko

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



Re: service() failed with http error 502

2023-03-23 Thread Mark Thomas

You have a mismatch between this attribute on the workers:

max_packet_size

It isn't set so the default of 8192 is used.

And this attribute on the AJP connector:

packetSize="65536"

Those attributes need to match on all workers and the AJP connector.

Mark



On 23/03/2023 18:19, Luis Ramos wrote:

Hi,
worker.list=tomcat01,tomcat02
worker.tomcat01.type=ajp13
worker.tomcat01.host=::1
worker.tomcat01.port=8009
worker.tomcat01.secret=namnetiq1
worker.tomcat01.ping_timeout=1000
worker.tomcat01.connect_timeout=1
worker.tomcat01.prepost_timeout=1
worker.tomcat01.socket_timeout=10
worker.tomcat01.connection_pool_timeout=60
worker.tomcat01.connection_pool_size=90
worker.tomcat01.retries=2
worker.tomcat01.reply_timeout=30

worker.tomcat02.type=ajp13
worker.tomcat02.host=::1
worker.tomcat02.port=8009
worker.tomcat02.secret=namnetiq1
worker.tomcat02.ping_timeout=1000
worker.tomcat02.connect_timeout=1
worker.tomcat02.prepost_timeout=1
worker.tomcat02.socket_timeout=10
worker.tomcat02.connection_pool_timeout=60
worker.tomcat02.connection_pool_size=90
worker.tomcat02.retries=2
worker.tomcat02.reply_timeout=30

Luis J Ramos
CNT Infotech Corp. (www.cntinfotech.com)
646.452.9349

- Original Message -
From: "Mark Thomas" 
To: "users" 
Sent: Thursday, March 23, 2023 12:51:59 PM
Subject: Re: service() failed with http error 502

And the workers.properties file?

Mark


On 23/03/2023 16:13, Luis Ramos wrote:

Hi
   Apache Tomcat/9.0.65
from server.xml


  


Luis J Ramos
CNT Infotech Corp. (www.cntinfotech.com)
646.452.9349

- Original Message -
From: "Mark Thomas" 
To: "users" 
Sent: Thursday, March 23, 2023 4:09:41 AM
Subject: Re: service() failed with http error 502

On 22/03/2023 19:20, Luis Ramos wrote:

Hi List.
In and around last windows updates for our WIN2019 box, our tomcat connector 
start to fail with the below error message.
Setup is IIS 10->ISAPI connector => Tomcat 9 -> 
https://tomcat.apache.org/connectors-doc/webserver_howto/iis.html
Has someone seen this behaivor?
To be able to open the system I am bypassing the connector and listening in 
port 443 in server.xml directly.


What Tomcat version are you using?

Has there been any change in Tomcat version in the same time frame? If
so, please provide exact version information.

Please provide the AJP connector configuration from Tomcat's server.xml


[Wed Mar 22 15:08:46.746 2023] [10780:14112] [error] 
ajp_connection_tcp_get_message::jk_ajp_common.c (1408): (tomcat01) wrong 
message size 18441 8192 from ::1:8009


This suggests that Tomcat is configured with a different maximum AJP
message size than IIS.

Please provide your workers.properties file.

Mark

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org
This e-mail message, including any attachment(s), is confidential and may also 
be legally privileged. It is intended solely for the addresse(s) and others 
authorized to receive it. If you are not the intended recipient you are hereby 
notified that any disclosure, copying, distribution or taking any action in 
reliance on the contents of this email is strictly prohibited and may be 
unlawful. If you have received this e-mail in error you are requested to delete 
it from your system and to notify us by replying to this message immediately. 
CNT Infotech is not liable for the improper transmission of this message nor 
for any damage sustained as a result of this message.



-
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
This e-mail message, including any attachment(s), is confidential and may also 
be legally privileged. It is intended solely for the addresse(s) and others 
authorized to receive it. If you are not the intended recipient you are hereby 
notified that any disclosure, copying, distribution or taking any action in 
reliance on the contents of this email is strictly prohibited and may be 
unlawful. If you have received this e-mail in error you are requested to delete 
it from your system and to notify us by replying to this message immediately. 
CNT Infotech is not liable for the improper transmission of this message nor 
for any damage sustained as a result of this message.



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

Re: service() failed with http error 502

2023-03-23 Thread Luis Ramos
Hi,
worker.list=tomcat01,tomcat02
worker.tomcat01.type=ajp13
worker.tomcat01.host=::1
worker.tomcat01.port=8009
worker.tomcat01.secret=namnetiq1
worker.tomcat01.ping_timeout=1000
worker.tomcat01.connect_timeout=1
worker.tomcat01.prepost_timeout=1
worker.tomcat01.socket_timeout=10
worker.tomcat01.connection_pool_timeout=60
worker.tomcat01.connection_pool_size=90
worker.tomcat01.retries=2
worker.tomcat01.reply_timeout=30

worker.tomcat02.type=ajp13
worker.tomcat02.host=::1
worker.tomcat02.port=8009
worker.tomcat02.secret=namnetiq1
worker.tomcat02.ping_timeout=1000
worker.tomcat02.connect_timeout=1
worker.tomcat02.prepost_timeout=1
worker.tomcat02.socket_timeout=10
worker.tomcat02.connection_pool_timeout=60
worker.tomcat02.connection_pool_size=90
worker.tomcat02.retries=2
worker.tomcat02.reply_timeout=30 

Luis J Ramos 
CNT Infotech Corp. (www.cntinfotech.com) 
646.452.9349

- Original Message -
From: "Mark Thomas" 
To: "users" 
Sent: Thursday, March 23, 2023 12:51:59 PM
Subject: Re: service() failed with http error 502

And the workers.properties file?

Mark


On 23/03/2023 16:13, Luis Ramos wrote:
> Hi
>   Apache Tomcat/9.0.65
> from server.xml
> 
> address="::1"
> port="8009"
> maxThreads="3000"
> minSpareThreads="50"
> connectionTimeout="121000"
>  packetSize="65536"
>  secretRequired="true" secret="namnetiq1"/>
>  
> 
> Luis J Ramos
> CNT Infotech Corp. (www.cntinfotech.com)
> 646.452.9349
> 
> - Original Message -
> From: "Mark Thomas" 
> To: "users" 
> Sent: Thursday, March 23, 2023 4:09:41 AM
> Subject: Re: service() failed with http error 502
> 
> On 22/03/2023 19:20, Luis Ramos wrote:
>> Hi List.
>> In and around last windows updates for our WIN2019 box, our tomcat connector 
>> start to fail with the below error message.
>> Setup is IIS 10->ISAPI connector => Tomcat 9 -> 
>> https://tomcat.apache.org/connectors-doc/webserver_howto/iis.html
>> Has someone seen this behaivor?
>> To be able to open the system I am bypassing the connector and listening in 
>> port 443 in server.xml directly.
> 
> What Tomcat version are you using?
> 
> Has there been any change in Tomcat version in the same time frame? If
> so, please provide exact version information.
> 
> Please provide the AJP connector configuration from Tomcat's server.xml
> 
>> [Wed Mar 22 15:08:46.746 2023] [10780:14112] [error] 
>> ajp_connection_tcp_get_message::jk_ajp_common.c (1408): (tomcat01) wrong 
>> message size 18441 8192 from ::1:8009
> 
> This suggests that Tomcat is configured with a different maximum AJP
> message size than IIS.
> 
> Please provide your workers.properties file.
> 
> Mark
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> This e-mail message, including any attachment(s), is confidential and may 
> also be legally privileged. It is intended solely for the addresse(s) and 
> others authorized to receive it. If you are not the intended recipient you 
> are hereby notified that any disclosure, copying, distribution or taking any 
> action in reliance on the contents of this email is strictly prohibited and 
> may be unlawful. If you have received this e-mail in error you are requested 
> to delete it from your system and to notify us by replying to this message 
> immediately. CNT Infotech is not liable for the improper transmission of this 
> message nor for any damage sustained as a result of this message.
> 
> 
> 
> -
> 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
This e-mail message, including any attachment(s), is confidential and may also 
be legally privileged. It is intended solely for the addresse(s) and others 
authorized to receive it. If you are not the intended recipient you are hereby 
notified that any disclosure, copying, distribution or taking any action in 
reliance on the contents of this email is strictly prohibited and may be 
unlawful. If you have received this e-mail in error you are requested to delete 
it from your system and to notify us by replying to this message immediately. 
CNT Infotech is not liable for the improper transmission of this message nor 
for any damage sustained as a result of this message.



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



Re: service() failed with http error 502

2023-03-23 Thread Mark Thomas

And the workers.properties file?

Mark


On 23/03/2023 16:13, Luis Ramos wrote:

Hi
  Apache Tomcat/9.0.65
from server.xml

   
 


Luis J Ramos
CNT Infotech Corp. (www.cntinfotech.com)
646.452.9349

- Original Message -
From: "Mark Thomas" 
To: "users" 
Sent: Thursday, March 23, 2023 4:09:41 AM
Subject: Re: service() failed with http error 502

On 22/03/2023 19:20, Luis Ramos wrote:

Hi List.
In and around last windows updates for our WIN2019 box, our tomcat connector 
start to fail with the below error message.
Setup is IIS 10->ISAPI connector => Tomcat 9 -> 
https://tomcat.apache.org/connectors-doc/webserver_howto/iis.html
Has someone seen this behaivor?
To be able to open the system I am bypassing the connector and listening in 
port 443 in server.xml directly.


What Tomcat version are you using?

Has there been any change in Tomcat version in the same time frame? If
so, please provide exact version information.

Please provide the AJP connector configuration from Tomcat's server.xml


[Wed Mar 22 15:08:46.746 2023] [10780:14112] [error] 
ajp_connection_tcp_get_message::jk_ajp_common.c (1408): (tomcat01) wrong 
message size 18441 8192 from ::1:8009


This suggests that Tomcat is configured with a different maximum AJP
message size than IIS.

Please provide your workers.properties file.

Mark

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org
This e-mail message, including any attachment(s), is confidential and may also 
be legally privileged. It is intended solely for the addresse(s) and others 
authorized to receive it. If you are not the intended recipient you are hereby 
notified that any disclosure, copying, distribution or taking any action in 
reliance on the contents of this email is strictly prohibited and may be 
unlawful. If you have received this e-mail in error you are requested to delete 
it from your system and to notify us by replying to this message immediately. 
CNT Infotech is not liable for the improper transmission of this message nor 
for any damage sustained as a result of this message.



-
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: service() failed with http error 502

2023-03-23 Thread Luis Ramos
Hi

telnet localhost 8009 connects ok

Luis J Ramos 
CNT Infotech Corp. (www.cntinfotech.com) 
646.452.9349

- Original Message -
From: "Kevin Huntly" 
To: "Tomcat Users List" 
Sent: Wednesday, March 22, 2023 4:20:58 PM
Subject: Re: service() failed with http error 502

Just wondering, are you able to telnet from your webserver into the Tomcat
server over the appropriate port? e.g. 8443 or whatnot - whatever is
configured in Tomcat's server.xml


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 Wed, Mar 22, 2023 at 3:22 PM Luis Ramos 
wrote:

> Hi List.
> In and around last windows updates for our WIN2019 box, our tomcat
> connector start to fail with the below error message.
> Setup is IIS 10->ISAPI connector => Tomcat 9 ->
> https://tomcat.apache.org/connectors-doc/webserver_howto/iis.html
> Has someone seen this behaivor?
> To be able to open the system I am bypassing the connector and listening
> in port 443 in server.xml directly.
>
>
>
> [Wed Mar 22 15:08:46.746 2023] [10780:14112] [error]
> ajp_connection_tcp_get_message::jk_ajp_common.c (1408): (tomcat01) wrong
> message size 18441 8192 from ::1:8009
> [Wed Mar 22 15:08:46.751 2023] [10780:14112] [error]
> ajp_get_reply::jk_ajp_common.c (2285): (tomcat01) Tomcat is down or network
> problems. Part of the response has already been sent to the client
> [Wed Mar 22 15:08:46.753 2023] [10780:14112] [info]
> ajp_service::jk_ajp_common.c (2774): (tomcat01) sending request to tomcat
> failed (recoverable), because of protocol error (attempt=1)
> [Wed Mar 22 15:08:46.860 2023] [10780:14112] [error]
> ajp_connection_tcp_get_message::jk_ajp_common.c (1408): (tomcat01) wrong
> message size 18441 8192 from ::1:8009
> [Wed Mar 22 15:08:46.865 2023] [10780:14112] [error]
> ajp_get_reply::jk_ajp_common.c (2285): (tomcat01) Tomcat is down or network
> problems. Part of the response has already been sent to the client
> [Wed Mar 22 15:08:46.868 2023] [10780:14112] [info]
> ajp_service::jk_ajp_common.c (2774): (tomcat01) sending request to tomcat
> failed (recoverable), because of protocol error (attempt=2)
> [Wed Mar 22 15:08:46.871 2023] [10780:14112] [error]
> ajp_service::jk_ajp_common.c (2795): (tomcat01) connecting to tomcat failed
> (rc=-11, errors=1, client_errors=0).
> [Wed Mar 22 15:08:46.873 2023] [10780:14112] [error]
> HttpExtensionProc::jk_isapi_plugin.c (2123): service() failed with http
> error 502
>
> This e-mail message, including any attachment(s), is confidential and may
> also be legally privileged. It is intended solely for the addresse(s) and
> others authorized to receive it. If you are not the intended recipient you
> are hereby notified that any disclosure, copying, distribution or taking
> any action in reliance on the contents of this email is strictly prohibited
> and may be unlawful. If you have received this e-mail in error you are
> requested to delete it from your system and to notify us by replying to
> this message immediately. CNT Infotech is not liable for the improper
> transmission of this message nor for any damage sustained as a result of
> this message.
This e-mail message, including any attachment(s), is confidential and may also 
be legally privileged. It is intended solely for the addresse(s) and others 
authorized to receive it. If you are not the intended recipient you are hereby 
notified that any disclosure, copying, distribution or taking any action in 
reliance on the contents of this email is strictly prohibited and may be 
unlawful. If you have received this e-mail in error you are requested to delete 
it from your system and to notify us by replying to this message immediately. 
CNT Infotech is not liable for the improper transmission of this message nor 
for any damage sustained as a result of this message.



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



Re: service() failed with http error 502

2023-03-23 Thread Luis Ramos
Hi
 Apache Tomcat/9.0.65
from server.xml

  


Luis J Ramos 
CNT Infotech Corp. (www.cntinfotech.com) 
646.452.9349

- Original Message -
From: "Mark Thomas" 
To: "users" 
Sent: Thursday, March 23, 2023 4:09:41 AM
Subject: Re: service() failed with http error 502

On 22/03/2023 19:20, Luis Ramos wrote:
> Hi List.
> In and around last windows updates for our WIN2019 box, our tomcat connector 
> start to fail with the below error message.
> Setup is IIS 10->ISAPI connector => Tomcat 9 -> 
> https://tomcat.apache.org/connectors-doc/webserver_howto/iis.html
> Has someone seen this behaivor?
> To be able to open the system I am bypassing the connector and listening in 
> port 443 in server.xml directly.

What Tomcat version are you using?

Has there been any change in Tomcat version in the same time frame? If 
so, please provide exact version information.

Please provide the AJP connector configuration from Tomcat's server.xml

> [Wed Mar 22 15:08:46.746 2023] [10780:14112] [error] 
> ajp_connection_tcp_get_message::jk_ajp_common.c (1408): (tomcat01) wrong 
> message size 18441 8192 from ::1:8009

This suggests that Tomcat is configured with a different maximum AJP 
message size than IIS.

Please provide your workers.properties file.

Mark

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org
This e-mail message, including any attachment(s), is confidential and may also 
be legally privileged. It is intended solely for the addresse(s) and others 
authorized to receive it. If you are not the intended recipient you are hereby 
notified that any disclosure, copying, distribution or taking any action in 
reliance on the contents of this email is strictly prohibited and may be 
unlawful. If you have received this e-mail in error you are requested to delete 
it from your system and to notify us by replying to this message immediately. 
CNT Infotech is not liable for the improper transmission of this message nor 
for any damage sustained as a result of this message.



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



javax.naming.NamingException: Could not create resource instance

2023-03-23 Thread Kevin Huntly
Hi Everyone,

I just migrated one of my apps off javax.servlet and onto jakarta.servlet.
I am getting the following exception:


[Time: 23 Mar 2023 11:31:44,134][Thread: main][Log:
org.springframework.web.context.support.XmlWebApplicationContext][Level:
WARN ] - [File: AbstractApplicationContext.java:591] - Exception
encountered during context initialization - cancelling refresh attempt:
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'mailSession': Invocation of init method failed; nested
exception is javax.naming.NamingException: Could not create resource
instance
[Time: 23 Mar 2023 11:31:44,139][Thread: main][Log:
org.springframework.web.servlet.DispatcherServlet][Level: ERROR] - [File:
FrameworkServlet.java:534] - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'mailSession': Invocation of init method failed; nested
exception is javax.naming.NamingException: Could not create resource
instance
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1804)
~[spring-beans-5.3.24.jar:5.3.24-migrated-1.0.6]
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620)
~[spring-beans-5.3.24.jar:5.3.24-migrated-1.0.6]
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
~[spring-beans-5.3.24.jar:5.3.24-migrated-1.0.6]
at
org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
~[spring-beans-5.3.24.jar:5.3.24-migrated-1.0.6]
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
~[spring-beans-5.3.24.jar:5.3.24-migrated-1.0.6]
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
~[spring-beans-5.3.24.jar:5.3.24-migrated-1.0.6]
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
~[spring-beans-5.3.24.jar:5.3.24-migrated-1.0.6]
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:936)
~[spring-beans-5.3.24.jar:5.3.24-migrated-1.0.6]
at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918)
~[spring-context-5.3.24.jar:5.3.24-migrated-1.0.6]
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583)
~[spring-context-5.3.24.jar:5.3.24-migrated-1.0.6]
at
org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:702)
~[spring-webmvc-5.3.24.jar:5.3.24-migrated-1.0.6]
at
org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:668)
~[spring-webmvc-5.3.24.jar:5.3.24-migrated-1.0.6]
at
org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:716)
~[spring-webmvc-5.3.24.jar:5.3.24-migrated-1.0.6]
at
org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:591)
~[spring-webmvc-5.3.24.jar:5.3.24-migrated-1.0.6]
at
org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:530)
~[spring-webmvc-5.3.24.jar:5.3.24-migrated-1.0.6]
at
org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:170)
~[spring-webmvc-5.3.24.jar:5.3.24-migrated-1.0.6]
at jakarta.servlet.GenericServlet.init(GenericServlet.java:158)
~[servlet-api.jar:6.0]
at jakarta.servlet.http.HttpServlet.init(HttpServlet.java:125)
~[servlet-api.jar:6.0]
at
org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:944)
~[catalina.jar:10.1.7]
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:901)
~[catalina.jar:10.1.7]
at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:805)
~[catalina.jar:10.1.7]
at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4632)
~[catalina.jar:10.1.7]
at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4919)
~[catalina.jar:10.1.7]
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
~[catalina.jar:10.1.7]
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:683)
~[catalina.jar:10.1.7]
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:658)
~[catalina.jar:10.1.7]
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:713)
~[catalina.jar:10.1.7]
at

Re: tag files compiled in wrong encoding?

2023-03-23 Thread Holger Klawitter
Hi Mark,

this fix was light speed! Thanks a lot!

Regards,
  Holger

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



Re: service() failed with http error 502

2023-03-23 Thread Mark Thomas

On 22/03/2023 19:20, Luis Ramos wrote:

Hi List.
In and around last windows updates for our WIN2019 box, our tomcat connector 
start to fail with the below error message.
Setup is IIS 10->ISAPI connector => Tomcat 9 -> 
https://tomcat.apache.org/connectors-doc/webserver_howto/iis.html
Has someone seen this behaivor?
To be able to open the system I am bypassing the connector and listening in 
port 443 in server.xml directly.


What Tomcat version are you using?

Has there been any change in Tomcat version in the same time frame? If 
so, please provide exact version information.


Please provide the AJP connector configuration from Tomcat's server.xml


[Wed Mar 22 15:08:46.746 2023] [10780:14112] [error] 
ajp_connection_tcp_get_message::jk_ajp_common.c (1408): (tomcat01) wrong 
message size 18441 8192 from ::1:8009


This suggests that Tomcat is configured with a different maximum AJP 
message size than IIS.


Please provide your workers.properties file.

Mark

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