FileDialog in Applet throwing security exception.

I am trying to create a simple applet that a user can select a file from and then upload that file to a server somewhere. I am able to accomplish this using the JApplet class and the JFileChooser class. Everything works fine with the signed applet. However I am going to need to make it compliant with the Microsoft VM since it is for a corporate settings and those people won't have admin rights on their machines to toggle between the VM. So JApplet has been changed to Applet, JFileChooser has been changed to FileDailog and now I am getting this error:
com.ms.security.SecurityExceptionEx[com/java/applet/il/AimsImporter/AimsImportApplet.actionPerformed]: FileDialog creation denied.
     at com/ms/security/permissions/UIPermission.check
     at com/ms/security/PolicyEngine.deepCheck
     at com/ms/security/PolicyEngine.checkPermission
     at com/ms/security/StandardSecurityManager.chk
     at com/ms/security/StandardSecurityManager.checkFileDialog
     at java/awt/FileDialog.<init>
     at com/java/applet/il/AimsImporter/AimsImportApplet.actionPerformed
     at java/awt/Button.processActionEvent
     at java/awt/Button.processEvent
     at java/awt/Component.dispatchEventImpl
     at java/awt/Component.dispatchEvent
     at java/awt/EventDispatchThread.run
com.ms.security.SecurityExceptionEx[com/java/applet/il/AimsImporter/AimsImportApplet.actionPerformed]: FileDialog creation denied.
This line of code is where it blows up:
FileDialog fileDialog = new FileDialog(new Frame(), "Please choose the file to open:", FileDialog.LOAD);The jar is signed, however something of interest to note: there isn't a pop-up asking me if I would like to trust this applet when I use the Microsoft VM?
jar.exe -cvf k:\applet\lib\Importer.jar com.java.applet.il.AimsImporter/*.class
jarsigner k:\applet\lib\Importer.jar mykey
jarsigner -verify Importer.jar
Is there something that is different when doing this with the Microsoft VM?????
Help! :)

I am trying to create a simple applet that a user can select a file from and then upload that file to a server somewhere. I am able to accomplish this using the JApplet class and the JFileChooser class. Everything works fine with the signed applet. However I am going to need to make it compliant with the Microsoft VM since it is for a corporate settings and those people won't have admin rights on their machines to toggle between the VM. So JApplet has been changed to Applet, JFileChooser has been changed to FileDailog and now I am getting this error:
com.ms.security.SecurityExceptionEx[com/java/applet/il/AimsImporter/AimsImportApplet.actionPerformed]: FileDialog creation denied.
     at com/ms/security/permissions/UIPermission.check
     at com/ms/security/PolicyEngine.deepCheck
     at com/ms/security/PolicyEngine.checkPermission
     at com/ms/security/StandardSecurityManager.chk
     at com/ms/security/StandardSecurityManager.checkFileDialog
     at java/awt/FileDialog.<init>
     at com/java/applet/il/AimsImporter/AimsImportApplet.actionPerformed
     at java/awt/Button.processActionEvent
     at java/awt/Button.processEvent
     at java/awt/Component.dispatchEventImpl
     at java/awt/Component.dispatchEvent
     at java/awt/EventDispatchThread.run
com.ms.security.SecurityExceptionEx[com/java/applet/il/AimsImporter/AimsImportApplet.actionPerformed]: FileDialog creation denied.
This line of code is where it blows up:
FileDialog fileDialog = new FileDialog(new Frame(), "Please choose the file to open:", FileDialog.LOAD);The jar is signed, however something of interest to note: there isn't a pop-up asking me if I would like to trust this applet when I use the Microsoft VM?
jar.exe -cvf k:\applet\lib\Importer.jar com.java.applet.il.AimsImporter/*.class
jarsigner k:\applet\lib\Importer.jar mykey
jarsigner -verify Importer.jar
Is there something that is different when doing this with the Microsoft VM?????
Help! :)

Similar Messages

  • Signed applet throws security exceptions

    Since nobody seems to be reading the Signe Applet forum, I decided to try here:
    Hi all
    I have problems with signed applet (self-made cert), and after reading this forum I see this is more or less common.
    The problem that I am having is, that I can not use doPrivilege() and similar tricks, because applet needs to be Java 1.1 compatible.
    So, signing will have to work.
    Applet is signed using 1.5.0_06 jarsigner. Jarsigner verifies it OK.
    It works on JVM 1.5.0_06 but not on 1.4.2_08.
    Please help me make if work under any JVM.
    The error I get is:
    Java(TM) Plug-in: Version 1.4.2_08
    Using JRE version 1.4.2_08 Java HotSpot(TM) Client VM
    User home directory = C:\Documents and Settings\miha
    Proxy Configuration: Automatic Proxy Configuration
         URL: http://orion.nil.si/proxy.pac
    c:   clear console window
    f:   finalize objects on finalization queue
    g:   garbage collect
    h:   display this help message
    l:   dump classloader list
    m:   print memory usage
    o:   trigger logging
    p:   reload proxy configuration
    q:   hide console
    r:   reload policy configuration
    s:   dump system properties
    t:   dump thread list
    v:   dump thread stack
    x:   clear classloader cache
    0-5: set trace level to <n>
    java.security.AccessControlException: access denied (java.net.SocketPermission host.domain.dom resolve)
    TelnetWrapper PROXY: java.security.AccessControlException: access denied (java.net.SocketPermission 127.0.0.1:0 connect,resolve)
    java.lang.NullPointerException
         at net.propero.rdp.ISO.connect(ISO.java:123)
         at net.propero.rdp.MCS.connect(MCS.java:84)
         at net.propero.rdp.Secure.connect(Secure.java:153)
         at net.propero.rdp.Secure.connect(Secure.java:171)
         at net.propero.rdp.Rdp.connect(Rdp.java:498)
         at net.propero.rdp.Rdesktop.main_nonstatic(Rdesktop.java:615)
         at net.propero.rdp.applet.RdpThread.run(RdpApplet.java:222)
    FATAL: java.lang.NullPointerException: nullWhat is funny, is that I have two applets, and one works and the other one doesn't. It is like this:
    Applet A (signed) needs to connect to host1, fails and tries to connect through proxy using my proxy library (also signed - different JAR). Everything works.
    Applet B (signed) needs to connect to host1, fails and tries to connect through proxy using the same proxy library. It gets a security exception.
    All JARs are signed using the same key/certificate.
    Both applets try to connect to the same "host1".
    Both applets try to use the same proxy - which is different from "host1".
    The one thing that might make a difference, is that in the working applet, everything is within one thread, and in the broken applet, the proxy object is in the main applet thread, and this applet may open many windows, that all utilize the same proxy object - only they can't.
    When I tried to move the proxy object down to the child threads, I get the following exception:
    Exception in thread "Thread-1952" java.security.AccessControlException: access denied (java.lang.RuntimePermission accessClassInPackage.sun.misc)
         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.checkPackageAccess(Unknown Source)
         at sun.applet.AppletSecurity.checkPackageAccess(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClassInternal(Unknown Source)
         at net.propero.rdp.Rdesktop.main_nonstatic(Rdesktop.java:567)
         at net.propero.rdp.applet.RdpThread.run(RdpApplet.java:211)It seems that I can only create the proxy object in the Applet.init() method, to avoid this exception.
    So to, summarize: I would prefer just one object for all threads that I will create, but then my applet behaves like it is not signed (at least under JVM 1.4.2_08). Java 1.5.0_06 doesn't have any problems with this.
    Regards, Miha Vitorovic

    The one thing that might make a difference, is that in the working applet, everything is within one thread, and in the broken applet, the proxy object is in the main applet thread, and this applet may open many windows, that all utilize the same proxy object - only they can't.
    When I tried to move the proxy object down to the child threads, I get the following exception:
    Exception in thread "Thread-1952" java.security.AccessControlException: access denied (java.lang.RuntimePermission accessClassInPackage.sun.misc)
         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.checkPackageAccess(Unknown Source)
         at sun.applet.AppletSecurity.checkPackageAccess(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClassInternal(Unknown Source)
         at net.propero.rdp.Rdesktop.main_nonstatic(Rdesktop.java:567)
         at net.propero.rdp.applet.RdpThread.run(RdpApplet.java:211)It seems that I can only create the proxy object in the Applet.init() method, to avoid this exception.
    So to, summarize: I would prefer just one object for all threads that I will create, but then my applet behaves like it is not signed (at least under JVM 1.4.2_08). Java 1.5.0_06 doesn't have any problems with this.
    Regards, Miha Vitorovic

  • Should a signed applet ever throw a security exception?

    hi,
    I've had a few times when a signed applet seems to throw a security exception (at the moment am trying to figure out a SocketException being thrown).
    I thought if the applet was signed, and when the browser asks if you want to grant it permissions you press Yes (which I do), then there should not be any security issues?
    thanks,
    asjf

    A signed applet has to assert which permissions it wants. The client JVM then asks the user if they will give those permissions to the signer. If the applet tries to do something for which it hasn't been granted permission a security exception is thrown.

  • JNI Application running in ms-dos but throws an exception in applet

    Hi! I have a java application which calls a DLL using the JNI. This works perfect if I execute the java program from my command line (in ms-dos) But when I try to do it in an applet, it indeed runs and do everything ok, but at the end of the execution I get a EXECUTION_EXCEPTION.
    This is how is working:
    1.- jnidllmyclass, this is where I call the native method of my DLL
    2.- intermediate DLL which writes to files to c:\temporal and it calls several functions from other DLL
    3.- other DLL which writes more files (among other things)
    4.- applet class with a call to jnidllmyclass
    Now the DLL what does is to open a connection to a usb scanner, then send commands to it to scann somethings, save front and back images to c:\temporal (obviously, all of this is done in the user system, using certificates) and write other file and close the connection. This works! it write the images well and write everything... but after that the exception arises... I have doubt of what is it, because if it does all, what is causing the exception?
    Thanks for your help!

    Hi! Applet can access the DLL. The scanners works, but the C DLL throws an exception. Nevertheless, I've managed to see what was going on. When you click a JButton in a GUI, it enters only one to the actionlistener, but if this is done in an Applet, enters twice, so... the first time worked fine, but the second no because there was nothing to scann.
    This theme is a bit creepy, if you want help just ask! I give snippets, not just advices... I hate those people, so fell free to ask.
    Greetings!

  • Security Exception executing a signed Applet

    Dear All,
    I get a security exception (file permission ) when i try to execute a signed applet using java plugin version 1.4.2._02, the same applet works good in java plugin version 1.3.1_04.
    Any ideas...???
    Thanks in advance
    KSRK123

    Although not a solution for us as we are tied to the 1.2.2 plugin for now, we did try out 1.3.1_10 and it worked fine without any modifications to cacerts.
    Please see our listings (below) and let us know if anything comes to mind. I'm fairly new to this but I thought the whole idea with 1.2.2 was that we shouldn't have to mess with the cacerts or policy files on a clients machine. Rather the Root Certificate of the browser was used for verification??
    http://forum.java.sun.com/thread.jsp?forum=32&thread=480668&tstart=0&trange=15
    http://forum.java.sun.com/thread.jsp?forum=63&thread=480895&tstart=0&trange=15

  • Self signed Applet - still getting Security Exception...

    Hi everyone...
    I m new to Java Mail... Nd I m developing a Applet to send mail from my Gmail account, nd I used keytool, jarsigner to Self sign the applet. Nd I wrote a Html page and when calling my applet method using javascript, I m having Security Exception... And I m using Java 1.5 (i.e., J2SE 5)
    Here is the sample of my code...
    --------- MyMail.java -----------
    import javax.mail.*;
    import javax.mail.internet.InternetAddress;
    import javax.mail.internet.MimeMessage;
    And all neccessory packages are imported....
    public class MyMail extends JApplet
         String server = "smtp.gmail.com";
         String username;
         String password;
         String fromAddres="";
         String toAddres="";
         Other Variable declaration goes here........
    Session ses;
    Transport tr;
    MimeMessage msg;
         public void init() //For testing purpose
              doLogin("username","password"); //My account details
         public void doLogin(String user,String pass)
              username = user;
              password = pass;
              boolean success;
              fromAddres = user+"@gmail.com";
              toAddres = "[email protected]";
              subject = "TEst SubJect";
              body = "This is Test Mail";
              success = doAuthentication();
              if(success)
                   setHeaders(server,username,password,fromAddres,toAddres,cc,bcc,htmlFormat,subject,body);
                   sendMail(ses);
                   doLogout();
         public void doLogout()
              //Deals with the logout from my account
         public boolean doAuthentication()
              //Deals with the authentication of my account
              // Setting properties, creating a session, getting transport object...
              //and returns true if authentication is success, false if not.
         public void setHeaders(String server, String username, String password, String fromAddress, String toAddress, String cc, String bcc, boolean htmlFormat, String subject, String body)
              //Sets the headers fields for the message (recieved through arguments)
         public void sendMail(Session ses)
              //Deals with sending mail
    class MyPasswordAuthenticator extends Authenticator
         //Deals with the authentication of my account
    ---------- MyMail.html -----------
    <html>
    <head>
    <script language=javascript>
    function sendmail()
    document.MyMail.doLogin("username","password"); //my account details
    </script>
    </head>
    <body>
    <input type=button name=but value=Send mail onclick=sendmail()>
    <applet name=MyMail code=MyMail.class
    archive=mail.jar,activation.jar,mailplus.jar width=0 height=0>
    </applet>
    </body>
    </html>
    And the applet is Self signed using the tools supplied from Java SDK...
    it got signed...
    And as the applet got loaded when i opend the MyMail.html, as i called the doLogin(..,..) in init() it is sending mail successfully...
    The problem is.... As I given the action for my button to send mail (by calling java method from java script i.e., calling doLogin() when the button clicked) I m getting Security Exception
    So...anyone plz tell me the solution....
    Thnx in advance....
    - Kanta

    http://www.google.nl/search?hl=nl&q=site%3Asun.com+javascript+signed+applet&btnG=Google+zoeken&meta=
    DoPrivileged would solve your problem but I've seen some cases where the
    threaded (link mentioned below second post) mothod is the only way it'll work.
    Signing applets:
    http://forum.java.sun.com/thread.jsp?forum=63&thread=524815
    second post and reply 18 for the java class file using doprivileged
    Still problems?
    A Full trace might help us out:
    http://forum.java.sun.com/thread.jspa?threadID=656028

  • Applet's Security Certificate problem...

    Hi all,
    I have a applet which is signed. The applet init function uses some of system properties like 'java.home' which are initialised as class variable in applet class.
    After lauching applet, it shows the Security Warning dialog. If i select 'NO' option from this dialog, it throws AccessControlException at the point where i fetch the system property. Once this is happned, the browser is blocked. If i try to launch the applet again from the same browser, no response. I need to close the browser and open a new one to launch the applet again.
    what is the problem here? How to handle this security exception...
    please help..
    thx,
    Soni.

    Do not click No when you're asked to trust the applet.
    the browser is blocked. ??What does that mean? what does the trace say?
    If i try to launch the applet again from the same browser, no response. Ijre will only ask you once (within a jre session) here are some examples with IE 6 and
    jre1.5.0:
    open the html page from local file system (double click) (=win1)
    open the html page again (leave prev window open) jre shared with win 1
    open IE , drag and drop the html page in the IE window, new jre instance is started
    go to win1 again, navigate away and back to the page, same jre instance
    This behavior is the same for Sessions (as in asp session).
    You have to close all browsers most of the time and the re request the page again.
    what is the problem here? How to handle this security exception..try catch.

  • Applet's security manager

    I am planning to write some test programs to test my api that I use in my applets, and want to define and set a securitymanager very close to what the JREs in the browsers do. So which of the securitymanager's methods of an applet's securiy manager throw the security exception, for signed and unsigned applets?
    are there any examples of the same on the net anywhere? Thanks.

    Why do you need to convert to an Applet?
    Does it have somthing to do with the fact that you would like to automate the "installation" of the application and you think that an Applet it the best way to to it?
    If this is the case a better option might be to use Java Web Start (JWS) and the JNLP protocol. Using signed jar files you could probably run the application unmodified (except for the issue of finding where to load the DLLs from). Loading the DLLs is simple, but would probably require a small change to the application.
    If you must stick with Applets for some reason, then your main problem is converting to an Applet. The Applet will have to be signed. Changing policy files is not necessary. A signed Applet can do anything.
    To load the DLLs, you should save them some place in the file system and then specify the full path to them in System.load(). Don't use System.loadLibrary() as it does not allow you to specify the path and full file name.

  • Unable to run a form(FOrms 5.0) on Web. Security exception E

    Hi,
    I am trying to run a simple form developed in Forms 5.0 over our
    intranet.
    Environment: On NT I am using Oracle 8.0.5, Developer/2000
    Server and Internet Information Server 4.0.
    I have created a simple form and deployed on the server.
    (created the virtual directories for Java related directories as
    per some documentation available with me). Made a small html
    document containing the Applet definition to run this form. When
    I tried to execute this, it gives the following security
    exception error.
    ==============================================
    com.ms.security.SecurityExceptionEx
    [oracle/forms/uiClient/v1_4/engine/Runform.initClipboard]:
    Clipboard access denied.
    at com/ms/security/permissions/UIPermission.check
    at com/ms/security/PolicyEngine.deepCheck
    at com/ms/security/PolicyEngine.checkPermission
    at com/ms/security/StandardSecurityManager.chk
    at
    com/ms/security/StandardSecurityManager.checkSystemClipboardAcces
    s
    at com/ms/awt/WToolkit.getSystemClipboard
    at
    oracle/forms/uiClient/v1_4/engine/Runform.initClipboard
    at oracle/forms/uiClient/v1_4/engine/Runform.startRunform
    at oracle/forms/uiClient/v1_4/engine/Runform.run
    at java/lang/Thread.run
    com.ms.security.SecurityExceptionEx
    [oracle/forms/uiClient/v1_4/engine/Runform.initClipboard]:
    Clipboard access denied.:Clipboard access denied.
    Microsoft (R) VM for Java, 4.0 Release 4.79.0.2435
    ==============================================
    ? help
    c clear
    f run finalizers
    g garbage collect
    m memory usage
    q quit
    t thread list
    ==============================================
    Can any body help me, where I might have gone wrong, either in
    the development or deployment.
    I am also, running Oracle Application server 4.0.7 on the
    server, but I am not using the cartridge based deployment of
    forms, beca, I could not find way to create Forms
    application/Cartridge in it. If any one about it please help me.
    Early response is highly appreciated.
    Thanking you in advance ..// Manohar Reddy //
    null

    Hi Mobeen,
    That is one thing that I wanted to know. How do I make Forms
    Server to run as Service. Please explain me the
    procedure/operation.
    I am using IIS 4.0.
    Do you have any Idea, how to implement the Cartridge version of
    the Forms on OAS 4.0
    Thanks for the information though ..// Manohar //
    mobeen (guest) wrote:
    : hi
    : well u can run forms server asa service on NT then even if u
    log
    : out i wont terminate.
    : which web server r u running
    : mobeen
    : Manohar Reddy (guest) wrote:
    : : Thank you Mobeen for your time..
    : : I was able solve the problem.
    : : The problem was, my Forms Server(F50srv32.exe) was
    terminating,
    : : whenever I log out of that box. Now, I need to know, I to
    make
    : : that Process to run continuously, like a servece.
    : : Another issue, which mentioned, in my y'days mail is, How to
    : run
    : : these forms as the CARTRIDGE method ? ..
    : : Does any bdy can help me ..// Manohar //
    : : Mobeen (guest) wrote:
    : : : Hi
    : : : i guesss u have not exported Dev2k.x509 for Developer/2000.
    : : : copy Dev2k.x059 file to ur harddisk from the media
    : : : then
    : : : use javakey -c Developer/2000 true
    : : : javekey -ic Developer/2000 Dev2k.x509
    : : : it would generate identitydb.obj place that file in
    : : /user/profile
    : : : directory.
    : : : plus u have to set forms60_mapping and forms60_output
    : Registry
    : : : Variables
    : : : i hope that would sovle ur problem
    : : : mobeen
    : : : Manohar Reddy (guest) wrote:
    : : : : Hi,
    : : : : I am trying to run a simple form developed in Forms 5.0
    : over
    : : : our
    : : : : intranet.
    : : : : Environment: On NT I am using Oracle 8.0.5,
    Developer/2000
    : : : : Server and Internet Information Server 4.0.
    : : : : I have created a simple form and deployed on the server.
    : : : : (created the virtual directories for Java related
    : directories
    : : : as
    : : : : per some documentation available with me). Made a small
    : html
    : : : : document containing the Applet definition to run this
    form.
    : : : When
    : : : : I tried to execute this, it gives the following security
    : : : : exception error.
    : : : : ==============================================
    : : : : com.ms.security.SecurityExceptionEx
    [oracle/forms/uiClient/v1_4/engine/Runform.initClipboard]:
    : : : : Clipboard access denied.
    : : : : at com/ms/security/permissions/UIPermission.check
    : : : : at com/ms/security/PolicyEngine.deepCheck
    : : : : at com/ms/security/PolicyEngine.checkPermission
    : : : : at com/ms/security/StandardSecurityManager.chk
    : : : : at
    com/ms/security/StandardSecurityManager.checkSystemClipboardAcces
    : : : : s
    : : : : at com/ms/awt/WToolkit.getSystemClipboard
    : : : : at
    : : : : oracle/forms/uiClient/v1_4/engine/Runform.initClipboard
    : : : : at
    oracle/forms/uiClient/v1_4/engine/Runform.startRunform
    : : : : at oracle/forms/uiClient/v1_4/engine/Runform.run
    : : : : at java/lang/Thread.run
    : : : : com.ms.security.SecurityExceptionEx
    [oracle/forms/uiClient/v1_4/engine/Runform.initClipboard]:
    : : : : Clipboard access denied.:Clipboard access denied.
    : : : : Microsoft (R) VM for Java, 4.0 Release 4.79.0.2435
    : : : : ==============================================
    : : : : ? help
    : : : : c clear
    : : : : f run finalizers
    : : : : g garbage collect
    : : : : m memory usage
    : : : : q quit
    : : : : t thread list
    : : : : ==============================================
    : : : : Can any body help me, where I might have gone wrong,
    either
    : : in
    : : : : the development or deployment.
    : : : : I am also, running Oracle Application server 4.0.7 on the
    : : : : server, but I am not using the cartridge based deployment
    : of
    : : : : forms, beca, I could not find way to create Forms
    : : : : application/Cartridge in it. If any one about it please
    : help
    : : : me.
    : : : : Early response is highly appreciated.
    : : : : Thanking you in advance ..// Manohar Reddy //
    null

  • Stocks RMI example not working - Security Exception

    Hi,
    I was trying to run the "Stocks" RMI example that comes with
    Weblogic server(see
    http://www.weblogic.com/docs45/classdocs/API_rmi.html#clientside)
    I compiled and configured the appropriate files, and tried to
    load the sample applet (StockApplet.java) loaded on the
    StockApplet.html page (using Microsoft IE browser).
    However, the applet generated the following exception :
    java.lang.ExceptionInInitializerError: com/ms/security/SecurityExceptionEx
         at weblogic/common/internal/TengahClassLoaders.registerURL (TengahClassLoaders.java:51)
         at weblogic/rjvm/RJVMImpl.loadFromCluster (RJVMImpl.java:1106)
         at weblogic/jndi/WLInitialContextFactoryDelegate.newContext (WLInitialContextFactoryDelegate.java:247)
         at weblogic/jndi/WLInitialContextFactoryDelegate.getInitialContext (WLInitialContextFactoryDelegate.java:205)
         at weblogic/jndi/Environment.getContext (Environment.java:122)
         at weblogic/jndi/Environment.getInitialContext (Environment.java:105)
         at weblogic/rmi/Naming.getContext (Naming.java:225)
         at weblogic/rmi/Naming.lookup (Naming.java:67)
         at examples/rmi/stock/StockApplet.init (StockApplet.java:127)
         at com/ms/applet/AppletPanel.securedCall0 (AppletPanel.java)
         at com/ms/applet/AppletPanel.securedCall (AppletPanel.java)
         at com/ms/applet/AppletPanel.processSentEvent (AppletPanel.java)
         at com/ms/applet/AppletPanel.processSentEvent (AppletPanel.java)
         at com/ms/applet/AppletPanel.run (AppletPanel.java)
         at java/lang/Thread.run (Thread.java)
    As you can see this looks like some sort of security exception. (StockApplet.java:127)
    in the above exception is the line where StockApplet calls Naming.lookup(). So
    I'm guessing it has something to do with it getting the Weblogic's RMI support
    classes to the local VM and deserializing and installing them, which generates
    a security exception.
    What needs to be done to make the example work properly?
    Thanks,
    Leonid Portnoy
    (In addition, two more types of exceptions are generated, which might be related
    to the cause of the above exception. These exceptions are :
    com.ms.security.SecurityExceptionEx[weblogic/rjvm/JVMID.setLocalID]: cannot connect
    to "testserver"
         at com/ms/security/permissions/NetIOPermission.check (NetIOPermission.java)
         at com/ms/security/PolicyEngine.deepCheck (PolicyEngine.java)
         at com/ms/security/PolicyEngine.checkPermission (PolicyEngine.java)
         at com/ms/security/StandardSecurityManager.chk (StandardSecurityManager.java)
         at com/ms/security/StandardSecurityManager.chkex (StandardSecurityManager.java)
         at com/ms/security/StandardSecurityManager.checkConnect (StandardSecurityManager.java)
         at java/net/InetAddress.getLocalHost (InetAddress.java)
         at weblogic/rjvm/JVMID.setLocalID (JVMID.java:59)
         at weblogic/rjvm/JVMID.localID (JVMID.java:43)
         at weblogic/rjvm/LocalRJVM.getID (LocalRJVM.java:143)
         at weblogic/rmi/extensions/BasicServerObjectReference.<init> (BasicServerObjectReference.java:44)
         at weblogic/rmi/extensions/BasicServerObjectAdapter.<init> (BasicServerObjectAdapter.java:43)
         at weblogic/rmi/extensions/BasicRequestHandler.<init> (BasicRequestHandler.java:30)
         at weblogic/rmi/extensions/BasicRequestDispatcher.<init> (BasicRequestDispatcher.java:42)
         at weblogic/rmi/internal/OIDManager.initializeDGCServer (OIDManager.java:267)
         at weblogic/rmi/internal/OIDManager.getReplacement (OIDManager.java:176)
         at weblogic/rmi/internal/OIDManager.replaceObject (OIDManager.java:84)
         at weblogic/rmi/server/UnicastRemoteObject.exportObject (UnicastRemoteObject.java:25)
         at examples/rmi/stock/StockApplet.init (StockApplet.java:110)
         at com/ms/applet/AppletPanel.securedCall0 (AppletPanel.java)
         at com/ms/applet/AppletPanel.securedCall (AppletPanel.java)
         at com/ms/applet/AppletPanel.processSentEvent (AppletPanel.java)
         at com/ms/applet/AppletPanel.processSentEvent (AppletPanel.java)
         at com/ms/applet/AppletPanel.run (AppletPanel.java)
         at java/lang/Thread.run (Thread.java)
    and
    com.ms.security.SecurityExceptionEx[weblogic/jndi/Environment.getProperty]: Unable
    to access system property: weblogic.jndi.provider.rjvm
         at com/ms/security/permissions/PropertyPermission.check (PropertyPermission.java)
         at com/ms/security/PolicyEngine.shallowCheck (PolicyEngine.java)
         at com/ms/security/PolicyEngine.checkCallersPermission (PolicyEngine.java)
         at com/ms/security/StandardSecurityManager.chk (StandardSecurityManager.java)
         at com/ms/security/StandardSecurityManager.checkPropertyAccess (StandardSecurityManager.java)
         at java/lang/System.getProperty (System.java)
         at weblogic/jndi/Environment.getProperty (Environment.java:598)
         at weblogic/jndi/Environment.getProviderRJVM (Environment.java:691)
         at weblogic/jndi/WLInitialContextFactoryDelegate.getInitialContext (WLInitialContextFactoryDelegate.java:166)
         at weblogic/jndi/Environment.getContext (Environment.java:122)
         at weblogic/jndi/Environment.getInitialContext (Environment.java:105)
         at weblogic/rmi/Naming.getContext (Naming.java:225)
         at weblogic/rmi/Naming.lookup (Naming.java:67)
         at examples/rmi/stock/StockApplet.init (StockApplet.java:127)
         at com/ms/applet/AppletPanel.securedCall0 (AppletPanel.java)
         at com/ms/applet/AppletPanel.securedCall (AppletPanel.java)
         at com/ms/applet/AppletPanel.processSentEvent (AppletPanel.java)
         at com/ms/applet/AppletPanel.processSentEvent (AppletPanel.java)
         at com/ms/applet/AppletPanel.run (AppletPanel.java)
         at java/lang/Thread.run (Thread.java)

    Can you post the Stock Applet and other source files...
    Jamal
    ([email protected])

  • Getting Bad Applet class name exception while opening applet.

    Hi,
      While opening an applet in my mac os x v10.6.8 machine i am getting "Bad Applet class name exception" which is working fine in mac os x v10.7.5.Java version in my mac is 1.6.0_43.Can anyone please help me to resolve this.

    Apple barred Java from running on Macs in order to safeguard users by blocking Java 7 Update 11 and adding it to the banned list in XProtect.
    This was the second time in two weeks that Apple had blocked Oracle's code from running on Macs. The threat was so serious that the U.S. Department of Homeland Security had recommended that all Java 7 users disable or uninstall the software until a patch was issued. This time Java is blocked through Apple's XProtect anti-malware feature.
    Java has come under fire as the means by which hackers have been able to gain control of computers. In April 2012 more than 600,000 Macs were reported to have been infected with a Flashback Trojan horse that was being installed on people's computers with the help of Java exploits. Then in August Macs were again at risk due to a flaw in Java, this time around, there was good news for Mac users: Thanks to changes Apple has made, most of us were safe from the threat.
    Unwilling to leave its customers open to potential threats Apple decided it's safer to block Java entirely.
    In order to block older versions of Flash, Apple has updated its "Xprotect.plist" file so that any versions that come before the current one (version 11.6.602.171) cannot be used on a Mac. Users who have older versions of Flash installed will be greeted with an alert that says "Blocked plug-in," and Safari will prompt the user to update to a newer version.
    Macs running OS X Snow Leopard and beyond are affected.
    UPDATE for those running Lion or Mountain Lion:
    Oracle on Friday February 1 released a new version reportedly addressing vulnerabilities seen with the last build.
    Apple disabled Java 7 through the OS X XProtect anti-malware system, requiring users to have at least version "1.7.0_10-b19" installed on their Macs. The release dated February 1 carries the designation "1.7.0_13-b20," meeting Apple's requirements.
    Oracle "strongly recommends" applying the CPU fixes as soon as possible, saying that the latest Critical Patch Update contains 50 new security fixes across all Jave SE products.
    Update for Snow Leopard users:
    Apple issued update 12 for Java for OS 10.6:
    http://support.apple.com/kb/DL1573
    Note:  On systems that have not already installed Java for Mac OS X 10.6 update 9 or later, this update will configure web browsers to not automatically run Java applets. Java applets may be re-enabled by clicking the region labeled "Inactive plug-in" on a web page. If no applets have been run for an extended period of time, the Java web plug-in will deactivate.
    If, after installing Java for OS X 2013-002 and the latest version of Java 7 from Oracle, you want to disable Java 7 and re-enable the Apple-provided Java SE 6 web plug-in and Web Start functionality, follow these steps:
    http://support.apple.com/kb/HT5559?viewlocale=en_US
    Further update:
    Apple issued this Java related security update No. 13 on February 19:
    http://support.apple.com/kb/HT5666
    and Update No. 14 on March 4:  http://support.apple.com/kb/DL1573
    http://support.apple.com/kb/HT5677
    You should also read this:
    https://support.apple.com/kb/HT5672
    The standard recommendation is for users to turn off Java except when they have to use it on known and trusted websites (like their bank). Javascript, which is unrelated despite the name, can be left on.
    Further useful comment in this article:
    http://www.macworld.co.uk/macsoftware/news/?newsid=3435007&olo=email

  • Help! JDOM SAXParserFactory causing Security exception in Microsoft Java VM

    Hiya all, I'm really hoping you can offer me a hand with this problem.
    I'm having a problem with SAXParserFactory causing a security exception in
    Microsoft Internet Explorer, using JDOM b7.
    here is the error string it spits out:
    String...com.ms.security.SecurityExceptionEx[javax/xml/parsers/SAXParserFact
    ory.newInstance]: Unable to access system property:
    javax.xml.parsers.SAXParserFactory
    at com/ms/security/permissions/PropertyPermission.check
    (PropertyPermission.java)
    at com/ms/security/PolicyEngine.shallowCheck (PolicyEngine.java)
    at com/ms/security/PolicyEngine.checkCallersPermission (PolicyEngine.java)
    at com/ms/security/StandardSecurityManager.chk
    (StandardSecurityManager.java)
    at com/ms/security/StandardSecurityManager.checkPropertyAccess
    (StandardSecurityManager.java)
    at java/lang/System.getProperty (System.java)
    at javax/xml/parsers/SAXParserFactory.newInstance
    (SAXParserFactory.java:139)
    at java/lang/reflect/Method.invoke (Method.java)
    at org/jdom/input/SAXBuilder.createParser (SAXBuilder.java)
    at org/jdom/input/SAXBuilder.build (SAXBuilder.java)
    at org/jdom/input/SAXBuilder.build (SAXBuilder.java)
    at aim/AIMPanel.parseXML (AIMPanel.java:673)
    at aim/AIMPanel.serverCall (AIMPanel.java:486)
    at aim/LogicalAIM.<init> (LogicalAIM.java:62)
    at aim/AIMPanel.customInitialize (AIMPanel.java:1595)
    at shout3d/Shout3DPanel.n (Shout3DPanel.java)
    at shout3d/Shout3DPanel.run (Shout3DPanel.java)
    at java/lang/Thread.run (Thread.java)
    Using Microsoft's 5.0.0.3802 VM, this error results in a NullPointer
    Exception further down, causing the app to quit.
    in 5.0.0.3310, it reports the error but continues to run.
    in 5.0.0.3234, no errors are reported at all.
    Do you guys have any idea what's going on and why, and what I might be able
    to do to correct this?
    Any help is greatly appreciated...
    -J

    The factory classes (DocumentBuilderFactory and SAXParserFactory) use a Systems Property to determine which parser to use. Since applets do not have access to the Systems properties, a security exception is usually thrown.
    I have not done work with Applets that use JAXP, however I would bet if you search this forum you will find other who have had this problem along with a possible work around.
    Hope this helps.

  • Mac OS (only)  security exception

    I have seen on the server that this applet is requesting java components like java.util and META-INF etc straight off the root of the host that is hosting the applet.
    Why does java do this on the mac, because the server is replying NO YOU CANT HAVE THAT COMPONENT BECAUSE I DONT HAVE IT, and the cakephp thing I have is also thinking to itself (what on earth is this applet guy asking me for java components for) and to be honest so is the developer, and then my friend mac gets upset and dies with security exception. (e.g Java.util package prohibited).
    Windows doesn't do it and neither does vista and the applet runs ok.
    On mac, the webstart version works ok but still requests the stuff from the server but feels a bit better about continuing on and launching the app.
    This is driving me up the wall.

    Hello,
    On my PowerPC G5 I have a similar issue where I installed Mac OS X 10.5.6, but after installing the iphone SDK I do not see any refs to iphone when in Xcode.
    I even tried the suggestion here:
    http://3by9.com/85/dont-have-an-intel-machine-but-want-to-code-for-the-iphone-an yway-follow-these-steps/
    This however, resulted in the same issue.
    Any suggestion on how to resolve this would be most appreciated.

  • Report in Applet throws SecurityException

    Hello,
    I try to integrate CrystalReport into my Applet.
    ReportClientDocument reportClientDoc = new ReportClientDocument();
    reportClientDoc.open("reportName.rpt", 0);
    ReportViewerBean reportViewer = new ReportViewerBean();
    reportViewer.setReportSource(reportClientDoc.getReportSource());
    reportViewer.init();
    reportViewer.start();
    The Applet throws a SecurityException. It runs if the java.policy from client will be modified:
    grant  {
      permission java.util.PropertyPermission "*", "read,write";
      permission java.io.FilePermission "<<ALL FILES>>", "read, write, delete, execute";
      permission java.lang.RuntimePermission "createClassLoader";
    Is there a way without a modify by client? Server can be adjust.
    Edited by: ergerg on Aug 17, 2011 8:29 PM

    here it is :
    java.security.AccessControlException: access denied (java.io.FilePermission lena.png read)
         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:270)
         at java.security.AccessController.checkPermission(AccessController.java:401)
         at java.lang.SecurityManager.checkPermission(SecurityManager.java:542)
         at java.lang.SecurityManager.checkRead(SecurityManager.java:887)
         at sun.awt.SunToolkit.getImageFromHash(SunToolkit.java:408)
         at sun.awt.SunToolkit.getImage(SunToolkit.java:422)
         at javax.swing.ImageIcon.<init>(ImageIcon.java:81)
         at javax.swing.ImageIcon.<init>(ImageIcon.java:107)
         at PNGLoader$1.actionPerformed(PNGLoader.java:38)
         at java.awt.Button.processActionEvent(Button.java:381)
         at java.awt.Button.processEvent(Button.java:350)
         at java.awt.Component.dispatchEventImpl(Component.java:3526)
         at java.awt.Component.dispatchEvent(Component.java:3367)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:445)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:190)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:144)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:130)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:98)

  • Typical Player Applet and Security

    Hello,
    When i use the Typical PlayerApplet in a webpage, it can connect to the rtsp server and play the video successfully.
    However, I'm trying to build a new player applet, using the com.sun.media.content.rtsp.RtspUtil class (following the com.sun.media.content.rtsp.Handler example), but then I get security exception.
    If I sign the applet, I still get that Security exception.
    Please help.

    Possibly. Any output in the Java console:
    View > Java Console
    As you're running in an Intranet environment why don't you go with the plugin as this would give you a lot more scope GUI wise? You can place it on your server and set your HTML so that it's downloaded automatically if the user does not already have it installed. The one problem with this is that if your users are running WIN2K/NT then they have to admin rights to do the install.
    If not then you could try compiling with the -target switch:
    javac -target <release> Generate class files for specific VM version

Maybe you are looking for

  • Can Media Encoder batch update metadata on .mov files?

    I discovered an issue with Audition creating a new starting time code on audio files extracted out of Canon 70D .mov files.   Details are here:  Re: Audition jumps time code forward on audio extracted from a .mov file For what is worth, Premier Pro h

  • Reporting the cost side of an AP transaction

    Hello, I was wondering if anyone could share their best practice for marrying AP, FI, and CO data.  For instance, I have data from a FI_AP_4 extractor, a FI_GL_4 extractor, and a CO_OM_WBS_6 extractor.  But there doesn't seem to be a common link betw

  • Restoring control buttons in mail

    When I open a new mail message I have lost the red, green and amber control buttons from the message toolbar.  Does anyone know how to restore them?

  • Expiring password warning

    Hello, I am using the JDBC thin driver and have individual user-id's with expiring passwords. The security profile gives them 5 days of warning messages. I can see these messages if logging in with SQL*PLUS. But I would like to pick this up in the ge

  • Aperture 2 double color management?

    Hello, I printed out from Aperture 2.0 on a HP B9180 / Hahnemühle Fine Art Baryta. I used the profile preview option with the selected HM Baryta ICC profile. CM in printer dialogue was application managed with this profile choosen, black point compen