Uploaded image for project: 'Keycloak'
  1. Keycloak
  2. KEYCLOAK-811

Can not use the Java Rest API anymore

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 1.0.4.Final
    • Fix Version/s: 1.1.0.Beta1
    • Component/s: None
    • Labels:
      None
    • Steps to Reproduce:
      Hide

      Create a Java client and call any Keycloak REST service on a remote Keycloak instance.

      Am using the Keycloak applicance distribution.

      Show
      Create a Java client and call any Keycloak REST service on a remote Keycloak instance. Am using the Keycloak applicance distribution.

      Description

      Hi,

      The Java Rest API is not working anymore.

      I get the following error when i do a call :

      Caused by: com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "access_token" (class org.keycloak.representations.AccessTokenResponse), not marked as ignorable (7 known properties: "tokenType", "notBeforePolicy", "token", "expiresIn", "sessionState", "refreshToken", "idToken"])

      at [Source: org.apache.http.conn.EofSensorInputStream@11b8a95d; line: 1, column: 18] (through reference chain: org.keycloak.representations.AccessTokenResponse["access_token"])

      at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:51) [jackson-databind-2.3.2.jar:2.3.2]

      at com.fasterxml.jackson.databind.DeserializationContext.reportUnknownProperty(DeserializationContext.java:671) [jackson-databind-2.3.2.jar:2.3.2]

      at com.fasterxml.jackson.databind.deser.std.StdDeserializer.handleUnknownProperty(StdDeserializer.java:771) [jackson-databind-2.3.2.jar:2.3.2]

      at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownProperty(BeanDeserializerBase.java:1297) [jackson-databind-2.3.2.jar:2.3.2]

      at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownVanilla(BeanDeserializerBase.java:1275) [jackson-databind-2.3.2.jar:2.3.2]

      at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:247) [jackson-databind-2.3.2.jar:2.3.2]

      at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:118) [jackson-databind-2.3.2.jar:2.3.2]

      at com.fasterxml.jackson.databind.ObjectReader._bind(ObjectReader.java:1233) [jackson-databind-2.3.2.jar:2.3.2]

      at com.fasterxml.jackson.databind.ObjectReader.readValue(ObjectReader.java:677) [jackson-databind-2.3.2.jar:2.3.2]

      at org.jboss.resteasy.plugins.providers.jackson.ResteasyJackson2Provider.readFrom(ResteasyJackson2Provider.java:120) [resteasy-jackson2-provider-3.0.8.Final.jar:]

      at org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.readFrom(AbstractReaderInterceptorContext.java:59) [resteasy-jaxrs-3.0.8.Final.jar:]

      at org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.proceed(AbstractReaderInterceptorContext.java:51) [resteasy-jaxrs-3.0.8.Final.jar:]

      at org.jboss.resteasy.security.doseta.DigitalVerificationInterceptor.aroundReadFrom(DigitalVerificationInterceptor.java:32) [resteasy-crypto-3.0.8.Final.jar:]

      at org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.proceed(AbstractReaderInterceptorContext.java:53) [resteasy-jaxrs-3.0.8.Final.jar:]

      at org.jboss.resteasy.plugins.interceptors.encoding.GZIPDecodingInterceptor.aroundReadFrom(GZIPDecodingInterceptor.java:59) [resteasy-jaxrs-3.0.8.Final.jar:]

      at org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.proceed(AbstractReaderInterceptorContext.java:53) [resteasy-jaxrs-3.0.8.Final.jar:]

      at org.jboss.resteasy.client.jaxrs.internal.ClientResponse.readFrom(ClientResponse.java:248) [resteasy-client-3.0.8.Final.jar:]

      ... 164 more

      This looks like a problem with Jackson in mapping JSON like names to Java Camel Case names !

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              stianst Stian Thorgersen
              Reporter:
              alexchri Alexander Chriztopher (Inactive)
              Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: