[josm-dev] Special Character Problem

Sebastian Waschik sebastian.waschik at gmx.de
Sun Aug 16 22:31:41 BST 2009


Hello,
Stephan <osm at stephans-server.de>
writes:

> Sebastian Waschik wrote:
>> $ javac SaxTest2.java && java -cp "$PWD":/usr/share/java/xercesImpl.jar SaxTest2 broken.osm
>> String values (4): d800 df34 d800 df37
>
>
> I don't think josm is including a private copy of xerces. So it will use 
> the one provided by sun.
>
> Using -Djaxp.debug=1 it prints the used factory. Here it's
> com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl

Here:
,----
| JAXP: find factoryId =javax.xml.parsers.SAXParserFactory
| JAXP: loaded from fallback value: com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl
| JAXP: created new instance of class com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl using ClassLoader: null
| JAXP: find factoryId =javax.xml.parsers.SAXParserFactory
| JAXP: loaded from fallback value: com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl
| JAXP: created new instance of class com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl using ClassLoader: null
| JAXP: find factoryId =javax.xml.parsers.SAXParserFactory
| JAXP: loaded from fallback value: com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl
| JAXP: created new instance of class com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl using ClassLoader: null
| JAXP: find factoryId =javax.xml.datatype.DatatypeFactory
| JAXP: loaded from fallback value: com.sun.org.apache.xerces.internal.jaxp.datatype.DatatypeFactoryImpl
| JAXP: created new instance of class com.sun.org.apache.xerces.internal.jaxp.datatype.DatatypeFactoryImpl using ClassLoader: null
`----

It does not print the version.  I include CLASSPATH xerces (2.9.1) in
classpath, but josm (using java -jar) does not use it.  That explains
why my TestApplication worked and JOSM not.  TestApplication use the
following:

,----
| JAXP: find factoryId =javax.xml.parsers.SAXParserFactory
| JAXP: found jar resource=META-INF/services/javax.xml.parsers.SAXParserFactory using ClassLoader: sun.misc.Launcher$AppClassLoader at 757aef
| JAXP: found in resource, value=org.apache.xerces.jaxp.SAXParserFactoryImpl
| JAXP: created new instance of class org.apache.xerces.jaxp.SAXParserFactoryImpl using ClassLoader: sun.misc.Launcher$AppClassLoader at 757aef
`----

Greetings
Sebastian Waschik





More information about the josm-dev mailing list