Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix role loading issue in MI dashboard with correlation logs enabled #4048

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import org.wso2.micro.integrator.security.util.Secret;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
import java.util.ArrayList;
Expand Down Expand Up @@ -723,7 +724,18 @@ public LdapContextInvocationHandler(Object previousContext) {
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {

long start = System.currentTimeMillis();
Object result = method.invoke(this.previousContext, args);
Object result;
try {
result = method.invoke(this.previousContext, args);
} catch (InvocationTargetException e) {
Throwable cause = e.getCause();

if (cause instanceof NamingException) {
throw (NamingException) cause; // Properly declared exception
}

throw new RuntimeException("Exception in LDAP proxy method: " + method.getName(), cause);
}
long delta = System.currentTimeMillis() - start;
String methodName = method.getName();
int argsLength = 0;
Expand Down
Loading