Re: net::ERR_HTTP2_PROTOCOL_ERROR with 10.1.30

2024-10-09 Thread Mark Thomas

On 09/10/2024 03:33, Boris Petrov wrote:
I also have been experiencing the same issue (with Tomcat 9). 9.0.93 
works fine. 9.0.94 is unusable. 9.0.95 and now 9.0.96 almost work but 
sometimes I get the same behavior as with 9.0.94. I see it in my 
integration tests - there are some sporadic failures here and there when 
I upgrade from 9.0.93. Not sure how to help more but I just wanted to 
chime in and say that Ahmed is not the only one still seeing the problem 
even with the newest version.


What we need both to track down the root cause (I have my suspicions but 
no proof) is a test case that triggers the issue. The simpler the test 
case the better but at this point I'd settle for anything that triggered 
the issue in a reasonable time frame.


Mark



On 2024/10/04 10:00:03 Ahmed Ashour wrote:
 > > How rare? Once in how many requests? Can you trigger this via 
automated testing e.g. with wrk?
 > After working for some time (from 10 minutes to an hour), making a 
request to a page (with subsequent JS/images) every one minute, the 
issue is shown, happens on Chrome and Brave.
 > The requests with wrk are all successful, tested for one hour, using 
the default settings.
 > Background:- There is a Tomcat server which is restarted daily, to 
clean the auto deploy of the applications.- Three members have seen the 
issue, in the last 3 days.- The main application is protected by basic 
authentication- Once the issue happens, even the sample non-protected 
application (html/js) is not accessible.

 >
 > > Does setting discardRequestsAndResponses="true" help at all?
 >
 > No, it doesn't.
 > The settings now are:
 > className="org.apache.coyote.http2.Http2Protocol" readTimeout="2"/>

 >
 > which still gives the error.
 > The current workaround is to remove the UpgradeProtocol element.
 >
 > I wonder if low-level logs, or network sniffing can help, as it is a 
secure connection.

 > Thanks,Ahmed

-
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: Migrating from Tomcat 9.0.88 to Tomcat 10.1.30 on windows machine with JDK 21 LTS

2024-10-09 Thread Mark Thomas

On 09/10/2024 05:49, Sajid Hussain wrote:

Hi,

Thanks for the quick response. Yes its spring boot application and 
packaged as War file. The Tomcat running as windows service using Apache 
common daemon.


I'm also attaching the stack trace observe in memory analyzer.


You need to look at the heap usage to see where the memory is being used.

Most profilers should also be able to tell where the CPU time is being 
spent.


Did you look at DAEMON-460? Does it apply to you?

Mark





Regards,
Sajid

On 10/9/2024 4:24 PM, Mark Thomas wrote:

Please send your reply to the users list so I can reply there.

Mark


On 08/10/2024 06:23, Sajid Hussain wrote:

Hi Mark,

Thanks for the quick response. Yes its spring boot application and 
packaged as War file. The Tomcat running as windows service using 
Apache common daemon.



Sajid

On 10/8/2024 4:47 PM, Mark Thomas wrote:

On 08/10/2024 05:21, Sajid Hussain wrote:

Hi,

I was using tomcat 9 with JDK 17 on windows. My java application 
was using 2.7.18. Now I'm migrating my application spring version 
to 3.3.4 with Tomcat 10.1.30 and JDK 21. I have upgraded the 
version in my java project and fix the hibernate error migrating 
from 5 to 6. Now my application start on tomcat 10. But after few 
request JVM consume the maximum memory (I set it 3GB max) and cup 
usage to 90-98%. I set windows service priority to low and it take 
80-90% hence my application stop responding. Here is the thread dum 
for the tomcat.Not getting any clue whats causing to tomcat high 
CPU and memory usage.


A profiler (I use YourKit because they give free licenses to OSS 
develoeprs but other profilers are avialable) will tell you more 
about what is going on than a single stack trace.


Is this a Spring Boot app? Is it packaged as a JAR or a WAR?

How are you running this as a Windows service? If you are using 
Apache Commons Daemon (the default way to run Tomcat as a Windows 
service) then this might be useful:

https://issues.apache.org/jira/projects/DAEMON/issues/DAEMON-460

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



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



Re: SSL on Tomcat 9

2024-10-09 Thread Mark Thomas

On 09/10/2024 07:47, Ron Boyer wrote:

