Skip to main content
Inspiring
October 14, 2021
Answered

SSO > Add or Edit SP throws error class coldfusion.saml.SpConfiguration cannot be cast to ...

  • October 14, 2021
  • 3 replies
  • 882 views

Hello folks,

 

Has anyone recieved this erorr when trying to add or edit a SP within the CFADMIN? Its working on one server and not on the other, both have identical configurations. I get this error when editing an existing SP entry and when trying to save a new one!

 

class coldfusion.saml.SpConfiguration cannot be cast to class coldfusion.saml.SpConfiguration (coldfusion.saml.SpConfiguration is in unnamed module of loader org.apache.felix.framework.BundleWiringImpl$BundleClassLoader @1bbea556; coldfusion.saml.SpConfiguration is in unnamed module of loader org.apache.felix.framework.BundleWiringImpl$BundleClassLoader @487f3afe)

 

 
 
    This topic has been closed for replies.
    Correct answer brookd

    It did install cleanly in the end. CF support is suggesting:

     

    - Uninstall the SAML package from CF admin UI - Package manager - Installed Packages - Select SAML - Uninstall
    - Clear all folders in - C:\ColdFusion2021\cfusion\bin\felix-cache
    - Clear all the classes files from C:\ColdFusion2021\cfusion\wwwroot\WEB-INF\cfclasses
    - Restart the CF server and Install the SAML package and try.

    I'll try that and post my results here.


    These steps worked (adding the stop of CF to the steps offered above from Adobe):

     

    - Uninstall the SAML package from CF admin UI - Package manager - Installed Packages - Select SAML - Uninstall

    - Stop ColdFusion
    - Clear all folders in - C:\ColdFusion2021\cfusion\bin\felix-cache
    - Clear all the classes files from C:\ColdFusion2021\cfusion\wwwroot\WEB-INF\cfclasses
    - Startthe CF server and Install the SAML package

    3 replies

    Charlie Arehart
    Community Expert
    Community Expert
    October 16, 2021

    Or, here's a different perspective: I'd doubt they truly "share" the same configuration (that's not easily done in cf. But bkbk you've been around long enough that I wonder if you have something particular in mind).

     

    Also we know he's using CF2021 as that's what adds the saml/sso feature and the admin pages being referred to. 

     

    But I WOULD press next on Brook's assertion that they ARE identical. Often folks say that, from what they expect or even "see". But a close comparison of them may show they are in fact NOT identical. (The cf admin settings can be compared using the text of the "settings summary" page, copied into any good compare tool. I favor BeyondCompare, myself, and have turned thousands on to it over the years.) 

     

    There could also be jvm differences, or unexpected machine/net diffs between the working and failing one.

     

    Finally, it could be that an error occurred in the applying of the cf update between these. Such errors are tracked in the install log in the hf-updates folder in each instance, and its subfolder for any update applied.

     

    Or Brook, if there's no subfolder in hf-updates, but cf shows being on update 2,then that instance was installed with the cf2021 installer released since last month, which includes both update 2 and Java 11.0.11. Is that the case for both?

     

    You can see the cf update level and JVM version on that same settings summary I'd mentioned above. 

    /Charlie (troubleshooter, carehart. org)
    BKBK
    Community Expert
    Community Expert
    October 17, 2021
    quote

    Or, here's a different perspective: I'd doubt they truly "share" the same configuration (that's not easily done in cf. But bkbk you've been around long enough that I wonder if you have something particular in mind).


    By @Charlie Arehart

     

    @Charlie Arehart , When I say the servers might be sharing the same resource, I mean that they might be sharing some class or library. Which brings me to the following question.

     

    @brookd , Are your servers making use of any third-party SAML libraries? 

     

    There is something not quite right about the error-message. Why would a ColdFusion process need a ColdFusion-own type (coldfusion.saml.SpConfiguration) from elsewhere?

    Unless perhaps the type comes bundled in a package that uses a third-party library. This will be specifically relevant if your ColdFusion is 2021, where packages can be installed separately.

    brookdAuthor
    Inspiring
    October 20, 2021

    Hello,

     

    So, the server having the issue had the easySSO SSO components installed before CF2021 was installed. They were not used in the end, but I don't think that is related as they are .NET not JAVA components. Also, this was working fine previously with this install of CF 2021. 

     

    I am able to copy the neo-saml.xml file from the working server and replace it and SSO seems to be working. I am just unable to do any configuration via the CFADMIN without those errors.  

     

    The log for Updater 2 shows a couple of errors on its first run. It was run multiple times and eventually completed without errors:

     

    Moving files failed:
    Status: FATAL ERROR
    Additional Notes: FATAL ERROR - Could not move the file C:\ColdFusion2021\cfusion\lib\updates\hf202100-4212182.jar to the backup location C:\ColdFusion2021\cfusion\hf-updates\hf-2021-00002-328618\backup\lib\updates\hf202100-4212182.jar

    Moving files failed:
    Status: FATAL ERROR
    Additional Notes: FATAL ERROR - Could not move the file C:\ColdFusion2021\cfusion/lib/jackson-mapper-asl-1.9.13.jar to the backup location C:\ColdFusion2021\cfusion\hf-updates\hf-2021-00002-328618\backup/lib/jackson-mapper-asl-1.9.13.jar

    Moving files failed:
    Status: FATAL ERROR
    Additional Notes: FATAL ERROR - Could not move the file C:\ColdFusion2021\cfusion/lib/jackson-core-asl-1.9.13.jar to the backup location C:\ColdFusion2021\cfusion\hf-updates\hf-2021-00002-328618\backup/lib/jackson-core-asl-1.9.13.jar

    BKBK
    Community Expert
    Community Expert
    October 16, 2021
    quote

    Its working on one server and not on the other, both have identical configurations.

     

     
     

    By @brookd

     

    That might be the cause. Perhaps the servers are sharing the same resource, with one server currently using the resource and preventing the other from having access. 

     

    Test by letting each server have its own separate resources. Remember to restart ColdFusion after you make a change to the server.

    BKBK
    Community Expert
    Community Expert
    October 16, 2021

    What is your ColdFusion version and update level?