Re: java.security.AccessControlException opening from an applet

at ucar.unidata.io.RandomAccessFile.<init>(RandomAccessFile.java:134)
at ucar.nc2.NetcdfFile.open(NetcdfFile.java:217)
at ucar.nc2.NetcdfFile.open(NetcdfFile.java:167)
at ucar.nc2.NetcdfFile.open(NetcdfFile.java:151)
at softiam.services.ui.dataAnalysis.util.NetCDFReader.<init>(NetCDFReader.java:42)
This seems to imply your applet is trying to open a local file. Can you figure 
out what the file or URL is?

S Santos wrote:
Hi All,

In this example the applet was loaded from a Tomcat server at localhost, so the applet is accesing to the server it was loaded from. Anyway, I tried an execution from a remote computer and the problem persists. Maybe this is a problem of the JVM (I'm using the latest one 1.5.0_06-b05) but the strange point is that using netcdf 2.1.10 all works fine and using the latest stable version (2.2.14) the Exception is throwed.

Here is the output with trace level five and a the thread stack dump


Trace level set to 5: all ... completed.
basic: Stopping applet ...
basic: Removed progress listener: sun.plugin.util.GrayBoxPainter@bf7190
basic: Finding information ...
basic: Releasing classloader: sun.plugin.ClassLoaderInfo@7bb290, refcount=0
basic: Caching classloader: sun.plugin.ClassLoaderInfo@7bb290
basic: Current classloader cache size: 1
basic: Done ...
basic: Joining applet thread ...
basic: Destroying applet ...
basic: Disposing applet ...
basic: Quiting applet ...
basic: Joined applet thread ...
basic: Unregistered modality listener
INFO: Tue 25-04-2006 10:24:17 < Scheduler#run: Thread "Thread-12" is waking up after -1145957018322 milliseconds. Requested sleep time was: 60000 milliseconds (1 minutes) > :OFNI INFO: Tue 25-04-2006 10:24:17 < Scheduler#reload: Update all ISchedulerManaged objects > :OFNI INFO: Tue 25-04-2006 10:24:17 < --------------------------------------------------------------------------- > :OFNI INFO: Tue 25-04-2006 10:24:17 < Scheduler#reload: Updating softiam.services.util.ConfigBean > :OFNI INFO: Tue 25-04-2006 10:24:17 < --------------------------------------------------------------------------- > :OFNI INFO: Tue 25-04-2006 10:24:17 < Scheduler#setUpdateInterval: UpdateInterval is being changed from 1 to 60 > :OFNI INFO: Tue 25-04-2006 10:24:17 < Scheduler#setUpdateInterval: Waking up the Thread > :OFNI INFO: Tue 25-04-2006 10:24:17 < Scheduler#run: Thread "Thread-12" is sleeping for 60 minutes (at startup this will be 1 minutes until resources are loaded) > :OFNI
basic: Registered modality listener
liveconnect: Invoking JS method: document
liveconnect: Invoking JS method: URL
basic: Referencing classloader: sun.plugin.ClassLoaderInfo@7bb290, refcount=1
basic: Added progress listener: sun.plugin.util.GrayBoxPainter@893969
basic: Loading applet ...
basic: Initializing applet ...
basic: Starting applet ...
network: Connecting http://139.222.100.25:8080/softiam-portal/softiam/services/ui/dataAnalysis/tool/data/images/applet.GIF with proxy=DIRECT network: Connecting http://139.222.100.25:8080/softiam-portal/softiam/services/ui/dataAnalysis/tool/data/images/applet.GIF with cookie "JSESSIONID=4D2AFA25DE6D6CEB3618E996D9227949" basic: Loading http://139.222.100.25:8080/softiam-portal/softiam/services/ui/dataAnalysis/tool/data/images/applet.GIF from cache network: Connecting http://139.222.100.25:8080/softiam-portal/softiam/services/ui/dataAnalysis/tool/data/images/graph.GIF with proxy=DIRECT network: Connecting http://139.222.100.25:8080/softiam-portal/softiam/services/ui/dataAnalysis/tool/data/images/graph.GIF with cookie "JSESSIONID=4D2AFA25DE6D6CEB3618E996D9227949" basic: Loading http://139.222.100.25:8080/softiam-portal/softiam/services/ui/dataAnalysis/tool/data/images/graph.GIF from cache network: Connecting http://139.222.100.25:8080/softiam-portal/softiam/services/ui/dataAnalysis/tool/data/images/iso.GIF with proxy=DIRECT network: Connecting http://139.222.100.25:8080/softiam-portal/softiam/services/ui/dataAnalysis/tool/data/images/iso.GIF with cookie "JSESSIONID=4D2AFA25DE6D6CEB3618E996D9227949" basic: Loading http://139.222.100.25:8080/softiam-portal/softiam/services/ui/dataAnalysis/tool/data/images/iso.GIF from cache network: Connecting http://139.222.100.25:8080/softiam-portal/softiam/services/ui/dataAnalysis/tool/data/images/color.GIF with proxy=DIRECT network: Connecting http://139.222.100.25:8080/softiam-portal/softiam/services/ui/dataAnalysis/tool/data/images/color.GIF with cookie "JSESSIONID=4D2AFA25DE6D6CEB3618E996D9227949" basic: Loading http://139.222.100.25:8080/softiam-portal/softiam/services/ui/dataAnalysis/tool/data/images/color.GIF from cache network: Connecting http://139.222.100.25:8080/softiam-portal/softiam/services/ui/dataAnalysis/tool/data/images/animation.GIF with proxy=DIRECT network: Connecting http://139.222.100.25:8080/softiam-portal/softiam/services/ui/dataAnalysis/tool/data/images/animation.GIF with cookie "JSESSIONID=4D2AFA25DE6D6CEB3618E996D9227949" basic: Loading http://139.222.100.25:8080/softiam-portal/softiam/services/ui/dataAnalysis/tool/data/images/animation.GIF from cache network: Connecting http://139.222.100.25:8080/softiam-portal/softiam/services/ui/dataAnalysis/tool/data/images/legend.GIF with proxy=DIRECT network: Connecting http://139.222.100.25:8080/softiam-portal/softiam/services/ui/dataAnalysis/tool/data/images/legend.GIF with cookie "JSESSIONID=4D2AFA25DE6D6CEB3618E996D9227949" basic: Loading http://139.222.100.25:8080/softiam-portal/softiam/services/ui/dataAnalysis/tool/data/images/legend.GIF from cache network: Connecting http://139.222.100.25:8080/softiam-portal/softiam/services/ui/dataAnalysis/tool/data/images/console.GIF with proxy=DIRECT network: Connecting http://139.222.100.25:8080/softiam-portal/softiam/services/ui/dataAnalysis/tool/data/images/console.GIF with cookie "JSESSIONID=4D2AFA25DE6D6CEB3618E996D9227949" basic: Loading http://139.222.100.25:8080/softiam-portal/softiam/services/ui/dataAnalysis/tool/data/images/console.GIF from cache network: Connecting http://139.222.100.25:8080/softiam-portal/softiam/services/ui/dataAnalysis/tool/data/images/graph.GIF with proxy=DIRECT network: Connecting http://139.222.100.25:8080/softiam-portal/softiam/services/ui/dataAnalysis/tool/data/images/graph.GIF with cookie "JSESSIONID=4D2AFA25DE6D6CEB3618E996D9227949" basic: Loading http://139.222.100.25:8080/softiam-portal/softiam/services/ui/dataAnalysis/tool/data/images/graph.GIF from cache network: Connecting http://139.222.100.25:8080/softiam-portal/softiam/services/ui/dataAnalysis/tool/data/images/table.GIF with proxy=DIRECT network: Connecting http://139.222.100.25:8080/softiam-portal/softiam/services/ui/dataAnalysis/tool/data/images/table.GIF with cookie "JSESSIONID=4D2AFA25DE6D6CEB3618E996D9227949" basic: Loading http://139.222.100.25:8080/softiam-portal/softiam/services/ui/dataAnalysis/tool/data/images/table.GIF from cache network: Connecting http://139.222.100.25:8080/softiam-portal/softiam/services/ui/dataAnalysis/tool/data/images/add.GIF with proxy=DIRECT network: Connecting http://139.222.100.25:8080/softiam-portal/softiam/services/ui/dataAnalysis/tool/data/images/add.GIF with cookie "JSESSIONID=4D2AFA25DE6D6CEB3618E996D9227949" basic: Loading http://139.222.100.25:8080/softiam-portal/softiam/services/ui/dataAnalysis/tool/data/images/add.GIF from cache network: Connecting http://139.222.100.25:8080/softiam-portal/softiam/services/ui/dataAnalysis/tool/data/images/remove.GIF with proxy=DIRECT network: Connecting http://139.222.100.25:8080/softiam-portal/softiam/services/ui/dataAnalysis/tool/data/images/remove.GIF with cookie "JSESSIONID=4D2AFA25DE6D6CEB3618E996D9227949" basic: Loading http://139.222.100.25:8080/softiam-portal/softiam/services/ui/dataAnalysis/tool/data/images/remove.GIF from cache network: Connecting http://139.222.100.25:8080/softiam-portal/softiam/services/ui/dataAnalysis/tool/data/images/tyndall.GIF with proxy=DIRECT network: Connecting http://139.222.100.25:8080/softiam-portal/softiam/services/ui/dataAnalysis/tool/data/images/tyndall.GIF with cookie "JSESSIONID=4D2AFA25DE6D6CEB3618E996D9227949" basic: Loading http://139.222.100.25:8080/softiam-portal/softiam/services/ui/dataAnalysis/tool/data/images/tyndall.GIF from cache java.security.AccessControlException: access denied (java.io.FilePermission http%3A%2F%2F139.222.100.25%3A8080%2Fsoftiam-portal%2Fusers%2Fe145%2FIPCC_ESM+Magicc_SCM%2Fmagicc_out.nc read)
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkRead(Unknown Source)
at java.io.RandomAccessFile.<init>(Unknown Source)
at java.io.RandomAccessFile.<init>(Unknown Source)
at ucar.unidata.io.RandomAccessFile.<init>(RandomAccessFile.java:134)
at ucar.nc2.NetcdfFile.open(NetcdfFile.java:217)
at ucar.nc2.NetcdfFile.open(NetcdfFile.java:167)
at ucar.nc2.NetcdfFile.open(NetcdfFile.java:151)
at softiam.services.ui.dataAnalysis.util.NetCDFReader.<init>(NetCDFReader.java:42) at softiam.services.ui.dataAnalysis.engine.SoftiamRepresentation.setNetCDFFile(SoftiamRepresentation.java:130) at softiam.services.ui.dataAnalysis.tool.SoftiamAnalyzer.loadURL(SoftiamAnalyzer.java:630) at softiam.services.ui.dataAnalysis.tool.SoftiamAnalyzerApplet.init(SoftiamAnalyzerApplet.java:38)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Dump thread stack ...
----------------------------------------------------
Full thread dump Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode):

"Thread-18" prio=4 tid=0x103c2058 nid=0x9a8 in Object.wait() [0x1090f000..0x1090fd68]
at java.lang.Object.wait(Native Method)
- waiting on <0x05c6deb8> (a visad.java2d.VisADCanvasJ2D)
at java.lang.Object.wait(Unknown Source)
at visad.java2d.VisADCanvasJ2D.run(VisADCanvasJ2D.java:365)
- locked <0x05c6deb8> (a visad.java2d.VisADCanvasJ2D)
at java.lang.Thread.run(Unknown Source)

"AWT-EventQueue-3" prio=4 tid=0x103f2830 nid=0x888 in Object.wait() [0x1aa6f000..0x1aa6f9e8]
at java.lang.Object.wait(Native Method)
- waiting on <0x05c51640> (a java.awt.EventQueue)
at java.lang.Object.wait(Unknown Source)
at java.awt.EventQueue.getNextEvent(Unknown Source)
- locked <0x05c51640> (a java.awt.EventQueue)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

"TimerQueue" daemon prio=4 tid=0x104aa780 nid=0x958 in Object.wait() [0x10c1f000..0x10c1fae8]
at java.lang.Object.wait(Native Method)
- waiting on <0x05c51738> (a javax.swing.TimerQueue)
at javax.swing.TimerQueue.run(Unknown Source)
- locked <0x05c51738> (a javax.swing.TimerQueue)
at java.lang.Thread.run(Unknown Source)

