Skip to content

Claim manager issue at run, and problem accessing trust store #238

@tarek-madani

Description

@tarek-madani

Please help with this issue.
I followed the same steps to deploy sso samples with oidc, but when I run the dispatch or the manager application I get the following error at the begining:

26-May-2020 12:54:57.881 SEVERE [http-nio-8080-exec-87] org.apache.catalina.core.StandardContext.listenerStart Exception sending context initialized event to listener instance of class org.wso2.sample.identity.oauth2.SampleContextEventListener java.lang.RuntimeException: Uncompilable source code - Erroneous ctor sym type: <any> at org.wso2.sample.identity.oauth2.SampleContextEventListener.contextInitialized(SampleContextEventListener.java:47) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4727) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5189) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

It is related to this piece of code in the ServletContextEventListenner.java:

ClaimManagerProxy claimManagerProxy = new ClaimManagerProxy( properties.getProperty("claimManagementEndpoint"), properties.getProperty("adminUsername"), properties.getProperty("adminPassword")); servletContextEvent.getServletContext().setAttribute("claimManagerProxyInstance", claimManagerProxy);

That's the first issue. When I get to the login page and I hit login then enter the credentials, I get sent back to the login page not to the home page and I get these errors:

26-May-2020 22:32:12.855 SEVERE [http-nio-8080-exec-3] org.wso2.sample.identity.oauth2.ManagerClientServlet.responseHandler Something went wrong org.apache.oltu.oauth2.common.exception.OAuthSystemException: java.net.SocketException: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.SSLContextImpl$DefaultSSLContext) at org.apache.oltu.oauth2.client.URLConnectionClient.execute(URLConnectionClient.java:108) at org.apache.oltu.oauth2.client.OAuthClient.accessToken(OAuthClient.java:65) at org.apache.oltu.oauth2.client.OAuthClient.accessToken(OAuthClient.java:55) at org.apache.oltu.oauth2.client.OAuthClient.accessToken(OAuthClient.java:71) at org.wso2.sample.identity.oauth2.CommonUtils.getToken(CommonUtils.java:125) at org.wso2.sample.identity.oauth2.ManagerClientServlet.responseHandler(ManagerClientServlet.java:80) at org.wso2.sample.identity.oauth2.ManagerClientServlet.doGet(ManagerClientServlet.java:43) at javax.servlet.http.HttpServlet.service(HttpServlet.java:622) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)

Caused by: java.net.SocketException: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.SSLContextImpl$DefaultSSLContext) at java.base/javax.net.ssl.DefaultSSLSocketFactory.throwException(SSLSocketFactory.java:263)

Caused by: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.SSLContextImpl$DefaultSSLContext) at java.base/java.security.Provider$Service.newInstance(Provider.java:1831)

Caused by: java.security.KeyStoreException: problem accessing trust store at java.base/sun.security.ssl.TrustManagerFactoryImpl.engineInit(TrustManagerFactoryImpl.java:73)

Caused by: java.io.IOException: Keystore was tampered with, or password was incorrect at java.base/sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:792)

Caused by: java.security.UnrecoverableKeyException: Password verification failed at java.base/sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:790)

it must be caused by this piece of code in the ManagerClientServlet.java:

try { // Obtain token response CommonUtils.getToken(request, response); //This line is what causes the issu response.sendRedirect("home.jsp"); } catch (SampleAppServerException | OAuthSystemException | OAuthProblemException e) { LOGGER.log(Level.SEVERE, "Something went wrong", e); response.sendRedirect("index.jsp"); }

Any help on how to fix this is highly appreciated. Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions