My Oracle Support Banner

Error Java.lang.Exception: Refresh Token Is Not Available When Consuming Rest API With OAuth2.0 (Doc ID 2799485.1)

Last updated on AUGUST 14, 2021

Applies to:

Oracle Integration-OIC - Version 21.2.2.0.0 and later
Information in this document applies to any platform.

Symptoms

The following error occurs when attempting to consume a REST API with OAuth 2.0.

 

"Fault Details : \n<nsmpr1:APIInvocationError xmlns:nsmpr1=\"http://xmlns.oracle.com/cloud/generic/rest/fault/REST/ConsultaTC"><nsmpr1:type/><nsmpr1:title/><nsmpr1:detail/><nsmpr1:errorCode/><nsmpr1:errorDetails><nsmpr1:type/><nsmpr1:title>Non-http status code</nsmpr1:title><nsmpr1:errorCode>REST_REQ_HDR_ERR</nsmpr1:errorCode><nsmpr1:errorPath>&lt;![CDATA[An error occurred while processing headers in the target REST endpoint.]]&gt;</nsmpr1:errorPath><nsmpr1:instance>&lt;![CDATA[Target REST endpoint headers could not be set.[[java.lang.Exception: Refresh Token is not available]]]]&gt;</nsmpr1:instance></nsmpr1:errorDetails></nsmpr1:APIInvocationError>\n:Application Error",
           "o:errorPath": "NA",
           "o:errorCode": "NA"

 

java.lang.IllegalStateException: OAUTH security provider is not provided hence generic OAUTH is not supported.[[
java.lang.IllegalStateException: OAUTH security provider is not provided hence generic OAUTH is not supported.
at oracle.cloud.security.oauth.client.util.OAuthUtil.getTwoLeggedOAuthAccessToken(OAuthUtil.java:1677)
at oracle.tip.tools.ide.adapters.rest.plugin.RestCloudConnection.testPing(RestCloudConnection.java:290)
at oracle.tip.tools.ide.adapters.rest.plugin.RestCloudConnection.ping(RestCloudConnection.java:158)
at oracle.ics.webconsole.model.manager.AppConfigManager.testApplicationInstance(AppConfigManager.java:2476)
at oracle.ics.services.rest.suite.v1.implementation.ConnectionResourceBuilderImpl.validateConnectionMultipart(ConnectionResourceBuilderImpl.java:2263)
at oracle.ics.services.rest.suite.v1.implementation.ConnectionResourceBuilderImpl.testConnection(ConnectionResourceBuilderImpl.java:448)
at oracle.ics.services.rest.suite.v1.ConnectionSuiteRestService.testConnectionWithAttachments(ConnectionSuiteRestService.java:441)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161)
at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102)

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.