On Sun, Nov 23, 2008 at 3:10 PM, far4ever <[EMAIL PROTECTED]> wrote:
> thanks a lot for your kind responses .
> i was able to find out what went wrong.
> the thing was as id i was passing the same name (hard coded)
> and when evert time i run the adding part that new node were created( with
> index
-file-from-the-jacrabbit-repository-tp20645363p20646570.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
exception...
--
View this message in context:
http://www.nabble.com/reading-a-file-from-the-jacrabbit-repository-tp20645363p20646278.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
far4ever wrote:
yes.
InputStream pic = s.getImage("farhath"); // this is the line where this
method is invoked
if(pic == null)
System.out.println(" the file read is null");
and the code in the if condition get executed..
You you please the full code, plus the st
sion.getRootNode();
> Node userfile = root.getNode(id);
> Node pic = userfile.getNode("picture");
> Node image = pic.getNode("jcr:content");
> picture = (FileInputStream)
> image.getProperty("jcr:data").getValue().getStream();
> if
/reading-a-file-from-the-jacrabbit-repository-tp20645363p20645924.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
ttp://www.nabble.com/reading-a-file-from-the-jacrabbit-repository-tp20645363p20645898.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
far4ever wrote:
actually i'm not getting an exception at this point.
it s affected in another method when i try to read the inputStream, it
throws a nullPointerException
So what is "null"? The input stream?
BR, Julian
actually i'm not getting an exception at this point.
it s affected in another method when i try to read the inputStream, it
throws a nullPointerException
--
View this message in context:
http://www.nabble.com/reading-a-file-from-the-jacrabbit-repository-tp20645363p20645582.html
Sent fro
far4ever wrote:
hi
i added an image to the repository but when i tried to get it back i wont
get it. instead i seems to be null..
What exactly is null? The stream? Are you getting an exception?
> ...
picture = (FileInputStream)
image.getProperty("jcr:data").getValue().getStream();
.
erfile.getNode("picture");
Node image = pic.getNode("jcr:content");
picture = (FileInputStream)
image.getProperty("jcr:data").getValue().getStream();
if(picture == null)
System.out.println("errorr in reading the file");
11 matches
Mail list logo