[jboss-jira] [JBoss JIRA] (WFLY-8313) Using own CustomRealm, CustomModificationRealm and CustomRealmMapper implementation leads to AbstractMethodError.
Hynek Švábek (JIRA)
issues at jboss.org
Tue Mar 7 09:44:00 EST 2017
[ https://issues.jboss.org/browse/WFLY-8313?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hynek Švábek updated WFLY-8313:
-------------------------------
Steps to Reproduce:
*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
{code}
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
{code}
*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*
{code}
./bin/standalone.sh -c=standalone-full.custommodifiablerealmimpl.xml
{code}
{code}
./bin/standalone.sh -c=standalone-full.customrealmimpl.xml
{code}
{code}
./bin/standalone.sh -c=standalone-full.customrealmmapperimpl.xml
{code}
*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:
{code}
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
{code}
Whole stack trace
{code:collapse=true}
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"]
}
{code}
was:
*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
{code}
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
{code}
*Deploy test application*
Copy attached war file print-roles.war to JBOSS_HOME/standalone/deployments
*Run server with given configuration - Elytron is set*
{code}
./bin/standalone.sh -c=standalone-full.custommodifiablerealmimpl.xml
{code}
{code}
./bin/standalone.sh -c=standalone-full.customrealmimpl.xml
{code}
{code}
./bin/standalone.sh -c=standalone-full.customrealmmapperimpl.xml
{code}
*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:
{code}
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
{code}
Whole stack trace
{code:collapse=true}
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"]
}
{code}
> Using own CustomRealm, CustomModificationRealm and CustomRealmMapper implementation leads to AbstractMethodError.
> -----------------------------------------------------------------------------------------------------------------
>
> Key: WFLY-8313
> URL: https://issues.jboss.org/browse/WFLY-8313
> Project: WildFly
> Issue Type: Bug
> Components: Security
> Reporter: Hynek Švábek
> Assignee: Darran Lofthouse
> Priority: Critical
>
> 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.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
More information about the jboss-jira
mailing list