• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

error:javax.xml.transform.TransformerException: java.io.FileNotFoundException: file:\C:\Documents%20

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I am try to convert java obj to xml file and i an getting below error please guide me, error and the code is mentioned below.

error:javax.xml.transform.TransformerException: java.io.FileNotFoundException: file:\C:\Documents%20and%20Settings\kiranain\Desktop\fop-0.20.5\.\out\ResultObj2XML.xml (The filename, directory name, or volume label syntax is incorrect)


code-



Thanks
Kiran purohit
 
Marshal
Posts: 79177
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have added code tags and you can see how much better the post looks
Why have you got a dot in the middle of your file path?
Why are you using System.exit? That looks unnecessary in that location.
 
Rancher
Posts: 1776
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please UseCodeTags while posting. It makes the code way better to read.

The FileNotFoundExcpetion clearly tells the system cannot find the file C:\Documents%20and%20Settings\kiranain\Desktop\fop-0.20.5\.\out\ResultObj2XML.xml

Is there a specific requirement to create a folder with just a period as it's name? I see we cannot have a directory with just period as it's name in Windows. Remove that part and try again.
 
kiran purohit
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Rancher,

I tried using name instead of dot(period),however i am getting the same error, dot was just part of the program i downloaded, however other programs(converting xml to FO and FO to pdf) is working fine, with same dot operator, however in error message it says that the file name, directory name or label might be incorrect.

kiran Purohit
 
John Jai
Rancher
Posts: 1776
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What does the below line does?

How is the Source created? If you cannot understand the program, then please start writing a new program from scratch to transform a Source to XML.
 
kiran purohit
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi John,



Here i am converting java object to source object which intern is an input to the JAXP Transformation, however the code to convert java object to source object is not a part of the code which i have posted.

Regards
Kiran
reply
    Bookmark Topic Watch Topic
  • New Topic