[xep-support] XEP fails with Crimson error

Alexei Gagarinov agagarinov at renderx.com
Sat Aug 25 13:34:37 PDT 2007


Hi Martin,

> I am trying to convert a set of DITA XML files to PDF using XEP
> (4.10). The process fails with this error:
> ...
> org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)
> ...

It means that Crimson is the default XML parser in your Java
environment.

The most probably this is not the crimson.jar from XEP distribution.
In order to make sure for that, please remove any occurrences of
crimson.jar from the script you are using for launching XEP.

If the removing of crimson.jar does not help, it means that "another"
Crimson is used in your environment.

Some applications may explicitly set
javax.xml.parsers.SAXParserFactory property. It could
be done by adding an appropriate record to the system properties or by 
creating a special '.properties' file in jre/lib/ subdirectory.

Another possible way is crimson.jar in the JVM bootstrap classpath.
But Java 1.5 (unlike Java 1.4) does not have Crimson as a part of the
package.

> Am I correct in assuming that the version of Crimson included with
> XEP does not include the patch that appears in the comments to the
> bug in the Apache Bugzilla?

You are correct.
But it is not Crimson shipped with XEP that cause the problem.

> Any ideas?

You may find out the used crimson.jar and replace it.
But neither "finding out", nor "replacing" is an easy task.

The simplest way to resolve the problem is to tell Java to use a
specific XML Reader.

Add the following property to the XEP execution command:

-Djavax.xml.parsers.SAXParserFactory=com.icl.saxon.aelfred.SAXParserFactoryImpl

It will force usage of Saxon Aelfred XML parser.

Best regards,
  Alexei Gagarinov
RenderX
---
www.renderx.net




-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo at renderx.com from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/terms-of-service.html



More information about the Xep-support mailing list