cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Business Adapter error "External component has thrown an exception"

We are getting below error while executing Business Adapter for on-off purchase order upload, do anyone has any idea for this issue, other Business Adapters are working fine on same location (FNMS Application server).

 

Please help me to fix this issue.

 

2/21/2020 5:05:12 PM - Information - FlexNet Manager Platform Business Importer from Flexera Software 13.2.0.1104
2/21/2020 5:05:12 PM - Information -
2/21/2020 5:05:12 PM - Information - Current user: NA\s310266
2/21/2020 5:05:12 PM - Information - Command line: "MGSBI.EXE" "/Simulate=Import_76bf6b758be24951b65ce17f0bd55392" "/ConfigFile=mgsbi_test.xml"
2/21/2020 5:05:12 PM - Information - Current directory: C:\Users\s310266\AppData\Local\Temp\2\Business Adapter
2/21/2020 5:05:12 PM - Information -
2/21/2020 5:05:12 PM - Information - Using custom configuration file: mgsbi_test.xml
2/21/2020 5:05:12 PM - Information - Destination connection string: Server=MSUSELKGIC4129;Database=FNMSCompliance;Trusted_Connection=yes;
2/21/2020 5:05:14 PM - Information - Source connection string: Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\ProgramData\Flexera Software\FlexNet Manager Platform\DataImport;Extended Properties='text;HDR=Yes;FMT=Delimited(CSVDelimited)'
2/21/2020 5:05:14 PM - Information - Source data query: select * from [One-off upload.csv]
An error has occurred when trying to run the query [select * from [One-off upload.csv]]. The error message is [External component has thrown an exception.].
External component has thrown an exception.

 

(3) Replies

It looks like it’s failing when trying to read from source csv file, please check source path/file etc from where business data is going to be processed.
You also check using business adapter to make sure adapter can reader without any problem.
————————part of the error shows possible problem————————
An error has occurred when trying to run the query [select * from [One-off upload.csv]]. The error message is [External component has thrown an exception.].
External component has thrown an exception.

Cheers
Aamer

Hi Sandeep,

As a first test, I would suggest running the Business Adapter Studio using the "Run as Administrator" option.

In case this does not solve the problem: Can you take a look at your MGSBI configuration file ('mgsbi_test.xml'), please?

For importing data from a CSV file, the default setting (as in your case) is using Microsoft.ACE.OLEDB.12.0 (Excel) as the import type. This will require having the drivers for Speadsheet Imports installed on your FNMS Application Server (see "Installing FlexNet Manager Suite On-Premises", page #27). You may want to check if this driver is available.

As an alternative, for importing CSV files you can also use the Microsoft.Jet.OLEDB.4.0 driver as documented in the "Using FlexNet Business Adapters" document.

Inside of the 'mgsbi_test.xml' configuration file, the ConnectionString Attribute inside of the Import Element will look differently for the EXCEL and CSV import types (file path shortened in the examples):

1. Import Type is EXCEL:

<Import
Name="Import1"
Type="CSV" Delimiter="Comma" Template="" Enabled="False"
ConnectionString="Provider=Microsoft.ACE.OLEDB.12.0;
Data Source=C:\ProgramData\..\DataImport;
Extended Properties='text;HDR=Yes;FMT=Delimited'"
Query="select * from [One-off upload.csv]"
FileName="C:\ProgramData\..\One-off upload.csv"
/>


2. Import Type is CSV:

<Import
Name="Import1"
Type="CSV" Delimiter="Comma" Template="" Enabled="False"
ConnectionString="Microsoft.Jet.OLEDB.4.0;
Data Source=C:\ProgramData\..\DataImport;
Extended Properties='text;HDR=Yes;FMT=Delimited'"
Query="select * from [One-off upload.csv]"
/>

Try changing the import type from EXCEL to CSV and see if this helps.

Thanks a lot Erwinlindemann for your quick help. As you suggested, we install drivers for spreadsheet import (Acess Database Engine 32 bit) which resolved our issue.

Now we are able to use one-off upload without any issue.

 

Thanks again.

Sandeep