4 Replies Latest reply on Nov 16, 2011 6:21 PM by pcraveiro

    MalformedURLException while loading STS configuration file

    pcraveiro

      Hi,

       

          I'm using Picketlink 2.0.1.1.final version. When I deploy the IDP it tries to locate my STS configuration file that is located in WEB-INF/picketlink-sts.xml and throws a "java.net.MalformedURLException: no protocol: ...".

       

          Debugging the code I realized that this exception happens on org.picketlink.identity.federation.core.sts.PicketLinkCoreSTS class. The URL passed as an argument is missing the protocol to be used (maybe "file://" ?).

       

                 

           // if no configuration file was found, log a warn message and use default configuration values.

               if (configurationFileURL == null)

               {

                  logger.warn(fileName + " configuration file not found using classloader");

                  try

                  {

                    configurationFileURL = new URL(fileName); // the exception is throwed here

                  }

                  catch (Exception e)

                  {

                     return new PicketLinkSTSConfiguration();

                  }

                  finally

                  {

                     if (configurationFileURL == null)

                     {

                        logger.warn(fileName + " configuration file not found using URL. Using default configuration values");

                        return new PicketLinkSTSConfiguration();

                     }

                  }

               }

       

          This is a bug or there is another way to indicate the STS configuration file for the IDP ?

       

      Thanks,

      Pedro Igor