hello, I am trying to renew the SSL certificate from a signing authority.  I am 
running Tomcat 9.  I understand that I have to import PKCS #12 certificate.  I 
seem to be able to make one, but I don't think it is correct.  My signing 
authority, GoDaddy, will let me download a crt and pem file. From the 
server.xml file I see there is only one entry that points to the keystore of a 
PKCS #12 key.  I don't know  whether I need to import the certificate with 
keytool or using the certificate snap-in with Windows Management Console.  Any 
advice?


How did you create the private key (show us the command line if you can) 
and what format is the key in?


If you followed an on-line guide (e.g. from GoDaddy) can you provide a 
reference to that?


Why do you think what you are doing is incorrect?

What is your TLS connector configuration (show use the XML but mask any 
sensitive information like passwords)?


What do the logs show for that Connector when Tomcat starts?

Mark


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



Re: [External] : Re: Issue with using tomcat-embed-core, JDK 11 and modules

2024-10-09 Thread Rémy Maucherat
On Wed, Oct 9, 2024 at 4:22 PM Greg Eschbacher
 wrote:
>
> Thank you very much Remy.  Your output below shows you using 9.0.96, and sure 
> enough this was a problem in 9.0.95 but is fixed in 9.0.96.

I tried 9.0.96 because I had just released it. However it has no
relevant fixes and 9.0.95 work for me as well. I would say your maven
did not use the right annotations jar, for example the annotations jar
from 9.0.93 does not include the module info (due to the packaging
bug) and it could maybe do that.

Rémy

