Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

JCo DestinationDataProvider Issues

Hi All:

I have a Java application using JCo 3.05 to connect to different SAP systems from the same client application.

public Connection(SapSystem system) {

DestDataProvider myProvider = new DestDataProvider(system);

com.sap.conn.jco.ext.Environment.registerDestinationDataProvider(myProvider);

try {

dest = JCoDestinationManager.getDestination(SAP_SERVER);

repos = dest.getRepository();

} catch (JCoException e) {

throw new RuntimeException(e);

}

}

When switching to different SAP system, I got error message:

Exception in thread "main" java.lang.IllegalStateException: DestinationDataProvider already registered: com.pepsico.dctm.sap.DestDataProvider.

If unregister the destination data provider, I got new error message:

Exception in thread "main" java.lang.RuntimeException: Not possible to receive function.

at com.pepsico.dctm.sap.Connection.getFunction(Connection.java:79)

Does anyone know how to register and unregister the destination data provider in multiple destination data provider environment?

Thanks,

Brian

Former Member
Not what you were looking for? View more on this topic or Ask a question