Menu

Liveconnect problems

Help
2005-05-04
2013-04-16
  • Ole Řyvind Hove

    Hi,

    First of all I'd like to give you a big "thank you" for bringing Java to the Mozilla-series of browsers on Mac. Since Apple won't let anybody else than Safari have access to proper java-handling, this plugin is exactly what I need.

    The Problem:
    However, we've been experiencing som anomalities while using this plugin, and were woundering why this happens. Our scenario is as follows:

    Websolution runnin on Apache, providing a Java-application from Pageflex, the .Edit application. The .Edit applet has a set of triggers, and one of them is onDocumentLoaded. when .Edit starts, it loads a document and then triggers the onDocumentLoaded event, which tries to run a function in another java-applet, which again runs a javascriptcall via liveconnect. Prior to this(,on a different page), we run a small applet, which tests if liveconnect from Javascript to Java works, and it seems to work just fine. But when we start the .EDIT application, the stranges thing happens. Sometimes .EDIT starts up just fine, but other times it dies with a java.lang.NullPointerException before the application is drawn to screen. The console-log sometimes says "Browser is null version is null." other times it says "Browser is Netscape version is null." or "Java Vendor: Apple Computer, Inc. Version: 1.4.2_05", but

    Error message:
    Browser is Netscape version null
    Java Vendor: Apple Computer, Inc. Version: 1.4.2_05
    java.lang.NullPointerException
        at DocumentApplet.start(DocumentApplet.java)
        at sun.applet.AppletPanel.run(AppletPanel.java:377)
        at java.lang.Thread.run(Thread.java:552)

    We've tried to change ownership of files, attributes set in the Java Control panel as stated in your documentation, and to set permissions in .java.policy-files for different users. This because we thought it had something to do with user-pemissions but we can't figure out if it

    JavaConsole logg with full trace:
    Referencing classloader: sun.plugin.ClassLoaderInfo@4d2125, refcount=1
    May 3, 2005 9:54:55 AM sun.plugin.util.PluginLogger log
    INFO: Referencing classloader: sun.plugin.ClassLoaderInfo@4d2125, refcount=1
    Loading applet ...
    May 3, 2005 9:54:55 AM sun.plugin.util.PluginLogger log
    INFO: Loading applet ...
    Tue May 03 09:54:55 CEST 2005 JEP creating applet DocumentApplet
    Initializing applet ...
    May 3, 2005 9:54:55 AM sun.plugin.util.PluginLogger log
    INFO: Initializing applet ...
    This is Pageflex .EDIT version Version 3.2.0  build 252
    Referencing classloader: sun.plugin.ClassLoaderInfo@397d4e, refcount=1
    May 3, 2005 9:54:56 AM sun.plugin.util.PluginLogger log
    INFO: Referencing classloader: sun.plugin.ClassLoaderInfo@397d4e, refcount=1
    Loading applet ...
    May 3, 2005 9:54:56 AM sun.plugin.util.PluginLogger log
    INFO: Loading applet ...
    Tue May 03 09:54:56 CEST 2005 JEP creating applet MediaPortAPI
    Initializing applet ...
    May 3, 2005 9:54:56 AM sun.plugin.util.PluginLogger log
    INFO: Initializing applet ...
    Trying to connect!
    test14
    Connecting http://media.billedbank.no/jsrpc/MediaPortRPC.html with no proxy
    May 3, 2005 9:54:56 AM sun.plugin.util.PluginLogger log
    INFO: Connecting http://media.billedbank.no/jsrpc/MediaPortRPC.html with no proxy
    Connecting http://media.billedbank.no/jsrpc/MediaPortRPC.html with cookie "AF_SID=31a46a8a64730a54d7760f7c51be0eac"
    May 3, 2005 9:54:57 AM sun.plugin.util.PluginLogger log
    INFO: Connecting http://media.billedbank.no/jsrpc/MediaPortRPC.html with cookie "AF_SID=31a46a8a64730a54d7760f7c51be0eac"
    Referencing classloader: sun.plugin.ClassLoaderInfo@4d2125, refcount=2
    May 3, 2005 9:54:57 AM sun.plugin.util.PluginLogger log
    INFO: Referencing classloader: sun.plugin.ClassLoaderInfo@4d2125, refcount=2
    Loading applet ...
    May 3, 2005 9:54:57 AM sun.plugin.util.PluginLogger log
    INFO: Loading applet ...
    Initializing applet ...
    Server http://media.billedbank.no/jsrpc/MediaPortRPC.html requesting to set-cookie with "AF_SID=31a46a8a64730a54d7760f7c51be0eac; path=/"
    Tue May 03 09:54:57 CEST 2005 JEP creating applet ControlApplet
    May 3, 2005 9:54:57 AM sun.plugin.util.PluginLogger log
    INFO: Server http://media.billedbank.no/jsrpc/MediaPortRPC.html requesting to set-cookie with "AF_SID=31a46a8a64730a54d7760f7c51be0eac; path=/"
    100::Velg Cancel for  rette feilen eller OK for  fortsette;;101::OK;;102::Avbryt;;201::Dette bildet har for lav opplsning. Vennligst bruk mindre zoom, eller erstatt bildet med et med hyere opplsning.;;202::Intet bilde valgt;;203::Bildet m fylle rammen!;;301::Denne tekstboksen inneholder mer tekst enn det er plass til.;;302::Denne tekniske boksen inneholder mer tekst enn det er plass til
    May 3, 2005 9:54:57 AM sun.plugin.util.PluginLogger log
    INFO: Initializing applet ...
    Starting applet ...
    May 3, 2005 9:54:58 AM sun.plugin.util.PluginLogger log
    INFO: Starting applet ...
    Starting applet ...
    May 3, 2005 9:54:58 AM sun.plugin.util.PluginLogger log
    INFO: Starting applet ...
    Browser is null version null
    Java Vendor: Apple Computer, Inc. Version: 1.4.2_05
    java.lang.NullPointerException
        at DocumentApplet.init(DocumentApplet.java)
        at sun.applet.AppletPanel.run(AppletPanel.java:353)
        at java.lang.Thread.run(Thread.java:552)
    Exception: java.lang.NullPointerException
    May 3, 2005 9:54:59 AM sun.plugin.util.PluginLogger log
    INFO: Exception: java.lang.NullPointerException

    This happens when I change to a different tab in Firefox:

    apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.IllegalArgumentException: null source
    java.lang.IllegalArgumentException: null source
        at java.util.EventObject.<init>(EventObject.java:34)
        at java.awt.AWTEvent.<init>(AWTEvent.java:226)
        at java.awt.event.ComponentEvent.<init>(ComponentEvent.java:94)
        at java.awt.event.WindowEvent.<init>(WindowEvent.java:174)
        at java.awt.event.WindowEvent.<init>(WindowEvent.java:211)
        at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:576)
        at java.awt.Component.dispatchEventImpl(Component.java:3572)
        at java.awt.Container.dispatchEventImpl(Container.java:1671)
        at java.awt.Window.dispatchEventImpl(Window.java:1606)
        at java.awt.Component.dispatchEvent(Component.java:3543)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
        at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:184)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)

     
    • Steven Michaud

      Steven Michaud - 2005-05-12

      Thanks for your detailed bug report.  On the face of it, it sounds
      like some kind of timing problem (that you're trying to access an
      applet before it's been fully initialized).  But your problem is so
      complex that I can't help you until I have access (via a URL and
      possibly a special account) to your whole system of applets.

      Or (if you can manage it) you could send me the source code for test
      cases that demonstrate your problems ... but since your problems are
      so complex, there's no guarantee that the problems the test cases
      demonstrate will be the same as what you experience with your full
      system.

      If you do decide to post the source code to one or more test cases,
      you should open a bug in the Java Embedding Plugin's Bugs tracker.

      Oh, and here's an obvious suggestion -- try the JEP's latest version
      (0.9.1), which came out after you posted your report.  I fixed one bug
      (item #7 in JEP 0.9.1's Changes.txt) that _might_ be relevant.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.