"thread applet-softiam.services.ui.dataAnalysis.tool.SoftiamAnalyzerApplet.class" prio=4 tid=0x103f1168 nid=0x40c in Object.wait() [0x1a76f000..0x1a76fbe8]
at java.lang.Object.wait(Native Method)
- waiting on <0x05c51938> (a sun.plugin.AppletViewer)
at java.lang.Object.wait(Unknown Source)
at sun.applet.AppletPanel.getNextEvent(Unknown Source)
- locked <0x05c51938> (a sun.plugin.AppletViewer)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

"TimerQueue" daemon prio=6 tid=0x1049eb40 nid=0xfd8 in Object.wait() [0x10a0f000..0x10a0fa68]
at java.lang.Object.wait(Native Method)
- waiting on <0x05c2ca38> (a javax.swing.TimerQueue)
at javax.swing.TimerQueue.run(Unknown Source)
- locked <0x05c2ca38> (a javax.swing.TimerQueue)
at java.lang.Thread.run(Unknown Source)

"ConsoleWriterThread" daemon prio=6 tid=0x105077f0 nid=0x438 in Object.wait() [0x1080f000..0x1080fae8]
at java.lang.Object.wait(Native Method)
- waiting on <0x058228f8> (a java.lang.Object)
at java.lang.Object.wait(Unknown Source)
at com.sun.deploy.util.ConsoleTraceListener$ConsoleWriterThread.run(Unknown Source)
- locked <0x058228f8> (a java.lang.Object)

"AWT-EventQueue-1" prio=6 tid=0x103c2ab0 nid=0xe78 runnable [0x02e2f000..0x02e2fb68]
at sun.plugin.JavaRunTime.dumpAllStacks(Native Method)
at sun.plugin.util.PluginConsoleController.dumpAllStacks(Unknown Source)
at com.sun.deploy.util.ConsoleWindow$1.actionPerformed(Unknown Source)
at javax.swing.JComponent$ActionStandin.actionPerformed(Unknown Source)
at javax.swing.SwingUtilities.notifyAction(Unknown Source)
at javax.swing.JComponent.processKeyBinding(Unknown Source)
at javax.swing.KeyboardManager.fireBinding(Unknown Source)
at javax.swing.KeyboardManager.fireKeyboardAction(Unknown Source)
at javax.swing.JComponent.processKeyBindingsForAllComponents(Unknown Source)
at javax.swing.JComponent.processKeyBindings(Unknown Source)
at javax.swing.JComponent.processKeyEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)
at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

"Thread-13" prio=6 tid=0x10462600 nid=0xfbc runnable [0x00000000..0x1010f71c]

"J3D-Renderer-1" prio=4 tid=0x104feb80 nid=0x73c in Object.wait() [0x1a05f000..0x1a05fd68]
at java.lang.Object.wait(Native Method)
- waiting on <0x058a0000> (a javax.media.j3d.Renderer)
at java.lang.Object.wait(Unknown Source)
at javax.media.j3d.J3dThread.runMonitor(J3dThread.java:275)
- locked <0x058a0000> (a javax.media.j3d.Renderer)
at javax.media.j3d.J3dThread.run(J3dThread.java:251)

"J3D-MasterControl-1" prio=4 tid=0x104b6850 nid=0xb70 in Object.wait() [0x19f5f000..0x19f5f9e8]
at java.lang.Object.wait(Native Method)
- waiting on <0x058a0190> (a javax.media.j3d.MasterControl)
at java.lang.Object.wait(Unknown Source)
at javax.media.j3d.MasterControl.runMonitor(MasterControl.java:3619)
- locked <0x058a0190> (a javax.media.j3d.MasterControl)
at javax.media.j3d.MasterControl.doWork(MasterControl.java:3081)
at javax.media.j3d.MasterControlThread.run(MasterControlThread.java:48)

"J3D-NotificationThread" prio=4 tid=0x104b66c8 nid=0x6ec in Object.wait() [0x19e5f000..0x19e5fa68]
at java.lang.Object.wait(Native Method)
- waiting on <0x058a02b8> (a javax.media.j3d.NotificationThread)
at java.lang.Object.wait(Unknown Source)
at javax.media.j3d.NotificationThread.runMonitor(NotificationThread.java:97)
- locked <0x058a02b8> (a javax.media.j3d.NotificationThread)
at javax.media.j3d.NotificationThread.run(NotificationThread.java:83)

"J3D-TimerThread" prio=4 tid=0x10502310 nid=0x16c in Object.wait() [0x19d5f000..0x19d5fae8]
at java.lang.Object.wait(Native Method)
- waiting on <0x058a0320> (a javax.media.j3d.TimerThread)
at java.lang.Object.wait(Unknown Source)
at javax.media.j3d.TimerThread.runMonitor(TimerThread.java:126)
- locked <0x058a0320> (a javax.media.j3d.TimerThread)
at javax.media.j3d.TimerThread.run(TimerThread.java:89)

