wso2esb - WSO2 ESB 4.8.0 - OAuth2 handler class - dependent jars org.wso2.carbon.identity.oauth.stub-4.2.2.jar -


i have custom handler validate token using oauth2 , included custom handler in rest api configuration. copied custom handler.jar /repository/components/libs directory doesn't contain (org.wso2.carbon.identity.oauth.stub-4.2.2.jar). when invoke api oauth access token getting below class not found exception.

java.lang.noclassdeffounderror: org/wso2/carbon/identity/oauth2/stub/dto/oauth2tokenvalidationrequestdto_oauth2accesstoken     @ org.wso2.handler.simpleoauthhandler.handlerequest(simpleoauthhandler.java:61)     @ org.apache.synapse.rest.api.process(api.java:285)     @ org.apache.synapse.rest.restrequesthandler.dispatchtoapi(restrequesthandler.java:76)     @ org.apache.synapse.rest.restrequesthandler.process(restrequesthandler.java:63)     @ org.apache.synapse.core.axis2.axis2synapseenvironment.injectmessage(axis2synapseenvironment.java:220)     @ org.apache.synapse.core.axis2.synapsemessagereceiver.receive(synapsemessagereceiver.java:83)     @ org.apache.axis2.engine.axisengine.receive(axisengine.java:180)     @ org.apache.synapse.transport.passthru.serverworker.processnonentityenclosingresthandler(serverworker.java:336)     @ org.apache.synapse.transport.passthru.serverworker.run(serverworker.java:168)     @ org.apache.axis2.transport.base.threads.nativeworkerpool$1.run(nativeworkerpool.java:172)     @ java.util.concurrent.threadpoolexecutor.runworker(unknown source)     @ java.util.concurrent.threadpoolexecutor$worker.run(unknown source)     @ java.lang.thread.run(unknown source) caused by: java.lang.classnotfoundexception: org.wso2.carbon.identity.oauth2.stub.dto.oauth2tokenvalidationrequestdto_oauth2accesstoken     @ org.eclipse.osgi.internal.loader.bundleloader.findclassinternal(bundleloader.java:455)     @ org.eclipse.osgi.internal.loader.bundleloader.findclass(bundleloader.java:421)     @ org.eclipse.osgi.internal.loader.bundleloader.findclass(bundleloader.java:412)     @ org.eclipse.osgi.internal.baseadaptor.defaultclassloader.loadclass(defaultclassloader.java:107)     @ java.lang.classloader.loadclass(unknown source)  best way include dependent jar - org.wso2.carbon.identity.oauth.stub-4.2.2.jar?  

there can 2 reasons this...

  1. as org.wso2.carbon.identity.oauth.stub-4.2.2.jar osgi bundle, therefore need put bundle in /repository/components/dropins . jar files put in lib directory, not osgi bundles

  2. there can other jar file in server org.wso2.carbon.identity.oauth.stub expose same classes.. if please try remove them.. example, can remove oauth mediator feature using feature manager management ui (oauth mediator feature packed org.wso2.carbon.identity.oauth.stub jar file.)


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -