Re: Couldn't Initialize SAML

175 views
Skip to first unread message
Message has been deleted

Misagh

unread,
Aug 26, 2020, 1:59:42 PM8/26/20
to Pac4j users mailing list
Look for conflicting/duplicate JAR files in your packaging.

On Wed, Aug 26, 2020 at 9:54 PM Krutarth Vora <krut...@pixalere.com> wrote:
>
> I am using pac4j-saml-opensamlv3-4.0.3.jar along with spring 3.1.2 (not spring boot or no spring security) in java to connect with ADFS SSO,
>
> but somehow it is throwing me following error when I try to initialise saml2clinet with saml2conifguration
>
> java.lang.NoClassDefFoundError: Could not initialize class org.pac4j.saml.client.SAML2Client
>
> If anyone can help :)
>
> Thanks in advance.
>
> --
> You received this message because you are subscribed to the Google Groups "Pac4j users mailing list" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to pac4j-users...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/pac4j-users/964714ac-4f66-435f-8ea6-9a20d021dc0bn%40googlegroups.com.
Message has been deleted
Message has been deleted

Jérôme LELEU

unread,
Sep 1, 2020, 2:32:10 AM9/1/20
to Krutarth Vora, Pac4j users mailing list
Hi,

It means that you don't have this URL (https://9f90ac5670ea.ngrok.io/pixalere1/AdfsSsoCallback.do) as the entityID in your metadata.
Thanks.
Best regards,
Jérôme

Le dim. 30 août 2020 à 13:34, Krutarth Vora <krut...@pixalere.com> a écrit :
I am able to manage jar files and now I am stuck with following error I checked my sp meatada but its fine as well.

If any one knows about this , please let me know.


javax.servlet.ServletException: org.pac4j.saml.exceptions.SAMLException: Cannot find entity https://9f90ac5670ea.ngrok.io/pixalere1/AdfsSsoCallback.do in metadata provider org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:535) org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:433) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432) javax.servlet.http.HttpServlet.service(HttpServlet.java:661) javax.servlet.http.HttpServlet.service(HttpServlet.java:742) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)

Root Cause

org.pac4j.saml.exceptions.SAMLException: Cannot find entity https://9f90ac5670ea.ngrok.io/pixalere1/AdfsSsoCallback.do in metadata provider org.pac4j.saml.context.SAML2ContextProvider.addContext(SAML2ContextProvider.java:126) org.pac4j.saml.context.SAML2ContextProvider.addSPContext(SAML2ContextProvider.java:105) org.pac4j.saml.context.SAML2ContextProvider.buildServiceProviderContext(SAML2ContextProvider.java:68) org.pac4j.saml.context.SAML2ContextProvider.buildContext(SAML2ContextProvider.java:74) org.pac4j.saml.credentials.extractor.SAML2CredentialsExtractor.extract(SAML2CredentialsExtractor.java:56) org.pac4j.core.client.BaseClient.retrieveCredentials(BaseClient.java:66) org.pac4j.core.client.IndirectClient.getCredentials(IndirectClient.java:144)  org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432) javax.servlet.http.HttpServlet.service(HttpServlet.java:661) javax.servlet.http.HttpServlet.service(HttpServlet.java:742) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)

Note The full stack trace of the root cause is available in the server logs.

On Wednesday, August 26, 2020 at 11:42:40 PM UTC+5:30 Krutarth Vora wrote:
Do you know list of all jars ?
If so that can be helpful .


--


Krutarth Vora

Software Developer | Pixalere Healthcare Inc

| p. +91-84601-57940  | e. krut...@pixalere.com  | w.  www.pixalere.com                                             

This email may be privileged and/or confidential. Any distribution, use or copying of this e-mail or the information it contains by other than an intended recipient is unauthorized. If you received this email in error, please advise the sender immediately (by return email or, and delete the message and its attachments from your system.


--
You received this message because you are subscribed to the Google Groups "Pac4j users mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pac4j-users...@googlegroups.com.

Krutarth Vora

unread,
Sep 5, 2020, 5:29:46 PM9/5/20
to Pac4j users mailing list
Hello Jérôme,

It was working fine with ADFS but I have shifted to Azure AD and now I am getting back the same error entity not found in metadata provider, does that mean SP side or IDP side ?

I am totally stuck at this point and I am stuck at this point from past couple of days can you please guide?

THanks.

Jérôme LELEU

unread,
Sep 7, 2020, 2:33:29 AM9/7/20
to Krutarth Vora, Pac4j users mailing list
Hi,

Did you regenerate your SP metadata and upload them to the IdP?
Thanks.
Best regards,
Jérôme


Krutarth Vora

unread,
Sep 7, 2020, 2:34:00 AM9/7/20
to Jérôme LELEU, Pac4j users mailing list
Yes i did

Jérôme LELEU

unread,
Sep 7, 2020, 3:00:24 AM9/7/20
to Krutarth Vora, Pac4j users mailing list
Hi,

Did you use the new IdP metadata?
Thanks.
Best regards,
Jérôme

Krutarth Vora

unread,
Sep 7, 2020, 3:23:52 AM9/7/20
to Jérôme LELEU, Pac4j users mailing list
Yes. I did use new IdP metadata as well as updated spmetadata.

Is there a way to debug the issue ?

Jérôme LELEU

unread,
Sep 8, 2020, 1:55:35 AM9/8/20
to Krutarth Vora, Pac4j users mailing list
Hi,

Sure. Enable the TRACE logs for org.pac4j.saml and org.opensaml to see the SAML response and check its values?
Thanks.
Best regards,
Jérôme


Reply all
Reply to author
Forward
0 new messages