"J3D-RenderingAttributesStructureUpdateThread" prio=4 tid=0x104f9e10 nid=0x8e4 in Object.wait() [0x19c5f000..0x19c5fb68]
at java.lang.Object.wait(Native Method)
- waiting on <0x058a0390> (a javax.media.j3d.StructureUpdateThread)
at java.lang.Object.wait(Unknown Source)
at javax.media.j3d.J3dThread.runMonitor(J3dThread.java:264)
- locked <0x058a0390> (a javax.media.j3d.StructureUpdateThread)
at javax.media.j3d.J3dThread.run(J3dThread.java:248)

"AWT-EventQueue-0" prio=6 tid=0x0f8a7070 nid=0x5d4 in Object.wait() [0x1020f000..0x1020fb68]
at java.lang.Object.wait(Native Method)
- waiting on <0x057c3fb0> (a java.awt.EventQueue)
at java.lang.Object.wait(Unknown Source)
at java.awt.EventQueue.getNextEvent(Unknown Source)
- locked <0x057c3fb0> (a java.awt.EventQueue)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

"traceMsgQueueThread" daemon prio=6 tid=0x0f898468 nid=0xf38 in Object.wait() [0x0ff5f000..0x0ff5fc68]
at java.lang.Object.wait(Native Method)
- waiting on <0x05810398> (a java.util.ArrayList)
at java.lang.Object.wait(Unknown Source)
at com.sun.deploy.util.Trace$TraceMsgQueueChecker.run(Unknown Source)
- locked <0x05810398> (a java.util.ArrayList)
at java.lang.Thread.run(Unknown Source)

"AWT-Windows" daemon prio=6 tid=0x0f887c98 nid=0x7c4 runnable [0x0fd4f000..0x0fd4fce8]
at java.awt.EventQueue.wakeup(Unknown Source)
at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.awt.SunToolkit.wakeupEventQueue(Unknown Source)
at sun.awt.PostEventQueue.postEvent(Unknown Source)
at sun.awt.SunToolkit.postEvent(Unknown Source)
at sun.awt.windows.WComponentPeer.postEvent(Unknown Source)
at sun.awt.windows.WToolkit.eventLoop(Native Method)
at sun.awt.windows.WToolkit.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

"AWT-Shutdown" prio=6 tid=0x0f887860 nid=0x548 in Object.wait() [0x0fc4f000..0x0fc4fd68]
at java.lang.Object.wait(Native Method)
- waiting on <0x057d3db8> (a java.lang.Object)
at java.lang.Object.wait(Unknown Source)
at sun.awt.AWTAutoShutdown.run(Unknown Source)
- locked <0x057d3db8> (a java.lang.Object)
at java.lang.Thread.run(Unknown Source)

"Java2D Disposer" daemon prio=10 tid=0x0f880970 nid=0xed0 in Object.wait() [0x0fb4f000..0x0fb4f9e8]
at java.lang.Object.wait(Native Method)
- waiting on <0x057d3e40> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(Unknown Source)
- locked <0x057d3e40> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(Unknown Source)
at sun.java2d.Disposer.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

"Low Memory Detector" daemon prio=6 tid=0x02d04898 nid=0xedc runnable [0x00000000..0x00000000]

"CompilerThread0" daemon prio=10 tid=0x02d03598 nid=0x9e0 waiting on condition [0x00000000..0x0f60f84c]

"Signal Dispatcher" daemon prio=10 tid=0x02d027e8 nid=0x644 runnable [0x00000000..0x00000000]

"Finalizer" daemon prio=8 tid=0x02cf98c0 nid=0xa18 in Object.wait() [0x0f40f000..0x0f40fc68]
at java.lang.Object.wait(Native Method)
- waiting on <0x057d3fe8> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(Unknown Source)
- locked <0x057d3fe8> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(Unknown Source)
at java.lang.ref.Finalizer$FinalizerThread.run(Unknown Source)

"Reference Handler" daemon prio=10 tid=0x02cf8428 nid=0x100 in Object.wait() [0x0f30f000..0x0f30fce8]
at java.lang.Object.wait(Native Method)
- waiting on <0x057d4068> (a java.lang.ref.Reference$Lock)
at java.lang.Object.wait(Unknown Source)
at java.lang.ref.Reference$ReferenceHandler.run(Unknown Source)
- locked <0x057d4068> (a java.lang.ref.Reference$Lock)

