Bug #965

TBX: X.X, net.sf.saxon.TransformerFactoryImpl class not found

Added by Matthieu Decorde over 5 years ago. Updated over 4 years ago.

Status:Feedback Start date:08/01/2014
Priority:Normal Due date:
Assignee:- % Done:

90%

Category:Toolbox Spent time: -
Target version:TXM 0.7.7

Description

Problem: In some environments, the javax TransformerFactory cannot be resolved. When the "javax.xml.transform.TransformerFactory" Java environment property is set to the saxon factory (net.sf.saxon.TransformerFactoryImpl), the javax.xml.transform.FactoryFinder fails to find the saxon factory.

Question: why javax.xml.transform.FactoryFinder could not find saxon factory? Maybe because of the multiple classloader of Eclipse RCP?

Solution: force the usage of saxon factory by replacing :

TransformerFactory factory = TransformerFactory.newInstance();

with

TransformerFactory factory = new net.sf.saxon.TransformerFactoryImpl();

Validation test

Run the ExecXSL macro

MD: OK Linux64

History

#1 Updated by Serge Heiden over 5 years ago

  • Description updated (diff)

#2 Updated by Matthieu Decorde about 5 years ago

MD:
code refactored
need to test :

src 2823
groovy 2820
org 2820
txm 2820
importer 2800
graal 2583
GraalApplyXsl.groovy 2386

61: factory = new net.sf.saxon.TransformerFactoryImpl(); OK deprecated

limsi 2731
importer.groovy 2731

201: TransformerFactory fabrique = new net.sf.saxon.TransformerFactoryImpl(); OK tested with limsi files sample

transcriber 2759
ChangeSpeaker.groovy 2519

113: TransformerFactory fabrique = new net.sf.saxon.TransformerFactoryImpl(); OK

importer.groovy 2759

296: TransformerFactory fabrique = new net.sf.saxon.TransformerFactoryImpl(); OK tested with TRS+CSV import

RemoveSpeaker.groovy (2 matches) 2743

113: TransformerFactory fabrique = new net.sf.saxon.TransformerFactoryImpl(); OK tested with TRS+CSV import with remove speaker option

ApplyXsl.groovy (2 matches) 2386

101: tFactory = new net.sf.saxon.TransformerFactoryImpl(); OK
115: tFactory = new net.sf.saxon.TransformerFactoryImpl(); OK
ApplyXsl2.java 2627
128: tFactory = new net.sf.saxon.TransformerFactoryImpl(); OK tested with front XSL in XML+CSV import

EncodingConverter.java 2519

148: TransformerFactory fabrique = new net.sf.saxon.TransformerFactoryImpl(); OK

RemoveTag.groovy 2763

96: TransformerFactory fabrique = new net.sf.saxon.TransformerFactoryImpl(); OK

ResolveXInclude.java 2519

81: TransformerFactory transformerFactory = new net.sf.saxon.TransformerFactoryImpl(); OK tested with XML+CSV import

macro 2800

edition
FacsEditionBuilderMacro.groovy
155: TransformerFactory fabrique = new net.sf.saxon.TransformerFactoryImpl();
RemoveTag.groovy
112: TransformerFactory fabrique = new net.sf.saxon.TransformerFactoryImpl(); OK
XTZEditionBuilderMacro.groovy
147: TransformerFactory fabrique = new net.sf.saxon.TransformerFactoryImpl();

sw 2583
ReplaceXmlDomNode.groovy 2386

129: TransformerFactory fabrique = new net.sf.saxon.TransformerFactoryImpl(); OK

java 2823
org 2823
txm 2823
importer 2743
DomUtils.java 2519

102: TransformerFactory fabrique = new net.sf.saxon.TransformerFactoryImpl(); OK tested with TXM launch

metadatas 2583
Metadatas.java 2529

479: TransformerFactory fabrique = new net.sf.saxon.TransformerFactoryImpl(); OK tested with TXT+CSV import

objects 2820
Base.java 2627

115: TransformerFactory fabrique = new net.sf.saxon.TransformerFactoryImpl(); OK tested with any import module

Workspace.java 2820

235: TransformerFactory fabrique = new net.sf.saxon.TransformerFactoryImpl(); OK tested with TXM launch

#3 Updated by Matthieu Decorde about 5 years ago

  • % Done changed from 0 to 20

#4 Updated by Matthieu Decorde about 5 years ago

  • Target version changed from TXM 0.7.7 to TXM 0.7.6

#5 Updated by Matthieu Decorde about 5 years ago

  • % Done changed from 20 to 80

#6 Updated by Sebastien Jacquot about 5 years ago

  • Target version changed from TXM 0.7.6 to TXM 0.7.7

#7 Updated by Matthieu Decorde almost 5 years ago

  • Status changed from New to Feedback

#8 Updated by Matthieu Decorde over 4 years ago

  • Description updated (diff)
  • % Done changed from 80 to 90

Also available in: Atom PDF