Please take this survey to help us learn more about how you use third party tools. Your input is greatly appreciated!

Vertica Client Driver for ADO.Net throws System.NullReferenceException exception from OData service

I have a OData service hosted on Microsoft Azure App Service. In the service, I am using Vertica Client Driver for ADO.Net to connect to Vertica database. When the code tries to open a connection to Vertica database using type VerticaConnection, it throws the following exception. From this exception stack is is clear that the Vertica client library Vertica.Data.dll version 7.2.3.0 throws exception at method GetOSVersion.

System.NullReferenceException: Object reference not set to an instance of an object.
at Vertica.Data.Internal.IO.ProtocolStream.GetOSVersion (Vertica.Data, Version=7.2.3.0, Culture=neutral, PublicKeyToken=725728a8837b3bd5)
at Vertica.Data.Internal.IO.ProtocolStream.Startup (Vertica.Data, Version=7.2.3.0, Culture=neutral, PublicKeyToken=725728a8837b3bd5)
at Vertica.Data.Internal.IO.ProtocolStream.InitSession (Vertica.Data, Version=7.2.3.0, Culture=neutral, PublicKeyToken=725728a8837b3bd5)
at Vertica.Data.Internal.Core.VConnection.Connect (Vertica.Data, Version=7.2.3.0, Culture=neutral, PublicKeyToken=725728a8837b3bd5)

at Vertica.Data.Internal.ADO.Net.SConnection.Open (Vertica.Data, Version=7.2.3.0, Culture=neutral, PublicKeyToken=725728a8837b3bd5)

Best Answer

  • saxenamsaxenam Employee
    Answer ✓

    @rjayabalan I have checked and found that you are using Vertica Server 9.2.1! Can you please update about the client driver version as well?

Answers

  • Question? What version of Vertica database are you trying to connect?

  • The Vertica database version is 9.2.1.
    Note: The same code base is able to connect to Vertica database when executed locally on Windows 10 machine. The issue arises only when I deploy to Microsoft Azure App Service. May be, it is something that got to do with OS.

  • Hi @siddyash
    I believe, I had provided the details you asked for. Do you need any further details?

  • Hi @siddyash

    FYI. From KUDU, I extracted the following information on OS and IIS

    OS version: Microsoft Windows NT 10.0.14393.0

    Microsoft-IIS/10.0

    Does it mean, Vertica Driver for Ado.Net is not supported on OS Microsoft Windows NT 10.0.14393.0 ?

  • Hi @siddyash
    This may due to Vertica.Data.dll written for .Net Framework v 4.6.1.
    I have written my OData using .Net Core 2.1 and .Net Std 2.0
    Do you have Vertica.Data.dll assembly for .Net Std 2.0 or higher?

  • @rjayabalan : It looks like a bug to me and we had similar bugs in past for 8.x vertica version. Please open a support case. we can work and file a bug accordingly.

  • Hi @SruthiA
    I will create support ticket with Vertica soon. By the way, I converted my code from .Net Core/Std to .Net Fx 4.7.2 as well. Still, it is not working.

  • Hi @saxenam
    You are correct. I was using Vertica.Data nuget packages. The package has Vertica.Data.dll v 7.2.3.0. After manually referring to Vertica.Data.dll assembly v 9.2.1, it is working now. Thank you @saxenam .

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file

Can't find what you're looking for? Search the Vertica Documentation, Knowledge Base, or Blog for more information.