"main" prio=6 tid=0x02c36938 nid=0xbd0 runnable [0x00000000..0x02f2e920]

"VM Thread" prio=10 tid=0x02cf4288 nid=0xa38 runnable

"VM Periodic Task Thread" prio=10 tid=0x02d05a78 nid=0xf7c waiting on condition

----------------------------------------------------
Done.


----- Original Message ----- From: "John Caron" <caron@xxxxxxxxxxxxxxxx>
To: "S Santos" <s.santos@xxxxxxxxx>
Cc: <netcdf-java@xxxxxxxxxxxxxxxx>; <support-netcdf-java@xxxxxxxxxxxxxxxx>
Sent: Monday, April 24, 2006 6:25 PM
Subject: Re: java.security.AccessControlException opening from an applet


It would be useful to see the complete stack trace. It looks like you are trying to read a local file?? As Tom said, applets dont have that right.

Tom Whittaker wrote:

Santi:

In general, applets are not permitted to communicate with a host other
than the one they were loaded from.  In previous JVMs, this rule when
using a local URL was relaxed.  In later versions of Java it is more
strictly enforced (as it always has been for loading applets from
remote hosts).

You might (I havent tried it) be able to use the
AccessController.doPrivileged() method to enable this -- I just don't
know if it would pop-up a user dialog for each I/O though.  Some more
info at:
<http://www.raditha.com/java/sandbox/unsigned.php>

Regards,

tom

On 4/24/06, S Santos <s.santos@xxxxxxxxx> wrote:

Hello,

I'm developing a tool to display netCDF files. The program has two versions, a desktop one and an applet version. When I load from a URL using the applet
version java throws this exception:

java.security.AccessControlException: access denied
(java.io.FilePermission
http%3A%2F%2Flocalhost%3A8080%2Fsoftiam-portal%2Fusers%2Fe145%2FIPCC_ESM+Magicc_SCM%2Fmagicc_out.nc
read)
at
java.security.AccessControlContext.checkPermission(Unknown
Source)
at java.security.AccessController.checkPermission(Unknown
Source)
at java.lang.SecurityManager.checkPermission(Unknown
Source)
at java.lang.SecurityManager.checkRead(Unknown Source)
at java.io.RandomAccessFile.<init>(Unknown Source)
at java.io.RandomAccessFile.<init>(Unknown Source)
at
ucar.unidata.io.RandomAccessFile.<init>(RandomAccessFile.java:134)
at ucar.nc2.NetcdfFile.open(NetcdfFile.java:217)
at ucar.nc2.NetcdfFile.open(NetcdfFile.java:167)
at ucar.nc2.NetcdfFile.open(NetcdfFile.java:151)
at
softiam.services.ui.dataAnalysis.util.NetCDFReader.<init>(NetCDFReader.java:42)
at
softiam.services.ui.dataAnalysis.engine.SoftiamRepresentation.setNetCDFFile(SoftiamRepresentation.java:130)
at
softiam.services.ui.dataAnalysis.tool.SoftiamAnalyzer.loadURL(SoftiamAnalyzer.java:630)
at
softiam.services.ui.dataAnalysis.tool.SoftiamAnalyzerApplet.init(SoftiamAnalyzerApplet.java:38)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

The system uses netCDF 2.2.14 version with slf4j-simple.jar and
log4j-1.2.13.jar for Http connections. In a previous version using netCDF 2.1.10 this problem didn't happen. Is there any solution to this problem
without having to change java security policy files?

Regards,

Santi


Santiago de la Nava Santos
Software Engineer
Tyndall Centre
Zuckermann Institute
University of East Anglia
Norwich NR4 7TJ

Telephone 01603 591377
Fax 01603 593901
E-mail s.santos@xxxxxxxxx




--
Tom Whittaker
University of Wisconsin-Madison
SSEC/CIMSS
1225 W. Dayton Street
Madison, WI  53706  USA
ph: 608-262-2759

===============================================================================
To unsubscribe netcdf-java, visit:
http://www.unidata.ucar.edu/mailing-list-delete-form.html
===============================================================================


===============================================================================
To unsubscribe netcdf-java, visit:
http://www.unidata.ucar.edu/mailing-list-delete-form.html
===============================================================================




  • 2006 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdf-java archives: