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...
as
org.wso2.carbon.identity.oauth.stub-4.2.2.jar
osgi bundle, therefore need put bundle in/repository/components/dropins
. jar files put inlib
directory, not osgi bundlesthere 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 usingfeature manager
management ui (oauth mediator feature packedorg.wso2.carbon.identity.oauth.stub
jar file.)
Comments
Post a Comment