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

Using own CustomRealm, CustomModificationRealm and CustomRealmMapper implementation leads to AbstractMethodError.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Blocker Blocker
    • None
    • 7.1.0.DR13
    • Security
    • None
    • Hide

      Add user and group
      ./bin/add-user.sh -u duke -p password1 -g JBossAdmin -a

      Add new modules with custom implementation
      ./bin/jboss-cli.sh

      embed-server
      module add --name=org.jboss.custommodifiablerealmimpl --dependencies=org.wildfly.extension.elytron,org.wildfly.security.elytron --resources=/tmp/custommodifiablerealmimpl.jar
      module add --name=org.jboss.customrealmimpl --dependencies=org.wildfly.extension.elytron,org.wildfly.security.elytron --resources=/tmp/customrealmimpl.jar
      module add --name=org.jboss.customrealmmapperimpl --dependencies=org.wildfly.extension.elytron,org.wildfly.security.elytron --resources=/tmp/customrealmmapperimpl.jar
      stop-embedded-server
      

      Deploy test application
      Copy attached war file print-roles.war to JBOSS_HOME/standalone/deployments

      Copy configuration files from attachment to your server
      standalone-full.custommodifiablerealmimpl.xml, standalone-full.customrealmimpl.xml, standalone-full.customrealmmapperimpl.xml

      Run server with given configuration - Elytron is set

      ./bin/standalone.sh -c=standalone-full.custommodifiablerealmimpl.xml
      
      ./bin/standalone.sh -c=standalone-full.customrealmimpl.xml
      
      ./bin/standalone.sh -c=standalone-full.customrealmmapperimpl.xml
      

      Invoke test app (if necessary)
      http://127.0.0.1:8080/print-roles/protected/printRoles?role=JBossAdmin

      Now you can see error message about AbstractMethodError.
      For example:

      java.lang.AbstractMethodError: Method org/wildfly/extras/creaper/commands/elytron/realm/AddCustomModifiableRealmImpl.getEvidenceVerifySupport(Ljava/lang/Class;Ljava/lang/String;)Lorg/wildfly/security/auth/SupportLevel; is abstract    
      

      Whole stack trace

      2017-03-07 15:19:58,926 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 68) MSC000001: Failed to start service jboss.undertow.deployment.default-server.default-host./print-roles: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./print-roles: java.lang.AbstractMethodError: Method org/wildfly/extras/creaper/commands/elytron/realm/AddCustomRealmImpl.getEvidenceVerifySupport(Ljava/lang/Class;Ljava/lang/String;)Lorg/wildfly/security/auth/SupportLevel; is abstract
      	at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:84)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      	at org.jboss.threads.JBossThread.run(JBossThread.java:320)
      Caused by: java.lang.AbstractMethodError: Method org/wildfly/extras/creaper/commands/elytron/realm/AddCustomRealmImpl.getEvidenceVerifySupport(Ljava/lang/Class;Ljava/lang/String;)Lorg/wildfly/security/auth/SupportLevel; is abstract
      	at org.wildfly.extras.creaper.commands.elytron.realm.AddCustomRealmImpl.getEvidenceVerifySupport(AddCustomRealmImpl.java)
      	at org.wildfly.security.auth.server.SecurityDomain.lambda$getEvidenceVerifySupport$12(SecurityDomain.java:457)
      	at org.wildfly.security.auth.server.SecurityDomain.getSupportLevel(SecurityDomain.java:484)
      	at org.wildfly.security.auth.server.SecurityDomain.getEvidenceVerifySupport(SecurityDomain.java:455)
      	at org.wildfly.security.auth.server.SecurityDomain.getEvidenceVerifySupport(SecurityDomain.java:473)
      	at org.wildfly.security.auth.server.AbstractMechanismAuthenticationFactory.getMechanismNames(AbstractMechanismAuthenticationFactory.java:96)
      	at org.wildfly.security.auth.server.HttpAuthenticationFactory.getMechanismNames(HttpAuthenticationFactory.java:50)
      	at org.wildfly.extension.undertow.ApplicationSecurityDomainDefinition$ApplicationSecurityDomainService.initialSecurityHandler(ApplicationSecurityDomainDefinition.java:461)
      	at org.wildfly.extension.undertow.ApplicationSecurityDomainDefinition$ApplicationSecurityDomainService.lambda$applyElytronSecurity$2(ApplicationSecurityDomainDefinition.java:425)
      	at io.undertow.servlet.core.DeploymentManagerImpl.setupSecurityHandlers(DeploymentManagerImpl.java:415)
      	at io.undertow.servlet.core.DeploymentManagerImpl.access$600(DeploymentManagerImpl.java:119)
      	at io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl.java:211)
      	at io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl.java:174)
      	at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:42)
      	at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
      	at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1704)
      	at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1704)
      	at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1704)
      	at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1704)
      	at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:239)
      	at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:99)
      	at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:81)
      	... 6 more
      
      2017-03-07 15:19:58,931 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "print-roles.war")]) - failure description: {
          "WFLYCTL0080: Failed services" => {"jboss.undertow.deployment.default-server.default-host./print-roles" => "org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./print-roles: java.lang.AbstractMethodError: Method org/wildfly/extras/creaper/commands/elytron/realm/AddCustomRealmImpl.getEvidenceVerifySupport(Ljava/lang/Class;Ljava/lang/String;)Lorg/wildfly/security/auth/SupportLevel; is abstract
          Caused by: java.lang.AbstractMethodError: Method org/wildfly/extras/creaper/commands/elytron/realm/AddCustomRealmImpl.getEvidenceVerifySupport(Ljava/lang/Class;Ljava/lang/String;)Lorg/wildfly/security/auth/SupportLevel; is abstract"},
          "WFLYCTL0412: Required services that are not installed:" => ["jboss.undertow.deployment.default-server.default-host./print-roles"]
      }
      
      Show
      Add user and group ./bin/add-user.sh -u duke -p password1 -g JBossAdmin -a Add new modules with custom implementation ./bin/jboss-cli.sh embed-server module add --name=org.jboss.custommodifiablerealmimpl --dependencies=org.wildfly.extension.elytron,org.wildfly.security.elytron --resources=/tmp/custommodifiablerealmimpl.jar module add --name=org.jboss.customrealmimpl --dependencies=org.wildfly.extension.elytron,org.wildfly.security.elytron --resources=/tmp/customrealmimpl.jar module add --name=org.jboss.customrealmmapperimpl --dependencies=org.wildfly.extension.elytron,org.wildfly.security.elytron --resources=/tmp/customrealmmapperimpl.jar stop-embedded-server Deploy test application Copy attached war file print-roles.war to JBOSS_HOME/standalone/deployments Copy configuration files from attachment to your server standalone-full.custommodifiablerealmimpl.xml, standalone-full.customrealmimpl.xml, standalone-full.customrealmmapperimpl.xml Run server with given configuration - Elytron is set ./bin/standalone.sh -c=standalone-full.custommodifiablerealmimpl.xml ./bin/standalone.sh -c=standalone-full.customrealmimpl.xml ./bin/standalone.sh -c=standalone-full.customrealmmapperimpl.xml Invoke test app (if necessary) http://127.0.0.1:8080/print-roles/protected/printRoles?role=JBossAdmin Now you can see error message about AbstractMethodError. For example: java.lang.AbstractMethodError: Method org/wildfly/extras/creaper/commands/elytron/realm/AddCustomModifiableRealmImpl.getEvidenceVerifySupport(Ljava/lang/ Class ;Ljava/lang/ String ;)Lorg/wildfly/security/auth/SupportLevel; is abstract Whole stack trace 2017-03-07 15:19:58,926 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 68) MSC000001: Failed to start service jboss.undertow.deployment. default -server. default -host./print-roles: org.jboss.msc.service.StartException in service jboss.undertow.deployment. default -server. default -host./print-roles: java.lang.AbstractMethodError: Method org/wildfly/extras/creaper/commands/elytron/realm/AddCustomRealmImpl.getEvidenceVerifySupport(Ljava/lang/ Class ;Ljava/lang/ String ;)Lorg/wildfly/security/auth/SupportLevel; is abstract at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:84) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang. Thread .run( Thread .java:745) at org.jboss.threads.JBossThread.run(JBossThread.java:320) Caused by: java.lang.AbstractMethodError: Method org/wildfly/extras/creaper/commands/elytron/realm/AddCustomRealmImpl.getEvidenceVerifySupport(Ljava/lang/ Class ;Ljava/lang/ String ;)Lorg/wildfly/security/auth/SupportLevel; is abstract at org.wildfly.extras.creaper.commands.elytron.realm.AddCustomRealmImpl.getEvidenceVerifySupport(AddCustomRealmImpl.java) at org.wildfly.security.auth.server.SecurityDomain.lambda$getEvidenceVerifySupport$12(SecurityDomain.java:457) at org.wildfly.security.auth.server.SecurityDomain.getSupportLevel(SecurityDomain.java:484) at org.wildfly.security.auth.server.SecurityDomain.getEvidenceVerifySupport(SecurityDomain.java:455) at org.wildfly.security.auth.server.SecurityDomain.getEvidenceVerifySupport(SecurityDomain.java:473) at org.wildfly.security.auth.server.AbstractMechanismAuthenticationFactory.getMechanismNames(AbstractMechanismAuthenticationFactory.java:96) at org.wildfly.security.auth.server.HttpAuthenticationFactory.getMechanismNames(HttpAuthenticationFactory.java:50) at org.wildfly.extension.undertow.ApplicationSecurityDomainDefinition$ApplicationSecurityDomainService.initialSecurityHandler(ApplicationSecurityDomainDefinition.java:461) at org.wildfly.extension.undertow.ApplicationSecurityDomainDefinition$ApplicationSecurityDomainService.lambda$applyElytronSecurity$2(ApplicationSecurityDomainDefinition.java:425) at io.undertow.servlet.core.DeploymentManagerImpl.setupSecurityHandlers(DeploymentManagerImpl.java:415) at io.undertow.servlet.core.DeploymentManagerImpl.access$600(DeploymentManagerImpl.java:119) at io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl.java:211) at io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl.java:174) at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:42) at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43) at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1704) at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1704) at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1704) at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1704) at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:239) at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:99) at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:81) ... 6 more 2017-03-07 15:19:58,931 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread ) WFLYCTL0013: Operation ( "deploy" ) failed - address: ([( "deployment" => "print-roles.war" )]) - failure description: { "WFLYCTL0080: Failed services" => { "jboss.undertow.deployment. default -server. default -host./print-roles" => "org.jboss.msc.service.StartException in service jboss.undertow.deployment. default -server. default -host./print-roles: java.lang.AbstractMethodError: Method org/wildfly/extras/creaper/commands/elytron/realm/AddCustomRealmImpl.getEvidenceVerifySupport(Ljava/lang/ Class ;Ljava/lang/ String ;)Lorg/wildfly/security/auth/SupportLevel; is abstract Caused by: java.lang.AbstractMethodError: Method org/wildfly/extras/creaper/commands/elytron/realm/AddCustomRealmImpl.getEvidenceVerifySupport(Ljava/lang/ Class ;Ljava/lang/ String ;)Lorg/wildfly/security/auth/SupportLevel; is abstract "}, "WFLYCTL0412: Required services that are not installed:" => [ "jboss.undertow.deployment. default -server. default -host./print-roles" ] }

      Using own CustomRealm, CustomModifiableRealm and CustomRealmMapper implementation leads to AbstractMethodError.

      I tried create my own implementation, set up server to use it but I get error message about AbstractMethodError.

      You can see bellow how to reproduce this problem. I attached jar files with implementation where are located .java files too.

              Unassigned Unassigned
              hsvabek_jira Hynek Švábek (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: