77
Views
6
Comments
Kafka Confluence librdkafka.dll where to put?
Application Type
Traditional Web

Hi there,

I create a C# extension for producer Kafka Confluence. When i build and then publish, it is okay. However in the run time, i got this error:

Error while loading librdkafka.dll or its dependencies from E:\Program Files\OutSystems\Platform Server\running\TestP11.xxxxxx\bin2\librdkafka.dll. Check the directory exists, if not check your deployment process. You can also load the library and its dependencies by yourself before any call to Confluent.Kafka.

How come is is succeed when building in Visual Studio, it is okay when publish, but still error in runtime?

where to put bin2\librdkafka.dll in Integration Studio?

regards and thanks

2019-06-15 21-39-22
Afonso Carvalho
 
MVP

Hello,

When you create an Extension, you can also control the Resources folder in Integration Studio:


Can you see if the DLL you need is in the Bin folder? Then select it and check the Deploy action - I believe it should be "Copy to Binaries directory", like this:


UserImage.jpg
Ashish Akolkar

@Indra Budiantho  Did you find answer for this?

I am also facing same issue.

2023-03-08 10-32-19
Vinod Kumar R

Hello Team,


I'm facing the DLL missing issue, Any inputs on this.


System.DllNotFoundException: Failed to load the librdkafka native library. at Confluent.Kafka.Impl.Librdkafka.TrySetDelegates(List`1 nativeMethodCandidateTypes) at Confluent.Kafka.Impl.Librdkafka.LoadNetStandardDelegates(String userSpecifiedPath) at Confluent.Kafka.Impl.Librdkafka.Initialize(String userSpecifiedPath) at Confluent.Kafka.Consumer`2..ctor(ConsumerBuilder`2 builder) at Confluent.Kafka.ConsumerBuilder`2.Build() at Iit.Shared.Messaging.Kafka.KafkaClientFactoryImpl.CreateConsumer[TKey,TValue](ConsumerConfig config, String topic, Action`1 configure, IDictionary`2 deserializerConfig, Func`2 deserializeValuePredicate) at Iit.Shared.Messaging.Kafka.KafkaClientFactoryImpl.CreateStreamConsumer[TKey,TValue](IStreamConsumerConfig config) at OutSystems.Nss_POC_KafkaConnector.Css_POC_KafkaConnector.MssReceive(RCConfigRecord ssConfig, RLMessageRecordList& ssMessageList, String& ssError)

UserImage.jpg
Micael Mota

Same error here.

Did any of you found a solution/workaround for this?

The systems is complaining about a missing DLL, but I checked the files and it looks to be there:

image

image

Those files are symlinks that actually point to this:


image 

So, it actually looks ok. Tried to delete the files and publish to generate them again but...same error. Pasted the actual dll file there, did not solved .

I don't have a ton of experience with Outsystems extensions, but is actually the first time I use a library that is divided in x64 and x86 and my guess is, that's the cause of this. Maybe Outsystems does not have the right logic to deal with that.

Did a small test library class for .net 4.6.2 (same as the extension) and works fine. If I remove the librdkafka.dll from the bin folder I do have the same exact error, which makes sense...

Any ideas? otherwise,  Opening a ticket is my last resort.


Thanks




UserImage.jpg
Micael Mota

Was able to solve the issue.

Like I suspected, the problem was  in fact related with the x64/x86 versioning. 

I can now tell for sure, Outsystems does not handle that correctly.

What I did was copying the files from the x64 folder to bin and include them on the extension recourses. Then deleted the librdkafka folder and excluded it from extension recourses. 

Actually tried both x86 and x64 files, only the x64 worked, not sure if that will be the case everywhere.  

UserImage.jpg
Ashish Akolkar

@Micael Mota  Yes works for x64 only.

I  did the same but also .Net Framework 4.6.1  also played important role to resolve this.

In my case i have added librdkafka  to bin folder.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.