»

ID #1176

How can I change the XML parser from Crimson to Xerces for the ICE Server, in Muse versions 2.1.0.1 to 2.2.2.0 ?

Muse is already parser independent starting with version 2.1.0.1 but is still being shipped with the Crimson XML parser until version 2.2.2.0. However the newer and more improved Xerces XML parser is included in all Java 1.6 builds so you can benefit from its use. There are two solutions for this and both of them are detailed below:

1. Specify the XML parser that the JVM is going to use. This means that you have to edit the script for starting the ICE Server, namely ${ICE_HOME}/startServer(.bat|.csh) - depending on the OS used - and add the following parameters to the Java command line:

-Djavax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl

-Djavax.xml.parsers.SAXParserFactory=com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl

-Dorg.xml.sax.driver=com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl

Hence the command line changes from:

$MUSE_JAVA_EXE  -Xmx512M -Xms128M -XX:MaxPermSize=128M -Djavax.xml.transform.TransformerFactory=com.icl.saxon.TransformerFactoryImpl -Dsun.net.client.defaultConnectTimeout=60000 -Dsun.net.client.defaultReadTimeout=60000 -Dfile.encoding=ISO-8859-1 -DMUSE_HOME="$MUSE_HOME" -DUSE_HOME="$USE_HOME" -DICE_HOME="$ICE_HOME" -DMODULES_HOME="$MODULES_HOME" -Dsun.net.inetaddr.ttl=0 -Djava.security.manager -Djava.security.policy==java.policy -Djava.security.auth.policy==jaas.policy -Djava.security.auth.login.config==jaas.config -Djavax.net.ssl.trustStore="$MODULES_HOME/jssecacerts" -Djssecaaliases="$MODULES_HOME/jssecaaliases.properties" com.edulib.ice.core.ICEStartup "$@"

to

$MUSE_JAVA_EXE  -Xmx512M -Xms128M -XX:MaxPermSize=128M -Djavax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl -Djavax.xml.parsers.SAXParserFactory=com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl -Dorg.xml.sax.driver=com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl -Djavax.xml.transform.TransformerFactory=com.icl.saxon.TransformerFactoryImpl -Dsun.net.client.defaultConnectTimeout=60000 -Dsun.net.client.defaultReadTimeout=60000 -Dfile.encoding=ISO-8859-1 -DMUSE_HOME="$MUSE_HOME" -DUSE_HOME="$USE_HOME" -DICE_HOME="$ICE_HOME" -DMODULES_HOME="$MODULES_HOME" -Dsun.net.inetaddr.ttl=0 -Djava.security.manager -Djava.security.policy==java.policy -Djava.security.auth.policy==jaas.policy -Djava.security.auth.login.config==jaas.config -Djavax.net.ssl.trustStore="$MODULES_HOME/jssecacerts" -Djssecaaliases="$MODULES_HOME/jssecaaliases.properties" com.edulib.ice.core.ICEStartup "$@"

The example above is taken from the startServer script but the changes are needed in any of the scripts used.

2. Rename or delete the ${ICE_HOME}/lib/crimson.jar library. Our recommendation is to rename it so that they will be able to restore it if necessary. Renaming it to ${ICE_HOME}/lib/crimson.jar.old will suffice. Note that there aren't needed any startup script changes.

Both solutions require a restart of the ICE Server. Our recommended solution would be #2 since it is the simplest.

Warning: Please note that Xerces is not thread-safe while Crimson is hence you could experience some problems with your system after making the above changes. If you notice anything unusual then please revert the changes and notify MuseGlobal Technical Support. For Muse versions newer than 2.2.2.0 the thread-safety has been achieved by changes in the Muse code. Starting with version 2.2.2.0 Muse is being shipped with a bundled Xerces XML Parser.

Tags: crimson, parser, Xerces, xml

Related entries: -

Last update: 2013-09-02 16:49
Author: Administrator
Revision: 1.0

Print this record Send FAQ to a friend Show this as PDF file
Rate this FAQ

Average rating: 0 (0 Votes)

completely useless 1 2 3 4 5 most valuable

You cannot comment on this entry

powered by phpMyFAQ 2.7.2