JDK 1.3 CORBA Problems..
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   black_magic
Posted On:   Sunday, July 15, 2001 02:38 PM

Hi.. I'm working with JAva CORBA (JDK 1.3), but i not run my applet client from netscape or IE . This is a code of my applet: import HelloApp.*; import org.omg.CosNaming.*; import org.omg.CosNaming.NamingContextPackage.*; import org.omg.CORBA.*; import java.awt.Graphics; import java.util.*; public class HelloApplet extends java.applet.Applet { public void init() { try { // create and initialize the ORB Properties props = new Properties(); props.put("org.omg.CORBA.ORBInitialPort", "900"); props.put("org.omg.CORBA.ORBInitialHost", "localhost"); ORB   More>>


Hi..
I'm working with JAva CORBA (JDK 1.3), but i not run my applet client from netscape or IE . This is a code of my applet:



import HelloApp.*;


import org.omg.CosNaming.*;


import org.omg.CosNaming.NamingContextPackage.*;

import org.omg.CORBA.*;


import java.awt.Graphics;


import java.util.*;



public class HelloApplet extends java.applet.Applet
{


public void init() {


try {
// create and initialize the ORB


Properties props = new Properties();


props.put("org.omg.CORBA.ORBInitialPort", "900");


props.put("org.omg.CORBA.ORBInitialHost", "localhost");



ORB orb = ORB.init(this, props);



// get the root naming context


org.omg.CORBA.Object objRef = orb.resolve_initial_references("NameService");


NamingContext ncRef = NamingContextHelper.narrow(objRef);



// resolve the Object Reference in Naming


NameComponent nc = new NameComponent("Hello", "");


NameComponent path[] = {nc};


Hello helloRef = HelloHelper.narrow(ncRef.resolve(path));



// call the Hello server object and print results


message = helloRef.sayHello();



} catch (Exception e) {


System.out.println("HelloApplet exception: " + e.getMessage());


e.printStackTrace(System.out);


}


}




public void paint(Graphics g)
{


g.drawString(message, 25, 50);


System.out.println("HelloWord");


}



String message = "";


}



I have must run applet with appletviewer (is successful), but with browser is impossible. I'm run the applet with ORBInitialPort = 900 and also try with port 1050 modify the applet and html code, and change the ORBInitialHost by localhost or 127.0.0.1, but display same problem. Also try change HTML APPLET TAG by EMBED TAG (using the Java plug-in directly )This is error display the Java Console:



HelloApplet exception:

org.omg.CORBA.COMM_FAILURE: minor code: 1398079490 completed: No

at com.sun.corba.se.internal.iiop.IIOPConnection.writeLock(Unknown Source)

at com.sun.corba.se.internal.iiop.IIOPConnection.send(Unknown Source)

at com.sun.corba.se.internal.iiop.IIOPOutputStream.invoke(Unknown Source)

at com.sun.corba.se.internal.iiop.ClientRequestImpl.invoke(Unknown Source)

at com.sun.corba.se.internal.corba.ClientDelegate.invoke(Unknown Source)

at com.sun.corba.se.internal.corba.InitialNamingClient.resolve(Unknown Source)

at com.sun.corba.se.internal.corba.InitialNamingClient.cachedInitialReferences(Unknown Source)

at com.sun.corba.se.internal.corba.InitialNamingClient.resolve_initial_references(Unknown Source)

at com.sun.corba.se.internal.corba.ORB.resolve_initial_references(Unknown Source)

at HelloApplet.init(HelloApplet.java:20)

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

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



And this is the html page: (only applet code)




WIDTH=500
HEIGHT=300>






I'm using Netscape 6 with Java Plug-in 1.3.0.1

Please Help me........

Know you if a browser that support CORBA with POA (included in JDK 1.4) ?

Thank advanced...

Black---

   <<Less
About | Sitemap | Contact