7 Replies Latest reply on Nov 28, 2003 4:40 PM by 395731

    JInitiator and applet tags: a guaranteed way to crash the browser?

    395731
      I have a very simple Java applet here (derived from one of the Oracle sample applets) which, as part of its processing, starts Forms 9i.

      Alas, it never works properly: Forms stalls with

      JInitiator Fatal Error
      Attachment to a running Virtual Machine failed

      assumes that this means that JInitiator isn't installed, installs it, and crashes IE.

      The problem seems to be that JInitiator is allergic to JVMs other than JInitator (even Sun JVMs with the same version number!) yet provides no way to run itself rather than other JVMs when the <applet> tag is encountered.

      It's easy to reproduce: go to a random web page that uses an ordinary Java applet (e.g. <http://gregegan.customer.netspace.net.au/>), and then start Forms or do something else that would normally trigger JInitiator.


      The JInitiator docs document nothing about the interoperation of JInitiator with other JVMs, nor any way to get the <applet> tag to start JInitiator rather than some other JVM.

      Is there any way to get Java applets to use JInitiator's JVM without rewriting the web page to use some strange non-<applet> tag (which is obviously a no-no as some of the web pages might be networkologically remote and not under our control).

      If there isn't such a way, I think it should be documented that JInitiator doesn't work with browser applets.
        • 1. Re: JInitiator and applet tags: a guaranteed way to crash the browser?
          Grant Ronald-Oracle
          Nick - it not clear from your email what you are doing.

          1) Are you running a Form from the builder which should use Jinitiator in the browser?

          2) Or are yuo saying you have a Java Applet application (non Forms) which is calling Forms (to run Jinit) and this is causing the problem.

          The important thing to ensure your set up is correct is can you do 1) - if this works and 2 does not then it helps clarify the problem a bit.
          Regards
          Grant Ronald
          Forms Product Management
          • 2. Re: JInitiator and applet tags: a guaranteed way to crash the browser?
            395731
            It is indeed 2): a Java applet that's calling Forms.

            But I don't need a Java applet to call forms: I just need to have started a Java applet at some point in the past (since last starting the browser instance, of course); the applet doesn't need to be running anymore or have anyhting to do with Forms's starting, or anything.

            JInitiator doesn't appear to get on with non-Oracle JVMs at all. :(

            (This also torpedoes the means suggested on page 15 of <http://otn.oracle.com/products/forms/pdf/SigningJint13.pdf> for getting certificates onto client machines, because it too requires a browser-side Java applet, which will, it seems, always use a non-Oracle JVM, whereupon starting JInitiator will crash in flames.)
            • 3. Re: JInitiator and applet tags: a guaranteed way to crash the browser?
              Grant Ronald-Oracle
              Nick - the reason you are getting this is the Java plugs ins do not support running multiple JVM versions. The same (should) be true if you do the same with two different applet pages running different JVM versions.

              The is more information about this if you google on the error message and you can speak to SUpport about BUG:3036355 which documents this.
              Hope this helps.
              Grant Ronald
              Forms Product Management
              • 4. Re: JInitiator and applet tags: a guaranteed way to crash the browser?
                395731
                Ah. Well, in that case, is there any way for a browser-side Java applet to trigger the starting of Forms?

                As it is, it seems the answer is `no' :( this seems to be a considerable (undocumented) restriction.
                • 5. Re: JInitiator and applet tags: a guaranteed way to crash the browser?
                  Grant Ronald-Oracle
                  Well it is a documented limitation of the technology on which Forms is based. As I mentioned it should replicate in a non Forms environment.
                  I'm not sure off the top of my head on a workaround (anyone else done this??) however I would recommend widening your net and maybe posting on the sun forum since it is a limitation of the Java VMs.

                  Sorry I don't have a more definitive answer.
                  Grant
                  • 6. Re: JInitiator and applet tags: a guaranteed way to crash the browser?
                    395731
                    I think I said at the top that I'd be just as happy with a hack that arranged for the JInitiator JVM to be used to run all applets (not just Forms).

                    Is there any way to do that?
                    • 7. Re: JInitiator and applet tags: a guaranteed way to crash the browser?
                      395731
                      Well, I tried changing the applet tag use to

                      <object classid='clsid:CAFECAFE-0013-0001-0009-ABCDEFABCDEF'
                      archive='<%=APPLET_ARCHIVE%>' code='<%=APPLET_CLASSNAME%>' width=0 height=0>

                      (the sole change from the <applet ...> days being the addition of the classid; all variables had the same value, too).

                      JInitiator started, and then said

                      APPLET tag missing CODE parameter.
                      java.lang.NullPointerException: name
                           at java.util.zip.ZipFile.getEntry(Unknown Source)
                           at java.util.jar.JarFile.getEntry(Unknown Source)
                           at java.util.jar.JarFile.getJarEntry(Unknown Source)
                           at sun.misc.URLClassPath$JarLoader.getResource(Unknown Source)
                           at sun.misc.URLClassPath.getResource(Unknown Source)
                           at sun.misc.URLClassPath.getResource(Unknown Source)
                           at java.lang.ClassLoader.getBootstrapResource(Unknown Source)
                           at java.lang.ClassLoader.getResource(Unknown Source)
                           at java.lang.ClassLoader.getResource(Unknown Source)
                           at java.lang.ClassLoader.getResource(Unknown Source)
                           at java.lang.ClassLoader.getResourceAsStream(Unknown Source)
                           at sun.applet.AppletPanel$2.run(Unknown Source)
                           at java.security.AccessController.doPrivileged(Native Method)
                           at sun.applet.AppletPanel.createApplet(Unknown Source)
                           at sun.plugin.AppletViewer.createApplet(Unknown Source)
                           at sun.applet.AppletPanel.runLoader(Unknown Source)
                           at sun.applet.AppletPanel.run(Unknown Source)
                           at java.lang.Thread.run(Unknown Source)

                      (the exception repeated once)

                      Needless to say, the CODE parameter is provided. I don't know quite what to think here.

                      (This working without source code for critical components is like trying to read a translation of your favourite novel into a language you don't read, in the dark.)