java.lang.IllegalArgumentException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • I do not see this issue with the original zip file that was provided in SEC-1004 (SpringSecurity SAML.zip) but see it consistently with the war built from Subversion source (revision 53). I'm getting this exception when I make a request to the application via a browser: java.lang.IllegalArgumentException: org.opensaml.xml.signature.impl.KeyInfoImpl cannot be added - it is already the child of another SAML Object at org.opensaml.xml.AbstractXMLObject.prepareForAssignment(AbstractXMLObject.java:272) at org.opensaml.saml2.metadata.impl.KeyDescriptorImpl.setKeyInfo(KeyDescriptorImpl.java:79) at org.springframework.security.saml.metadata.MetadataGenerator.getKeyDescriptor(MetadataGenerator.java:125) at org.springframework.security.saml.metadata.MetadataGenerator.buildSPSSODescriptor(MetadataGenerator.java:116) at org.springframework.security.saml.metadata.MetadataGenerator.generateMetadata(MetadataGenerator.java:96) at org.springframework.security.saml.metadata.MetadataDisplayFilter.initializeSystemMetadata(MetadataDisplayFilter.java:134) at org.springframework.security.saml.metadata.MetadataDisplayFilter.doFilterHttp(MetadataDisplayFilter.java:88) at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390) at org.springframework.security.saml.SAMLEntryPoint.doFilterHttp(SAMLEntryPoint.java:102) at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390) at org.springframework.security.ui.logout.LogoutFilter.doFilterHttp(LogoutFilter.java:89) at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390) at org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:235) at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390) at org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:175) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:236) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
    via by Rob Moore,
  • I do not see this issue with the original zip file that was provided in SEC-1004 (SpringSecurity SAML.zip) but see it consistently with the war built from Subversion source (revision 53). I'm getting this exception when I make a request to the application via a browser: java.lang.IllegalArgumentException: org.opensaml.xml.signature.impl.KeyInfoImpl cannot be added - it is already the child of another SAML Object at org.opensaml.xml.AbstractXMLObject.prepareForAssignment(AbstractXMLObject.java:272) at org.opensaml.saml2.metadata.impl.KeyDescriptorImpl.setKeyInfo(KeyDescriptorImpl.java:79) at org.springframework.security.saml.metadata.MetadataGenerator.getKeyDescriptor(MetadataGenerator.java:125) at org.springframework.security.saml.metadata.MetadataGenerator.buildSPSSODescriptor(MetadataGenerator.java:116) at org.springframework.security.saml.metadata.MetadataGenerator.generateMetadata(MetadataGenerator.java:96) at org.springframework.security.saml.metadata.MetadataDisplayFilter.initializeSystemMetadata(MetadataDisplayFilter.java:134) at org.springframework.security.saml.metadata.MetadataDisplayFilter.doFilterHttp(MetadataDisplayFilter.java:88) at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390) at org.springframework.security.saml.SAMLEntryPoint.doFilterHttp(SAMLEntryPoint.java:102) at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390) at org.springframework.security.ui.logout.LogoutFilter.doFilterHttp(LogoutFilter.java:89) at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390) at org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:235) at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390) at org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:175) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:236) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
    via by Rob Moore,
    • java.lang.IllegalArgumentException: org.opensaml.xml.signature.impl.KeyInfoImpl cannot be added - it is already the child of another SAML Object at org.opensaml.xml.AbstractXMLObject.prepareForAssignment(AbstractXMLObject.java:272) at org.opensaml.saml2.metadata.impl.KeyDescriptorImpl.setKeyInfo(KeyDescriptorImpl.java:79) at org.springframework.security.saml.metadata.MetadataGenerator.getKeyDescriptor(MetadataGenerator.java:125) at org.springframework.security.saml.metadata.MetadataGenerator.buildSPSSODescriptor(MetadataGenerator.java:116) at org.springframework.security.saml.metadata.MetadataGenerator.generateMetadata(MetadataGenerator.java:96) at org.springframework.security.saml.metadata.MetadataDisplayFilter.initializeSystemMetadata(MetadataDisplayFilter.java:134) at org.springframework.security.saml.metadata.MetadataDisplayFilter.doFilterHttp(MetadataDisplayFilter.java:88) at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390) at org.springframework.security.saml.SAMLEntryPoint.doFilterHttp(SAMLEntryPoint.java:102) at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390) at org.springframework.security.ui.logout.LogoutFilter.doFilterHttp(LogoutFilter.java:89) at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390) at org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:235) at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390) at org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:175) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:236) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
    No Bugmate found.