> Thanks,
> Greg
>
> 
> From: Rémy Maucherat 
> Sent: Wednesday, October 9, 2024 8:28 AM
> To: Tomcat Users List 
> Subject: [External] : Re: Issue with using tomcat-embed-core, JDK 11 and 
> modules
>
> On Tue, Oct 8, 2024 at 5:23 PM Greg Eschbacher
>  wrote:
> >
> > Hi everyone,
> >
> > Our application is upgrading from tomcat-embed-core 9.0.88 to 9.0.95, and 
> > we are having issues building with the latest jar.
> >
> > We are getting issues related to JDK 11 and modules.  Specifically, when we 
> > build, we get the message " module not found: java.annotation "
> >
> > To demonstrate this, I have created a sample project 
> > https://urldefense.com/v3/__https://drive.google.com/file/d/1GwFLYRNol-zRL9vgg_ubsFcL2NWi9UmG/view?usp=drive_link__;!!ACWV5N9M2RV99hQ!KRBvIgokmvBd1aVvM0vbH9TfGPKUb9V19F0iBEPQb2krEaYSlz5szIeqUzlik5UNAMaq_27PCfqMPAjY$
> >   .  (Just run "mvn clean package" with your JAVA_HOME set to JDK 11.  I'm 
> > using Oracle jdk-11.0.23)
> >
> > By modifying the pom.xml and setting Tomcat to 9.0.88, it works fine.  
> > 9.0.95, it does not.  I've tried going through the commit history, but 
> > nothing stands out.
> >
> > Note that a similar issue involving JDK 11 and modularity happened in this 
> > thread:  
> > https://urldefense.com/v3/__https://www.mail-archive.com/users@tomcat.apache.org/msg143765.html__;!!ACWV5N9M2RV99hQ!KRBvIgokmvBd1aVvM0vbH9TfGPKUb9V19F0iBEPQb2krEaYSlz5szIeqUzlik5UNAMaq_27PCRPRO8ni$
>
> This is a packaging issue that is fixed in 9.0.93, it is not similar.
>
> Your test project works for me, so I don't have any ideas. Maven did
> download the proper tomcat-annotations-api.
>
> remm@feather:~/Work/tomcat/tests/simple-tomcat-project$ mvn package
> [INFO] Scanning for projects...
> [INFO]
> [INFO] -< com.example:simple-tomcat-project 
> >--
> [INFO] Building simple-tomcat-project 1.0-SNAPSHOT
> [INFO]   from pom.xml
> [INFO] [ jar 
> ]-
> Downloading from central:
> https://urldefense.com/v3/__https://repo.maven.apache.org/maven2/org/apache/tomcat/embed/tomcat-embed-core/9.0.96/tomcat-embed-core-9.0.96.pom__;!!ACWV5N9M2RV99hQ!KRBvIgokmvBd1aVvM0vbH9TfGPKUb9V19F0iBEPQb2krEaYSlz5szIeqUzlik5UNAMaq_27PCfuLXrv6$
> Downloaded from central:
> https://urldefense.com/v3/__https://repo.maven.apache.org/maven2/org/apache/tomcat/embed/tomcat-embed-core/9.0.96/tomcat-embed-core-9.0.96.pom__;!!ACWV5N9M2RV99hQ!KRBvIgokmvBd1aVvM0vbH9TfGPKUb9V19F0iBEPQb2krEaYSlz5szIeqUzlik5UNAMaq_27PCfuLXrv6$
> (1.7 kB at 4.8 kB/s)
> Downloading from central:
> https://urldefense.com/v3/__https://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-annotations-api/9.0.96/tomcat-annotations-api-9.0.96.pom__;!!ACWV5N9M2RV99hQ!KRBvIgokmvBd1aVvM0vbH9TfGPKUb9V19F0iBEPQb2krEaYSlz5szIeqUzlik5UNAMaq_27PCXYAjrvZ$
> Downloaded from central:
> https://urldefense.com/v3/__https://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-annotations-api/9.0.96/tomcat-annotations-api-9.0.96.pom__;!!ACWV5N9M2RV99hQ!KRBvIgokmvBd1aVvM0vbH9TfGPKUb9V19F0iBEPQb2krEaYSlz5szIeqUzlik5UNAMaq_27PCXYAjrvZ$
> (1.5 kB at 75 kB/s)
> Downloading from central:
> https://urldefense.com/v3/__https://repo.maven.apache.org/maven2/org/apache/tomcat/embed/tomcat-embed-core/9.0.96/tomcat-embed-core-9.0.96.jar__;!!ACWV5N9M2RV99hQ!KRBvIgokmvBd1aVvM0vbH9TfGPKUb9V19F0iBEPQb2krEaYSlz5szIeqUzlik5UNAMaq_27PCUsKMjsy$
> Downloaded from central:
> https://urldefense.com/v3/__https://repo.maven.apache.org/maven2/org/apache/tomcat/embed/tomcat-embed-core/9.0.96/tomcat-embed-core-9.0.96.jar__;!!ACWV5N9M2RV99hQ!KRBvIgokmvBd1aVvM0vbH9TfGPKUb9V19F0iBEPQb2krEaYSlz5szIeqUzlik5UNAMaq_27PCUsKMjsy$
> (3.6 MB at 11 MB/s)
> Downloading from central:
> https://urldefense.com/v3/__https://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-annotations-api/9.0.96/tomcat-annotations-api-9.0.96.jar__;!!ACWV5N9M2RV99hQ!KRBvIgokmvBd1aVvM0vbH9TfGPKUb9V19F0iBEPQb2krEaYSlz5szIeqUzlik5UNAMaq_27PCd7Y_xAy$
> Downloaded from central:
> https://urldefense.com/v3/__https://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-annotations-api/9.0.96/tomcat-annotations-api-9.0.96.jar__;!!ACWV5N9M2RV99hQ!KRBvIgokmvBd1aVvM0vbH9TfGPKUb9V19F0iBEPQb2krEaYSlz5szIeqUzlik5UNAMaq_27PCd7Y_xAy$
> (13 kB at 667 kB/s)
>
> With 9.0.93 it fails (as expected) with "module not found:
> org.apache.tomcat.embed.core".
>
> Rémy
>
> > Thanks in advance for any suggestions on 

Re: SSL on Tomcat 9

2024-10-09 Thread Ron Boyer
I created the certificate a windows csr.  I did find OpenSSL on our server and 
from there we were able to create the right type of .pem file for Tomcat to 
use.  Thanks for everyone's help.



Ron Boyer

IT Director

Information Technology

Summit County, Utah

Office: 435-336-3143




From: Mark Thomas 
Sent: Wednesday, October 9, 2024 10:48 AM
To: users@tomcat.apache.org 
Subject: Re: SSL on Tomcat 9

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

On 09/10/2024 07:47, Ron Boyer wrote:
> hello, I am trying to renew the SSL certificate from a signing authority.  I 
> am running Tomcat 9.  I understand that I have to import PKCS #12 
> certificate.  I seem to be able to make one, but I don't think it is correct. 
>  My signing authority, GoDaddy, will let me download a crt and pem file. From 
> the server.xml file I see there is only one entry that points to the keystore 
> of a PKCS #12 key.  I don't know  whether I need to import the certificate 
> with keytool or using the certificate snap-in with Windows Management 
> Console.  Any advice?

