5 Replies Latest reply: Jan 11, 2013 2:08 PM by user730626 RSS

    issues with the execution of a link that runs an applet in spaces

    user730626
      Sr- 3-6343374111
      Ver- 11.1.1.4.0


      customer gets this error when accessing a JAVA applet in spaces. This happens only in IE8

      http://portal/webcenter/faces/oracle/webcenter/page/scopedMD/s8bba98ff_4cbb_40b8_beee_296c916a23ed/businessRolePages/com/attinc/resqnet/client/ATTApplet.class solicita configuración de cookie con "acecookie=R3234720318; path=/; expires=Sat, 20-Oct-2012 15:27:20 GMT"
      network: No se ha encontrado la entrada de caché [URL: http://portal/webcenter/faces/oracle/webcenter/page/scopedMD/s8bba98ff_4cbb_40b8_beee_296c916a23ed/businessRolePages/, versión: null]
      basic: error: Incompatible magic value 1013478509 in class file com/attinc/resqnet/client/ATTApplet.
      java.lang.ClassFormatError: Incompatible magic value 1013478509 in class file com/attinc/resqnet/client/ATTApplet
           at java.lang.ClassLoader.defineClass1(Native Method)
           at java.lang.ClassLoader.defineClass(Unknown Source)
           at java.security.SecureClassLoader.defineClass(Unknown Source)
           at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
           at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
           at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)

      Thank you so much for all the help you can provide us.


      Check screen-shots attached to SR

      Edited by: user730626 on Oct 29, 2012 12:26 PM

      Edited by: user730626 on Oct 31, 2012 8:16 PM
        • 1. Re: issues with the execution of a link that runs an applet in spaces
          user730626
          When we click over the link of the applet in Chrome from Portal, the link takes me to the exact route where the applet is, This is the line of execution:

          Line2 "Output Java console(Chrome).txt" basic: Plugin2ClassLoader.addURL parent called for _http://xstabog15-436/UC/client.jar

          Has you can see the name of the applet is "client.jar".

          Now, if we do the exact same thing, but in IE8 from Portal, we get this line of execution in the java console:

          line2 Output "Java console(Chrome).txt" basic: Plugin2ClassLoader.addURL parent called for http://portal/webcenter/faces/oracle/webcenter/page/scopedMD/s8bba98ff4cbb_40b8_beee_296c916a23ed/businessRolePages/client.jar

          As you can see, IE8 is changing the route where our applet is, we are trying over the very same link, but just from different browsers in Portal.
          • 2. Re: issues with the execution of a link that runs an applet in spaces
            mcano-Oracle
            Can you indicate how is that they are integrating the applet in spaces?
            for example, any of these?
            - HTML Markup Layout Component
            - Web Page layout component
            - HTML document displayed using Content presenter
            - Applet consumed using the JSF Portlet Bridge?

            Can they run the applet standalone in the browser?
            If yes, have they run the applet in IE outside webcenter?
            Does this work fine?
            • 3. Re: issues with the execution of a link that runs an applet in spaces
              user730626
              To integrate the applet in spaces customer is using the Web Page Layout Component, which is the one that actually works on Chrome and Firefox but not in IE8. When they put the applet in a HTML Markup Layout Component they get the same error in all browsers.


              they are able to run the applet as a standalone application and attached a screen shot in the Sr (Applet_Internet_Explorer.jpg).


              Thanks
              • 4. Re: issues with the execution of a link that runs an applet in spaces
                mcano-Oracle
                Ok, I can reproduce the issue using IE8.

                Calling this Applet from a webpage component in WebCenter spaces:

                http://java.com/en/download/testjava.jsp

                When I call the applet to test the java in the browser from the above applet from within webcenter I get an error.
                opening the Java Console I see this error:

                Java Plug-in 1.6.0_16
                Using JRE version 1.6.0_16-b01 Java HotSpot(TM) Client VM User home directory = C:\Documents and Settings\mcano
                ----------------------------------------------------
                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
                q: hide console
                r: reload policy configuration
                s: dump system and deployment properties
                t: dump thread list
                v: dump thread stack
                x: clear classloader cache
                0-5: set trace level to <n>
                ----------------------------------------------------


                java.lang.ClassFormatError: Incompatible magic value 1013478509 in class file testJava2_1/TestVMApplet
                     at java.lang.ClassLoader.defineClass1(Native Method)
                     at java.lang.ClassLoader.defineClass(Unknown Source)
                     at java.security.SecureClassLoader.defineClass(Unknown Source)
                     at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
                     at java.lang.ClassLoader.loadClass(Unknown Source)
                     at java.lang.ClassLoader.loadClass(Unknown Source)
                     at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
                     at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
                     at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
                     at java.lang.Thread.run(Unknown Source)
                Exception: java.lang.ClassFormatError: Incompatible magic value 1013478509 in class file testJava2_1/TestVMApplet



                I did another test.
                I created a static HTML file with this to call the applet outside webcenter (saved the file as test_applet.html):


                <html>
                <iframe src="http://java.com/en/download/testjava.jsp" width="100%" height="100%">
                </iframe>
                </html>


                Then opening the above test_applet.html file from IE it also fails.
                So this is not a WebCenter issue.

                By looking at the View Source of the applet (http://java.com/en/download/testjava.jsp) I can see they are calling the applet suing this tag:

                <applet id="testVM" alt="Something is wrong. Java is not working." codebase="../../applet/TestJava" code="testJava2_1/TestVMApplet" archive="TestVM2.jar" width="500" height="280">
                     <param name="locale" value="en" />

                     <param name="titleSize" value="22" />
                     <param name="subtitleSize" value="18" />

                     </applet>
                </noscript>


                First the codebase parameter (codebase="../../applet/TestJava" ) is a relative URL. internet Explorer might have issues interpreting that when the applet is called from a different server form where the applet is running.

                Second .. doing more research it turns out that there are 3 ways to call an applet from HTML.
                You can call the applet using any of the following 3 tags:

                applet - This is deprecated with HTML 4.0.1 or above
                object
                embed

                These are explained here:
                http://download.java.net/jdk8/docs/technotes/guides/jweb/applet/applet_deployment.html

                The applet tag is deprecated in HTML 4.0.1 as indicated here:
                http://www.w3.org/TR/1999/REC-html401-19991224/appendix/changes.html#h-A.3.1.2
                http://www.w3.org/TR/1999/REC-html401-19991224/struct/objects.html#h-13.4

                This is also documented here:
                http://msdn.microsoft.com/en-us/library/ie/ms535183%28v=vs.85%29.aspx
                http://social.msdn.microsoft.com/Forums/en-US/iewebdevelopment/thread/bd2dea61-e878-4685-a494-33802ef539e8

                So if the customer created his own applet and is calling the applet using the APPLET tag then they need to change that and call teh applet using the OBJECT tag instead.
                They should also use full URLs (not relative URLs) if they are calling the applet from a different server from where the applet is running to ensure the classes form the applet are found.
                • 5. Re: issues with the execution of a link that runs an applet in spaces
                  user730626
                  Thanks a lot martha,

                  your suggestions perfectly worked-

                  Customer said,

                  We made the change of the tag that we use for call the applet from <applet> to <object> and it works in IE8.

                  For some reason the same HTML with <object> tag does´n works in Chrome, but for now we need that works in IE8.



                  Thank you very much for your help.