JSObject.getWindow(this) returning null under Netscape 7.0

Hi All
Hopefully somebody can help me out here. I have an applet that functions under all versions of IE (4.0+) and Netscape 4.x flavour browsers.
My applet uses Java to JavaScript communication to obtain launch parameters form the page that launched it and to control a Real Player plugin.
I have just installed Netscape 7.0 and when I make a call to JSObject.getWindow(this) from my applet all I get returmed is null.
My applet tag contains the mayscript attribute and the mayscript param.
Has anybody experienced anything similar with Netscape 7.0 or 7.1
Thanks
Mark

Here's my code that works in IE 6.x with the Java Plug-in that comes with NS7.1. In NS7.1 it throws a JSException.
In applet:
     public void start()
     System.out.println( "Starting applet..." );
     try
          win = JSObject.getWindow(this);               
          win.eval("appletReady = true;"); //Needed for NS 7.1 JAVA Plug-in
          win.eval("showSayHello();");
     catch(Exception e)
          System.out.println( e.toString() );
     public void sayHello()
          win.eval("alert(\"Hello\");");
In HTML file:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
     <head>
          <title>My Applet</title>
          <script language="JavaScript">
     <!--
          //debugger;
          var app = null;
          var appletReady = false;
          function showSayHello() {          
               if (appletReady)
                    app = document.getElementById("myApplet");                    
                    app.sayHello();
     // -->
          </script>
     </head>
     <body>
     <applet id="myApplet" name="myApplet" code="myApplet.class" style="LEFT: 0px; WIDTH: 100px; TOP: 0px; HEIGHT: 100px" height="100" archive="myApplet.jar" width="100">
     </applet>
     </body>
</html>

Similar Messages

  • JSObject.getWindow(this) doesn't work in NN6

    Hi,
    I'm trying to call JSObject.getWindow(this) method from init() method of an applet. I'm using Netscape 6, win2k, JRE 1.4. When this statement is reached, IE 5.0 works fine, but Netscape (6.0/6.2/7.0) hangs. The CPU usage becomes 100% if I see the task manager/performance. It doesn't even throw any exception. I'm using netscape.javascript.JSObject class. Please help me out.
    Deepak Jain

    have same problem.
    could not be solved, using java version 1.4.2:
    Java(TM) Plug-in: Version 1.4.2_01
    Verwendung der JRE-Version 1.4.2 Java HotSpot(TM) Client VM
    problem exists under
    Mozilla 1.0rc2
    Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0rc2) Gecko/20020510

  • (DocumentBuilder).parse return null under jdk 1.5.0

    I would like to understand why the following code return a correct Document instance if it running under jdk 1.4.2 and instead return null if it running under jdk 1.5.0.
    Thanks!
    F.
    import java.io.IOException;
    import java.io.StringReader;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.ParserConfigurationException;
    import org.w3c.dom.Document;
    import org.xml.sax.InputSource;
    import org.xml.sax.SAXException;
    String test = "<root>" + "" + "</root>";
    StringReader sreader = new StringReader (test);
    InputSource is = new InputSource(sreader);
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    DocumentBuilder builder;
    builder = factory.newDocumentBuilder();
    Document doc =  builder.parse(is);
    System.out.println("Document is: " + doc);

    Because you're using the toString() method to display the Document. It works differently in Java 5 than it did in Java 1.4. This is perfectly okay because the DOM specification doesn't say anything about what the toString() method should return. If you relied on that for anything other than debugging then you were relying on an undocumented feature. Shouldn't do that.

  • Builder.parse return null under jdk 1.5.0

    I would like to understand why the following code return a correct Document instance if it running under jdk 1.4.2 and instead return null if it running under jdk 1.5.0.
    Thanks!
    F.
    String test = "<root>" + "" + "</root>";
    StringReader sreader = new StringReader (test);
    InputSource is = new InputSource(sreader);
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    DocumentBuilder builder;
    builder = factory.newDocumentBuilder();
    Document doc =  builder.parse(is);
    System.out.println("Document is: " + doc);

    Because you're using the toString() method to display the Document. It works differently in Java 5 than it did in Java 1.4. This is perfectly okay because the DOM specification doesn't say anything about what the toString() method should return. If you relied on that for anything other than debugging then you were relying on an undocumented feature. Shouldn't do that.

  • JSObject.getWindow(this)

    Hello. I am running an applet which makes calls to javascript functions using the netscape JSObject. This works fine in multiple browsers on PC but wont work at all on Mac Safari/Firefox for Mac/or IE for Mac. What happens is it throws JSException at JSObject.getWindow(JSObject.java) I have searched google and found only outdated versions of this problem which the only solution offered was to make sure I have the most recent JVM. I do. And still not working. I can't figure it out. I need this to work in Safari. Can someone please help me figure out how to call javascript functions from Mac Safari. Thank you.

    Never figured this one out. Its too late now, I restructured everything. Instead of having my applet call javascript functions, i had javascript call functions in my applet and everything works great on PC and on Mac. A theory I have is that maybe since <applet> is deprecated, maybe Mac is more picky than pc and it causes live connect not to work properly. The only way to test this is to use <object> instead of <applet> (like we are all supposed to). But unless I have a need, I won't be worrying about this anymore. I just don't use <object> because I think its easier to use <applet> and it works. Plus I don't know how to use <object>. Oh well.

  • How to use getRelativePath() with browseForOpen()? It returns null

    It's quite simple:
    fTargetFile:File = File.applicationDirectory.resolvePath("assets");
    fRootFile:File = File.applicationDirectory.resolvePath("assets");
    fTargetFile.addEventListener(Event.SELECT,onSelect)
    fTargetFile.browseForOpen("test"); <-- here I open a file in "/assets/images/test.jpg"
    function onSelect(e:Event):void
        trace(fRootFile.getRelativePath(fTargetFile));  <-- this returns null
    Every single "tutorial" in the web - along with Adobe's documentation - gracefully uses resolvePath to explicitly point to the file objects, thereby bypassing the actual use case. getRelativePath indeed works with resolvePath, but using resolvePath means I've already known where the file is located in the first place, rendering getRelativePath actually useless
    tracing the nativePath property of both objects returns the correct path.
    What I'm trying to do is letting the user choose a file within the "assets" directory. The file can be from any folder so long as they're under the "assets", and once user chooses a file, display the relative path from "assets" to the chosen file.
    So, in the example above, I expect "images/test.jpg" to be returned, but it returns nothing
    Do I have to do some wizardry before getRelativePath works?

    This post is rather old, so I may not be able to help the original author of this topic, but as I found this thread, when searching for a solution for this problem myself, I might be able to help someone else.
    I found the following solution:
    function onSelect(e:Event):void
      var f1:File = (new File()).resolvePath(e.currentTarget.nativePath);
      var f2:File = (new File()).resolvePath(File.applicationDirectory.nativePath);
      trace(f2.getRelativePath(f1, true));

  • Field.get(Object obj) now returning null with Generics (Java 5.0) ??

    Hello,
    I'm currently using Java 5.0 (especially for the Generics part) on a new Java/J2EE project, but having a strange issue with code working previously in a Java 1.4 project.
    Below is an overriding of the toString() method provided by the Object class which allow me to view nicely in debug (dev. mode) the contents of my Transfer Objects (all the TO's must extend this ATO abstract class).
    Previously this code displayed me something like:
    [field1 => value1, field2 => value2] ... for a TO (sort of "Javabean") having e.g. two String fields with values initialized to "value1" (resp. "value2").
    But unfortunately, this does (or seems) not to work anymore, having such display :
    [field1 => null, field2 => null]I tried to debug, and the problem is that the call fieldValue = field.get(this); returns null while it should returns the actual value of the field.
    I thing it it strongly related to Generics, but could not at the moment found how/why it does not work.
    May someone help...? Thanks.
    public abstract class ATO {
        // Reflection for field value display
        public String toString() {
            StringBuffer sb = new StringBuffer("[");
            MessageFormat mf = new MessageFormat("{0} => {1}, ");
            Field[] fields = this.getClass().getDeclaredFields();
            for (int i = 0; i < fields.length; i++) {
                Field field = (Field) fields;
    String fieldName = field.getName();
    Object fieldValue = null;
    try {
    fieldValue = field.get(this);
    } catch (IllegalArgumentException e) {
    } catch (IllegalAccessException e) {
    mf.format(new Object[] { fieldName, fieldValue }, sb, null);
    if (sb.length() > 1) {
    sb.setLength(sb.length() - 2);
    sb.append("]");
    return sb.toString();

    ejp wrote:
    Field field = (Field) fields;
    This cast is unnecessary.
    Effectively, I haven't noticed it yet. Fixed.
    } catch (IllegalArgumentException e) {
    } catch (IllegalAccessException e) {
    }Either the field value really is null or you are getting one of these exceptions which you are ignoring. Never write empty catch blocks.That's true, I missed something. Fixed with some code to log the eventual exceptions.
    Thanks for you answer.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Graphics returning null in one place, but not another.

    If you want to compile and run my program.... you can get all the files here:
    http://s94182144.onlinehome.us/randomstuff/files.zip
    (The main classes you'll need to look at are DrawingCanvas, Trig and GraphEngine)
    Here's a visual just in case:
    http://s94182144.onlinehome.us/randomstuff/graph.jpg
    When I click the "Graph It" button, I'm sending all those variables in the window to another class. Except the method I need to call is passed Graphics g... and thus, I needed to create a graphics variable. But it's returning null.
    Here is my code in GraphEngine, which runs when a button is clicked. You'll notice for Graph It... I created a Graphics variable... this returns null. Except you'll also notice I do the same thing for "Clear"... but this works.
    NOTE: I was getting mad so I named some methods not so nicely :p .... you may notice they are different in my files.
         public void actionPerformed(ActionEvent e)
              userDisplay=e.getActionCommand();
              if(userDisplay.equals("Draw"))
                   String progChoice=grapher.graphType.getSelectedItem();
                   System.out.println(progChoice);
                   if(progChoice.equals("Lines"))
                        grapher.allButtons[0].enable();
                        draw();
                   else if(progChoice.equals("Scatter Plot"))
                        lineOfBestFit();
              else if(userDisplay.equals("Graph It"))
                   Trig.graphThisStuff();
                   Graphics g = canvas.getGraphics();
                   canvas.trig(g);
               else if(userDisplay.equals("Clear"))
                    Graphics g = canvas.getGraphics();
                   System.out.println(g);
                    canvas.clear(g);
            else if(userDisplay.equals("Reset"))
                Trig.restartThis();   
              else if(userDisplay.equals("Credits"))
                showInstructionsFrame();
            else if(userDisplay.equals("Help"))
                showHelpFrame();   
            else if(userDisplay.equals("Create Sinusodial Graph"))
                showTrigFrame();   

    1. Do you expect forum members to download and unzip your code? Good luck...
    2. Inside almost every "big" problem is a small one trying to get out. Write a minimal program
    demonstrating your problem (say <50 lines) and post that. The shorter code and the easier it
    is to copy, paste and run, the more forum members will actually give it a go.
    That being said, you problem is that you are using Component's getGraphics at all. Don't use it.
    It doesn't work very well -- they rendering you do is temporary, if you iconify and restore your
    window your changes will disappear (sometimes even moving another window past yours will do this!).
    What should you do instead? Put all your rendering code in paintComponent (or subroutines
    it calls). Changes in state of your app should trigger a call to repaint (or you will call it directly).
    Repainting will eventually cause your paintComponent to be called.

  • Session.getAttribute("somekey") returning  NULL in SessionDestroyed

    Hi all,
         session.getAttribute("somekey") is returning null  in SessionDestroyed() method of flex listener.
    Below are the steps I am following
    1) I am adding flexLister in contextInitialized method of ServletContextListener
       FlexSession.addSessionCreateListener(myListener)
    2) In sessionCreate method
         sessionCreated(FlexSession session) {
                session.addSessionDestroyListener(this)
    3) some where in applicaion I am putting a key vlaue pair in session like this
    FlexContext.getSession().setAttribute("somekey" , someVlue)  ;
    The issue is when I try to retreive vale from session
    her is how I m retreiving value
       sessionDestroyed(FlexSession session) {
              session.getAttribute("somekey");     this return null WHY ?
    This is always returning me null
    Pls note that I am RTMP channel and  version of LCDS is 2.6
    I also tried RTMPFlexSession
      RTMPFlexSession.addSessionCreateListener(myListener)
    but no luck  , still got null
    Am I doing anything wrong  ?
    One more doubt, how to explicitly put data in RTMPFlexSeesion. FlexContex.getSession () always return HttpSession and I always hence I always end up putting attribute in unintended place.
    Thanks ,
    Dharmendra

    Hi,
    I really apologize for posting irrelevant question. I was not really aware of what do you mean by Lingo Director..
    Thanks for suggestions and reply.
    Regards,
    Dharmendra

  • Has anyone any idea what this message in console mean ? "Finder: WormholeServer::copyMyAppleIdentity returned NULL"

    ? Has anyone any idea what this message in console mean ? "Finder: WormholeServer::copyMyAppleIdentity returned NULL"

    I just responded here, https://discussions.apple.com/thread/3380580?start=0&tstart=0
    Air-drop with wi-fi off

  • MessageBroker.getMessageBroker(null) returns null.. why?

    Hello
    I have seen lot of posts regarding this but no clear reason why this would happen. My server runs under Tomcat 6.0.33. In a spearate thread, I try to get MessageBroker msgBroker = MessageBroker.getMessageBroker(null); but it always returns null. In my web.xml, there is a valid servlet MessageBrokerServlet with load-on-startup = 1. In one of the posts Rohit suggested copy jta.jar to tomcat libs but it doesnot help either. I tried to wait 30 secs or so in my thread before invoking MessageBroker.getMessageBroker(null) and also tried to set param-name messageBrokerId in web.xml, but none seems to help.. please help...
    Also tried MessageBroker broker = FlexContext.getMessageBroker() in the init() of my Servlet but it is also null.
    thanks
    Rupak
    Message was edited by: RupakKhurana

    It is resolved now. Upon careful examination of the log, I found that the MessageBrokerServlet was indeed throwing an exception due to a wrong tag being used in messaging-config.xml file..

  • RisPort returns NULL in Response

    Hi all,
    I'm trying to write a little Java application that fetches information about phones currently registered on a CUCM 6.1 cluster.
    I've generated Java classes from the WSDL using AXL 1.4's WSDL2JAVA tool.
    The code below is using these classes to fetch phone information. My problem is that the response is giving just 0. getTotalDevicesFound() returns 0, getCmNodes() returns NULL.
    Any ideas?
    Thanks
    Jörg
    public static void main(String[] args) {
    try {
    System.out.println("---------Starting---------");
    URL url = new URL("https://192.168.38.151:8443/realtimeservice/services/RisPort");
    RISServiceLocator loc = new RISServiceLocator();
    RisPortType port = loc.getRisPort(url);
    ((RisBindingStub) port)._setProperty(Call.USERNAME_PROPERTY, "ccmadministrator");
    ((RisBindingStub) port)._setProperty(Call.PASSWORD_PROPERTY, "sbh7113");
    StringHolder stateInfo = new StringHolder("1");
    CmSelectionCriteria cmSelectionCriteria = new CmSelectionCriteria();
    cmSelectionCriteria.setStatus("Any");
    cmSelectionCriteria.set_class(DeviceClass._Phone);
    cmSelectionCriteria.setSelectBy("Name");
    cmSelectionCriteria.setModel(new UnsignedInt(255));
    cmSelectionCriteria.setMaxReturnedDevices(new UnsignedInt(100));
    SelectCmDeviceResult res = port.selectCmDevice(stateInfo, cmSelectionCriteria);
    UnsignedInt number = res.getTotalDevicesFound();
    CmNode[] nodes = res.getCmNodes();
    System.out.println("---------Listing result---------");
    System.out.println(number.intValue());
    System.out.println(nodes.length);
    System.out.println("---- DONE ----");
    } catch(Exception e) {
    e.printStackTrace();

    Hi:
    How did you compile and build the package using WSDL2JAVA. I tried under UCM 6.1 environment but receiving error message on 2 of the classes that, too large object.
    axisbuild:
    compiling 1007 source files
    /generatedaxisclient/com/cisco/www/AXLAPLService/AXLAPIBindingStub.java:4026:code too large
    public AXLAPIBindingStub(javax.xml.rpc.Service service)throws org.apache.axis.AxisFault {
    Error
    /generatedaxisclient/com/cisco/www/AXLAPLService/AXLAPIBindingStub.java:18:code too large
    public AXLAPIBindingStub(javax.xml.rpc.Service service)throws org.apache.axis.AxisFault {
    static {
    Error
    2 Errors
    Please let me know if you have any thoughts on this.
    Thank You
    Ramesh Vasudevan

  • GetConnectionURL returns null in Bluetooth Application

    Hi,
    I am trying to make my first steps with the JSR-82 API on mobile phones
    (Nokia 6680 and Sony Ericsson W800i). I have written a simple program
    (see code below), which is supposed to discover near-by devices, search
    for a given service (UUID) on a chosen (previously discovered) device
    (=server) and then to connect to the server and send a byte (n) to it. The
    server should then in turn send n+1 back. All this should be done using
    RFCOMM.
    The code works fine in the emulator as well as on two Nokia phones and
    on two SE phones. It further works, when using a Nokia phone as the
    server and a SE phone as the client. However, when using a SE as the
    client and a Nokia as the server, the call to getConnectionURL() returns
    null instead of a valid URL that can be used to set up the connection
    (you can find this piece of code in the ClientThread class). Can somebody
    explain me what I am doing wrong?
    Thanks,
    Michael
    P.S.:At first I thought it might be a compatibility problem, but in the
    BluetoothDemo program that comes with WTK2.2 the correct URL ist
    returned by getConnectionURL() (have other problems with this example
    though, when it comes to download images, in particular...).
    import java.io.IOException;
    import java.util.Vector;
    import javax.bluetooth.BluetoothStateException;
    import javax.bluetooth.DataElement;
    import javax.bluetooth.DeviceClass;
    import javax.bluetooth.DiscoveryAgent;
    import javax.bluetooth.DiscoveryListener;
    import javax.bluetooth.LocalDevice;
    import javax.bluetooth.RemoteDevice;
    import javax.bluetooth.ServiceRecord;
    import javax.bluetooth.UUID;
    import javax.microedition.io.StreamConnectionNotifier;
    import javax.microedition.lcdui.Alert;
    import javax.microedition.lcdui.AlertType;
    import javax.microedition.lcdui.Command;
    import javax.microedition.lcdui.CommandListener;
    import javax.microedition.lcdui.Display;
    import javax.microedition.lcdui.Displayable;
    import javax.microedition.lcdui.Form;
    import javax.microedition.lcdui.List;
    import javax.microedition.midlet.MIDlet;
    import javax.microedition.midlet.MIDletStateChangeException;
    public class MessageTest2 extends MIDlet
          implements CommandListener, DiscoveryListener {
          private final int START = 0;
          private final int SERVER_IDLE = 1;
          private final int CLIENT_START = 2;
          private final int CLIENT_DEVICES_DISCOVERED = 3;
          private final int CLIENT_SERVICES_DISCOVERED = 4;
          private final String MY_UUID = "F0E0D0C0B0A000908070605040302010";
          private final Command EXIT_CMD = new Command("Exit", Command.EXIT, 1);
          private final Command OK_CMD = new Command("Ok", Command.OK, 1);
          private List startList = new List("Select Type", List.IMPLICIT);
          private List deviceList = null;
          private List serviceList = null;
          private Form mainForm = new Form("Message Test 2");
          private int state;
          private ServerThread serverThread = null;
          private LocalDevice local = null;
          private DiscoveryAgent agent = null;
          StreamConnectionNotifier server = null;
          private Vector devicesFound = null;
          private ServiceRecord[] servicesFound = null;
          public MessageTest2() {
                super();
                mainForm.addCommand(EXIT_CMD);
                mainForm.addCommand(OK_CMD);
                mainForm.setCommandListener(this);
                startList.addCommand(EXIT_CMD);
                startList.addCommand(OK_CMD);
                startList.append("Server", null);
                startList.append("Client", null);
                startList.setCommandListener(this);
          protected void startApp() throws MIDletStateChangeException {
                state = START;
                Display.getDisplay(this).setCurrent(startList);
          protected void pauseApp() {
                // TODO Auto-generated method stub
          protected void destroyApp(boolean arg0) throws MIDletStateChangeException {
                // TODO Auto-generated method stub
          public void commandAction(Command c, Displayable d) {
                if (c == EXIT_CMD) {
                      if (server != null) {
                            try {
                                  server.close();
                            } catch (IOException e) {
                      notifyDestroyed();
                if (c == OK_CMD) {
                      if (state == START) {
                            if (startList.getSelectedIndex() == 0) {
                                  startServer();
                            } else {
                                  startClient();
                      } else if (state == CLIENT_START) {
                            doDeviceDiscovery();
                      } else if (state == CLIENT_DEVICES_DISCOVERED) {
                            doServiceDiscovery();
                      } else if (state == CLIENT_SERVICES_DISCOVERED) {
                            communicate();
          public void deviceDiscovered(RemoteDevice dev, DeviceClass devClass) {
                devicesFound.addElement(dev);
          public void servicesDiscovered(int transID, ServiceRecord[] serviceRecs) {
                servicesFound = serviceRecs;
          public void serviceSearchCompleted(int transID, int respCode) {
                switch(respCode) {
                case DiscoveryListener.SERVICE_SEARCH_COMPLETED:
                      showServices();
                      break;
                case DiscoveryListener.SERVICE_SEARCH_DEVICE_NOT_REACHABLE:
                      System.err.println("Device not reachable");
                      break;
                case DiscoveryListener.SERVICE_SEARCH_ERROR:
                      System.err.println("Service search error");
                      break;
                case DiscoveryListener.SERVICE_SEARCH_NO_RECORDS:
                      System.err.println("No records");
                      break;
                case DiscoveryListener.SERVICE_SEARCH_TERMINATED:
                      System.err.println("Service search terminated (cancelled)");
                      break;
          public void inquiryCompleted(int param) {
                switch (param) {
                case DiscoveryListener.INQUIRY_COMPLETED:
                      showDevices();
                      break;
                case DiscoveryListener.INQUIRY_ERROR:
                      System.err.println("Inquiry error");
                      Display.getDisplay(this).setCurrent(mainForm);
                      break;
                case DiscoveryListener.INQUIRY_TERMINATED:
                      System.err.println("Inquiry terminated (cancelled)");
                      Display.getDisplay(this).setCurrent(mainForm);
                      break;
          public void setServer(StreamConnectionNotifier server) {
                this.server = server;
          private void startServer() {
                state = SERVER_IDLE;
                mainForm.deleteAll();
                mainForm.append("Server");
                Display.getDisplay(this).setCurrent(mainForm);
                String connectionURL = "btspp://localhost:" + MY_UUID + ";"
                      + "authenticate=false;encrypt=false;name=RFCOMM Server";
                try {
                      local = LocalDevice.getLocalDevice();
                      local.setDiscoverable(DiscoveryAgent.GIAC);
                } catch (BluetoothStateException e) {
                      System.err.println(e);
                serverThread = new ServerThread(this, connectionURL);
                serverThread.start();
                System.out.println("Server thread started");
          private void startClient() {
                state = CLIENT_START;
                mainForm.deleteAll();
                mainForm.append("Discover?");
                Display.getDisplay(this).setCurrent(mainForm);
          private void doDeviceDiscovery() {
                Form discoveringForm = new Form("discovering");
                try {
                      local = LocalDevice.getLocalDevice();
                } catch (BluetoothStateException e) {
                      System.err.println(e);
                agent = local.getDiscoveryAgent();
                devicesFound = new Vector();
                try {
                      if (!agent.startInquiry(DiscoveryAgent.GIAC, this)) {
                            System.err.println("Inquiry not started...");
                } catch (BluetoothStateException e) {
                      System.err.println(e);
                Display.getDisplay(this).setCurrent(discoveringForm);
          private void doServiceDiscovery() {
                if (devicesFound.size() <= 0) return;
                int[] attributes = {0x100, 0x101, 0x102};
                UUID[] uuids = new UUID[1];
                uuids[0] = new UUID(MY_UUID, false);
                int index = deviceList.getSelectedIndex();
                RemoteDevice rd = (RemoteDevice)devicesFound.elementAt(index);
                try {
                      agent.searchServices(attributes, uuids, rd, this);
                } catch (BluetoothStateException e) {
                      System.err.println(e);
          private void showDevices() {
                state = CLIENT_DEVICES_DISCOVERED;
                deviceList = new List("Discovered Devices", List.IMPLICIT);
                deviceList.addCommand(EXIT_CMD);
                deviceList.addCommand(OK_CMD);
                deviceList.setCommandListener(this);
                for (int i = 0; i < devicesFound.size(); i++) {
                      RemoteDevice rd = (RemoteDevice)devicesFound.elementAt(i);
                      String str = rd.getBluetoothAddress();
                      try {
                            str = str + " " + rd.getFriendlyName(false);
                      } catch (IOException e) {
                      deviceList.append(str, null);
                Display.getDisplay(this).setCurrent(deviceList);
          private void showServices() {
                state = CLIENT_SERVICES_DISCOVERED;
                if (servicesFound.length <= 0) {
                      mainForm.deleteAll();
                      mainForm.append("no services found");
                      mainForm.append("discover devices?");
                      state = CLIENT_START;
                      Display.getDisplay(this).setCurrent(mainForm);
                      return;
                serviceList = new List("Services Found", List.IMPLICIT);
                serviceList.addCommand(EXIT_CMD);
                serviceList.addCommand(OK_CMD);
                serviceList.setCommandListener(this);
                for (int i = 0; i < servicesFound.length; i++) {
                      String str;
                      ServiceRecord sr = (ServiceRecord)servicesFound;
    DataElement de = sr.getAttributeValue(0x100);
    str = (String)de.getValue();
    serviceList.append(str, null);
    Display.getDisplay(this).setCurrent(serviceList);
    private void communicate() {
    int index = serviceList.getSelectedIndex();
    ServiceRecord sr = (ServiceRecord)servicesFound[index];
    ClientThread clientThread = new ClientThread(this, sr);
    clientThread.start();
    public void showResult(int n) {
    Form resultForm = new Form("End");
    resultForm.addCommand(EXIT_CMD);
    resultForm.setCommandListener(this);
    resultForm.append("Received: " + n);
    Display.getDisplay(this).setCurrent(resultForm);
    public void showMessage(String msg) {
    Displayable d = Display.getDisplay(this).getCurrent();
    Alert al = new Alert("Info", msg, null, AlertType.INFO);
    al.setTimeout(Alert.FOREVER);
    Display.getDisplay(this).setCurrent(al, d);
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.OutputStream;
    import javax.microedition.io.Connector;
    import javax.microedition.io.StreamConnection;
    import javax.microedition.io.StreamConnectionNotifier;
    public class ServerThread extends Thread {
          private MessageTest2 parent;
          private StreamConnectionNotifier server;
          private String connectionURL = null;
          public ServerThread(MessageTest2 parent, String connectionURL) {
                this.parent = parent;
                this.connectionURL = connectionURL;
          public void run() {
                StreamConnection conn = null;
                try {
                      server = (StreamConnectionNotifier) Connector.open(connectionURL);
                } catch (IOException e) {
                      System.err.println(e);
                parent.setServer(server);
                try {
                      conn = server.acceptAndOpen();
                } catch (IOException e) {
                      System.err.println(e);
                InputStream in = null;
                int n = -1;
                try {
                      in = conn.openInputStream();
                      n = in.read();
                } catch (IOException e) {
                      System.err.println(e);
                if (in != null) {
                      try {
                            in.close();
                      } catch (IOException e) {
                            System.err.println(e);
                try {
                      OutputStream out;
                      out = conn.openOutputStream();
                      out.write(n + 1);
                      out.flush();
                } catch (IOException e) {
                      System.err.println(e);
                try {
                      conn.close();
                } catch (IOException e) {
                      System.out.println(e);
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.OutputStream;
    import javax.bluetooth.ServiceRecord;
    import javax.microedition.io.Connector;
    import javax.microedition.io.StreamConnection;
    public class ClientThread extends Thread {
          private MessageTest2 parent;
          private ServiceRecord sr;
          public ClientThread(MessageTest2 parent, ServiceRecord sr) {
                this.parent = parent;
                this.sr = sr;
          public void run() {
            StreamConnection conn = null;
            String url = null;
            int n = 0;
            try {
                url = sr.getConnectionURL(
                        ServiceRecord.NOAUTHENTICATE_NOENCRYPT, false);
                if (url == null) {
                      parent.showMessage("URL null");
                      return;
                conn = (StreamConnection) Connector.open(url);
            } catch (IOException e) {
                System.err.println("Note: can't connect to: " + url);
            try {
                OutputStream out = conn.openOutputStream();
                out.write(n);
                out.flush();
                out.close();
                InputStream in = conn.openInputStream();
                n = in.read();
            } catch (IOException e) {
                System.err.println("Can't write to server for: " + url);
            try {
                  conn.close();
            } catch (IOException ee) {
                  System.err.println(ee);
            parent.showResult(n);

    Hi:
    How did you compile and build the package using WSDL2JAVA. I tried under UCM 6.1 environment but receiving error message on 2 of the classes that, too large object.
    axisbuild:
    compiling 1007 source files
    /generatedaxisclient/com/cisco/www/AXLAPLService/AXLAPIBindingStub.java:4026:code too large
    public AXLAPIBindingStub(javax.xml.rpc.Service service)throws org.apache.axis.AxisFault {
    Error
    /generatedaxisclient/com/cisco/www/AXLAPLService/AXLAPIBindingStub.java:18:code too large
    public AXLAPIBindingStub(javax.xml.rpc.Service service)throws org.apache.axis.AxisFault {
    static {
    Error
    2 Errors
    Please let me know if you have any thoughts on this.
    Thank You
    Ramesh Vasudevan

  • Problem with JSObject.getWindow() method - Please Help

    I have a small Apllet that has a button that calls a Javascript function in the opening window, to close the window in which it is loaded.
    The Applet window is a PopUp window from one of my application's window. First time I start my application and load that Applet the button works fine. It calls the Javascript method and the Method closes the window using the window.close() method.
    But now if I open the applet window again and click on the button to close the windows, it hangs. I put in trace statements and saw that it hangs on JSObject.getWindow() window.
    I am using JDK Plugin 1.2.2, testing in IE 6.0 with no microsoft JVM.
    Please, if somebody could give me some clue about why this would happen, I will really appreciate that. I have been stuck into this problem for last three days.

    Hello,
    I have the same problem as you have had. I am using a Flash GUI to control a Java 1.4.2_04 applet via JavaScript. The Java applet appears on 50 html pages within a web-based training. It works fine on IE 6.0 and NS 7.1 when I view only one of the applet pages. But when I turn e.g. from the 10th to the 11th page, the browser crashes due to a fatal exeption in vbscript.dll (IE) or xpconnect.dll (NS). Sometimes I can view 50 or more pages without problems, but the browser crashes far too often. (When I use the applet's own GUI to control it, I can view it on as many pages as I want without any problems).
    5 times per second Flash calls a JavaScript function, which calls a Java function, which returns a value (indicating the state of the applet), which JavaScript uses to set a Flash variable. Java never calls a JavaScript function. On IE I used VB Script to enable Flash to JavaScript communication.
    Is liveconnect buggy? Have you found a solution of the problem?

  • Getnode returned null for uri error for caldav server

    Hello,
    I am trying to install the Oracle UCS ( SUN 7 update 2 ) server.
    https://wikis.oracle.com/display/CommSuite7U2/Communications+Suite+on+a+Single+Host+%28Linux%29#CommunicationsSuiteonaSingleHost%28Linux%29-InstallingtheExample
    So far, I have successfully:
    Checked the installation requirements
    Installed Communications Suite 7 Update 2 Software
    Installed and Configured the Directory Server
    Prepared the Directory under ( Configuring Communications Suite Components )
    Configured Delegated Administrator and Communications CLI
    Configured Messaging Server
    Configured MYSQL Server
    Configured Calendar Server
    I have just installed a caldav server. I checked that it was enabled by running:
    # asadmin list-components -p <admin-port> --type=web
    davserver <web-module>
    Command list-components executed successfully.
    # asadmin show-component-status -p <admin-port> davserver
    Status of davserver is enabled.
    Command show-component-status executed successfully.
    that was from this page:
    https://wikis.oracle.com/display/CommSuite7RR92909/Calendar+Server+7+Troubleshooting
    In Firefox, I try to hit the suggested pages under "Testing Calendar accounts". However, this errors out every time for me.
    http://domain.com/davserver/dav/h/myDomain.com/myusername/calendar
    wheremyDdomain.com is my actual domain that I will not list here
    and myUsername is my actual username which I will not list here
    ( I edited both of these in the logs below )
    I checked my log in /var/opt/sun/comms/davserver/logs:
    INFO [2012-02-11T11:46:02.729-0500] <...DavServer.<init>> Server Startup succeeded
    INFO [2012-02-11T11:46:02.730-0500] <...DavServer.loadBackend> Loading backend defaultbackend with backendid defaultbackend
    INFO [2012-02-11T11:46:02.730-0500] <...DavServer.loadBackend>      JDBC JNDI Name = jdbc/defaultbackend
    INFO [2012-02-11T11:46:09.033-0500] <...DavServer.loadBackend> Loading backend ischedulebackend with backendid ischedulebackend
    INFO [2012-02-11T11:46:09.033-0500] <...DavServer.loadBackend>      JDBC JNDI Name = jdbc/ischedulebackend
    INFO [2012-02-11T11:46:09.427-0500] <...DavServer.loadBackends> iSchedule enabled
    INFO [2012-02-11T11:46:09.439-0500] <...DavServer.loadBackends> modified ischedule collection at /ischedule/
    INFO [2012-02-11T13:33:18.967-0500] <...URIInfoManagerImpl.getEntryFromSearchFilter> found 0 corresponding to: (uid=caldav)
    INFO [2012-02-11T13:33:59.844-0500] <...URIInfoManagerImpl.getEntryFromSearchFilter> found 0 corresponding to: (uid=caldav)
    FINE [2012-02-11T13:42:39.157-0500] <...DavServerServlet.service> [REQ] GET /davserver/browse/h/myDomainName/myUserName/calendar 127.0.0.1 myDomainName
    FINE [2012-02-11T13:42:39.808-0500] <...LDAPSingleHostPool.getConnection> got connection from getConnection() for pool Pool number:0. Host=myDomainName
    FINE [2012-02-11T13:42:41.441-0500] <...LDAPSingleHostPool.getConnection> got connection from getConnection() for pool Pool number:0. Host=myDomainName
    FINE [2012-02-11T13:42:41.460-0500] <...LoginModuleHelper.checkIfUserInAdminGroup> user: admin; isMemberOf = cn=Service Administrators, ou=Groups, o=isp
    FINE [2012-02-11T13:42:41.684-0500] <...DavBrowserServlet.service> Got a non standard condition: getNode returned null for uri /davserver/browse/h/myDomainName/myUserName/calendar
    FINE [2012-02-11T13:42:41.684-0500] <...DavServerServlet.service> [RES] [404] Command execution time: 2.527 secs
    I can hit this page from the browser:
    http://myDomainName:4848
    From my understanding, that is the admin port. That brings up the GlassFish server admin page.
    I do not remember creating a calendar account anywhere is my first thought. I followed the example deployment step by step so far and nowhere does it have me create a calendar user account. So, maybe there is no account at this point?
    So, my first question would be:
    How can I verify that I have a calendar account to begin with? ( or is this what I am doing by trying to log into the sites suggested under 'Test Calendar Accounts').
    My next question would be:
    What does this error mean: "getnode returned null for uri error for caldav server"?
    Spin off question from that:
    What should I do to fix that error?
    Thanks in advance!

    I did not put a slash at the end of the uris I was testing
    http://myDomain.com:80/davserver/browse/h/myDomain/myUserName/calendar
    http://myDomain.com:80/davserver/dav/h/myDomain/myUserName/calendar
    Once I put the slash at the end of the uri, the configuration page appeared and the error was not displayed about getNode anymore:
    http://myDomain.com:80/davserver/browse/h/myDomain/myUserName/calendar/
    http://myDomain.com:80/davserver/dav/h/myDomain/myUserName/calendar/

Maybe you are looking for

  • Can I use ARD to control my mac with Back to my Mac service?

    Can I use ARD to control my mac with Back to my Mac service? The with Back to my Mac service on you see your mac in the Shared column, hit Share Screen & your good - on ARD I don't see my remote Mac listed anywhere in that program. Thanks

  • Problems running tomcat on win XP

    Hi! I've just downloaded and installed the JWSDP on Windows XP Professional, but when I try to use Tomcat it starts but then terminates instantly. Can anyone help me with this? thanks, Ylva

  • Error in MIGO - Key * (IMKEY) in table VICAAROBJ does not exist

    Hi, I am trying to receive a PO in MIGO and getting this error. This looks like a program error. Upon further research i found out that there is a SAP Note out for this so i implemented that and also configured the manual steps. Even after doing that

  • HTTP trigger - Calling failed - 9.0.2.10000-71

    Hi, I have created a HTTP trigger in Premium licensed UCCX server (9.0.2.10000-71). When I try to call the URL from java application I am getting HTTP error code as "404". However HTTP trigger calling is working fine in the servers with the version o

  • GreaterThanOrEqualTo against a Date

    Can anyone give me direction on how to use a CriteriaBuilder to create a >= statement against a date, using the greaterThanOrEqualTo method. :mydate >= effDate Thanks, Jay