Unable to publish XACML policy in wso2 application manager and throwing NoSuchMethodError exception

大兔子大兔子 提交于 2019-12-02 04:37:30

This is not an error with XACML policy. According in to the error it clearly says that java.lang.NoSuchMethodError: org.wso2.carbon.identity.entitlement.stub.EntitlementPolicyAdminServiceStub.publishPolicies([Ljavag;Ljava/lang/String;ZI)V

So this is a problem with the web service API that you calling. It means most probably there is an API change in the web service API and some component is still calling the older API. As you have installed the XACML features in to API manager, you may have installed some older version of XACML features. However Could you please check whether there are two version of following jar file in the system.

  1. You can go to the <APIM_HOME>/repository/components/plugin directory and search for name.

org.wso2.carbon.identity.entitlement.stub

  1. If there are two jar file, please remove the one jar file (say older version)

  2. Please remove the OSGI entry for that jar file in bundle.info file which can be found at <APIM_HOME>repository/components/default/configuration/org.eclipse.equinox.simpleconfigurator directory

  3. Restart the server and try out your operation.

  4. If did not work, please remove other jar file and add older jar file and also remember add new deleted entry to above file mentioned in step3

This is not the correct way to resolve this. I guess, best thing, you can re-install the XACML features by finding correct P2 repo for the APIM version that you are using. You can find it from here

This is due to you have installed wrong feature version of XACML and XACML mediator. Please uninstall the features again using management console and reinstall the correct version.

Example: If your using WSO2 APIM 1.7

  • XACML mediator 4.2.2
  • XACML 4.2.1

is the correct versions you should select. You can find out it using this table.

Reference : https://wso2.org/jira/browse/APIMANAGER-3106

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!