Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Anthony Karta
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13071
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 342
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 21314
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it not possible to put both saxon8.jar and saxon8-dom.jar in the classpath?
 
Rahul Bhattacharjee
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic