This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes why java5 (jaxp1.3) is looking for saxon8-dom.jar Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "why java5 (jaxp1.3) is looking for saxon8-dom.jar" Watch "why java5 (jaxp1.3) is looking for saxon8-dom.jar" New topic
Author

why java5 (jaxp1.3) is looking for saxon8-dom.jar

Anthony Karta
Ranch Hand

Joined: Aug 09, 2004
Posts: 342
I'm writing the code below to write/serialize xml document.

it's compiled but it's looking for saxon8-dom.jar when run it.

how to make it search for "default" transfomer (whatever it is) implementation?

thanks



SCJP 5
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12769
    
    5
Looks like you have a system property named "javax.xml.transform.TransformerFactory" which names a class to be used.
If you remove that property it should look for a default class.

See the javadocs for javax.xml.transform.TransformerFactory

Bill
Anthony Karta
Ranch Hand

Joined: Aug 09, 2004
Posts: 342
Originally posted by William Brogden:
Looks like you have a system property named "javax.xml.transform.TransformerFactory" which names a class to be used.
If you remove that property it should look for a default class.

See the javadocs for javax.xml.transform.TransformerFactory

Bill


Thanks William. Actually, saxon8.jar is included in classpath. I remove it and it works!

But... how if we want to use saxon8 for some classes?? I might brake someone else code here. thanks again.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

Is it not possible to put both saxon8.jar and saxon8-dom.jar in the classpath?
Rahul Bhattacharjee
Ranch Hand

Joined: Nov 29, 2005
Posts: 2308
Originally posted by Anthony Karta:

how to make it search for "default" transfomer (whatever it is) implementation?



For using the default implementation you do not need to do anything.For looking up the parser/transformer , it also consults the files present in /META-INF/services/* , If no system property or jaxp.properties is not set then this would make use of the default values.


Rahul Bhattacharjee
LinkedIn - Blog
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: why java5 (jaxp1.3) is looking for saxon8-dom.jar