[keycloak-dev] keycloak/resteasy problem

Stan Silvert ssilvert at redhat.com
Mon Jan 12 14:12:35 EST 2015


I'm trying to call the keycloak rest API using the keycloak admin 
client.  The call works fine from a web app but when I try to do the 
same thing from the keycloak subsystem I get this:

14:01:51,918 ERROR [org.jboss.msc.service.fail] (MSC service thread 
1-15) MSC000001: Failed to start service 
jboss.deployment.unit."VanillaWAR.war".REGISTER: org.jboss.ms
c.service.StartException in service 
jboss.deployment.unit."VanillaWAR.war".REGISTER: JBAS018733: Failed to 
process phase REGISTER of deployment "VanillaWAR.war"
         at 
org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:166) 
[wildfly-server-8.1.0.Final.jar:8.1.0.Final]
         at 
org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) 
[jboss-msc-1.2.2.Final.jar:1.2.2.Final]
         at 
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) 
[jboss-msc-1.2.2.Final.jar:1.2.2.Final]
         at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown 
Source) [rt.jar:1.7.0_51]
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown 
Source) [rt.jar:1.7.0_51]
         at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0_51]
Caused by: javax.ws.rs.ProcessingException: Unable to invoke request
         at 
org.jboss.resteasy.client.jaxrs.engines.ApacheHttpClient4Engine.invoke(ApacheHttpClient4Engine.java:287)
         at 
org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.invoke(ClientInvocation.java:407)
         at 
org.jboss.resteasy.client.jaxrs.internal.proxy.ClientInvoker.invoke(ClientInvoker.java:102)
         at 
org.jboss.resteasy.client.jaxrs.internal.proxy.ClientProxy.invoke(ClientProxy.java:62)
         at com.sun.proxy.$Proxy20.grantToken(Unknown Source)
         at 
org.keycloak.admin.client.token.TokenManager.grantToken(TokenManager.java:56)
         at 
org.keycloak.admin.client.token.TokenManager.getAccessToken(TokenManager.java:33)
         at 
org.keycloak.admin.client.token.TokenManager.getAccessTokenString(TokenManager.java:28)
         at org.keycloak.admin.client.Keycloak.<init>(Keycloak.java:28)
         at org.keycloak.admin.client.Keycloak.getInstance(Keycloak.java:36)
         at 
org.keycloak.subsystem.extension.SeamlessSecurityDeploymentProcessor.addDeploymentToAuthServer(SeamlessSecurityDeploymentProcessor.java:117)
         at 
org.keycloak.subsystem.extension.SeamlessSecurityDeploymentProcessor.deploy(SeamlessSecurityDeploymentProcessor.java:104)
         at 
org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:159) 
[wildfly-server-8.1.0.Final.jar:8.1.0.Final]
         ... 5 more
Caused by: javax.ws.rs.ProcessingException: could not find writer for 
content-type application/x-www-form-urlencoded type: javax.ws.rs.core.Form$1
         at 
org.jboss.resteasy.core.interception.ClientWriterInterceptorContext.throwWriterNotFoundException(ClientWriterInterceptorContext.java:40)
         at 
org.jboss.resteasy.core.interception.AbstractWriterInterceptorContext.getWriter(AbstractWriterInterceptorContext.java:138)
         at 
org.jboss.resteasy.core.interception.AbstractWriterInterceptorContext.proceed(AbstractWriterInterceptorContext.java:117)
         at 
org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.writeRequestBody(ClientInvocation.java:341)
         at 
org.jboss.resteasy.client.jaxrs.engines.ApacheHttpClient4Engine.writeRequestBodyToOutputStream(ApacheHttpClient4Engine.java:558)
         at 
org.jboss.resteasy.client.jaxrs.engines.ApacheHttpClient4Engine.buildEntity(ApacheHttpClient4Engine.java:524)
         at 
org.jboss.resteasy.client.jaxrs.engines.ApacheHttpClient4Engine.loadHttpMethod(ApacheHttpClient4Engine.java:423)
         at 
org.jboss.resteasy.client.jaxrs.engines.ApacheHttpClient4Engine.invoke(ApacheHttpClient4Engine.java:281)
         ... 17 more

Any ideas?


More information about the keycloak-dev mailing list