• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Transformer Configuration Exception with JDK1.4.2

 
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We recently moved from WL 8.1 SP1 to SP3 and the application gives the following error.

javax.xml.transform.TransformerConfigurationException: javax.xml.transform.TransformerException: javax.xml.transform.TransformerException: A location step was expected following the '/' or '//' token.

when doing the following

javax.xml.transform.Templates templates = transFact.newTemplates(xslSource);

where transFact is a javax.xml.tranform.TransformFactory and xslSource is an InputSource.

SP1 is shipped with JDK1.4.1 and SP3 is shipped with JDK1.4.2
On doing some research its says its because of some bug fixes in Xalan, but then some point its with JDK1.4.2

I tried using the xalan.jar and xml-apis.jar from the xalan 2.6 distribution, by placing them on classpath before rt.jar
But, I still get the same error.

Any suggestions ??

if any one experienced this please post how you solved it
 
meka toka
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Found the answer myself.

I had some XSL files which had the nodes selecting using something like below



Looks like the above way of selecting nodes was fine with JDK1.4.1 but with JDK 1.4.2 it wouldnt work as it was having problem finding a location path stop.

All I had to do was remove the trailing slash. SO I changed it to




When doing research for this, I came across alot of people looking for solutions in similar situations and are confused that its because of some problem with WL 8.1 SP3. But the main reason is because the working of the TransformerFactory has changed from JDK1.4.1 to JDK 1.4.2

Hope this helps
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Wow! Talk about synchronicity! I was just about to post a question that you may have solved.
My client gets a Transformer error from an XSL file that runs fine on my system - I'm off to see which JDK version he has.
Bill
 
passwords must contain 14 characters, a number, punctuation, a small bird, a bit of cheese and a tiny ad.
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic