Connection error: The type initializer for 'OracleInternal.Network.AddressResolution — oracle-tech

    Forum Stats

  • 3,715,830 Users
  • 2,242,890 Discussions
  • 7,845,632 Comments

Discussions

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Connection error: The type initializer for 'OracleInternal.Network.AddressResolution

user5317405
user5317405 Member Posts: 9

Hello,

After I upgraded to 19.3.2 I get:

"Error opening connection 'dev'.Details: The type initializer for 'OracleInternal.Network.AddressResolution' threw an exception."

It worked with previous version. I reinstalled .Net Core, but no success. Any idea what I am doing wrong?

OS: WIndows_NT x64 6.1.7601

Connection type: TNS alias or Basic

Thanks for your help.

Answers

  • Christian.Shay -Oracle
    Christian.Shay -Oracle Posts: 1,786 Employee
    edited October 2019

    Could it be that you copied over a SQLNET.ORA?

    If it is there, try removing LDAP from NAMES.DIRECTORY_PATH in SQLNET.ORA

  • user5317405
    user5317405 Member Posts: 9
    edited October 2019

    It is and I have:

    NAMES.DIRECTORY_PATH= (TNSNAMES, HOSTNAME, ONAMES)

    But I think the sqlnet.ora has been there before... I tried renaming it, but the error persist.

  • Christian.Shay -Oracle
    Christian.Shay -Oracle Posts: 1,786 Employee
    edited October 2019

    Let's make sure the SQLNET.ORA and TNSNAMES.ORA you think you are using are what are actually being used:

    In the list of extensions, find Oracle Developer Tools, then right click the "gear" icon and select Configure Extension Settings.

    In the settings for ODT  you will see: Network Configuration: Config Files Location

    Using Windows Explorer or command line, go to the path location set there and see if there is a SQLNET.ORA and/or LDAP.ORA. If there is, temporarily rename the SQLNET.ORA and LDAP.ORA file name and restart Visual Studio Code.

  • Christian.Shay -Oracle
    Christian.Shay -Oracle Posts: 1,786 Employee
    edited October 2019

    I just noticed that you seem to have said that you are also attempting to create a "Basic" connection (with just host, port, and service name). Is that true? Do you get the same error with a Basic connection?

  • user5317405
    user5317405 Member Posts: 9
    edited October 2019

    Yes, I tried with no success. The error persists.

    Same with basic connection, I made a new connection, hostname and servicename, default port..., it should work, but same error.

    Even "Connection string" (Advanced conn)... no success, same error...

  • user5317405
    user5317405 Member Posts: 9
    edited October 2019

    I downgraded to 19.3.1 and it works out of the box.

  • Christian.Shay -Oracle
    Christian.Shay -Oracle Posts: 1,786 Employee
    edited October 2019

    Hm, this doesn't sound good.

    Can you please let me know what is the path set in Network Configuration: Config Files Location?

    Also, can you successfully ping the "Database Host Name" used in the basic connection? (I assume so because you can connect with 19.3.1)

    Can you confirm you are using Windows? Is it Windows 7?

  • user5317405
    user5317405 Member Posts: 9
    edited October 2019

    Config file location: C:/oracle/product/11.2.0/client_1/network/admin

    I confirm that pinging works.

    OS: WIndows_NT x64 6.1.7601 (Windows 7 Enterprise)

    I am in the process of migrating to Windows 10, so hopefully it will work there.

  • Christian.Shay -Oracle
    Christian.Shay -Oracle Posts: 1,786 Employee
    edited October 2019

    Thanks. I'm not sure if it matters, but you are using forward slashes in the path while Windows uses backslashes.

    Can you try the following?

    1) Change the config file location setting to the correct Wndows format (use backslashes), close VS Code and reopen it and try again.

    2) Try creating a new directory, such as c:\odtvscode and copy only the  tnsnames.ora file there. Change the config file location to point there (using  backslashes).  Close VS Code and reopen it and try again.

  • user5317405
    user5317405 Member Posts: 9
    edited October 2019

    I cannot make it work.

    I did exaclty as you suggested with Windows style path format, etc... TNS alias dropdown is succesfully populated (as it was before with old directory), but still fails with exact same error message.

    I tried unnistalling and installing again, remove all settings, started from scratch... failed.

  • Christian.Shay -Oracle
    Christian.Shay -Oracle Posts: 1,786 Employee
    edited October 2019

    I see what else I can find out we can try.

    Is there anything else that is different in your configuration between the 19.3.1 install and the 19.3.2?

    Are you running this in a Virtualbox VM and are reverting to a snapshot that still has 19.3.1 installed? Is that how you are "downgrading"?

  • Christian.Shay -Oracle
    Christian.Shay -Oracle Posts: 1,786 Employee
    edited October 2019

    One additional request:

    Can you zip up the *.log files generated in the %USERPROFILE%\.vscode\extensions\oracle.oracledevtools-19.3.2 directory and attach them to this thread, or email them to christian (dot) shay (at) oracle (dot) com?

  • user5317405
    user5317405 Member Posts: 9
    edited October 2019

    There is nothing different in my environment. I downgraded with "Install Another Version..." command in VS Code.

    No snapshots, VM or anything like that...

    I sent logs by the mail.

  • Christian.Shay -Oracle
    Christian.Shay -Oracle Posts: 1,786 Employee

    Hi, could you please install version 19.3.3 and let me know if this is fixed? Thank you!

Sign In or Register to comment.