Link to home
Start Free TrialLog in
Avatar of jazzIIIlove
jazzIIIloveFlag for Sweden

asked on

StreamResult on windows is fine but not in AIX

Hi;

I am doing xml manipulation. My code works fine on Windows but fails in AIX without throwing any exception. The idea is that it should create a file in a local directory but cannot for AIX..

expression = "/my/xpath";
            Node stateNode = (Node) xPath.compile(expression).evaluate(xmlResultDocument, XPathConstants.NODE);

            Transformer transformer = TransformerFactory.newInstance().newTransformer();

           Result  output = new StreamResult(new File("C:\\jazz.abc"));
           Source input = new DOMSource(stateNode);

            transformer.transform(input, output);

Open in new window

Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Result  output = new StreamResult(new File("C:\\jazz.abc"));

Open in new window

Why would you use such a path on AIX?
Avatar of jazzIIIlove

ASKER

Ah, my mistake. It is the same when i give /path/to/save
ASKER CERTIFIED SOLUTION
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi,

My catch block is detailed so no exception got lost on the way.

The code works fine on Windows but fails in AIX, both of which are JDK1.6
What boolean value did you get?
oh oh, sorry. I had checked your above comment, on my iphone and canWrite was trimmed there.

i find out that to the given path, there is no right to generate a file. I will come back next week for this case.

Regards.