How did you create the private key (show us the command line if you can)
and what format is the key in?

If you followed an on-line guide (e.g. from GoDaddy) can you provide a
reference to that?

Why do you think what you are doing is incorrect?

What is your TLS connector configuration (show use the XML but mask any
sensitive information like passwords)?

What do the logs show for that Connector when Tomcat starts?

Mark


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



Re: SSL on Tomcat 9

2024-10-09 Thread Ron Boyer

Hello Ahmed, I have always used keytool on the web host.  Can I run OpenSSL on 
another client and send the key to the webhost or does OpenSSL have to run on 
the webhost?



From: Ahmed Ashour 
Sent: Wednesday, October 9, 2024 8:01 AM
To: users@tomcat.apache.org 
Subject: Re: SSL on Tomcat 9

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

 Hi,
On windows, one can use OpenSSL to export the private key and certificate to 
.p12, then import that to the key store.
openssl pkcs12 -export -in fullchain.pem -inkey privatekey.pem -out server.p12 
-name tomcatkeytool -importkeystore -deststorepass changeit -destkeystore 
localhost-rsa.jks -srckeystore server.p12 -srcstoretype PKCS12 -srcstorepass 
changeit -alias tomcat

Similar posts in 
https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fppm.softtek.com%2Fitg%2Fpdf%2Fmanual%2FContent%2FSA%2FInstallAdmin%2Fimport_existing_SSL.htm&data=05%7C02%7Crboyer%40summitcountyutah.gov%7Ca23b98c0ea3b4e2f4d9a08dce86b052d%7C497f0086ed7845149cc43715b1894e4e%7C0%7C0%7C638640793572493089%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=QH2sqNJnnDXp%2FUWLKCk0qb4T5GxoxamgRXtAPc6Qwto%3D&reserved=0
 and How to import an existing SSL certificate for use in Tomcat | Atlassian 
Support | Atlassian Documentation

|
|
|  |
How to import an existing SSL certificate for use in Tomcat | Atlassian ...


 |

 |

 |




Hope that helps,Ahmed
On Wednesday, October 9, 2024 at 03:47:49 PM GMT+2, Ron Boyer 
 wrote:


 hello, I am trying to renew the SSL certificate from a signing authority.  I 
am running Tomcat 9.  I understand that I have to import PKCS #12 certificate.  
I seem to be able to make one, but I don't think it is correct.  My signing 
authority, GoDaddy, will let me download a crt and pem file. From the 
server.xml file I see there is only one entry that points to the keystore of a 
PKCS #12 key.  I don't know  whether I need to import the certificate with 
keytool or using the certificate snap-in with Windows Management Console.  Any 
advice?



Re: SSL on Tomcat 9

2024-10-09 Thread Ahmed Ashour
 Hi,
On windows, one can use OpenSSL to export the private key and certificate to 
.p12, then import that to the key store.
openssl pkcs12 -export -in fullchain.pem -inkey privatekey.pem -out server.p12 
-name tomcatkeytool -importkeystore -deststorepass changeit -destkeystore 
localhost-rsa.jks -srckeystore server.p12 -srcstoretype PKCS12 -srcstorepass 
changeit -alias tomcat

Similar posts in 
https://ppm.softtek.com/itg/pdf/manual/Content/SA/InstallAdmin/import_existing_SSL.htm
 and How to import an existing SSL certificate for use in Tomcat | Atlassian 
Support | Atlassian Documentation

| 
| 
|  | 
How to import an existing SSL certificate for use in Tomcat | Atlassian ...


 |

 |

 |




Hope that helps,Ahmed
On Wednesday, October 9, 2024 at 03:47:49 PM GMT+2, Ron Boyer 
 wrote:
 
 
 hello, I am trying to renew the SSL certificate from a signing authority.  I 
am running Tomcat 9.  I understand that I have to import PKCS #12 certificate.  
I seem to be able to make one, but I don't think it is correct.  My signing 
authority, GoDaddy, will let me download a crt and pem file. From the 
server.xml file I see there is only one entry that points to the keystore of a 
PKCS #12 key.  I don't know  whether I need to import the certificate with 
keytool or using the certificate snap-in with Windows Management Console.  Any 
advice?

  

RE: Re: net::ERR_HTTP2_PROTOCOL_ERROR with 10.1.30

