0

Currently i am using wso2 identity server v5.11.0 and my major use cases is xacml policy based authorization that uses a attribute finder extension to resolve attributes of policies to serve as PIP for policy evaluation. Now we want to upgrade the identity server to v7.0.0 and to do so i have just changed identity server version on doing so, some of the java classes of the attribute finder extension throwing NoClassDefFoundError (Even though their are .class files in the jar package and working fine with v5.11.0). Can anyone help me with this what i am missing here. Do i need to change my Pom file and how can i find the upgrade guide for this. The v7.0.0 guide didn't even talked about the core architecture and other things related policies.

I have searched through the new documentation but didn't find any clue related to policies and PIP part of the Identity server. I have tried all the possible combinations of upgrading different dependencies of the attribute finder extension to their latest version too.

Edit: Error log while initialising Attribute finders

At the line 34 i am creating an object of a resolver class. Also this class is present in the jar i mean the '.class' file. And it was working fine until v5.11.0 but when i used the same jar in v7.0.0 Identity server it is throwing this error. resolver = new APIAttributeResolver(scheme, host);

2
  • could you please add the exact noClassDefFound error that you encountered? Commented Jun 27 at 16:40
  • I have added the screenshot. If it is a classpath issue why it is working fine with v5.11.0. And the new documentation doesn't include anything about Policy Information Point/ Attribute finder for the xacml policies Commented Jun 28 at 6:02

1 Answer 1

0

Ensure that all necessary classes are included in the JAR file and correctly packaged. Sometimes, classpath issues can cause NoClassDefFoundError.

Extract the jar and check whether it has all the classes

Check for Deprecated Classes or Methods:

Verify if any classes or methods used in your attribute finder extension are deprecated or removed in v7.0.0. Refactor the code to use the updated classes or methods.

Review the release notes and migration guide for WSO2 Identity Server v7.0.0 to understand any breaking changes or updates in the dependencies.

5
  • v7's deprecation or documentation guides doesn't even include Attribute finder extension. And the class for which it is showing NoClassDefFoundError is just a local java class not an external dependency Commented Jun 28 at 6:37
  • Can you share the stack trace pls? Commented Jun 28 at 16:48
  • Sure, here is the link Commented Jun 30 at 10:11
  • ``` <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-pool2</artifactId> <version>2.11.1</version> </dependency> ``` can you add this dependency to the pom file Make sure your OSGi bundle's MANIFEST.MF file imports the required packages. Import-Package: org.apache.commons.pool2.impl;version="[2.0.0,3.0.0)" Commented Jul 1 at 6:26
  • No, this is not working. Commented Jul 2 at 5:11

Not the answer you're looking for? Browse other questions tagged or ask your own question.