Win a copy of Penetration Testing Basics this week in the Security forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SAP JCo Connection/RFC Error

Pranjal Gupta Gupta
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi I have migrated from SAP I36 to T21 configuration recently. I am getting a peculiar problem, on hitting RFC, I get correct results for a random number of time and the an error "Function ZWF_CAL_STATUS not found" is thrown. I receive correct results only for a few number of hits.

I am using connection pooling with the following properties to connect to SAP

Properties connectProperties = new Properties();
connectProperties.setProperty(DestinationDataProvider.JCO_POOL_CAPACITY, "10");
connectProperties.setProperty(DestinationDataProvider.JCO_PEAK_LIMIT, "10");
connectProperties.setProperty(DestinationDataProvider.JCO_EXPIRATION_TIME, "5000");
connectProperties.setProperty(DestinationDataProvider.JCO_EXPIRATION_PERIOD, "1000");
connectProperties.setProperty(DestinationDataProvider.JCO_MAX_GET_TIME, "50000");
createDestinationDataFile(DESTINATION_NAME2, connectProperties);

However i don't get a connection error. The only error thrown is that RFC not found. This issue is resolved when the glassfish server is restared, but again after a random number of hits same error is thrown. Can anybody please tell if they have faced same issue or any possible solution.

Part of the server code

JCoDestination destination = null;
destination = SAPConnection.connectWithPool();
JCoFunction function = destination.getRepository().getFunction(RFC_NAME);
if (function == null) {
LOGGER.warn("Function ZWF_CAL_STATUS not found");

the connectWithPool is a static method which contains the following code

JCoDestination destination = JCoDestinationManager.getDestination(DESTINATION_NAME2);
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic