Quantcast
Channel: SCN : Popular Discussions - Java Development
Viewing all articles
Browse latest Browse all 518

JCo: Destination ABAP_AS does not exist

$
0
0

Hi,

 

I am a Lotus Notes Developer and this is my first attempt at JCo in Notes. So, I have followed instructions from SAP Java Connector 3 help document.

I am trying to test an example code in the help document CustomDestinationDataProvider.java.

The code attempts to register DestinationDataProvider: - com.sap.conn.jco.ext.Environment.registerDestinationDataProvider(myProvider);

This statement executes fine the first time. However, the second time it throws the following error:

Exception in thread "AgentThread: JavaAgent" java.lang.Error: java.lang.IllegalStateException: DestinationDataProvider already registered [CustomDestinationDataProvider$MyDestinationDataProvider]

 

Hence, I included following condition before trying to register DestinationDataProvider:

if (!com.sap.conn.jco.ext.Environment.isDestinationDataProviderRegistered()) {

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

}

And,

if (!com.sap.conn.jco.ext.Environment.isDestinationDataProviderRegistered()) {

                            myProvider.changeProperties(destName, getDestinationPropertiesFromUI());

}

 

Now, my code skips the registering part, and changing properties part (considering the fact that this has already been done once).

But, now the statement below

String destName = "ABAP_AS";

CustomDestinationDataProvider test = new CustomDestinationDataProvider();

JCoDestination dest;

dest = JCoDestinationManager.getDestination(destName);

 

throws the error that

 

com.sap.conn.jco.JCoException: (106) JCO_ERROR_RESOURCE: Destination ABAP_AS does not exist

 

This may be a very silly issue and might have even simpler solution, but I would really appreciate your time and effort in resolving it.

 

Thanks.


Viewing all articles
Browse latest Browse all 518

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>