You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2022/11/17 16:29:16 UTC

[Bug 66353] New: java.lang.NoClassDefFoundError: org/apache/tomcat/jakartaee/EESpecProfile

https://bz.apache.org/bugzilla/show_bug.cgi?id=66353

            Bug ID: 66353
           Summary: java.lang.NoClassDefFoundError:
                    org/apache/tomcat/jakartaee/EESpecProfile
           Product: Tomcat 10
           Version: 10.1.2
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
          Assignee: dev@tomcat.apache.org
          Reporter: andrealuciano71@gmail.com
  Target Milestone: ------

Created attachment 38434
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=38434&action=edit
maven pom.xml

Making a simple test with Apache Tomcat 10.1.2 embedded server in Spring Boot
3.0.0-RC2, this exception is raised when it runs:

mvnw spring-boot:run
...
2022-11-17T17:12:30.261+01:00  INFO 2508 --- [           main]
c.e.restservice.RestServiceApplication   : Starting RestServiceApplication
using Java 17.0.5 with PID 2508
(C:\Progetti\Ericsson\gs-rest-service-main\initial\target\classes started by
eanluci in C:\Progetti\Ericsson\gs-rest-service-main\initial)
2022-11-17T17:12:30.267+01:00  INFO 2508 --- [           main]
c.e.restservice.RestServiceApplication   : No active profile set, falling back
to 1 default profile: "default"
2022-11-17T17:12:31.191+01:00  WARN 2508 --- [           main]
ConfigServletWebServerApplicationContext : Exception encountered during context
initialization - cancelling refresh attempt:
org.springframework.context.ApplicationContextException: Unable to start web
server
2022-11-17T17:12:31.199+01:00  INFO 2508 --- [           main]
.s.b.a.l.ConditionEvaluationReportLogger :

Error starting ApplicationContext. To display the condition evaluation report
re-run your application with 'debug' enabled.
2022-11-17T17:12:31.213+01:00 ERROR 2508 --- [           main]
o.s.boot.SpringApplication               : Application run failed

org.springframework.context.ApplicationContextException: Unable to start web
server
        at
org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:164)
~[spring-boot-3.0.0-RC2.jar:3.0.0-RC2]
        at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:578)
~[spring-context-6.0.0-RC4.jar:6.0.0-RC4]
        at
org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146)
~[spring-boot-3.0.0-RC2.jar:3.0.0-RC2]
        at
org.springframework.boot.SpringApplication.refresh(SpringApplication.java:730)
~[spring-boot-3.0.0-RC2.jar:3.0.0-RC2]
        at
org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:432)
~[spring-boot-3.0.0-RC2.jar:3.0.0-RC2]
        at
org.springframework.boot.SpringApplication.run(SpringApplication.java:308)
~[spring-boot-3.0.0-RC2.jar:3.0.0-RC2]
        at
org.springframework.boot.SpringApplication.run(SpringApplication.java:1302)
~[spring-boot-3.0.0-RC2.jar:3.0.0-RC2]
        at
org.springframework.boot.SpringApplication.run(SpringApplication.java:1291)
~[spring-boot-3.0.0-RC2.jar:3.0.0-RC2]
        at
com.example.restservice.RestServiceApplication.main(RestServiceApplication.java:10)
~[classes/:na]
Caused by: java.lang.NoClassDefFoundError:
org/apache/tomcat/jakartaee/EESpecProfile
        at
org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.prepareContext(TomcatServletWebServerFactory.java:244)
~[spring-boot-3.0.0-RC2.jar:3.0.0-RC2]
        at
org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getWebServer(TomcatServletWebServerFactory.java:209)
~[spring-boot-3.0.0-RC2.jar:3.0.0-RC2]
        at
org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:183)
~[spring-boot-3.0.0-RC2.jar:3.0.0-RC2]
        at
org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:161)
~[spring-boot-3.0.0-RC2.jar:3.0.0-RC2]
        ... 8 common frames omitted
Caused by: java.lang.ClassNotFoundException:
org.apache.tomcat.jakartaee.EESpecProfile
        at
java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
~[na:na]
        at
java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
~[na:na]
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
~[na:na]
        ... 12 common frames omitted

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  03:13 min
[INFO] Finished at: 2022-11-17T17:12:31+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal
org.springframework.boot:spring-boot-maven-plugin:3.0.0-RC2:run (default-cli)
on project rest-service-initial: Process terminated with exit code: 1 -> [Help
1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e
switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please
read the following articles:
[ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException


If I change the version to either tomcat 10.1.1 or tomcat 10.1.0 in my pom.xml
file there is no error and the embedded server starts.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 66353] java.lang.NoClassDefFoundError: org/apache/tomcat/jakartaee/EESpecProfile

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66353

Andrea Luciano <an...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All

--- Comment #1 from Andrea Luciano <an...@gmail.com> ---
https://github.com/spring-projects/spring-boot/issues/33243

Spring says: This is due to a bug in Tomcat and is why our dependency
management still uses 10.1.1. It's been fixed in 10.1.3 snapshots.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 66353] java.lang.NoClassDefFoundError: org/apache/tomcat/jakartaee/EESpecProfile

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66353

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #2 from Mark Thomas <ma...@apache.org> ---


*** This bug has been marked as a duplicate of bug 66348 ***

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org