2 Replies Latest reply on Jan 21, 2002 9:19 PM by 807592

    Security problem in NS6.2?

    807592
      Could anyone tell me whatthis means? This is the message I get when trying to run an applet in NS 6.2. Works fine in NS4

      java.security.AccessControlException: access denied (java.lang.RuntimePermission modifyThread)
           at java.security.AccessControlContext.checkPermission(Unknown Source)
           at java.security.AccessController.checkPermission(Unknown Source)
           at java.lang.SecurityManager.checkPermission(Unknown Source)
           at sun.applet.AppletSecurity.checkAccess(Unknown Source)
           at java.lang.Thread.checkAccess(Unknown Source)
           at java.lang.Thread.stop(Unknown Source)
           at SynthactorPlayer.stop(Unknown Source)
           at sun.applet.AppletPanel.run(Unknown Source)
           at java.lang.Thread.run(Unknown Source)
      Exception caught

      java.security.AccessControlException: access denied (java.lang.RuntimePermission accessClassInPackage.sun.audio)
           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 s.f(Unknown Source)
           at s.a(Unknown Source)
           at t.a(Unknown Source)
           at u.d(Unknown Source)
           at u.l(Unknown Source)
           at u.run(Unknown Source)
           at java.lang.Thread.run(Unknown Source)


      And this is the code on the HTMl page:

      <applet CODE=SynthactorPlayer.class hspace="0" align="left" vspace="0"
           ALIGN=top
           ID="atFacePlayer"
           NAME="atFacePlayer"
           ARCHIVE=SynthactorPlayer.jar
           CODEBASE="http://www.text2video.com/jarfiles"
           WIDTH="180"
           HEIGHT="150"
           TITLE=Sally>
      <param NAME="scale" VALUE="2.2">
      <param NAME="mdlPath" VALUE="/<%=modelpath%>">
      <param NAME="avPath" VALUE="/<%=avpath%>">
      <param NAME="showCounters" VALUE="0">
      <param NAME="playMode" VALUE="1">
      <param NAME="bkgMode" VALUE="32">
      <param NAME="BackColorHex" VALUE="6192EF">
      <param NAME="xOffs" VALUE="0">
      <param NAME="yOffs" VALUE="15">
      <param NAME="playEveryFrame" VALUE="0">
      </applet>

      Sorry. But I can't give you the source code of the applet.
        • 1. Re: Security problem in NS6.2?
          807592
          I don't really work with applets much so I may not be able to help you too specifically, but you have two stack traces and I am not sure if they are related or not. The first one may have been thrown when some method attempted to invoke Thread.stop() . Thread.stop() checks the security manager for run time permission "stopThread". The applet security manager may not grant that permission. You may have to eliminate a call to that method (which is deprecated any ways) or change the security environment.

          The second exception looks like it is being thrown because the applet does not have access to classes in the sun.audio package. That problem is also security related and you may have to change things. In a java application, you could just modify your policy file to include those run time permission (for access to package sun.audio and permission to invoke Thread.stop). I doubt that your browser will allow you to modify those types of policies. Have you tried running it via the Sun applet plugin, rather then through the browser's applet engine? This forum should have several examples on how to use the Sun plugin.
          • 2. Re: Security problem in NS6.2?
            807592
            NN4 accepts the <APPLET> tags but NN6 wants the <OBJECT> tag (altho with JRE1.3.1._02, NN6.2 will run correctly with the plain <APPLET> tag) You may have to use the HTMLConverter that comes with your JDK to convert the HTML file.

            V.V.