on 05-02-2013 2:54 PM
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.
Hi Shwela,
Can you try with destName as "ABAP_AS_WITHOUT_POOL" . The other alternative is "ABAP_AS_WITH_POOL" .
Thanks,
Vikas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.