Skip to Content.
Sympa Menu

ndt-users - Re: java.lang.SecurityException: Permission denied

Subject: ndt-users list created

List archive

Re: java.lang.SecurityException: Permission denied


Chronological Thread 
  • From: Tom Throckmorton <>
  • To: Seth Peery <>,
  • Cc:
  • Subject: Re: java.lang.SecurityException: Permission denied
  • Date: Sat, 05 Mar 2011 12:22:32 -0500
  • Organization: MCNC

On 3/5/11 11:55 AM, Seth Peery wrote:
> Matt,
>
> I see that you're using the testingServer <PARAM> to point the applet to
> your own NDT server. When I developed the functionality for the NDT
> client to be able to do this, I had to use a bit of a workaround -- you
> must sign the applet in order to circumvent the security model of the
> JVM. By design, unsigned Java applets can only open sockets to the
> machine from which their codebase was served.
> java.lang.SecurityException: Permission denied is one of the common
> errors you'll receive if your applet is trying to access a resource
> outside of the JVM's "sandbox". I would try signing the applet (see,
> for example,
> http://java.sun.com/developer/onlineTraining/Programming/JDCBook/signed.html)
> and see if this fixes your problem.

+1 on that.

One other thing worth noting is that it is also possible for the web
content and NDT service to live on different servers without signing the
applet, by making the jar file available on the NDT server and
specifying a 'codebase' for the applet, like so:

<applet name="NDT" code=Tcpbw100.class
codebase="http://NDTserver_IP_or_name/"; ARCHIVE="Tcpbw100.jar"
width=580
height=300>
<PARAM NAME="testingServer" VALUE="NDTserver_IP_or_name">
</applet>


Cheers,

-tt

