Access denied on applet in broswer - fine in applet viewer

I have written an applet that access a php file and sends a post message. I have tested the applet with the applet viewer and it succeeds each time. When I put the applet on a web page I get the following error:
access denied (java.net.SocketPermission libraries.cjt-design.com:80 connect,resolve)
Any help is appreciated.
The code is as follows:
               try {
                    message = code + "&" + toMessage + "&" + fromMessage + "&" + subjectMessage + "&" + bodyMessage;
                    URL url;
                    HttpURLConnection urlConn;
                    PrintWriter out;
                    url = new URL(target);
                    urlConn = (HttpURLConnection) url.openConnection();
                    urlConn.setRequestMethod("POST");
                    urlConn.setRequestProperty("Referer", "http://libraries.cjt-design.com/index.html");
                    urlConn.setDoOutput(true);
                    urlConn.setDoInput(true);
                    urlConn.setUseCaches(false);     
     out = new PrintWriter(urlConn.getOutputStream());
     out.print(message);
     out.close();
          InputStream is = urlConn.getInputStream();
          // any response?
          InputStreamReader isr = new InputStreamReader(is);
          BufferedReader br = new BufferedReader(isr);
                         String s = "";
                         String response = "";
          while ( (s = br.readLine()) != null)
                              response += s;
          is.close();
                    statusLabel.setText(response);
                    statusLabel.invalidate();
               } catch (Exception e) {
                    String error = e.getMessage();
                    jEditorPane1.setText(error);
                    error = "Server Exception Occurred - Please try again later.";
                    statusLabel.setText(error);
                    statusLabel.invalidate();
               }

1. Why does it work from the applet viewer and not
the webpage.Appletviewer is in effect a Java application so it runs using the Java application security manager which by default gives an application almost unlimited access to the machine it runs on.
Running an Applet from a Web page runs the Applet constrained by the Applet security manager. By default, the Applet security manager assumes that anything that is downloaded from the web is untrusted so severely limits what an Applet can do. A signed Applet is assumed to be trusted if the certificate chain points back to one of the certificate roots such as Verisign.
You can use self signing for test purposes and then a client will be asked whether or not he trusts the Applet.
2. How do I make the jar file signed?http://java.sun.com/docs/books/tutorial/jar/sign/signing.html
http://java.sun.com/j2se/1.5.0/docs/tooldocs/solaris/jarsigner.html
http://java.sun.com/developer/onlineTraining/Security/Fundamentals/magercises/Signtool/help.html