2024-10-09 Thread Boris Petrov
I also have been experiencing the same issue (with Tomcat 9). 9.0.93 
works fine. 9.0.94 is unusable. 9.0.95 and now 9.0.96 almost work but 
sometimes I get the same behavior as with 9.0.94. I see it in my 
integration tests - there are some sporadic failures here and there when 
I upgrade from 9.0.93. Not sure how to help more but I just wanted to 
chime in and say that Ahmed is not the only one still seeing the problem 
even with the newest version.


On 2024/10/04 10:00:03 Ahmed Ashour wrote:
> > How rare? Once in how many requests? Can you trigger this via 
automated testing e.g. with wrk?
> After working for some time (from 10 minutes to an hour), making a 
request to a page (with subsequent JS/images) every one minute, the 
issue is shown, happens on Chrome and Brave.
> The requests with wrk are all successful, tested for one hour, using 
the default settings.
> Background:- There is a Tomcat server which is restarted daily, to 
clean the auto deploy of the applications.- Three members have seen the 
issue, in the last 3 days.- The main application is protected by basic 
authentication- Once the issue happens, even the sample non-protected 
application (html/js) is not accessible.

>
> > Does setting discardRequestsAndResponses="true" help at all?
>
> No, it doesn't.
> The settings now are:
> className="org.apache.coyote.http2.Http2Protocol" readTimeout="2"/>

>
> which still gives the error.
> The current workaround is to remove the UpgradeProtocol element.
>
> I wonder if low-level logs, or network sniffing can help, as it is a 
secure connection.

> Thanks,Ahmed

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



SSL on Tomcat 9

2024-10-09 Thread Ron Boyer
hello, I am trying to renew the SSL certificate from a signing authority.  I am 
running Tomcat 9.  I understand that I have to import PKCS #12 certificate.  I 
seem to be able to make one, but I don't think it is correct.  My signing 
authority, GoDaddy, will let me download a crt and pem file. From the 
server.xml file I see there is only one entry that points to the keystore of a 
PKCS #12 key.  I don't know  whether I need to import the certificate with 
keytool or using the certificate snap-in with Windows Management Console.  Any 
advice?



Re: Migrating from Tomcat 9.0.88 to Tomcat 10.1.30 on windows machine with JDK 21 LTS

2024-10-09 Thread Sajid Hussain

Hi,

Thanks for the quick response. Yes its spring boot application and 
packaged as War file. The Tomcat running as windows service using Apache 
common daemon.


I'm also attaching the stack trace observe in memory analyzer.


Regards,
Sajid

On 10/9/2024 4:24 PM, Mark Thomas wrote:

Please send your reply to the users list so I can reply there.

Mark


On 08/10/2024 06:23, Sajid Hussain wrote:

Hi Mark,

Thanks for the quick response. Yes its spring boot application and 
packaged as War file. The Tomcat running as windows service using 
Apache common daemon.



Sajid

On 10/8/2024 4:47 PM, Mark Thomas wrote:

On 08/10/2024 05:21, Sajid Hussain wrote:

Hi,

I was using tomcat 9 with JDK 17 on windows. My java application 
was using 2.7.18. Now I'm migrating my application spring version 
to 3.3.4 with Tomcat 10.1.30 and JDK 21. I have upgraded the 
version in my java project and fix the hibernate error migrating 
from 5 to 6. Now my application start on tomcat 10. But after few 
request JVM consume the maximum memory (I set it 3GB max) and cup 
usage to 90-98%. I set windows service priority to low and it take 
80-90% hence my application stop responding. Here is the thread dum 
for the tomcat.Not getting any clue whats causing to tomcat high 
CPU and memory usage.


A profiler (I use YourKit because they give free licenses to OSS 
develoeprs but other profilers are avialable) will tell you more 
about what is going on than a single stack trace.


Is this a Spring Boot app? Is it packaged as a JAR or a WAR?

How are you running this as a Windows service? If you are using 
Apache Commons Daemon (the default way to run Tomcat as a Windows 
service) then this might be useful:

https://issues.apache.org/jira/projects/DAEMON/issues/DAEMON-460

Mark

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

https-openssl-nio2-8443-exec-2
  at sun.nio.ch.SocketDispatcher.read0(Ljava/io/FileDescriptor;JI)I 
(SocketDispatcher.java(Native Method))
  at sun.nio.ch.SocketDispatcher.read(Ljava/io/FileDescriptor;JI)I 
