My Oracle Support Banner

OAuth2 Security Configuration For BPEL Services -oracle.security.jps.internal.credstore.GenericCredentialImpl cannot be cast to oracle.security.jps.service.credstore.PasswordCredential (Doc ID 2750229.1)

Last updated on FEBRUARY 08, 2021

Applies to:

Oracle Platform Security for Java - Version 12.2.1.4.0 and later
Information in this document applies to any platform.

Symptoms

On : 12.2.1.4.0 version, Java Platform Security

After the customer followed the configuration of OAuth2 Security for the BPEL web service calls, they are getting below error

 

Following below docs to setup oauth2

https://docs.oracle.com/en/middleware/fusion-middleware/ws-manager/12.2.1.4/use-case/securing-restful-web-services-using-owsm-oauth-2.0-idcs-oauth-2.0.html#GUID-93B8DFA0-FC0E-4F0D-96BC-4A761C15D72A


* Max Heap size: 2976907264
** Free Heap size: 476399672 oracle.fabric.common.FabricInvocationException: javax.ws.rs.ProcessingException: java.io.IOException: oracle.wsm.common.sdk.WSMException: GenericFault : generic error
at oracle.integration.platform.blocks.rest.bc.reference.RestReference.request(RestReference.java:330)
at oracle.integration.platform.blocks.rest.bc.reference.RestReferenceBindingComponent.request(RestReferenceBindingComponent.java:260)
at oracle.integration.platform.blocks.mesh.SynchronousMessageHandler.doRequest(SynchronousMessageHandler.java:151)
at oracle.integration.platform.blocks.mesh.MessageRouter.request(MessageRouter.java:219)
at oracle.integration.platform.blocks.mesh.MeshImpl.request(MeshImpl.java:285)
at sun.reflect.GeneratedMethodAccessor2409.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at oracle.integration.platform.metrics.PhaseEventAspect.invoke(PhaseEventAspect.java:69)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
at com.sun.proxy.$Proxy462.request(Unknown Source)
at oracle.fabric.CubeServiceEngine.requestToMesh(CubeServiceEngine.java:1195)
at com.collaxa.cube.ws.WSInvocationManager.invoke0(WSInvocationManager.java:263)
at com.collaxa.cube.ws.WSInvocationManager.invoke(WSInvocationManager.java:333)
at com.collaxa.cube.engine.ext.common.InvokeHandler.__invoke(InvokeHandler.java:1477)
at com.collaxa.cube.engine.ext.common.InvokeHandler.handleNormalWSDLInvoke(InvokeHandler.java:815)
at com.collaxa.cube.engine.ext.common.InvokeHandler.handleNormalInvoke(InvokeHandler.java:506)
at com.collaxa.cube.engine.ext.common.InvokeHandler.handle(InvokeHandler.java:157)
at com.collaxa.cube.engine.ext.bpel.common.wmp.BPELInvokeWMP.__executeStatements(BPELInvokeWMP.java:78)
at com.collaxa.cube.engine.ext.bpel.common.wmp.BaseBPELActivityWMP$1.call(BaseBPELActivityWMP.java:197)
at com.collaxa.cube.engine.ext.bpel.common.wmp.BaseBPELActivityWMP$1.call(BaseBPELActivityWMP.java:195)
at com.collaxa.bpel.sws.SWSComponentProcessActivityWrapper$1.call(SWSComponentProcessActivityWrapper.java:74)
at com.collaxa.bpel.sws.SWSCallableActivityWrapper.execute(SWSCallableActivityWrapper.java:89)
at com.collaxa.bpel.sws.SWSComponentProcessActivityWrapper.execute(SWSComponentProcessActivityWrapper.java:82)
at com.collaxa.cube.engine.ext.bpel.common.wmp.BaseBPELActivityWMP.perform(BaseBPELActivityWMP.java:205)
at com.collaxa.cube.engine.CubeEngine.performActivity(CubeEngine.java:2932)
at com.collaxa.cube.engine.CubeEngine._handleWorkItem(CubeEngine.java:1295)
at com.collaxa.cube.engine.CubeEngine.handleWorkItem(CubeEngine.java:1184)
at com.collaxa.cube.engine.dispatch.message.instance.PerformMessageHandler.handleLocal(PerformMessageHandler.java:92)
at com.collaxa.cube.engine.dispatch.DispatchHelper.handleLocalMessage(DispatchHelper.java:300)
at com.collaxa.cube.engine.dispatch.DispatchHelper.sendMemory(DispatchHelper.java:379)
at com.collaxa.cube.engine.CubeEngine.endRequest(CubeEngine.java:4972)
at com.collaxa.cube.engine.CubeEngine.endRequest(CubeEngine.java:4896)
at com.collaxa.cube.engine.CubeEngine._createAndInvoke(CubeEngine.java:782)
at com.collaxa.cube.engine.CubeEngine.createAndInvoke(CubeEngine.java:615)
at com.collaxa.cube.engine.ejb.impl.CubeEngineBean.createAndInvoke(CubeEngineBean.java:138)
at com.collaxa.cube.engine.ejb.impl.CubeEngineBean.syncCreateAndInvokeParticipate(CubeEngineBean.java:231)
at com.collaxa.cube.engine.ejb.impl.bpel.BPELEngineBean_uhguq6_ICubeEngineLocalBeanImpl.__WL_invoke(Unknown Source)
at weblogic.ejb.container.internal.SessionLocalMethodInvoker.invoke(SessionLocalMethodInvoker.java:33)
at com.collaxa.cube.engine.ejb.impl.bpel.BPELEngineBean_uhguq6_ICubeEngineLocalBeanImpl.syncCreateAndInvokeParticipate(Unknown Source)
at com.collaxa.cube.engine.delivery.DeliveryHandler.callCreateAndInvoke(DeliveryHandler.java:978)
at com.collaxa.cube.engine.delivery.DeliveryHandler.initialRequest(DeliveryHandler.java:670)
at com.collaxa.cube.engine.delivery.DeliveryHandler.request(DeliveryHandler.java:286)
at com.collaxa.cube.engine.delivery.DeliveryHandler.request(DeliveryHandler.java:1130)
at oracle.fabric.CubeServiceEngine.request(CubeServiceEngine.java:658)
at oracle.integration.platform.blocks.mesh.SynchronousMessageHandler.doRequest(SynchronousMessageHandler.java:151)
at oracle.integration.platform.blocks.mesh.MessageRouter.request(MessageRouter.java:219)
at oracle.integration.platform.blocks.mesh.MeshImpl.request(MeshImpl.java:285)
at sun.reflect.GeneratedMethodAccessor2409.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at oracle.integration.platform.metrics.PhaseEventAspect.invoke(PhaseEventAspect.java:57)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
at com.sun.proxy.$Proxy462.request(Unknown Source)
at oracle.integration.platform.blocks.soap.WebServiceEntryBindingComponent.doMessageProcessing(WebServiceEntryBindingComponent.java:2472)
at oracle.integration.platform.blocks.soap.WebServiceEntryBindingComponent.processIncomingMessage(WebServiceEntryBindingComponent.java:1456)
at oracle.integration.platform.blocks.soap.FabricProvider.processMessage(FabricProvider.java:119)
at oracle.j2ee.ws.server.provider.ProviderProcessor.doEndpointProcessing(ProviderProcessor.java:1364)
at oracle.j2ee.ws.server.WebServiceProcessor.invokeEndpointImplementation(WebServiceProcessor.java:1383)
at oracle.j2ee.ws.server.provider.ProviderProcessor.doRequestProcessingPhaseTwo(ProviderProcessor.java:718)
at oracle.j2ee.ws.server.WebServiceProcessor.doRequestProcessing(WebServiceProcessor.java:677)
at oracle.j2ee.ws.server.WebServiceProcessor.processRequest(WebServiceProcessor.java:248)
at oracle.j2ee.ws.server.WebServiceProcessor.doService(WebServiceProcessor.java:212)
at oracle.j2ee.ws.server.WebServiceServlet.doService(WebServiceServlet.java:700)
at oracle.j2ee.ws.server.WebServiceServlet.doPost(WebServiceServlet.java:538)
at oracle.integration.platform.blocks.soap.FabricProviderServlet.doPost(FabricProviderServlet.java:913)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:295)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:260)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:137)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:353)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:25)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78)
at oracle.integration.platform.blocks.filter.RequestPayloadSizeLimitFilter.doFilter(RequestPayloadSizeLimitFilter.java:125)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78)
at oracle.security.jps.ee.http.JpsAbsFilter$3.run(JpsAbsFilter.java:175)
at java.security.AccessController.doPrivileged(Native Method)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:650)
at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:112)
at oracle.security.jps.ee.http.JpsAbsFilter.doFilterInternal(JpsAbsFilter.java:293)
at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:150)
at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:94)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78)
at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:248)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78)
at oracle.jrf.servlet.ExtensibleGlobalFilter.doFilter(ExtensibleGlobalFilter.java:92)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3797)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3763)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:344)
at weblogic.security.service.SecurityManager.runAsForUserCode(SecurityManager.java:197)
at weblogic.servlet.provider.WlsSecurityProvider.runAsForUserCode(WlsSecurityProvider.java:203)
at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:71)
at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2451)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2299)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2277)
at weblogic.servlet.internal.ServletRequestImpl.runInternal(ServletRequestImpl.java:1720)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1680)
at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:272)
at weblogic.invocation.ComponentInvocationContextManager._runAs(ComponentInvocationContextManager.java:352)
at weblogic.invocation.ComponentInvocationContextManager.runAs(ComponentInvocationContextManager.java:337)
at weblogic.work.LivePartitionUtility.doRunWorkUnderContext(LivePartitionUtility.java:57)
at weblogic.work.PartitionUtility.runWorkUnderContext(PartitionUtility.java:41)
at weblogic.work.SelfTuningWorkManagerImpl.runWorkUnderContext(SelfTuningWorkManagerImpl.java:655)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:420)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:360)
Caused by: javax.ws.rs.ProcessingException: java.io.IOException: oracle.wsm.common.sdk.WSMException: GenericFault : generic error
at org.glassfish.jersey.client.ClientFilteringStages$RequestFilteringStage.apply(ClientFilteringStages.java:121)
at org.glassfish.jersey.client.ClientFilteringStages$RequestFilteringStage.apply(ClientFilteringStages.java:103)
at org.glassfish.jersey.process.internal.Stages.process(Stages.java:171)
at org.glassfish.jersey.client.ClientRuntime.invoke(ClientRuntime.java:255)
at org.glassfish.jersey.client.JerseyInvocation$2.call(JerseyInvocation.java:700)
at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
at org.glassfish.jersey.internal.Errors.process(Errors.java:228)
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:444)
at org.glassfish.jersey.client.JerseyInvocation.invoke(JerseyInvocation.java:696)
at org.glassfish.jersey.client.JerseyInvocation$Builder.method(JerseyInvocation.java:420)
at oracle.integration.platform.blocks.rest.bc.reference.RestResource.request(RestResource.java:125)
at oracle.integration.platform.blocks.rest.bc.reference.RestReference.request(RestReference.java:302)
... 115 more
Caused by: java.io.IOException: oracle.wsm.common.sdk.WSMException: GenericFault : generic error
at oracle.wsm.agent.handler.jaxrs.RESTClientFilter.processFilter(RESTClientFilter.java:621)
at oracle.wsm.agent.handler.jaxrs.RESTClientFilter.filter(RESTClientFilter.java:528)
at oracle.wsm.agent.handler.jaxrs.RESTClientFilterPAPIntegrator.processRequest(RESTClientFilterPAPIntegrator.java:378)
at oracle.wsm.agent.handler.jaxrs.RESTClientFilterPAPIntegrator.filter(RESTClientFilterPAPIntegrator.java:269)
at org.glassfish.jersey.client.ClientFilteringStages$RequestFilteringStage.apply(ClientFilteringStages.java:115)
... 127 more
Caused by: oracle.wsm.common.sdk.WSMException: GenericFault : generic error
at oracle.wsm.policyengine.impl.runtime.WSPolicyRuntimeExecutor.executeSimpleAssertion(WSPolicyRuntimeExecutor.java:534)
at oracle.wsm.policyengine.impl.runtime.WSPolicyRuntimeExecutor.executeAndAssertion(WSPolicyRuntimeExecutor.java:438)
at oracle.wsm.policyengine.impl.runtime.WSPolicyRuntimeExecutor.execute(WSPolicyRuntimeExecutor.java:385)
at oracle.wsm.policyengine.impl.PolicyExecutionEngine.execute(PolicyExecutionEngine.java:175)
at oracle.wsm.agent.WSMAgentProcessor.processCommon(WSMAgentProcessor.java:760)
at oracle.wsm.agent.WSMAgentProcessor.processRequest(WSMAgentProcessor.java:379)
at oracle.wsm.agent.WSMAgent.handleRequest(WSMAgent.java:517)
at oracle.wsm.agent.WSMAgent.processRequest(WSMAgent.java:415)
at oracle.wsm.agent.handler.jaxrs.RESTClientFilter.processFilter(RESTClientFilter.java:609)
... 131 more
Caused by: java.lang.ClassCastException: oracle.security.jps.internal.credstore.GenericCredentialImpl cannot be cast to oracle.security.jps.service.credstore.PasswordCredential
at oracle.wsm.security.policy.scenario.util.OAuth2TokenConfigurationUtil.getClientCreds(OAuth2TokenConfigurationUtil.java:216)
at oracle.wsm.security.policy.scenario.util.OAuth2TokenConfigurationUtil.intializeOAuth2TokenConfiguration(OAuth2TokenConfigurationUtil.java:84)
at oracle.wsm.security.policy.scenario.executor.HttpOAuth2SecurityScenarioExecutor.sendRequest(HttpOAuth2SecurityScenarioExecutor.java:151)
at oracle.wsm.security.policy.scenario.executor.SecurityScenarioExecutor.execute(SecurityScenarioExecutor.java:892)
at oracle.wsm.policyengine.impl.runtime.AssertionExecutor.execute(AssertionExecutor.java:44)
at oracle.wsm.policyengine.impl.runtime.WSPolicyRuntimeExecutor.executeSimpleAssertion(WSPolicyRuntimeExecutor.java:526)
... 139 more

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.