On Tue, Oct 8, 2024 at 5:23 PM Greg Eschbacher
<greg.eschbac...@oracle.com.invalid> 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

Reply via email to