[ 
https://issues.apache.org/jira/browse/XERCESJ-1404?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael Glavassevich resolved XERCESJ-1404.
-------------------------------------------

    Resolution: Duplicate

Sorry, this is a bug in Java 5. Please review the JAXP specification. 
META-INF/services/javax.xml.validation.SchemaFactory is not a properties file.  
See XERCESJ-1175.

> incorrect content for 
> xercesImpl-2.9.1.jar!/META-INF/services/javax.xml.validation.SchemaFactory
> ------------------------------------------------------------------------------------------------
>
>                 Key: XERCESJ-1404
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1404
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: JAXP (javax.xml.validation)
>    Affects Versions: 2.9.1
>         Environment: Java version: 1.5.0_19
> Java home: /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home
> Default locale: en_US, platform encoding: MacRoman
> OS name: "mac os x" version: "10.5.7" arch: "i386" Family: "unix"
>            Reporter: Freeman Fang
>
> I'm using code like 
> {code}
> javax.xml.validation.SchemaFactory.SchemaFactory factory = 
> SchemaFactory.newInstance(schemaLanguage);
> {code}
> to create SchemaFactory, I already put xercesImpl jar in my classpath, so I 
> hope the org.apache.xerces.jaxp.validation.XMLSchemaFactory could be loaded 
> as it's defined in 
> META-INF/services/javax.xml.validation.SchemaFactory, jdk code 
> javax.xml.validation.SchemaFactoryFinder should load class 
> org.apache.xerces.jaxp.validation.XMLSchemaFactory per SPI discovery 
> mechnasim. But actually always the class 
> com.sun.org.apache.xerces.internal.jaxp.validation.XMLSchemaFactory from jdk 
> was loaded.
> So I enable jaxp.debug property and find the interesting output
> JAXP: looking into 
> jar:file:/Users/ffang/.m2/repository/xerces/xercesImpl/2.8.1/xercesImpl-2.8.1.jar!/META-INF/services/javax.xml.validation.SchemaFactory
> JAXP: Reading 
> jar:file:/Users/ffang/.m2/repository/xerces/xercesImpl/2.8.1/xercesImpl-2.8.1.jar!/META-INF/services/javax.xml.validation.SchemaFactory
> JAXP: http://www.w3.org/2001/XMLSchema is not in the property file 
> So jdk now load 
> xercesImpl-2.9.1.jar!/META-INF/services/javax.xml.validation.SchemaFactory as 
> java Properties class and try to look for value for key 
> "http://www.w3.org/2001/XMLSchema";
> currently the content of META-INF/services/javax.xml.validation.SchemaFactory 
> is
> org.apache.xerces.jaxp.validation.XMLSchemaFactory
> it's not correct, it should be
> http\://www.w3.org/2001/XMLSchema = 
> org.apache.xerces.jaxp.validation.XMLSchemaFactory
> according to the jdk spi discovery code.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to