Similar Messages

  • BSP Application Error : Access Denied

    Hi Gurus,
    I have developed a BSP application with an input field and a search help. I am using Java script to popup the search help window and "opener.document.<form>.<field>.value=value;" to pass selected value from search help window to main page. At BSP application level I have checked "Allows Portal Integration" check box. Now, when I try to select the value from search help at runtime, I am getting an error "Access Denied". It works perfectly fine when the check box "Allows Portal Integration" is unchecked. How do I resolve this issue keeping the check box checked.
    Thanks in advance
    John
    <* Input Field *>
    <htmlb:inputField id            = "sales_order"
                       value         = "<%= controller->sale_order %>"
                       maxlength     = "30"
                       showHelp      = "TRUE"
                       onValueHelp   = "showSalesOrderHelp()"
                       submitOnEnter = "X"
                       size          = "30" />
    <* Java script routine to popup search help window *>
    function showSalesOrderHelp()
       newDialog =    window.open("salesOrderHelp.htm","_blank","resizable=no,height=500,width=475");

    The problem is that your popup windows probably do not have their domain relaxed. (Usually popp windows are implemented in an iframe, which must also be relaxed in the same way as the main page.)

  • Bitlocker (MBAM 2.0) - Access Denied on HelpDesk URL

    Hi,
    Recently installed MBAM 2.0, now when users try and connect to the MBAM URL they get Access Denied.
    Domain Admins are fine, other users are not able to connect. Anyone help?

    Hello,
    You'll need to place the users in the local group "MBAM Helpdesk Users" on your MBAM server. If you work in a domain based environment, it could be great to create an AD group that you put in the local group, so you'll be able to manage it from AD.

  • Applet Error:java.security.AccessControlException: access denied

    Hi,
    I just successful deploy an business component project to oralce 8.1.6 as an EJB Session bean, and
    the test of application module is successful. In the same workspace, I create an new project with
    an applet(which contains only an grid control)as a client of the business component. Everything works
    fine within the Applet viewer, however, when I trying to load the applet in IE5.5 I got the following
    error message in java console:
    Java(TM) Plug-in
    Using JRE version 1.2.1
    User home directory = D:\Documents and Settings\ERic
    Proxy Configuration: no proxy
    JAR cache enabled.
    Failed to query environment: 'access denied (java.util.PropertyPermission jbo.debugoutput read)'
    Diagnostics: Silencing all diagnostic output (use -Djbo.debugoutput=console to see it)
    Failed to query environment: 'access denied (java.util.PropertyPermission jbo.logging.show.timing read)'
    Failed to query environment: 'access denied (java.util.PropertyPermission jbo.logging.show.function read)'
    Failed to query environment: 'access denied (java.util.PropertyPermission jbo.logging.show.level read)'
    Failed to query environment: 'access denied (java.util.PropertyPermission jbo.logging.show.linecount read)'
    Failed to query environment: 'access denied (java.util.PropertyPermission jbo.logging.trace.threshold read)'
    Failed to query environment: 'access denied (java.util.PropertyPermission jbo.jdbc.driver.verbose read)'
    java.lang.ExceptionInInitializerError: java.security.AccessControlException: access denied (java.util.PropertyPermission org.omg.CORBA.ORBClass read)
    at java.security.AccessControlContext.checkPermission(Compiled Code)
    at oracle.aurora.jndi.orb_dep.Orb.<clinit>(Orb.java:24)
    at oracle.aurora.jndi.sess_iiop.sess_iiopURLContext.<clinit>(sess_iiopURLContext.java:9)
    at javax.naming.spi.NamingManager.getURLObject(NamingManager.java:588)
    at javax.naming.spi.NamingManager.getURLContext(NamingManager.java:537)
    at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:274)
    at javax.naming.InitialContext.lookup(InitialContext.java:349)
    at oracle.jbo.client.remote.ejb.aurora.AuroraEJBAmHomeImpl.connectToService(AuroraEJBAmHomeImpl.java:179)
    at oracle.jbo.client.remote.ejb.aurora.AuroraEJBAmHomeImpl.createSession(AuroraEJBAmHomeImpl.java:152)
    at oracle.jbo.client.remote.ejb.aurora.AuroraEJBAmHomeImpl.initRemoteHome(AuroraEJBAmHomeImpl.java:123)
    at oracle.jbo.client.remote.ejb.aurora.AuroraEJBAmHomeImpl.<init>(AuroraEJBAmHomeImpl.java:59)
    at oracle.jbo.client.remote.ejb.aurora.AuroraEJBInitialContext.createJboHome(AuroraEJBInitialContext.java:47)
    at oracle.jbo.common.JboInitialContext.lookup(JboInitialContext.java:72)
    at javax.naming.InitialContext.lookup(InitialContext.java:349)
    at oracle.dacf.dataset.SessionInfo._createAppModule(SessionInfo.java:2330)
    at oracle.dacf.dataset.SessionInfo.connect(SessionInfo.java:1799)
    at oracle.dacf.dataset.SessionInfo.openProducerObject(SessionInfo.java:1848)
    at oracle.dacf.dataset.ProducerObject.open(ProducerObject.java:94)
    at oracle.dacf.dataset.SessionInfo.publishSession(SessionInfo.java:1305)
    at oracle.dacf.dataset.SessionInfo.publishSession(SessionInfo.java:1287)
    at broadcastapplet.myBroadCastApplet.init(myBroadCastApplet.java:70)
    at sun.applet.AppletPanel.run(Compiled Code)
    at java.lang.Thread.run(Thread.java:479)
    The Oracle 8.1.6 runs on Win2000, I put the JAR & related zip files in the same machine's IIS webserver.
    Is anyone can help?
    ERic

    Hi Shaji,
    Are you calling a webservice from within an Xacute Query for your applet?  On first glance, it looks like a web service call is being rejected due to security permissions.  If you have a webservice call (or HTTP post/get), can you test it separately with the same credentials as the webpage is using?
    Regards,
    Mike

  • Java.io.File causes "access denied" exception in a signed applet

    Hi,
    New to these forums and not entirely where it's appropriate to post this issue, so I'll stick it here for now until told otherwise.
    The problem:
    My applet throws the following exception.
    INFO: Exception Message: access denied (java.io.FilePermission C:\Some Dir With Spaces\AnotherDir\FinalDir read)
    The psuedo-code:
    java.io.File RootPath = new java.io.File( "C:\" );
    private boolean doesSubdirectoryExist(String directory) {
            boolean mResult = false;
            try
                java.io.File tmpPath = new java.io.File( RootPath.toString() + java.io.File.separatorChar + directory );
                mResult = tmpPath.isDirectory();
                tmpPath = null;
            catch (Exception e)
                ... error handling code
            return mResult;
    private void btnCheckPathActionPerformed(java.awt.event.ActionEvent evt) {
            ....some other stuff....
            doesSubdirectoryExist(.. a text field value from the GUI form..);
            ....some other stuff....
    }                                       The conditions:
    1) The applet is signed.
    2) The applet runs fine in the AppletViewer.
    3) I am using JDK1.5.0_09.
    4) When I click the button the event handler is tied to, it works correctly the first time.
    5) If I click a second time, with the same value in the text field (i.e. testing for the same subdirectory again) I get the exception error.
    I'm pulling my hair out trying to figure this one out. If it were a security issue with the applet running from a browser, why does it work the first time?
    Am I failing to release some lock that creating a java.io.File instance creates?
    I would appreciate any help.

    I've identified the issue. I was attempting to access the filesystem from two different thread and/or contexts.
    It seems that if I use the SwingWorker class from https://swingworker.dev.java.net/ to perform background tasks in the Worker thread, I don't get the security privileges required to modify the filesystem. Even though I have signed the jar correctly.
    However I can access the filesystem quite happily from the Event Dispatcher thread. If my jar is signed correctly.
    So, I have the following questions:
    1. Why doesn't SwingWorker worker threads get the same security context as the event dispatcher thread?
    2. Is there anyway I can give the worker thread the necessary security privileges?
    3. Is there anyway to do this without having to write my own thread handling code and creating my own thread pools?
    Message was edited by:
    Fidotas
    Message was edited by:
    Fidotas

  • ".. access denied: ... jnlp read" error in applet with NO .jnlp file!

    I'm trying to embed a Java program called ImageJA [http://pacific.mpi-cbg.de/wiki/index.php/ImageJA] into a webpage. I'm using ASP.NET with XHTML 1.0. Since I'm embedding it as an object in the html code, it should not cause any issues from that end. Unforunately, when I try I get an error saying "java.security.AccessControlException: access denied (java.util.PropertyPermission jnlp read)". The weird thing is, there is no jnlp file anywhere (including the .jar and codebase).
    I'm able to run it successfully if I change the permissions in my java.policy file, but that solution only works for my local machine.
    The .jar file (the only one) has been signed (I believe). I followed the steps as suggested [http://download.oracle.com/docs/cd/E17476_01/javase/1.4.2/docs/guide/plugin/developer_guide/rsa_signing.html], with the exception of contacting VeriSign/Thawte (I wish to have this be self signed).
    This seems like a very odd issue to me, and I'm running out of hair. Can anyone help?
    Here's my html code:
    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
    <title>Untitled Page</title>
    </head>
    <body>
    <form id="form1" runat="server">
    <div>
    <object
    classid = "clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
    codebase = "[http://java.sun.com/update/1.5.0/jinstall-1_5-windows-i586.cab]"
    width="500" height="500">
    <param name = "code" value = "ij.ImageJApplet.class" />
    <param name = "codebase" value = "ImageJA" />
    <param name = "archive" value = "ij-1.44a.jar" />
    <param name="type" value="application/x-java-applet;jpi-version=1.4.2" />
    <param name="scriptable" value="true" />
    </object>
    </div>
    </form>
    </body>
    </html>
    Edited by: Sythion on Jul 13, 2010 2:19 PM

    Sythion wrote:
    I'm trying to embed a Java program called ImageJA [http://pacific.mpi-cbg.de/wiki/index.php/ImageJA] ..
    I suggest you take up the problem through the [channels suggested by the API developers|http://pacific.mpi-cbg.de/wiki/index.php/Help:Contents].

  • File read access denied for signed applet

    Hi:
    I have a signed applet with a certificate generated with the keytool. Yet, I keep getting this error:
    java.lang.Exception: java.security.AccessControlException:
        access denied (java.io.FilePermission C:\WINDOWS\system32\aetpkss1.dll read)The error is produced when the method loadKeyStore(pin) below is called.
        private KeyStore ks;
        private Provider provider;
        private static final String providerName    = "PKCS11";
        private static final String providerLibrary = "aetpkss1.dll";
        public void loadKeyStore(String pin) throws IOException,
         CertificateException, KeyStoreException, NoSuchAlgorithmException {
         if (provider == null)
             registerProvider(providerLibrary);
         try {
             ks = KeyStore.getInstance(providerName,provider);
         } catch (Exception e) {
             throw new KeyStoreException("Failed get keystore instance\n"
                             + e.getMessage());
         try {
             ks.load(null, pin.toCharArray());
         } catch (Exception e) {
             throw new KeyStoreException("Failed load keystore\n"
                             + e.getMessage());
        public void registerProvider(String library)
         throws FileNotFoundException, KeyStoreException {
         String fileName;
         if (new File(library).isAbsolute())
             fileName = library;
         else
             fileName = getAbsolutePath(library);
         if (!(new File(fileName).exists()))
             throw new FileNotFoundException("No such file: " + fileName);
         String config = "name = " + providerName + "\n"
             + "library = " + fileName;
         ByteArrayInputStream confStream =
             new ByteArrayInputStream(config.getBytes());
         try {
             provider = new sun.security.pkcs11.SunPKCS11(confStream);
             Security.addProvider(provider);
         } catch (Exception e) {
             throw new KeyStoreException("Can initialize " +
                             "Sun PKCS#11 provider. Reason: " +
                             e.getCause().getMessage());
        private String getAbsolutePath(String lib) throws FileNotFoundException {
         String[] searchPath;
         /* NOTE: This should be modified to suit different versions of   *
          *       Windows and not just Windows XP                         */
         if (System.getProperty("os.name").matches("^(?i)Windows.*")) {
             searchPath = new String[] { "C:\\WINDOWS\\system32" ,
                             "C:\\java" };
         } else {
             searchPath = new String[] { "/usr/local/lib/" };
         for (int i = 0; i < searchPath.length; i++) {
             if ((new File(searchPath[i] + File.separator + lib).exists()))
              return (searchPath[i] + File.separator + lib);
         throw new FileNotFoundException("Library not in search path " + lib);
        }The above code is called by a java script, the class' constructor is empty.
    The error appears not to be caught by my code. I have tried to insert try/catch statements everywhere to figure out where this error is produced.
    The code is write off of the applet for signing with a smart card by Svetlin Nakov - and his applet works!
    I have also made a CLI application that uses the above code and it works perfectly.
    So: Something is wrong either with my certificate, the signing method, signature verification or something completely different. Any hints?
    The certificate I generated with
    keytool -genkey -keystore mystore -alias me
    keytool -seflcert -keystore mystore -alias meI have tired both with and without the selfcert step.
    Thanks! Erik

    The problem has been identified: Placing registerProvider() in the constructor the error no longer occurs, instead an error is produced when the key store is loaded.
    It appears that the javascript code is not trusted and so, even though the applet is signed, access privileges are restricted to those of the java script.
    A solution to this problem is not clear, but possibly, serving the pages from a trusted server, the java script will be trusted, some documentation seem to indicate.

  • I get this message on my Facebook news feed when someone posts a YouTube video. Don't know why. It's worked fine for years. I am using Safari on my iPad. If I use the Facebook app it works fine. Any thoughts. Thanks,    Access Denied   You don't have

    I get this message on my Facebook news feed when someone posts a YouTube video. Don't know why. It's worked fine for years. I am using Safari on my iPad. If I use the Facebook app it works fine. Any thoughts.
    Thanks,
    Walid
    Access Denied
    You don't have permission to access "http://fbexternal-a.akamaihd.net/embed/?" on this server.
    Reference #18.3555facd.1362007289.6945153f

    Same thing on mine, it just started happening last weekend.

  • Access denied to a security provider on a signed applet

    Hi,
    I'm having permissions problems to work with a security provider.
    The security provider is already installed at java.security. In fact, at Netbeans when debbuging the app it's working perfectly.
    If I'm working the provider in an signed applet, then there are errors.
    Even, I have created a .jar file and I have saved in the /ext directory, wich by default in the java.policy file has got all security permissions.
    grant codeBase "file:${{java.ext.dirs}}/*" {
    permission java.security.AllPermission;
    Even with these granted permissions, I'm getting problems to work with the security provider that I have installed. Also, with these permissions I should be able to install the security provider.
    log:
    <record>
    <date>2012-03-13T12:13:39</date>
    <millis>1331637219126</millis>
    <sequence>17</sequence>
    <logger>appletpdf.appletPdf</logger>
    <level>SEVERE</level>
    <class>appletpdf.appletPdf</class>
    <method>applTest</method>
    <thread>11</thread>
    <message>excepcion: {0} </message>
    <exception>
    <message>java.security.AccessControlException: access denied (java.security.SecurityPermission authProvider.SunPKCS11-Provider-name)</message>
    <frame>
    <class>java.security.AccessControlContext</class>
    <method>checkPermission</method>
    <line>393</line>
    </frame>
    <frame>
    <class>java.security.AccessController</class>
    <method>checkPermission</method>
    <line>553</line>
    </frame>
    <frame>
    <class>java.lang.SecurityManager</class>
    <method>checkPermission</method>
    <line>549</line>
    </frame>
    <frame>
    <class>net.sourceforge.jnlp.runtime.JNLPSecurityManager</class>
    <method>checkPermission</method>
    <line>250</line>
    </frame>
    <frame>
    <class>sun.security.pkcs11.SunPKCS11</class>
    <method>login</method>
    <line>1036</line>
    </frame>
    <frame>
    <class>sun.security.pkcs11.P11KeyStore</class>
    <method>login</method>
    <line>874</line>
    </frame>
    <frame>
    <class>sun.security.pkcs11.P11KeyStore</class>
    <method>engineLoad</method>
    <line>764</line>
    </frame>
    <frame>
    <class>java.security.KeyStore</class>
    <method>load</method>
    <line>1201</line>
    </frame>
    <frame>
    <class>apppdf.appPdf</class>
    <method>tPKCS11</method>
    <line>174</line>
    </frame>
    <frame>
    <class>appletpdf.appletPdf</class>
    <method>applTest</method>
    <line>137</line>
    </frame>
    <frame>
    <class>appletpdf.appletPdf</class>
    <method>initapplDPdf</method>
    <line>116</line>
    </frame>
    <frame>
    <class>sun.reflect.NativeMethodAccessorImpl</class>
    <method>invoke0</method>
    </frame>
    <frame>
    <class>sun.reflect.NativeMethodAccessorImpl</class>
    <method>invoke</method>
    <line>57</line>
    </frame>
    <frame>
    <class>sun.reflect.DelegatingMethodAccessorImpl</class>
    <method>invoke</method>
    <line>43</line>
    </frame>
    <frame>
    <class>java.lang.reflect.Method</class>
    <method>invoke</method>
    <line>616</line>
    </frame>
    <frame>
    <class>sun.applet.PluginAppletSecurityContext$4</class>
    <method>run</method>
    <line>699</line>
    </frame>
    <frame>
    <class>java.security.AccessController</class>
    <method>doPrivileged</method>
    </frame>
    <frame>
    <class>sun.applet.PluginAppletSecurityContext</class>
    <method>handleMessage</method>
    <line>696</line>
    </frame>
    <frame>
    <class>sun.applet.AppletSecurityContextManager</class>
    <method>handleMessage</method>
    <line>69</line>
    </frame>
    <frame>
    <class>sun.applet.PluginStreamHandler</class>
    <method>handleMessage</method>
    <line>273</line>
    </frame>
    <frame>
    <class>sun.applet.PluginMessageHandlerWorker</class>
    <method>run</method>
    <line>82</line>
    </frame>
    </exception>
    </record>
    Fails in the line where the KeyStore is loading:(Pin is correct)
    KeyStore myKeyStore=null;
    Provider p = Security.getProvider("SunPKCS11-Provider-Name");
    myKeyStore = KeyStore.getInstance("PKCS11",p);
    char[] pinData = pin.toCharArray();
    myKeyStore.load(null, pinData);
    Any help would be apreciated.
    Thank you.
    Bye

    Thank you for your information, Frank, as it clarifies part of my confusion. However, there are a couple more loose ends I'd love to address before I mark your responses as answers.
    Do backup and restore privileges apply at all over a network mount created via "net use"?
    The network mount requires a username and password for the destination machine. Assuming the destination machine is a Windows box with a simple CIFS share, how does this user affect our permissions and access? Do we end up effectively impersonating this
    user, or is the access check still done with our sync process's run-as user?
    We require that both our configured run-as user for our sync process *and* the credentials passed to the network mount be administrator users of the local system and destination system, respectively, meaning they're in of the "BUILTIN\Administrators,
    S-1-5-32-544" group.
    On re-syncs, the destination file will exist and since we don't have the ability to read the ACL in all cases (we're running as one user, the file is owned by another user, and we aren't specified in the ACL in any way), we aren't able to determine if the
    file has changed. Is it possible to determine the owner of this file in this case? Preferably, we'd obtain the entire SDDL.
    My proposed plan is to interpret access denied as a difference requiring re-sync, resulting in us taking ownership of the file, granting ourselves access, determining if there are data differences, and then re-syncing the metadata as appropriate.

  • Access denied in an applet that uses the jai jars

    Hello there
    I have a problem while I am using
    ParameterBlockJAI pb = new ParameterBlockJAI("scale");
    Interpolation interp = Interpolation.getInstance(
    Interpolation.INTERP_BILINEAR);
    pb.addSource(orig);
    pb.setParameter("xScale", dScale);
    pb.setParameter("yScale", dScale);
    pb.setParameter("xTrans", 0.0F); //x Translate amount
    pb.setParameter("yTrans", 0.0F); //y Translate amount
    pb.setParameter("interpolation", interp);
    RenderingHints rh= new RenderingHints(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
    rh.put(RenderingHints.KEY_ALPHA_INTERPOLATION, RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
    rh.put(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
    At the moment my application has a signed applet jar file with the MANIFEST file having the class path with the
    lib/jai_codec.jar lib/jai_core.jar lib/mlibwrapper_jai.jar files that are allocated on lib folder.
    I signed those files but I am still getting the following error while I am trying to scale down an image.
    Could you please give a help
    Thanks
    Aris
    Java.security.AccessControlException: access denied (java.util.PropertyPermission java.home 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.checkPropertyAccess(Unknown Source)
         at java.lang.System.getProperty(Unknown Source)
         at com.sun.media.jai.util.PropertyUtil$1.run(PropertyUtil.java:99)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sun.media.jai.util.PropertyUtil.getFileFromClasspath(PropertyUtil.java:124)
         at com.sun.media.jai.util.PropertyUtil.getBundle(PropertyUtil.java:148)
         at com.sun.media.jai.util.PropertyUtil.getString(PropertyUtil.java:165)
         at javax.media.jai.operator.JaiI18N.getString(JaiI18N.java:19)
         at javax.media.jai.operator.AbsoluteDescriptor.<clinit>(AbsoluteDescriptor.java:65)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Unknown Source)
         at javax.media.jai.RegistryFileParser.getInstance(RegistryFileParser.java:216)
         at javax.media.jai.RegistryFileParser.registerDescriptor(RegistryFileParser.java:352)
         at javax.media.jai.RegistryFileParser.parseFile(RegistryFileParser.java:287)
         at javax.media.jai.RegistryFileParser.loadOperationRegistry(RegistryFileParser.java:47)
         at javax.media.jai.OperationRegistry.initializeRegistry(OperationRegistry.java:363)
         at javax.media.jai.JAI.<clinit>(JAI.java:560)
         at javax.media.jai.ParameterBlockJAI.<init>(ParameterBlockJAI.java:178)
         at mpu.uploadingAreaPanel.scaleImage(uploadingAreaPanel.java:234)
         at mpu.uploadingAreaPanel.scale2Fit(uploadingAreaPanel.java:265)
         at mpu.uploadingAreaPanel.paintComponent(uploadingAreaPanel.java:107)
         at javax.swing.JComponent.paint(Unknown Source)
         at javax.swing.JComponent.paintToOffscreen(Unknown Source)
         at javax.swing.BufferStrategyPaintManager.paint(Unknown Source)
         at javax.swing.RepaintManager.paint(Unknown Source)
         at javax.swing.JComponent._paintImmediately(Unknown Source)
         at javax.swing.JComponent.paintImmediately(Unknown Source)
         at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
         at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
         at javax.swing.RepaintManager.seqPaintDirtyRegions(Unknown Source)
         at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(Unknown Source)
         at java.awt.event.InvocationEvent.dispatch(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForFilter(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)
    Exception in thread "AWT-EventQueue-2" java.lang.ExceptionInInitializerError
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Unknown Source)
         at javax.media.jai.RegistryFileParser.getInstance(RegistryFileParser.java:216)
         at javax.media.jai.RegistryFileParser.registerDescriptor(RegistryFileParser.java:352)
         at javax.media.jai.RegistryFileParser.parseFile(RegistryFileParser.java:287)
         at javax.media.jai.RegistryFileParser.loadOperationRegistry(RegistryFileParser.java:47)
         at javax.media.jai.OperationRegistry.initializeRegistry(OperationRegistry.java:363)
         at javax.media.jai.JAI.<clinit>(JAI.java:560)
         at javax.media.jai.ParameterBlockJAI.<init>(ParameterBlockJAI.java:178)
         at mpu.uploadingAreaPanel.scaleImage(uploadingAreaPanel.java:234)
         at mpu.uploadingAreaPanel.scale2Fit(uploadingAreaPanel.java:265)
         at mpu.uploadingAreaPanel.paintComponent(uploadingAreaPanel.java:107)
         at javax.swing.JComponent.paint(Unknown Source)
         at javax.swing.JComponent.paintToOffscreen(Unknown Source)
         at javax.swing.BufferStrategyPaintManager.paint(Unknown Source)
         at javax.swing.RepaintManager.paint(Unknown Source)
         at javax.swing.JComponent._paintImmediately(Unknown Source)
         at javax.swing.JComponent.paintImmediately(Unknown Source)
         at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
         at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
         at javax.swing.RepaintManager.seqPaintDirtyRegions(Unknown Source)
         at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(Unknown Source)
         at java.awt.event.InvocationEvent.dispatch(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForFilter(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)
    Caused by: java.lang.NullPointerException
         at com.sun.media.jai.util.PropertyUtil.getString(PropertyUtil.java:167)
         at javax.media.jai.operator.JaiI18N.getString(JaiI18N.java:19)
         at javax.media.jai.operator.AbsoluteDescriptor.<clinit>(AbsoluteDescriptor.java:65)
         ... 30 more

    Not sure if this is the problem, but manifests are not appropriate ways to add jar's to an applet's classpath. Instead, add each jar to the archive attribute of the applet element in the web page.
    Something like..
    <applet
      class='JaiApplet'
      archive="our.jar,lib/jai_codec.jar,lib/jai_core.jar,lib/mlibwrapper_jai.jar"
      width='600'
      height='400'>
    </applet>

  • Applet access denied  with Tomcat 4.1.29 -- Plz Help

    I searched for answers in the forum and used the jarsigner to certify an applet that uses Oracle thin driver. Modified the catalina.policy to:
    grant {
            permission java.security.AllPermission;
    permission java.net.SocketPermission "127.0.0.1:1024-", "accept, connect, listen, resolve";
              }; I am still seeing this error:
    access denied (java.net.SocketPermission 127.0.0.1:1521 connect, resolve)PLEASE HELP
    Murthy

    Thanks for the clarification! I created a java.policy file on the client. I'm now seeing null pointer for the connection variable. BTW, on the client I saved the java.policy at $HOME and the policy tool says it can't find it!!!

  • Applet says access denied

    I posted the code from Sam's book in another thread. I compiled the code resulting in two files: PeteApplet.class and PetePanel.class. I moved the files to /usr/local/tomcat/jsp directory. I then copied the required GIF's to the same directory. The GIF's have read/write/exec permission to everyone (chmod 777 on unix). But at run time I get the following error. Please help!
    java.security.AccessControlException: access denied (java.io.FilePermission right1.gif 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:486)
         at sun.awt.SunToolkit.getImage(SunToolkit.java:500)
         at PetePanel.<init>(PeteApplet.java:32)
         at PeteApplet.<init>(PeteApplet.java:6)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
         at java.lang.Class.newInstance0(Class.java:306)
         at java.lang.Class.newInstance(Class.java:259)
         at sun.applet.AppletPanel.createApplet(AppletPanel.java:566)
         at sun.plugin.AppletViewer.createApplet(AppletViewer.java:1775)
         at sun.applet.AppletPanel.runLoader(AppletPanel.java:495)
         at sun.applet.AppletPanel.run(AppletPanel.java:292)
         at java.lang.Thread.run(Thread.java:536)
    java.security.AccessControlException: access denied (java.io.FilePermission right1.gif 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:486)
         at sun.awt.SunToolkit.getImage(SunToolkit.java:500)
         at PetePanel.<init>(PeteApplet.java:32)
         at PeteApplet.<init>(PeteApplet.java:6)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
         at java.lang.Class.newInstance0(Class.java:306)
         at java.lang.Class.newInstance(Class.java:259)
         at sun.applet.AppletPanel.createApplet(AppletPanel.java:566)
         at sun.plugin.AppletViewer.createApplet(AppletViewer.java:1775)
         at sun.applet.AppletPanel.runLoader(AppletPanel.java:495)
         at sun.applet.AppletPanel.run(AppletPanel.java:292)
         at java.lang.Thread.run(Thread.java:536)

    You need to either grant permissions to your applet in
    the policy tool or sign your applet. Give the file
    read/write permissions has nothing to do with the
    applet. The applet runs in a sandbox, to break out of
    it your applet must have permission to read from your
    hard drive.How do I give the applet permission to read from hard drive?
    After reading java.sun.com/sfaq I created ~/.hotjava/properties file with entries like
    ac.read=/usr/local/tomcat/webapps/ROOT
    where the path points to a directory containing the GIF files. I've set the access permissions to chmod 777 on linux. Still the applet fails to load the GIF file!

  • Applet database connection : access denied

    Connections to my MySql database can only made from applications running on the host. So when I log on to my domain and run a Java application from the console, I can talk to the database. There's no problem with php either. But when I upload an applet, I get an access denied.
    Anyone knows how to get around this problem?

    Change MySQL so that it will accept connections from users running on whatever system the applet is running on.

  • Access denied by loading files into applet

    Hi!
    I have a problem with initializing my applet.
    When i try to load files from my harddisk in my applet, i get the
    "access denied" message and so the applet could not be initialized.
    I gave my program files "allPermission" in the java-policy-tool.
    Is there anybody who can tell me, what the problem is?
    Thanks for your help.
    Stefan

    You should load the URL of your file.
    URL url = null;
    try {
    url = new URL(getCodeBase(), getParameter("...your file..."));
    }catch(Exception e){;}
    loaders.load(url);
    Normally, that should be good !
    Bye !

  • Deployment of an infobus applet : access denied

    When I deploy my program, I get the following errors after the
    data login dialog:
    Access denied (java.net.Socket Permission "hostname" resolve)
    My applet try to read/write via an infobusdataform on the server
    hostname
    Thanks
    null

    Hi!
    I solved the problem!
    I got this messages because I used thr oracle14 - driver. This driver was already signed and i tried to sign the whole program again...
    Thats it!
    I just used another driver, which isnt signed... easy but effective!

Maybe you are looking for

  • Create a new row in a table without using add new row button

    I want to add a new row to the table without using the add new row button of the table. I'm not able to display default row in the table. Though if click on apply the record appears after saving in the database. Any thoughts how to implement this fun

  • Uploading excel data to database table

    Dear Experts,                      I have an Excel file which was downloaded from SQL database, now I need to export this data into my 'ztable', for this first I created an internal table of ztable structure and tried to upload into this table throug

  • NMT 1.4 iPhoto issues

    Hi all, This is my first post, let´s see if I make myself clear... :-) I just bough a Nokia 5800. I installed NMT 1.4 and everything goes great except for two things: - itunes artwork is not showing up in my phone - most importantly, when I try to sy

  • How do you charge your iPads in the classroom?

    How do you charge your iPads in the classroom? Is this convenient?

  • Replicating the data source

    Hi, I have an attribute data source and when I have replicated the data source again from the source system, the type has changed from attribute to hierarchy. Can you please tell me how can this happen and what needs to be done to revert it back to a