I want to use a own DestinationDataProvider for a JCoIDocServer.
I have registered my provider with:
Environment.registerDestinationDataProvider
When I call
JCoDestination destination = JCoDestinationManager.getDestination("SAP_DEST_" + connector.name + "_server");
my data provider is called.
But when I use:
JCoIDocServer server = JCoIDoc.getServer("SAP_DEST_" + connector.name + "_server");
My provider is not called (I debugged it), and I get this exception:
com.sap.conn.jco.JCoException: (106) JCO_ERROR_RESOURCE: Server SAP_DEST_TestSap_server does not exist
at com.sap.conn.jco.rt.StandaloneServerFactory.update(StandaloneServerFactory.java:338)
at com.sap.conn.jco.rt.StandaloneServerFactory.getServerInstance(StandaloneServerFactory.java:175)
at com.sap.conn.idoc.jco.JCoIDoc.getServer(JCoIDoc.java:301)
at com.sap.conn.idoc.jco.JCoIDoc$getServer.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
at com.lomnido.service.SapService.$tt__startServer(SapService.groovy:84)
at com.lomnido.service.SapService$_startServer_closure2.doCall(SapService.groovy)
What is the problem here?