[JIRA] Commented: (SIDP-552) IdP-Metadata containing german umlauts shows encoding-problems on Microsoft Windows (Error in ResourceBackedMetadataProvider?)

Nikolaus Ortner (JIRA) noreply at shibboleth.net
Wed May 23 16:47:03 BST 2012


    [ https://issues.shibboleth.net/jira/browse/SIDP-552?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14089#comment-14089 ] 

Nikolaus Ortner commented on SIDP-552:
--------------------------------------

The IdP has no problem (despite the mentioned Exception).
But the IdP is delivering invalid metadata to other components, which they cannot parse then [and somehow the IdP should know it or - my favorite: take the given encoding into account and deliver correct metadata].

My test SP (Shibboleth SP 2.4.3) shibd.log says:
2012-05-23 17:34:31 INFO OpenSAML.MetadataProvider.XML : reloading remote resource...
2012-05-23 17:34:33 ERROR XMLTooling.ParserPool : fatal error on line 1, column 666, message: invalid byte 'r' at position 2 of a 3-byte sequence
2012-05-23 17:34:33 ERROR OpenSAML.MetadataProvider.XML : error while loading resource (https://kiistest01.technikum.local:1443/idp/shibboleth): XML error(s) during parsing, check log for specifics
2012-05-23 17:34:33 WARN OpenSAML.MetadataProvider.XML : adjusted reload interval to 1200 seconds
2012-05-23 17:34:33 CRIT OpenSAML.MetadataProvider.XML : maintaining existing configuration, error reloading resource (https://kiistest01.technikum.local:1443/idp/shibboleth): XML error(s) during parsing, check log for specifics

and my test Centralized Discovery Service (1.1.3) says:
17:39:30.487 - ERROR [org.opensaml.saml2.metadata.provider.AbstractReloadingMetadataProvider:285] - Unable to unmarshall metadata
org.opensaml.xml.io.UnmarshallingException: org.opensaml.xml.parse.XMLParserException: Invalid XML
	at org.opensaml.saml2.metadata.provider.AbstractMetadataProvider.unmarshallMetadata(AbstractMetadataProvider.java:462)
	at org.opensaml.saml2.metadata.provider.AbstractReloadingMetadataProvider.unmarshallMetadata(AbstractReloadingMetadataProvider.java:282)
	at org.opensaml.saml2.metadata.provider.AbstractReloadingMetadataProvider.processNewMetadata(AbstractReloadingMetadataProvider.java:325)
	at org.opensaml.saml2.metadata.provider.AbstractReloadingMetadataProvider.refresh(AbstractReloadingMetadataProvider.java:243)
	at org.opensaml.saml2.metadata.provider.AbstractReloadingMetadataProvider.doInitialization(AbstractReloadingMetadataProvider.java:220)
	at org.opensaml.saml2.metadata.provider.AbstractMetadataProvider.initialize(AbstractMetadataProvider.java:407)
	at edu.internet2.middleware.shibboleth.wayf.IdPSiteSet.<init>(IdPSiteSet.java:205)
	at edu.internet2.middleware.shibboleth.wayf.WayfService.init(WayfService.java:181)
	at javax.servlet.GenericServlet.init(GenericServlet.java:212)
	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1173)
	at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:809)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:129)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
	at java.lang.Thread.run(Thread.java:662)
Caused by: org.opensaml.xml.parse.XMLParserException: Invalid XML
	at org.opensaml.xml.parse.BasicParserPool.parse(BasicParserPool.java:218)
	at org.opensaml.saml2.metadata.provider.AbstractMetadataProvider.unmarshallMetadata(AbstractMetadataProvider.java:449)
	... 20 common frames omitted
Caused by: org.xml.sax.SAXParseException: Invalid byte 2 of 3-byte UTF-8 sequence.
	at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
	at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
	at javax.xml.parsers.DocumentBuilder.parse(Unknown Source)
	at org.opensaml.xml.parse.BasicParserPool$DocumentBuilderProxy.parse(BasicParserPool.java:671)
	at org.opensaml.xml.parse.BasicParserPool.parse(BasicParserPool.java:215)
	... 21 common frames omitted


> IdP-Metadata containing german umlauts shows encoding-problems on Microsoft Windows (Error in ResourceBackedMetadataProvider?)
> ------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: SIDP-552
>                 URL: https://issues.shibboleth.net/jira/browse/SIDP-552
>             Project: Shibboleth IdP 2 - Java
>          Issue Type: Bug
>         Environment: IdP 2.3.6 (MSI-Install) on Microsoft Windows Server 2008 (x86 SP 2 and 64 Bit R2 SP1, Sun/Oracle JRE 1.6.0_31-b05 / 1.6.0_29-b11). IdP runs standalone with the included Tomcat 6.
>            Reporter: Nikolaus Ortner
>            Assignee: Chad La Joie
>            Priority: Minor
>         Attachments: exception.txt
>
>
> Had some trouble with german umlauts in our IdP-Metadata (OrganizationName, OrganizationDisplayName and UIInfo/DisplayName). I tried various encodings in the XML declaration besides <?xml version="1.0" encoding="UTF-8"?> and saving the file in different encodings (UTF-8/ANSI/..) - but no combination did work. MetadataProvider [id="IdPMD"] is of type "ResourceBackedMetadataProvider".
> The workaround was to start tomcat's Java with Option "-Dfile.encoding=UTF8" [side-effects on other applications may occur then?] and the specified encoding is then taken into account. It works fine with ISO-8859-1 encoded metadata now.
> Since other configuration files are always read correct according to their specified encoding (eg. conf/attribute-resolver.xml where I have some static attributes containing umlauts in their values), it seems like the ResourceBackedMetadataProvider has a problem.
> -Niko

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the commits mailing list