cancel
Showing results for 
Search instead for 
Did you mean: 

LoadLibrary for observer failed SAP B1 DI API

Bryan-SG
Explorer
0 Kudos

Has anyone encountered this error when connecting to 

oCompany.Connect();

And

SAPbobsCOM.Documents oDocuments = new SAPbobsCOM.Documents();

SAP Connection error: OBserverGeneric::GetNewLibraryFromServer: LoadLibrary for observer failed
System error 127,
Observer file name: C:\Program Files (x86)\SAP\SAP Business One DI API\OBServer\OBServerDLL_1000181.dll

 

#sapbusinessonesdk

#sapbobscom

#diapi

View Entire Topic
ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Bryan-SG,

Please perform below operations and test if the issue still occurs.

1. Login as an administrator.
2. Check that your user profile on the workstation has a temp folder defined and there is sufficient disk space.
3. Locate the Temp folder by going to Start -> Run and type %temp%.
4. Locate the SM_OBS_DLL folder and delete or rename it.
5. Locate the Temp folder by going to C:\WINDOWS\Temp.
6. Locate the SM_OBS_DLL folder and delete or rename it.
7. Uninstall the DI API from Add/Remove Programs.
8. Install the DI API from your latest patch with full admin rights (Run as administrator).

Kind regards,

ANKIT CHAUHAN

SAP Business One Support

Bryan-SG
Explorer
0 Kudos
I got new error. This is weird because it was running okay previously.
Bryan-SG
Explorer
0 Kudos

I got new error. This is weird because it was running okay previously. It occurs here: SAPbobsCOM.Documents oDocuments = new SAPbobsCOM.Documents();

Message = "Retrieving the COM class factory for component with CLSID {4AFE074D-4F31-4E7B-87DF-64D55098DA5E} failed due to the following error: 80040111 ClassFactory cannot supply requested class (Exception from HRESULT: 0x80040111 (CLASS_E_CLASSNOTAVAILABLE))."

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Bryan-SG,

Have you installed the DI API from the same Patch package that you have installed on SAP Business One Server?

Make sure that your program is targetting to the correct DI API. Set the Target Platform as x64 and test again.

Kind regards,

ANKIT CHAUHAN

SAP Business One Support