cancel
Showing results for 
Search instead for 
Did you mean: 

JCo: Destination ABAP_AS does not exist

Former Member
0 Kudos

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.

Accepted Solutions (0)

Answers (1)

Answers (1)

vikas2
Active Participant
0 Kudos

Hi Shwela,

Can you try with destName as  "ABAP_AS_WITHOUT_POOL" . The other alternative is "ABAP_AS_WITH_POOL" .

Thanks,

Vikas

Former Member
0 Kudos

Hi Shwela,

I have the same problem.Do you have fix for this issue?

Former Member
0 Kudos

Hi Shwela,

I have the same problem.Do you have fix for this issue?

former_member193379
Active Contributor
0 Kudos

Hi Venkat,

This exception is thrown when JCO has run out of resources such as connections in a connection pool.

Please check you pool connection settings.

Thanks,

Hamendra

MarkusTolksdorf
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Hamendra,


no, this is wrong. This exception is thrown, if the destination does not exist at all and therefore JCo cannot find it. For a DestinationDataProvider, the highlander principle is to be used, there can be only one. As there has been already one registered the registration of an addtional one failed. But it's not really needed. As an application, a destination should only be used, you should not worry about creating destinations in your code. This is infrastructure coding. However, some place will exist, where you provide destination configuration and which implements the DestinationDataProvider interface provided by some infrastructure layer. There, a destination of name AS_ABAP needs to be configured with valid properties pointing to a target system that offers the needed functionality.


Best regards,

Markus

former_member193379
Active Contributor
0 Kudos

Thanks Markus for correcting but sometimes it leads the wrong message as well.

Thanks again.

Thanks,

Hamendra

HAL9000
Product and Topic Expert
Product and Topic Expert
0 Kudos

No, it does not!

The error message "Destination <name> does not exist" clearly says what the causing issue is.

If you think that there would be a wrong JCo error message please report this to SAP by creating a support ticket. But in this case I don't think that you will be able to reproduce your "thesis".

Best regards,

Stefan