wood burning stoves 2.0*
The moose likes Java in General and the fly likes error:javax.xml.transform.TransformerException: java.io.FileNotFoundException: file:\C:\Documents%20 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "error:javax.xml.transform.TransformerException: java.io.FileNotFoundException: file:\C:\Documents%20" Watch "error:javax.xml.transform.TransformerException: java.io.FileNotFoundException: file:\C:\Documents%20" New topic
Author

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

kiran purohit
Greenhorn

Joined: Oct 13, 2010
Posts: 4
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
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38075
    
  22
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.
John Jai
Bartender

Joined: May 31, 2011
Posts: 1776
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

Joined: Oct 13, 2010
Posts: 4
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
Bartender

Joined: May 31, 2011
Posts: 1776
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

Joined: Oct 13, 2010
Posts: 4
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: error:javax.xml.transform.TransformerException: java.io.FileNotFoundException: file:\C:\Documents%20
 
Similar Threads
Java : avalon framework configuration exception
Unicode parsing exception
java xslt & output xml files
Please help: Transformer Exception while applying transformation.
XML to HTML Conversion using JAX-P, XSLT Processor