Corba connectivity issue
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   siddharth_mishra
Posted On:   Friday, June 26, 2009 10:51 AM

Hi, While running a client code in Orbix3.0 i am getting an exception. org.omg.CORBA.BAD_PARAM: minor code: 0 completed: No at java.lang.Throwable.fillInStackTrace(Native Method) at java.lang.Throwable. (Throwable.java:94) at java.lang.Exception. (Exception.java:42) at java.lang.RuntimeException. (RuntimeException.java:47) at org.omg.CORBA.SystemException. (SystemException.java:49) at org.omg.CORBA.BAD_PARAM. (BAD_PARAM.java:74) at org.omg.CORBA.BAD_PARAM. (BAD_PARAM.java:50) at org.omg.CORBA.BAD_PARAM. (BAD_PARAM.java:39) at JavaRouter.ATW_CFA_ROUTER.AdtJavaAccessHelper.narrow(AdtJavaAccessHelper.java:83) at CfacClient.initORB(CfacClien   More>>

Hi,

While running a client code in Orbix3.0 i am getting an exception.

org.omg.CORBA.BAD_PARAM: minor code: 0 completed: No
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable. (Throwable.java:94)
at java.lang.Exception. (Exception.java:42)
at java.lang.RuntimeException. (RuntimeException.java:47)
at org.omg.CORBA.SystemException. (SystemException.java:49)
at org.omg.CORBA.BAD_PARAM. (BAD_PARAM.java:74)
at org.omg.CORBA.BAD_PARAM. (BAD_PARAM.java:50)
at org.omg.CORBA.BAD_PARAM. (BAD_PARAM.java:39)
at JavaRouter.ATW_CFA_ROUTER.AdtJavaAccessHelper.narrow(AdtJavaAccessHelper.java:83)
at CfacClient.initORB(CfacClient.java:47)
at CfacClient.main(CfacClient.java:18)
Exception in connection

Please let me know the solution

Please find the attached Java client code

import java.io.*;
import java.text.*;
import java.util.*;
import org.omg.CORBA.*;
import JavaRouter.ATW_CFA_ROUTER.AdtCfacAccess.*;
import IE.Iona.OrbixWeb.*;
import java.util.Properties;

class CfacClient
{
public static void main(String[] args)
{
CfacClient cc=new CfacClient();
System.out.println("Hello World!");
try
{

if (cc.initORB() != 0)
{
System.out.println("Connected SUCCESSFULLY!");
}

}
catch (Exception e)
{
System.out.println("EXC:"+e);
}

}
public int initORB() throws Exception {
//Properties prop=new Properties();
//prop.put("org.omg.CORBA.ORB","IE.Iona.OrbixWeb._OrbixWeb.ORB");
System.out.println("CFAC Client"+"initORB Enter");
String [] args = null;
//org.omg.CORBA.ORB omgORB = null;
//IE.Iona.OrbixWeb.CORBA.ORB webORB = null;
ORB orb = ORB.init(args,System.getProperties());
//ORB orb = ORB.init(args,prop);
//_OrbixWeb.ORB(orb).setDiagnostics(255);
BufferedReader input=null;
try
{
input = new BufferedReader(new InputStreamReader(new FileInputStream("ibmCfacAccess.ref")));
String ior = input.readLine();
System.out.println("CFAC Connectivity"+"IOR="+ior);
org.omg.CORBA.Object object = orb.string_to_object(ior);
JavaRouter.ATW_CFA_ROUTER.AdtJavaAccess AdtCfacAccess = JavaRouter.ATW_CFA_ROUTER.AdtJavaAccessHelper.narrow(object);

}
catch (Exception ex)
{
ex.printStackTrace();
System.out.println("Exception in connection");
return 0;
}
try {
input.close();
}
catch (IOException ioe) {
String errorMessage = "Error while closing the ior file " + ioe.getMessage();
System.out.println("cfapreq"+errorMessage);
}

return 1;
}


}

Please let me know the solution

   <<Less
About | Sitemap | Contact