We are currently using JCA on EP 6.0 SP2 platform to connect to SAP R/3 backend system for custom java iviews as shown below ...
Context ctx = null;
IConnectionFactory connectionFactory = null;
IConnection client = null;
IConnection aConnection = null;
try
{
//Obtain the initial JNDI context
ctx = new InitialContext();
//Perform JNDI lookup to obtain connection factory
connectionFactory = (IConnectionFactory) ctx.lookup("EISConnections/SAPFactory");
connectionFactory.setConnectionTimeOut( 900 );
IConnectionSpec spec = connectionFactory.getConnectionSpec();
// FOR MiniP
((Map) spec).put("client", "100");
((Map) spec).put("UserName", "USER_ID");
((Map) spec).put("Password", "password");
((Map) spec).put("logonmethod", "UIDPW");
((Map) spec).put("Language", "EN");
((Map) spec).put("ashost", "10.14.17.44");
((Map) spec).put("sysnr", "02");
aConnection = connectionFactory.getConnectionEx(spec);
}
catch (Throwable th)
{
StringWriter sw = new StringWriter();
th.printStackTrace( new PrintWriter( sw ) );
log("Caught an exception (Throwable) : \n" + sw.toString() );
}
When we migrated the code, the connection to SAP R/3 system is failing. Searching servicemarketplace for some solution, we found a note 820857 and made the necessary code change for JNDI lookup from "EISConnections/SAPFactory" to "deployedAdapters/SAPFactory/shareable/SAPFactory" but we are still getting the following connection failure errors ...
(R3/BW) Failed to get connection. Please contact your admin.
com.sapportals.connector.connection.ConnectionFailedException: Connection Failed: Nested Exception. Failed to get connection. Please contact your admin.
at com.sapportals.connectors.SAPCFConnector.SAPConnectorException.getNewConnectionFailedException(SAPConnectorException.java:107)
Also, the help link is not updated for any changes ...
http://help.sap.com/saphelp_nw04s/helpdata/en/89/8a185c148e4f6582560a8d809210b4/content.htm
I really appreciate any help being provided for solving the issue.