Video Screencast Help

Content management API - MAPI_E_DECLINE_COPY-error

Created: 10 Oct 2006 • Updated: 21 May 2010 | 6 comments

Hi

I am using the Enterprise Content Management API (EV 6.0 SP3) in my test application (c#) to connect to the EV-server and get an archive from my EV server. I follow the example in the API reference, but when i call the KVS.EnterpriseVault.Interop.IArchive.Get() method, it results in:

error code: -2147220730 (MAPI_E_DECLINE_COPY)

error message "An internal failure occurred"

stacktrace: Internal Error: '<0x18d4>'.
at KVS.EnterpriseVault.Interop.IArchive.Get()

I also did a DTrace on my test application. It resulted in the following transcript (omitted some columns for readability):

4 CContentManagementAPI::get_Archive
5 CEVArchive::FinalConstruct()
6 CEVArchive::Initialise()
7 CStorageProxyBase::FindStorageComputer performing directory lookup on 1C464AD612C0BBD44B0483EC96FEC3A931110000enterprisevault.hq.mycompany.no
15 CBaseDirectoryServiceWrapper::IsLocalMachine: ENTERPRISEVAULT.HQ.MYCOMPANY.NO
16 CBaseDirectoryServiceWrapper::CreateDirectoryService() IsLocalMachine failed.
Sts: 0x002afc
Directory Name: ENTERPRISEVAULT.HQ.MYCOMPANY.NO
17 CBaseDirectoryServiceWrapper::CreateDirectoryService() failed.
Hr: 0x80040154
Retries: 40
TryLocal: false
Directory Name: ENTERPRISEVAULT.HQ.MYCOMPANY.NO
IP Addr: (null)
Is Local: false
18 HRXEX fn trace : Source : .\DirectoryServiceWrapper.cpp (CBaseDirectoryServiceWrapper::GetInterface) built Jul 4 00:01:33 2005
Description: Call error 0x80040154
ref: ENTERPRISEVAULT.HQ.MYCOMPANY.NO
19 HRXEX fn trace :
Source : .\DirectoryServiceWrapper.cpp (CBaseDirectoryServiceWrapper::Invoke)
built Jul 4 00:01:33 2005
Description: Call error 0x80040154
20 HRXEX fn trace :
Source : .\DirectoryServiceWrapper.cpp (CReadDirectoryServiceWrapper::Invoke) built Jul 4 00:01:33 2005
Description: Call error 0x80040154
22 CStorageProxyBase::FindStorageComputer Failed on Entry
Id:1C464AD612C0BBD44B0483EC96FEC3A931110000enterprisevault.hq.mycompany.no (hr=Class not registered
)
23 HRXEX fn trace :
Source : .\StorageAPI.cpp (CContentManagementAPI::GetComputerNameFromEntryId)
built Jul 25 17:27:05 2006
Description: Call error 0xc00418d4
24 CContentManagementAPI::GetComputerNameFromEntryId com_
error raised Call error 0xc00418d4 (err=c00418d4)
25 HRXEX fn trace :
Source : .\StorageAPI.cpp (CContentManagementAPI::AccessSimpleStore) built Jul 25
Description: Call error 0xc00418d4
26 CContentManagementAPI::AccessSimpleStore com_error raised Call error 0xc00418d4 (err=c00418d4)
27 Error accessing SimpleStore. Attempt:1 EntryId:1C464AD612C0BBD44B0483EC96FEC3A931110000enterprisevault.hq.mycompany.no
hr=There was no such Storage Service Entry %1 in the Vault Directory
28 HRXEX fn trace :
Source : .\Archive.cpp (CEVArchive::Create) built Jul 25 17:27:04 2006
Description: Call error 0xc00418d4
29 CEVArchive::Create com_error raised Call error 0xc00418d4 (err=c00418d4)


Any suggestions?

Discussion Filed Under:

Comments 6 CommentsJump to latest comment

Joe Devola's picture

UPDATE:

I tried running the same code locally on the EV-server, and then it worked fine. I now think that the problem is that I am not communicating correctly with the Directory Service on the EV-server. Anyone ever tried using the Content management API?

TonySterling's picture

Where did you get this from?

1C464AD612C0BBD44B0483EC96FEC3A931110000enterprisevault.hq.mycompany.no

It seems that it thinks this should be the storage service from the error.

Joe Devola's picture

Thanks for your answer, Tony!

"1C464AD612C0BBD44B0483EC96FEC3A931110000enterprisevault.hq.mycompany.no" is the ID of the archive I am trying to retrieve from the EV-server. What my little test application does is exactly the same as the example in the API:

oArchive = ContentManagementAPI.Archive
oArchive.Id = archiveId
oArchive.Get()
strName = oArchive.Name

When I run my application from a remote server, it crashes when the Get()-method is called, and I get the dtrace above. When I run the exact same code locally on the EV server i get the following Dtrace, and I am able to print out the name of the archive:


Running locally on the EV server:

1 CContentManagementAPI::get_Archive
2 CEVArchive::FinalConstruct()
3 CEVArchive::Initialise()
4 CStorageProxyBase::FindStorageComputer performing direc
tory lookup on 1C464AD612C0BBD44B0483EC96FEC3A931110000enterprisevault.hq.mycompany.no
12 CBaseDirectoryServiceWrapper::CreateDirectoryService():
Using local directory connection
29 CStorageProxyBase::FindStorageComputer caching entryid
1C464AD612C0BBD44B0483EC96FEC3A931110000enterprisevault.hq.mycompany.no:Enterprisevault.hq.mycompany.no
30 CStorageProxyBase::FindStorageComputer reading computer
name from cache for entryid=1C464AD612C0BBD44B0483EC96FEC3A931110000enterprisevault.hq.mycompany.no
31 CContentManagementAPI::SetSecurity Using AuthServer sec
urity? Yes (hr=0)
32 CContentManagementAPI::AccessSimpleStore caching Simple
Store object from computer: Enterprisevault.hq.mycompany.no


I am pretty sure that the reason I cannot get the application to work from a remote location is that I am unable to communicate with the Directory Service on the EV server. This suspicion is also confirmed by the fact that when running Dtrace on the Directory service, it prints out a whole lot when running my test application locally on the EV server. When I run my test application from a remote location nothing is logged from the Directory Service to the Dtrace.

Any suggestions on how I can make my application communicate correctly with the Directory Service from a remote location? Or am I making any obvious mistakes?

Joe Devola's picture

Problem solved. There was some DNS-problems in my domain, so the EV-server could not be resolved correctly from the remote computer. Running code from the remote computer towards the EV-server now works fine.

s_ravi_kumar's picture

Hi Tony,

Looking at your replies on the similar problem I am running into, I thought of asking you help.

 

I need help in accessing EV from java / C#. I am looking for an SDK which will enable me to communicate with

the EV. Can you guide me please ?

 

Regards

Ravi Kumar