Reputation: 299
I recently updated my environment from WSO2 IS 5.0.0 to WSO2 IS 5.2.0. My environment consists of 2 machines that are creating a cluster (using the WKA membership scheme and Load Balancer(AWS ELB) with sticky session enabled). I am using MySQL(not the default H2 database). The machines on which the IS is deployed are Windows Server 2012 R2 (EC2 AWS machines).
In the IS 5.0.0 version we had custom grant OAuth grant type. It was implemented following the article below:
https://docs.wso2.com/display/IS500/Writing+a+Custom+OAuth+2.0+Grant+Type
After the upgrade process, the .jar file was added in the [IS_HOME]\repository\components\lib and the system was started successfully without errors in the console.log. But then when we started calling the token endpoint, the systems tarted to error out:
https://slack-files.com/T0DDMMC9Y-F2QRF2JLA-bcd85857dc
https://slack-files.com/T0DDMMC9Y-F2QRFES10-ab528f64e5
Then we rebuilt the custom OAuth grant type. We updated the org.wso2.carbon.identity.oauth_4.2.3.jar to version 4.2.7. We followed these article:
https://docs.wso2.com/display/IS520/Extension+Points+for+OAuth#ExtensionPointsforOAuth-CustomOAuthgranthandler
https://docs.wso2.com/display/IS520/Writing+a+Custom+OAuth+2.0+Grant+Type
But still when we enable the custom grant type and the start calling the token endpoint, the mentioned above errors are logged in the console.log and are returned as response by the tomcat server.
After we implemented some adjustments in order to resolve some of the issues, we have progress, but this still we do not have a complete solution:
https://slack-files.com/T0DDMMC9Y-F2S5LKT6V-560a2854ea
Could this be related to some issues while migrating from 5.0.0 to 5.2.0, or this is some sort of configuration issue with Tomcat server? Or this is related to the grant type itself? We followed all the instructions as we did with IS 5.0.0 but we are not able to make it run on IS 5.2.0.
Thanks in advance.
Upvotes: 0
Views: 233
Reputation: 3011
The root cause for this is,
Caused by: java.lang.ClassNotFoundException: org.apache.amber.oauth2.common.validators.AbstractValidator
Amber library is no longer used by WSO2 IS. Therefore amber library is not available in the IS 5.2.0 runtime causing the class not found error. Instead, we are using Apache Oltu instead in 5.2.0
You can simply fix this by copying the amber amber_0.22.1358727.wso2v4.jar found in IS_HOME/repository/components/plugins of IS 5.0.0 to IS_HOME/repository/components/dropins.
Update :
Another reason why this extension was not working was the use of a class that was not exported by the OAuth osgi bundle at runtime.
Upvotes: 1