Deploying a Microprofile JWT web app fails to a bootable hollow jar

50 views
Skip to first unread message

ralfbat...@gmail.com

unread,
Sep 18, 2024, 12:09:59 PM9/18/24
to WildFly
Dear experts

I am not sure what I am doing wrong.

The bootable hollow jar is created with <layer>microprofile-platform</layer>.

The log shows activating the the sub system as expected WFLYJWT0001: Activating MicroProfile JWT Subsystem

But for some reasons, deploying the war app via cli commend fails with 

Caused by: java.lang.NoClassDefFoundError: org/eclipse/microprofile/jwt/JsonWebToken

The Microprofile JWT API is not exposed, and I am lost to identify the root cause.

I can't attach the log file but here are the relevant logs:

17:42:02,745 INFO  [org.wildfly.extension.microprofile.jwt.smallrye] (ServerService Thread Pool -- 47) WFLYJWT0001: Activating MicroProfile JWT Subsystem
17:42:02,746 INFO  [org.wildfly.extension.microprofile.telemetry] (ServerService Thread Pool -- 49) WFLYMPTEL0001: Activating MicroProfile Telemetry Subsystem
17:42:02,755 WARN  [org.wildfly.extension.elytron] (MSC service thread 1-6) WFLYELY00023: KeyStore file 'C:\.....configuration\application.keystore' does not exist. Used blank.
17:42:02,759 WARN  [org.wildfly.extension.elytron] (MSC service thread 1-6) WFLYELY01084: KeyStore C:\......\application.keystore not found, it will be auto-generated on first use with a self-signed certificate for host localhost
17:42:02,760 WARN  [org.jboss.as.domain.http.api.undertow] (MSC service thread 1-7) WFLYDMHTTP0003: Unable to load console module for slot main, disabling console
17:42:02,761 INFO  [org.jboss.as.naming] (ServerService Thread Pool -- 50) WFLYNAM0001: Activating Naming Subsystem
17:42:02,766 INFO  [org.wildfly.extension.microprofile.health.smallrye] (ServerService Thread Pool -- 46) WFLYMPHEALTH0001: Activating MicroProfile Health Subsystem
17:42:02,785 INFO  [org.wildfly.extension.io] (ServerService Thread Pool -- 39) WFLYIO001: Worker 'default' has auto-configured to 24 IO threads with 192 max task threads based on your 12 available processors
17:42:02,816 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-4) WFLYUT0003: Undertow 2.3.15.Final starting
17:42:02,820 INFO  [org.jboss.as.connector] (MSC service thread 1-4) WFLYJCA0009: Starting Jakarta Connectors Subsystem (WildFly/IronJacamar 3.0.9.Final)
17:42:02,844 INFO  [org.jboss.as.naming] (MSC service thread 1-4) WFLYNAM0003: Starting Naming Service
17:42:02,863 INFO  [org.wildfly.extension.undertow] (ServerService Thread Pool -- 56) WFLYUT0014: Creating file handler for path 'C:/...../browser' with options [directory-listing: 'false', follow-symlink: 'false', case-sensitive: 'true', safe-symlink-paths: '[]']
17:42:02,876 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-6) WFLYUT0012: Started server default-server.
17:42:02,878 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-6) Queuing requests.
17:42:02,880 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-6) WFLYUT0018: Host default-host starting
17:42:02,906 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-8) WFLYUT0006: Undertow HTTPS listener https listening on 127.0.0.1:8428
17:42:02,978 INFO  [org.wildfly.security] (MSC service thread 1-5) ELY01146: LDAP Realm unable to register listener, defering action.
17:42:02,979 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) WFLYSRV0027: Starting deployment of "rno-login-internal.war" (runtime-name: "rno-login-internal.war")
17:42:03,440 WARN  [org.jboss.weld.deployer] (MSC service thread 1-8) WFLYWELD0018: Found both WEB-INF/beans.xml and WEB-INF/classes/META-INF/beans.xml. It is not portable to use both locations at the same time. Weld is going to use the former location for this deployment.
17:42:03,532 INFO  [org.jboss.weld.deployer] (MSC service thread 1-8) WFLYWELD0003: Processing weld deployment rno-login-internal.war
17:42:03,683 INFO  [org.hibernate.validator.internal.util.Version] (MSC service thread 1-8) HV000001: Hibernate Validator 8.0.1.Final
17:42:03,911 INFO  [org.jboss.weld.Version] (MSC service thread 1-2) WELD-000900: 5.1.2 (Final)
17:42:04,224 INFO  [org.jboss.weld.Bootstrap] (Weld Thread Pool -- 1) WELD-000119: Not generating any bean definitions from com.swx.ptp.rno.domain.gateway.resource.AuthenticationResource because of underlying class loading error: Type org.eclipse.microprofile.jwt.JsonWebToken from [Module "deployment.rno-login-internal.war" from Service Module Loader] not found.  If this is unexpected, enable DEBUG logging to see the full error.
17:42:04,704 INFO  [org.wildfly.extension.microprofile.openapi.smallrye] (MSC service thread 1-1) WFLYMPOAI0004: Registered MicroProfile OpenAPI endpoint '/openapi' for host 'default-host'
17:42:04,842 INFO  [org.jboss.resteasy.resteasy_jaxrs.i18n] (ServerService Thread Pool -- 61) RESTEASY002225: Deploying jakarta.ws.rs.core.Application: class com.swx.ptp.rno.domain.gateway.resource.RestApplication
17:42:04,855 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 61) MSC000001: Failed to start service jboss.deployment.unit."rno-login-internal.war".undertow-deployment: org.jboss.msc.service.StartException in service jboss.deployment.unit."rno-login-internal.war".undertow-deployment: java.lang.NoClassDefFoundError: org/eclipse/microprofile/jwt/JsonWebToken
at org.wildfly.ext...@33.0.1.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:73)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at org.jbos...@2.4.0.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jbos...@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
at org.jbos...@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
at org.jbos...@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
at java.base/java.lang.Thread.run(Thread.java:833)
at org.jbos...@2.4.0.Final//org.jboss.threads.JBossThread.run(JBossThread.java:513)
Caused by: java.lang.NoClassDefFoundError: org/eclipse/microprofile/jwt/JsonWebToken
at java.base/java.lang.Class.getDeclaredFields0(Native Method)
at java.base/java.lang.Class.privateGetDeclaredFields(Class.java:3297)


Any hint what I do wrong are very appreciated. 
Ralf
Reply all
Reply to author
Forward
0 new messages