>
> ____________________________________________________
> Seth Peery
> Senior GIS Architect, Enterprise GIS
> Virginia Tech Geospatial Information Sciences (0197)
> Virginia Polytechnic Institute and State University
>
> (540) 231-2178
> http://gis.it.vt.edu/
>
>
>
> On 3/5/2011 9:45 AM, Jason Zurawski wrote:
>> Matt;
>>
>> On 3/5/11 9:03 AM,
>>
>> wrote:
>>> Hi Jason,
>>> # jar -vtf /var/www/pms/Tcpbw100.jar
>>> 0 Wed Feb 16 19:50:54 CST 2011 META-INF/
>>> 75 Wed Feb 16 19:50:54 CST 2011 META-INF/MANIFEST.MF
>>> 611 Wed Feb 16 19:50:54 CST 2011 Tcpbw100$1.class
>>> 462 Wed Feb 16 19:50:54 CST 2011 Tcpbw100$2.class
>>> 462 Wed Feb 16 19:50:54 CST 2011 Tcpbw100$3.class
>>> 603 Wed Feb 16 19:50:54 CST 2011 Tcpbw100$4.class
>>> 509 Wed Feb 16 19:50:54 CST 2011 Tcpbw100$5.class
>>> 45395 Wed Feb 16 19:50:54 CST 2011 Tcpbw100.class
>>> 585 Wed Feb 16 19:50:54 CST 2011 Tcpbw100$clsFrame$1.class
>>> 505 Wed Feb 16 19:50:54 CST 2011 Tcpbw100$clsFrame.class
>>> 371 Wed Feb 16 19:50:54 CST 2011 Tcpbw100$Message.class
>>> 1311 Wed Feb 16 19:50:54 CST 2011 Tcpbw100$MyTextPane.class
>>> 2110 Wed Feb 16 19:50:54 CST 2011 Tcpbw100$OsfwWorker.class
>>> 1549 Wed Feb 16 19:50:54 CST 2011 Tcpbw100$Protocol.class
>>> 876 Wed Feb 16 19:50:54 CST 2011 Tcpbw100$StatusPanel$1.class
>>> 2289 Wed Feb 16 19:50:54 CST 2011 Tcpbw100$StatusPanel.class
>>> 3620 Wed Feb 16 19:50:54 CST 2011 Tcpbw100$TestWorker.class
>>> I think the content is the same as yours ,
>>> I am using IE8 with oracle java (build 1.6.0_24-b07) ,
>>
>>
>> Try disabling this and using the Java provided by IE instead. If this
>> doesn't work I would suggest using a debugging tool to get more
>> information.
>>
>> Have you modified the original Java source in some way?
>>
>> -jason
>>
>>
>>> Add this as follows to my page:
>>> <applet name="NDT" code=Tcpbw100.class ARCHIVE="Tcpbw100.jar" width=580
>>> height=300>
>>> <PARAM NAME="testingServer" VALUE="myserver_IP">
>>> </applet>
>>>
>>> Any hint ?
>>>
>>> Thanks and best regards,
>>> Matt
>>>
>>> -----Original Message-----
>>> From: Jason Zurawski
>>> [mailto:]
>>> Sent: Saturday, March 05, 2011 9:09 PM
>>> To:
>>>
>>> Cc:
>>>
>>> Subject: Re: java.lang.SecurityException: Permission denied
>>>
>>> Matt;
>>>
>>> The Class files are located in the jar itself, you won't need to put
>>> them in the same directory:
>>>
>>>> [zurawski@psndt2
>>>> ndt]$ jar -vtf Tcpbw100.jar
>>>> 0 Wed Aug 11 16:41:34 EDT 2010 META-INF/
>>>> 75 Wed Aug 11 16:41:34 EDT 2010 META-INF/MANIFEST.MF
>>>> 611 Wed Aug 11 16:41:32 EDT 2010 Tcpbw100$1.class
>>>> 462 Wed Aug 11 16:41:32 EDT 2010 Tcpbw100$2.class
>>>> 462 Wed Aug 11 16:41:32 EDT 2010 Tcpbw100$3.class
>>>> 603 Wed Aug 11 16:41:32 EDT 2010 Tcpbw100$4.class
>>>> 509 Wed Aug 11 16:41:32 EDT 2010 Tcpbw100$5.class
>>>> 371 Wed Aug 11 16:41:32 EDT 2010 Tcpbw100$Message.class
>>>> 1311 Wed Aug 11 16:41:32 EDT 2010 Tcpbw100$MyTextPane.class
>>>> 2110 Wed Aug 11 16:41:32 EDT 2010 Tcpbw100$OsfwWorker.class
>>>> 1549 Wed Aug 11 16:41:32 EDT 2010 Tcpbw100$Protocol.class
>>>> 876 Wed Aug 11 16:41:32 EDT 2010 Tcpbw100$StatusPanel$1.class
>>>> 2289 Wed Aug 11 16:41:32 EDT 2010 Tcpbw100$StatusPanel.class
>>>> 3620 Wed Aug 11 16:41:32 EDT 2010 Tcpbw100$TestWorker.class
>>>> 585 Wed Aug 11 16:41:32 EDT 2010 Tcpbw100$clsFrame$1.class
>>>> 505 Wed Aug 11 16:41:32 EDT 2010 Tcpbw100$clsFrame.class
>>>> 44997 Wed Aug 11 16:41:34 EDT 2010 Tcpbw100.class
>>>
>>> If you do the same to your classfile, do you see similar contents?
>>>
>>> Which version of Java are you using for IE, is it Sun/Oracle Java or is
>>> it the version that came with IE?
>>>
>>> What is the entire contents of your<applet> tag in the html file? Does
>>> it look like this:
>>>
>>>> <applet code=Tcpbw100.class ARCHIVE="Tcpbw100.jar"
>>>> width=700 height=320>
>>>> </applet>
>>>
>>> Or are you using something else?
>>>
>>> Thanks;
>>>
>>> -jason


--
Tom Throckmorton
MCNC
919.248.1448

"Connecting North Carolina's future today"



Archive powered by MHonArc 2.6.16.

Top of Page