3 Replies Latest reply on Nov 29, 2001 9:01 AM by Sanjit Singh

    applet access to EJB bug!

    weijie Newbie

      jboss2.4.3 with tomcat 3.2
      if I package the EJB in stand alone jar, my applet can access it OK.
      but if package the .jar with .war to .ear, the some applet got this:

      java.security.AccessControlException: access denied (java.io.FilePermission \jboss\tmp\deploy\Default\test.ear\- read)

      at java.security.AccessControlContext.checkPermission(Unknown Source)

      at java.security.AccessController.checkPermission(Unknown Source)

      at java.lang.SecurityManager.checkPermission(Unknown Source)

      at sun.rmi.server.LoaderHandler$Loader.checkPermissions(Unknown Source)

      at sun.rmi.server.LoaderHandler$Loader.access$000(Unknown Source)

      at sun.rmi.server.LoaderHandler.getClassLoader(Unknown Source)

      at sun.rmi.server.MarshalInputStream.resolveProxyClass(Unknown Source)

      at java.io.ObjectInputStream.inputProxyClassDescriptor(Unknown Source)

      at java.io.ObjectInputStream.readObject(Unknown Source)

      at java.io.ObjectInputStream.readObject(Unknown Source)

      at java.io.ObjectInputStream.inputObject(Unknown Source)

      at java.io.ObjectInputStream.readObject(Unknown Source)

      at java.io.ObjectInputStream.readObject(Unknown Source)

      at java.rmi.MarshalledObject.get(Unknown Source)

      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:353)

      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:333)

      at javax.naming.InitialContext.lookup(Unknown Source)

      at resourceMgm.resourcetree.init(resourcetree.java:44)

      at sun.applet.AppletPanel.run(Unknown Source)

      at java.lang.Thread.run(Unknown Source)

        • 1. Re: applet access to EJB bug!
          gsr88 Newbie

          Does any one have a fix for this.

          • 2. Re: applet access to EJB bug!
            Mikael Eriksson Novice

            This looks strange...

            It looks like the ear file is in the classpath on the _client_ side. If you want the classses to exist on the client you should have them in a jar that the browser/applet can find in its classpath. That jar would then have to be installed on the client computer somehow. (Are you now running the client and the server on the same computer?)

            The standard way to do this is to let the server deliver the classes to the applet. In that case all the classes that the applet need should be in the same jar as the applet, that is you need to put the home and remote interfaces of the EJB there, and any other application specific classes that you use.

            (Have not worked with applets in a while so I don't really remember the mechanisms for this at the moment... Also client packages in ears might solve this somehow but not I would not be sure how :-) )


            • 3. Re: applet access to EJB bug!
              Sanjit Singh Newbie


              I am having the same problem as you, but this problem only creeps up once in a blue moon (not always). Did you figure out the solution to the above. If yes, then it would be great if you could share it with me.