You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by ndesk1900 <nd...@gmail.com> on 2009/07/14 03:55:13 UTC

System.getSecurityManager(); is null

Hello all,

I've written some code that connects to the repository, loads an image
(using ImageIO.read()) and i wish to store that image in the JCR.

The problem is; as soon as i make a call to ImageIO.read() i am thrown an
exception; reason for the exception is [SecurityManager security =
System.getSecurityManager();]  System.getSecurityManager() returning null
somewhere in the File class. I've never really needed to
'setSecurityManager' as such before; is this something to do with
Jackrabbit? Any ideas how to solve this?

Thanks
Neville
-- 
View this message in context: http://www.nabble.com/System.getSecurityManager%28%29--is-null-tp24472460p24472460.html
Sent from the Jackrabbit - Dev mailing list archive at Nabble.com.


Re: System.getSecurityManager(); is null

Posted by ndesk1900 <nd...@gmail.com>.
There is a call [fs.checkAccess(this, FileSystem.ACCESS_READ)] that is
returning me false. The file is NOT readonly and the owner is Everyone so i
guess all permissions are in place (using Windows Vista). Dont know why its
happening.

I now am quite sure it has nothing to do with Jackrabbit; sorry about the
post.

Thanks


Dave Brosius-2 wrote:
> 
> I take it then that bioimagene is a standalone application, and not one
> that runs in a web server or applet, or container of any kind?
> 
> -----Original Message-----
> From: "ndesk1900" <nd...@gmail.com>
> Sent: Tuesday, July 14, 2009 4:00pm
> To: dev@jackrabbit.apache.org
> Subject: Re: System.getSecurityManager(); is null
> 
> 
> Stack trace:-
> 
> javax.imageio.IIOException: Can't read input file!
> 	at javax.imageio.ImageIO.read(ImageIO.java:1275)
> 	at
> com.bioimagene.imageServer.storage.jackrabbit.IndexImages.addNewImages(IndexImages.java:66)
> 	at
> com.bioimagene.imageServer.storage.jackrabbit.IndexImages.addNewImages(IndexImages.java:85)
> 	at
> com.bioimagene.imageServer.storage.jackrabbit.IndexImages.main(IndexImages.java:38)
> 
> 
> 
> ndesk1900 wrote:
>> 
>> Hello all,
>> 
>> I've written some code that connects to the repository, loads an image
>> (using ImageIO.read()) and i wish to store that image in the JCR.
>> 
>> The problem is; as soon as i make a call to ImageIO.read() i am thrown an
>> exception; reason for the exception is [SecurityManager security =
>> System.getSecurityManager();]  System.getSecurityManager() returning null
>> somewhere in the File class. I've never really needed to
>> 'setSecurityManager' as such before; is this something to do with
>> Jackrabbit? Any ideas how to solve this?
>> 
>> Thanks
>> Neville
>> 
> 
> -- 
> View this message in context:
> http://www.nabble.com/System.getSecurityManager%28%29--is-null-tp24472460p24486768.html
> Sent from the Jackrabbit - Dev mailing list archive at Nabble.com.
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/System.getSecurityManager%28%29--is-null-tp24472460p24487856.html
Sent from the Jackrabbit - Dev mailing list archive at Nabble.com.


Re: System.getSecurityManager(); is null

Posted by ndesk1900 <nd...@gmail.com>.
Yes thats just a package hierarchy; Actually corrected one is here;

Stack trace:-

javax.imageio.IIOException: Can't read input file!
	at javax.imageio.ImageIO.read(ImageIO.java:1275)
	at
com.imageServer.storage.jackrabbit.IndexImages.addNewImages(IndexImages.java:66)
	at
com.imageServer.storage.jackrabbit.IndexImages.addNewImages(IndexImages.java:85)
	at com.imageServer.storage.jackrabbit.IndexImages.main(IndexImages.java:38)



Dave Brosius-2 wrote:
> 
> I take it then that bioimagene is a standalone application, and not one
> that runs in a web server or applet, or container of any kind?
> 
> -----Original Message-----
> From: "ndesk1900" <nd...@gmail.com>
> Sent: Tuesday, July 14, 2009 4:00pm
> To: dev@jackrabbit.apache.org
> Subject: Re: System.getSecurityManager(); is null
> 
> 
> Stack trace:-
> 
> javax.imageio.IIOException: Can't read input file!
> 	at javax.imageio.ImageIO.read(ImageIO.java:1275)
> 	at
> com.bioimagene.imageServer.storage.jackrabbit.IndexImages.addNewImages(IndexImages.java:66)
> 	at
> com.bioimagene.imageServer.storage.jackrabbit.IndexImages.addNewImages(IndexImages.java:85)
> 	at
> com.bioimagene.imageServer.storage.jackrabbit.IndexImages.main(IndexImages.java:38)
> 
> 
> 
> ndesk1900 wrote:
>> 
>> Hello all,
>> 
>> I've written some code that connects to the repository, loads an image
>> (using ImageIO.read()) and i wish to store that image in the JCR.
>> 
>> The problem is; as soon as i make a call to ImageIO.read() i am thrown an
>> exception; reason for the exception is [SecurityManager security =
>> System.getSecurityManager();]  System.getSecurityManager() returning null
>> somewhere in the File class. I've never really needed to
>> 'setSecurityManager' as such before; is this something to do with
>> Jackrabbit? Any ideas how to solve this?
>> 
>> Thanks
>> Neville
>> 
> 
> -- 
> View this message in context:
> http://www.nabble.com/System.getSecurityManager%28%29--is-null-tp24472460p24486768.html
> Sent from the Jackrabbit - Dev mailing list archive at Nabble.com.
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/System.getSecurityManager%28%29--is-null-tp24472460p24487659.html
Sent from the Jackrabbit - Dev mailing list archive at Nabble.com.


Re: System.getSecurityManager(); is null

Posted by Dave Brosius <db...@mebigfatguy.com>.
I take it then that bioimagene is a standalone application, and not one that runs in a web server or applet, or container of any kind?

-----Original Message-----
From: "ndesk1900" <nd...@gmail.com>
Sent: Tuesday, July 14, 2009 4:00pm
To: dev@jackrabbit.apache.org
Subject: Re: System.getSecurityManager(); is null


Stack trace:-

javax.imageio.IIOException: Can't read input file!
	at javax.imageio.ImageIO.read(ImageIO.java:1275)
	at
com.bioimagene.imageServer.storage.jackrabbit.IndexImages.addNewImages(IndexImages.java:66)
	at
com.bioimagene.imageServer.storage.jackrabbit.IndexImages.addNewImages(IndexImages.java:85)
	at
com.bioimagene.imageServer.storage.jackrabbit.IndexImages.main(IndexImages.java:38)



ndesk1900 wrote:
> 
> Hello all,
> 
> I've written some code that connects to the repository, loads an image
> (using ImageIO.read()) and i wish to store that image in the JCR.
> 
> The problem is; as soon as i make a call to ImageIO.read() i am thrown an
> exception; reason for the exception is [SecurityManager security =
> System.getSecurityManager();]  System.getSecurityManager() returning null
> somewhere in the File class. I've never really needed to
> 'setSecurityManager' as such before; is this something to do with
> Jackrabbit? Any ideas how to solve this?
> 
> Thanks
> Neville
> 

-- 
View this message in context: http://www.nabble.com/System.getSecurityManager%28%29--is-null-tp24472460p24486768.html
Sent from the Jackrabbit - Dev mailing list archive at Nabble.com.


Re: System.getSecurityManager(); is null

Posted by ndesk1900 <nd...@gmail.com>.
Stack trace:-

javax.imageio.IIOException: Can't read input file!
	at javax.imageio.ImageIO.read(ImageIO.java:1275)
	at
com.bioimagene.imageServer.storage.jackrabbit.IndexImages.addNewImages(IndexImages.java:66)
	at
com.bioimagene.imageServer.storage.jackrabbit.IndexImages.addNewImages(IndexImages.java:85)
	at
com.bioimagene.imageServer.storage.jackrabbit.IndexImages.main(IndexImages.java:38)



ndesk1900 wrote:
> 
> Hello all,
> 
> I've written some code that connects to the repository, loads an image
> (using ImageIO.read()) and i wish to store that image in the JCR.
> 
> The problem is; as soon as i make a call to ImageIO.read() i am thrown an
> exception; reason for the exception is [SecurityManager security =
> System.getSecurityManager();]  System.getSecurityManager() returning null
> somewhere in the File class. I've never really needed to
> 'setSecurityManager' as such before; is this something to do with
> Jackrabbit? Any ideas how to solve this?
> 
> Thanks
> Neville
> 

-- 
View this message in context: http://www.nabble.com/System.getSecurityManager%28%29--is-null-tp24472460p24486768.html
Sent from the Jackrabbit - Dev mailing list archive at Nabble.com.


Re: System.getSecurityManager(); is null

Posted by Alexander Klimetschek <ak...@day.com>.
On Tue, Jul 14, 2009 at 3:55 AM, ndesk1900<nd...@gmail.com> wrote:
> I've written some code that connects to the repository, loads an image
> (using ImageIO.read()) and i wish to store that image in the JCR.
>
> The problem is; as soon as i make a call to ImageIO.read() i am thrown an
> exception; reason for the exception is [SecurityManager security =
> System.getSecurityManager();]  System.getSecurityManager() returning null
> somewhere in the File class. I've never really needed to
> 'setSecurityManager' as such before; is this something to do with
> Jackrabbit? Any ideas how to solve this?

Could you provide the affected code snippet and (full) stacktrace of
the exception? Otherwise it is pure guessing.

But I would think that it is not related to Jackrabbit, especially if
it happens on the ImageIO.read() when reading from your file, because
at this point Jackrabbit as the target of the stream is not involved
yet.

Regards,
Alex

-- 
Alexander Klimetschek
alexander.klimetschek@day.com