Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-19164

(7.3.z) JwtActivationProcessor throws NPE when LoginConfig#realmName not declared

XMLWordPrintable

    • +
    • Workaround Exists
    • Hide

      Define the auth-method within a web.xml deployment descriptor, the web.xml takes priority over the annotation so the code triggering the NPE will be skipped if already defined in the web.xml.

      Show
      Define the auth-method within a web.xml deployment descriptor, the web.xml takes priority over the annotation so the code triggering the NPE will be skipped if already defined in the web.xml.

      When starting a Microprofile application utilizing the org.eclipse.microprofile.auth.LoginConfig annotation, a NullPointerException is thrown if the annotation does not declare the realmName property.

      ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) {} MSC000001: Failed to start service jboss.deployment.unit."example.war".PARSE: org.jboss.msc.service.StartException in service jboss.deployment.unit."example.war".PARSE: WFLYSRV0153: Failed to process phase PARSE of deployment "example.war"
              at org.jboss.as.server@11.0.0.Final//org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:183)
              at org.jboss.msc@1.4.11.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1739)
              at org.jboss.msc@1.4.11.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1701)
              at org.jboss.msc@1.4.11.Final//org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1559)
              at org.jboss.threads@2.3.3.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
              at org.jboss.threads@2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
              at org.jboss.threads@2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
              at org.jboss.threads@2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
              at java.base/java.lang.Thread.run(Unknown Source)
      Caused by: java.lang.NullPointerException
              at org.wildfly.extension.microprofile.jwt-smallrye@19.0.0.Final//org.wildfly.extension.microprofile.jwt.smallrye.JwtActivationProcessor.deploy(JwtActivationProcessor.java:80)
              at org.jboss.as.server@11.0.0.Final//org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:176)
              ... 8 more
      

              darran.lofthouse@redhat.com Darran Lofthouse
              rhn-support-iweiss Ingo Weiss
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: