Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

can't instantiate default ORB implementation org.jacorb.orb.ORB

294 views
Skip to first unread message

arar2...@gmail.com

unread,
May 17, 2007, 3:09:31 AM5/17/07
to
hi please can anyone help me

i write client application using visibroker 7 in unix machine ....
this application using Paymentplugin jar file to make the Corba
connection ... i have a problem when i try to make instance of
paymentconnectionfactory class .... the error above appear

import de.siemens.advantage.payment.payplugin.impl.processing.*;
import de.siemens.advantage.payment.payplugin.impl.corba.Common.*;
import de.siemens.advantage.payment.payplugin.impl.PluginProperties;

//PluginProperties
import org.apache.log4j.Category;
import org.apache.log4j.PropertyConfigurator;
import java.util.*;
import java.io.*;

/**
*
* @author mohammad.arar
*/
public class Main {
public static Category cat =
Category.getInstance( Main.class.getName());
/** Creates a new instance of Main */
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
try
{
///////////////////////////////////////////////////////


//props.put( "org.omg.CORBA.ORBClass",
"com.inprise.vbroker.orb.ORB" );
//
props.put( "org.omg.CORBA.ORBSingletonClass","com.inprise.vbroker.orb.ORB" );
//org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init( args, props );
////////////
java.util.Properties props = new java.util.Properties();
props.put("javax.rmi.CORBA.UtilClass","com.inprise.vbroker.rmi.CORBA.UtilImpl");
props.put("javax.rmi.CORBA.StubClass","com.inprise.vbroker.rmi.CORBA.StubImpl");
props.put("org.omg.CORBA.ORBSingletonClass","com.inprise.vbroker.orb.ORBSingleton");
props.put("org.omg.CORBA.ORBClass","com.inprise.vbroker.orb.ORB");
props.put("vbroker.agent.port","14000");
props.put("javax.rmi.PortableRemoteObjectClass","com.inprise.vbroker.rmi.PortableRemoteObjectImpl");
org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init( args,
props );
/////
if (args.length == 0)
{
System.out.println("Must give filename as first arg.");
PluginProperties.getReference().load( new
FileInputStream( "C:\\Documents and Settings\\mohammad.arar\\Desktop\
\MTC Bhr\\INP\\INP\\YAQ7\\F04\\00\\INTPaqasp\\reloc\\INTPaqasp\
\PaymentPlugin.properties.tmpl"));
}
///////////////////////////////////////////////////////
if ( args.length > 0 ) {
// read the Payment Plugin property file and
// initialize the PluginProperties class
PluginProperties.getReference().load( new FileInputStream( args[0]) );
}
// extends class BasicConfigurator from log4j
// to provide configuration from an external file
PropertyConfigurator.configure( PluginProperties.getReference() );
// verify the properties specified by the user
PluginProperties.getReference().verify();
// obtain a reference to the PaymentConnectionFactory

PaymentConnectionFactory factory=
PaymentConnectionFactory.getReference();
//
// get a new connection from the factory
PaymentConnection conn = factory.getConnection();

//PaymentConnectionFactory.getReference();
// Instantiate a payment request
// either calling the default constructor and subsequent set methods
// or the overloaded constructor with arguments for all request

RechargeAmountReq req = new RechargeAmountReq();
req.setTransactionID("100000000001");
req.setRoleID( (short)3 );
req.setUserID("Arar Mohammad");
req.setPin("8888");
req.setAccessFrontendID("API_Tester");
req.setConsumerAccountID( Long.parseLong("0815"));
req.setConsumerID("Miller");
req.setConsumerPIN("1234");
req.setPurpose("test_of_rechargeAmount");
req.setCurrency("EUR");
req.setAmount(500000);
// the expiry date is today plus 30 days
Date today = new Date();
long expiryDate = today.getTime() + 30 * 24 * 60 * 60 *1000L;
req.setExpiryDate(expiryDate);
System.out.println(req);
// Use the connection to execute requests on the payment@vantage
server.
PaymentResponse conf = conn.execute( req );
// Check the status of the execution.
// Error codes are documented in the
// Payment@vantage Interface Specification.
// Additional error codes are generated by the PaymentPlugin.
int status = conf.getExecutionStatus();
System.out.println("ExecutionStatus=" + status +
" for TransactionID " + conf.getTransactionID());
// Finally close the PaymentConnection.
// This will free all the resources allocated for this connection.
conn.close();
}
catch ( Exception ex ) {
System.out.println( "Uncaught exception: " +
ex.getLocalizedMessage() );
}
System.exit( 0 );
}

}

arar2...@gmail.com

unread,
May 17, 2007, 3:10:08 AM5/17/07
to

arar2...@gmail.com

unread,
May 17, 2007, 3:10:27 AM5/17/07
to
0 new messages