(SocketDispatcher.java:46)
  at sun.nio.ch.NioSocketImpl.tryRead(Ljava/io/FileDescriptor;[BII)I 
(NioSocketImpl.java:256)
  at sun.nio.ch.NioSocketImpl.implRead([BII)I (NioSocketImpl.java:307)
  at sun.nio.ch.NioSocketImpl.read([BII)I (NioSocketImpl.java:346)
  at sun.nio.ch.NioSocketImpl$1.read([BII)I (NioSocketImpl.java:796)
  at java.net.Socket$SocketInputStream.read([BII)I (Socket.java:1099)
  at org.postgresql.core.VisibleBufferedInputStream.readMore(IZ)Z 
(VisibleBufferedInputStream.java:192)
  at org.postgresql.core.VisibleBufferedInputStream.ensureBytes(IZ)Z 
(VisibleBufferedInputStream.java:159)
  at org.postgresql.core.VisibleBufferedInputStream.ensureBytes(I)Z 
(VisibleBufferedInputStream.java:144)
  at org.postgresql.core.VisibleBufferedInputStream.read([BII)I 
(VisibleBufferedInputStream.java:255)
  at org.postgresql.core.PGStream.receive([BII)V (PGStream.java:660)
  at org.postgresql.core.PGStream.receiveTupleV3()Lorg/postgresql/core/Tuple; 
(PGStream.java:620)
  at 
org.postgresql.core.v3.QueryExecutorImpl.processResults(Lorg/postgresql/core/ResultHandler;IZ)V
 (QueryExecutorImpl.java:2387)
  at 
org.postgresql.core.v3.QueryExecutorImpl.execute(Lorg/postgresql/core/Query;Lorg/postgresql/core/ParameterList;Lorg/postgresql/core/ResultHandler;IIIZ)V
 (QueryExecutorImpl.java:372)
  at 
org.postgresql.jdbc.PgStatement.executeInternal(Lorg/postgresql/core/CachedQuery;Lorg/postgresql/core/ParameterList;I)V
 (PgStatement.java:517)
  at 
org.postgresql.jdbc.PgStatement.execute(Lorg/postgresql/core/CachedQuery;Lorg/postgresql/core/ParameterList;I)V
 (PgStatement.java:434)
  at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(I)Z 
(PgPreparedStatement.java:194)
  at org.postgresql.jdbc.PgPreparedStatement.executeQuery()Ljava/sql/ResultSet; 
(PgPreparedStatement.java:137)
  at 
com.zaxxer.hikari.pool.ProxyPreparedStatement.executeQuery()Ljava/sql/ResultSet;
 (ProxyPreparedStatement.java:52)
  at 
com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeQuery()Ljava/sql/ResultSet;
 (HikariProxyPreparedStatement.java)
  at 
org.hibernate.sql.results.jdbc.internal.DeferredResultSetAccess.executeQuery()V 
(DeferredResultSetAccess.java:246)
  at 
org.hibernate.sql.results.jdbc.internal.DeferredResultSetAccess.getResultSet()Ljava/sql/ResultSet;
 (DeferredResultSetAccess.java:167)
  at 
org.hibernate.sql.results.jdbc.internal.JdbcValuesResultSetImpl.advanceNext()Z 
(JdbcValuesResultSetImpl.java:265)
  at 
org.hibernate.sql.results.jdbc.internal.JdbcValuesResultSetImpl.processNext(Lorg/hibernate/sql/results/jdbc/spi/RowProcessingState;)Z
 (JdbcValuesResultSetImpl.java:145)
  at 
org.hibernate.sql.results.jdbc.internal.AbstractJdbcValues.next(Lorg/hibernate/sql/results/jdbc/spi/RowProcessingState;)Z
 (AbstractJdbcValues.java:19)
  at org.hibernate.sql.results.interna

Re: Issue with using tomcat-embed-core, JDK 11 and modules

2024-10-09 Thread Rémy Maucherat
On Tue, Oct 8, 2024 at 5:23 PM Greg Eschbacher
 wrote:
>
> Hi everyone,
>
> Our application is upgrading from tomcat-embed-core 9.0.88 to 9.0.95, and we 
> are having issues building with the latest jar.
>
> We are getting issues related to JDK 11 and modules.  Specifically, when we 
> build, we get the message " module not found: java.annotation "
>
> To demonstrate this, I have created a sample project 
> https://drive.google.com/file/d/1GwFLYRNol-zRL9vgg_ubsFcL2NWi9UmG/view?usp=drive_link
>  .  (Just run "mvn clean package" with your JAVA_HOME set to JDK 11.  I'm 
> using Oracle jdk-11.0.23)
>
> By modifying the pom.xml and setting Tomcat to 9.0.88, it works fine.  
> 9.0.95, it does not.  I've tried going through the commit history, but 
> nothing stands out.
>
> Note that a similar issue involving JDK 11 and modularity happened in this 
> thread:  https://www.mail-archive.com/users@tomcat.apache.org/msg143765.html

This is a packaging issue that is fixed in 9.0.93, it is not similar.

Your test project works for me, so I don't have any ideas. Maven did
download the proper tomcat-annotations-api.

remm@feather:~/Work/tomcat/tests/simple-tomcat-project$ mvn package
[INFO] Scanning for projects...
[INFO]
[INFO] -< com.example:simple-tomcat-project >--
[INFO] Building simple-tomcat-project 1.0-SNAPSHOT
[INFO]   from pom.xml
[INFO] [ jar ]-
Downloading from central:
https://repo.maven.apache.org/maven2/org/apache/tomcat/embed/tomcat-embed-core/9.0.96/tomcat-embed-core-9.0.96.pom
Downloaded from central:
https://repo.maven.apache.org/maven2/org/apache/tomcat/embed/tomcat-embed-core/9.0.96/tomcat-embed-core-9.0.96.pom
(1.7 kB at 4.8 kB/s)
Downloading from central:
https://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-annotations-api/9.0.96/tomcat-annotations-api-9.0.96.pom
Downloaded from central:
https://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-annotations-api/9.0.96/tomcat-annotations-api-9.0.96.pom
(1.5 kB at 75 kB/s)
Downloading from central:
https://repo.maven.apache.org/maven2/org/apache/tomcat/embed/tomcat-embed-core/9.0.96/tomcat-embed-core-9.0.96.jar
Downloaded from central:
https://repo.maven.apache.org/maven2/org/apache/tomcat/embed/tomcat-embed-core/9.0.96/tomcat-embed-core-9.0.96.jar
(3.6 MB at 11 MB/s)
Downloading from central:
https://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-annotations-api/9.0.96/tomcat-annotations-api-9.0.96.jar
Downloaded from central:
https://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-annotations-api/9.0.96/tomcat-annotations-api-9.0.96.jar
(13 kB at 667 kB/s)

With 9.0.93 it fails (as expected) with "module not found:
org.apache.tomcat.embed.core".

Rémy

> Thanks in advance for any suggestions on things to try.
>
>   *
> Greg

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



Re: [External] : Re: Issue with using tomcat-embed-core, JDK 11 and modules

2024-10-09 Thread Greg Eschbacher
Thank you very much Remy.  Your output below shows you using 9.0.96, and sure 
enough this was a problem in 9.0.95 but is fixed in 9.0.96.

Thanks,
Greg


From: Rémy Maucherat 
Sent: Wednesday, October 9, 2024 8:28 AM
To: Tomcat Users List 
Subject: [External] : Re: Issue with using tomcat-embed-core, JDK 11 and modules

On Tue, Oct 8, 2024 at 5:23 PM Greg Eschbacher
 wrote:
>
> Hi everyone,
>
> Our application is upgrading from tomcat-embed-core 9.0.88 to 9.0.95, and we 
> are having issues building with the latest jar.
>
> We are getting issues related to JDK 11 and modules.  Specifically, when we 
> build, we get the message " module not found: java.annotation "
>
> To demonstrate this, I have created a sample project 
> https://urldefense.com/v3/__https://drive.google.com/file/d/1GwFLYRNol-zRL9vgg_ubsFcL2NWi9UmG/view?usp=drive_link__;!!ACWV5N9M2RV99hQ!KRBvIgokmvBd1aVvM0vbH9TfGPKUb9V19F0iBEPQb2krEaYSlz5szIeqUzlik5UNAMaq_27PCfqMPAjY$
>   .  (Just run "mvn clean package" with your JAVA_HOME set to JDK 11.  I'm 
> using Oracle jdk-11.0.23)
>
> By modifying the pom.xml and setting Tomcat to 9.0.88, it works fine.  
> 9.0.95, it does not.  I've tried going through the commit history, but 
> nothing stands out.
>
> Note that a similar issue involving JDK 11 and modularity happened in this 
> thread:  
> https://urldefense.com/v3/__https://www.mail-archive.com/users@tomcat.apache.org/msg143765.html__;!!ACWV5N9M2RV99hQ!KRBvIgokmvBd1aVvM0vbH9TfGPKUb9V19F0iBEPQb2krEaYSlz5szIeqUzlik5UNAMaq_27PCRPRO8ni$

This is a packaging issue that is fixed in 9.0.93, it is not similar.

Your test project works for me, so I don't have any ideas. Maven did
download the proper tomcat-annotations-api.

remm@feather:~/Work/tomcat/tests/simple-tomcat-project$ mvn package
[INFO] Scanning for projects...
[INFO]
[INFO] -< com.example:simple-tomcat-project >--
[INFO] Building simple-tomcat-project 1.0-SNAPSHOT
[INFO]   from pom.xml
[INFO] [ jar ]-
Downloading from central:
https://urldefense.com/v3/__https://repo.maven.apache.org/maven2/org/apache/tomcat/embed/tomcat-embed-core/9.0.96/tomcat-embed-core-9.0.96.pom__;!!ACWV5N9M2RV99hQ!KRBvIgokmvBd1aVvM0vbH9TfGPKUb9V19F0iBEPQb2krEaYSlz5szIeqUzlik5UNAMaq_27PCfuLXrv6$
Downloaded from central:
https://urldefense.com/v3/__https://repo.maven.apache.org/maven2/org/apache/tomcat/embed/tomcat-embed-core/9.0.96/tomcat-embed-core-9.0.96.pom__;!!ACWV5N9M2RV99hQ!KRBvIgokmvBd1aVvM0vbH9TfGPKUb9V19F0iBEPQb2krEaYSlz5szIeqUzlik5UNAMaq_27PCfuLXrv6$
(1.7 kB at 4.8 kB/s)
Downloading from central:
https://urldefense.com/v3/__https://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-annotations-api/9.0.96/tomcat-annotations-api-9.0.96.pom__;!!ACWV5N9M2RV99hQ!KRBvIgokmvBd1aVvM0vbH9TfGPKUb9V19F0iBEPQb2krEaYSlz5szIeqUzlik5UNAMaq_27PCXYAjrvZ$
Downloaded from central:
https://urldefense.com/v3/__https://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-annotations-api/9.0.96/tomcat-annotations-api-9.0.96.pom__;!!ACWV5N9M2RV99hQ!KRBvIgokmvBd1aVvM0vbH9TfGPKUb9V19F0iBEPQb2krEaYSlz5szIeqUzlik5UNAMaq_27PCXYAjrvZ$
(1.5 kB at 75 kB/s)
Downloading from central:
https://urldefense.com/v3/__https://repo.maven.apache.org/maven2/org/apache/tomcat/embed/tomcat-embed-core/9.0.96/tomcat-embed-core-9.0.96.jar__;!!ACWV5N9M2RV99hQ!KRBvIgokmvBd1aVvM0vbH9TfGPKUb9V19F0iBEPQb2krEaYSlz5szIeqUzlik5UNAMaq_27PCUsKMjsy$
Downloaded from central:
https://urldefense.com/v3/__https://repo.maven.apache.org/maven2/org/apache/tomcat/embed/tomcat-embed-core/9.0.96/tomcat-embed-core-9.0.96.jar__;!!ACWV5N9M2RV99hQ!KRBvIgokmvBd1aVvM0vbH9TfGPKUb9V19F0iBEPQb2krEaYSlz5szIeqUzlik5UNAMaq_27PCUsKMjsy$
(3.6 MB at 11 MB/s)
Downloading from central:
https://urldefense.com/v3/__https://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-annotations-api/9.0.96/tomcat-annotations-api-9.0.96.jar__;!!ACWV5N9M2RV99hQ!KRBvIgokmvBd1aVvM0vbH9TfGPKUb9V19F0iBEPQb2krEaYSlz5szIeqUzlik5UNAMaq_27PCd7Y_xAy$
Downloaded from central:
https://urldefense.com/v3/__https://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-annotations-api/9.0.96/tomcat-annotations-api-9.0.96.jar__;!!ACWV5N9M2RV99hQ!KRBvIgokmvBd1aVvM0vbH9TfGPKUb9V19F0iBEPQb2krEaYSlz5szIeqUzlik5UNAMaq_27PCd7Y_xAy$
(13 kB at 667 kB/s)

With 9.0.93 it fails (as expected) with "module not found:
org.apache.tomcat.embed.core".

Rémy

> Thanks in advance for any suggestions on things to try.
>
>   *
> Greg

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