Code works in application but not in Applet
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Wei_Xiao
Posted On:   Tuesday, February 12, 2002 03:29 PM

I'm writing a program which uses CORBA URL Binding. The strange thing is, the following code will give me error message: "org.omg.CORBA.BAD_PARAM: minor code: 0 completed: No" when I use appletviewer to start the applet. Here is the applet code: ... public void init() { String url = "http://localhost/IOR/Agent.ior"); String[] args = new String[]{}; org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(args,null); PortfolioAgent _portfolioAgent = PortfolioAgentHelper.bind(orb, url); if (_portfolioAgent != null) System.out.println("BINDING successful"); } ... However, the same c   More>>

I'm writing a program which uses CORBA URL Binding. The strange thing is, the following code will give me error message: "org.omg.CORBA.BAD_PARAM: minor code: 0 completed: No" when I use appletviewer to start the applet.


Here is the applet code:


...
public void init() {

String url = "http://localhost/IOR/Agent.ior");

String[] args = new String[]{};

org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(args,null);

PortfolioAgent _portfolioAgent = PortfolioAgentHelper.bind(orb, url);

if (_portfolioAgent != null)

System.out.println("BINDING successful");

}

...


However, the same code works fine as in an application:


public static void main(String[] args) {



String url = "http://localhost/IOR/Agent.ior";

String[] argss = new String[]{};

org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(argss,null);


PortfolioAgent _portfolioAgent = PortfolioAgentHelper.bind(orb, url);

if (_portfolioAgent != null)
System.out.println("BINDING successful");

}


Could someone help me to figure it out? Thanks a lot.

   <<Less
About | Sitemap | Contact