You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by ajay bhadauria <ab...@yahoo.com> on 2010/06/02 19:41:32 UTC
File not found exception during xml transformation
I am using xalan-2.7.1. I have server which has xslt and external document in Map. The external xml document is called from xslt using xslt document function.
During xml transformation, we are getting File not found exception in between.
Transformation Exception : File not found: java.lang.NullPointerException
org.apache.xalan.xsltc.TransletException: java.io.FileNotFoundException: swift.mvaltest01$GetAccount.xml
swift.mvaltest01$GetAccount.xml is stored in Map.
I do not know why it is saying FileNotFound Exception though external document is stored in java Map and external doucument is resolved through resolver.
Any idea / thought
Thanks
Ajay
---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org
Re: File not found exception during xml transformation
Posted by ke...@us.ibm.com.
First obvious question: You say you have the document in a Map; I presume
you mean a Java Map indexed by the filename. Xerces and Xalan won't look
there unless you have plugged in a user-written Resolver which recognizes
the URI you are requesting and retrieves the document from the Map object
rather than the file system or network. I'd suggest setting a breakpoint
in that resolver to check that it's doing what you think it's doing.
Note that what the resolver sees *is* a URI, not a filename, so you may
need to use the file:// "scheme"; otherwise, a filename will usually be
interpreted as relative to the enclosing document's base URI. Again,
having the debugger stop in the resolver will let you see what's actually
being passed to it, so you can change either the call to the document()
function or the resolver's logic as appropriate.
If those suggestions don't solve the problem for you, post more specifics
-- exactly what the resolver you've written looks like, exactly what the
Map's keys are, exactly what the URI passed to the document() call looks
like. We need to know exactly what you're doing before we can offer
specifics.
______________________________________
"... Three things see no end: A loop with exit code done wrong,
A semaphore untested, And the change that comes along. ..."
-- "Threes" Rev 1.1 - Duane Elms / Leslie Fish (
http://www.ovff.org/pegasus/songs/threes-rev-11.html)
From:
Michael Glavassevich <mr...@ca.ibm.com>
To:
j-users@xerces.apache.org
Date:
06/02/2010 02:37 PM
Subject:
Re: File not found exception during xml transformation
Hi Ajay,
ajay bhadauria <ab...@yahoo.com> wrote on 06/02/2010 01:41:32 PM:
> I am using xalan-2.7.1.
Okay. So you should have asked this question on the Xalan user mailing
list.
> I have server which has xslt and external
> document in Map. The external xml document is called from xslt using
> xslt document function.
>
> During xml transformation, we are getting File not found exception in
between.
>
> Transformation Exception : File not found:
java.lang.NullPointerException
>
> org.apache.xalan.xsltc.TransletException:
> java.io.FileNotFoundException: swift.mvaltest01$GetAccount.xml
>
> swift.mvaltest01$GetAccount.xml is stored in Map.
> I do not know why it is saying FileNotFound Exception though
> external document is stored in java Map and external doucument is
> resolved through resolver.
>
> Any idea / thought
Better ask the Xalan folks and they'll probably need more context (e.g.
stack traces, code, etc...) to be able to tell you what's going on.
> Thanks
> Ajay
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
> For additional commands, e-mail: j-users-help@xerces.apache.org
Thanks.
Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org
Re: File not found exception during xml transformation
Posted by ke...@us.ibm.com.
First obvious question: You say you have the document in a Map; I presume
you mean a Java Map indexed by the filename. Xerces and Xalan won't look
there unless you have plugged in a user-written Resolver which recognizes
the URI you are requesting and retrieves the document from the Map object
rather than the file system or network. I'd suggest setting a breakpoint
in that resolver to check that it's doing what you think it's doing.
Note that what the resolver sees *is* a URI, not a filename, so you may
need to use the file:// "scheme"; otherwise, a filename will usually be
interpreted as relative to the enclosing document's base URI. Again,
having the debugger stop in the resolver will let you see what's actually
being passed to it, so you can change either the call to the document()
function or the resolver's logic as appropriate.
If those suggestions don't solve the problem for you, post more specifics
-- exactly what the resolver you've written looks like, exactly what the
Map's keys are, exactly what the URI passed to the document() call looks
like. We need to know exactly what you're doing before we can offer
specifics.
______________________________________
"... Three things see no end: A loop with exit code done wrong,
A semaphore untested, And the change that comes along. ..."
-- "Threes" Rev 1.1 - Duane Elms / Leslie Fish (
http://www.ovff.org/pegasus/songs/threes-rev-11.html)
From:
Michael Glavassevich <mr...@ca.ibm.com>
To:
j-users@xerces.apache.org
Date:
06/02/2010 02:37 PM
Subject:
Re: File not found exception during xml transformation
Hi Ajay,
ajay bhadauria <ab...@yahoo.com> wrote on 06/02/2010 01:41:32 PM:
> I am using xalan-2.7.1.
Okay. So you should have asked this question on the Xalan user mailing
list.
> I have server which has xslt and external
> document in Map. The external xml document is called from xslt using
> xslt document function.
>
> During xml transformation, we are getting File not found exception in
between.
>
> Transformation Exception : File not found:
java.lang.NullPointerException
>
> org.apache.xalan.xsltc.TransletException:
> java.io.FileNotFoundException: swift.mvaltest01$GetAccount.xml
>
> swift.mvaltest01$GetAccount.xml is stored in Map.
> I do not know why it is saying FileNotFound Exception though
> external document is stored in java Map and external doucument is
> resolved through resolver.
>
> Any idea / thought
Better ask the Xalan folks and they'll probably need more context (e.g.
stack traces, code, etc...) to be able to tell you what's going on.
> Thanks
> Ajay
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
> For additional commands, e-mail: j-users-help@xerces.apache.org
Thanks.
Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org
Re: File not found exception during xml transformation
Posted by Michael Glavassevich <mr...@ca.ibm.com>.
Hi Ajay,
ajay bhadauria <ab...@yahoo.com> wrote on 06/02/2010 01:41:32 PM:
> I am using xalan-2.7.1.
Okay. So you should have asked this question on the Xalan user mailing
list.
> I have server which has xslt and external
> document in Map. The external xml document is called from xslt using
> xslt document function.
>
> During xml transformation, we are getting File not found exception in
between.
>
> Transformation Exception : File not found: java.lang.NullPointerException
>
> org.apache.xalan.xsltc.TransletException:
> java.io.FileNotFoundException: swift.mvaltest01$GetAccount.xml
>
> swift.mvaltest01$GetAccount.xml is stored in Map.
> I do not know why it is saying FileNotFound Exception though
> external document is stored in java Map and external doucument is
> resolved through resolver.
>
> Any idea / thought
Better ask the Xalan folks and they'll probably need more context (e.g.
stack traces, code, etc...) to be able to tell you what's going on.
> Thanks
> Ajay
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
> For additional commands, e-mail: j-users-help@xerces.apache.org
Thanks.
Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org