Forum Stats

  • 3,853,804 Users
  • 2,264,276 Discussions
  • 7,905,450 Comments

Discussions

"Unable to launch the Java Virtual Machine" ... msvcr100.dll with JDK 1.8u261

Roelof_vS
Roelof_vS Member Posts: 17 Green Ribbon
edited Jul 23, 2020 11:42AM in SQL Developer

Hi all,

Windows 64 bit

SQL*Developer 20.2

JDK 1.8u261

Fresh installation of SQL*Dev and JDK.

With JDK u251, all is good.

With JDK u261, and error window appears:

   Unable to launch the Java Virtual Machine

   Located at path:

   c:\p\jdk8\jre\bin\msvcr100.dll

Downloading and installing Microsoft Redistributable files for Visual stusio 2010 does not help. Neither does the 2012 version, nor the one for 2015-2019.

I know JDK 8u261 is compiled with a newer Visual Studio (2017, per their readme), so likely that is key to the cause of this error. I have reviewed Support note

  => Java SE 8 Update 261+ and Java SE 7 Update 281+ Runtime Windows Visual Studio Library (DLL) Dependency Changes (Doc ID 2684819.1)

but that did not resolve. It only gives me the idea that SQL*Dev on Windows may need to be recompiled?

The worklaround is simple - use JDK 8u251, but I am concerned about other products in the Oracle stack that may also be affected, e.g. OBIEE, Forms, etc. So I wish to understand this problem better, and whether to advise internally to avoid JDK 8u261.

Glen Conway56849cef-1b97-4dd7-9375-041f9b77949cRod Allenilker ozupak

Best Answer

  • Sudhakar-Oracle
    Sudhakar-Oracle Member Posts: 21 Employee
    edited Jul 21, 2020 2:53AM Answer ✓

    As pointed by Michael Ferrante, Bug has been filed for SQL Dev product to look for the issue with JDK 1.8 update 261.
    As a workaroud, I tested following which worked. Copied msvcr100.dll from previous JDK 1.8+ to JDK 1.8 update 261

    Glen ConwayRod Allenilker ozupakUser_QCBKD
«1

Answers

  • Glen Conway
    Glen Conway Member Posts: 859 Gold Badge
    edited Jul 18, 2020 11:47AM

    Interesting.  Java 8 and 11 are both LTS releases, and so far I have ignored the other Java releases, sticking with Java 8 for SQL Developer, with 8u221 as my latest update.

    Upgrading to 8u261, I see the same problem you experienced. But  running 20.2 with jdk-11.0.8 works fine. Neither 8u261 or 11.0.8 ship with any msvcr*.dll files.

    I recall that some components / extensions of SQL Developer may still require Java 8 so, pending new, detailed guidance from the SQL Developer team, I would recommend staying with 8u251 or lower.

    Cheers

    Edit:  This dependency change is also mentioned in the Java 8 release notes: https://www.oracle.com/java/technologies/javase/8u261-relnotes.html

    Rod Allen
  • Roelof_vS
    Roelof_vS Member Posts: 17 Green Ribbon
    edited Jul 18, 2020 12:45PM

    Hi Glen,

    Thanks - I also saw the update in the relnotes.

    As mentioned, for SQL*Dev I can happily stay on 8u251.

    But I wish to understand the problem (and eventual solution) better, as it may affect othe Oracle product lines installed at my customer. For the moment I may just recommend to not go above 8u251 until I know what's cooking.

    Fortunately in this scenario, but JDK and SQL*Dev are Oracle products, so hopefully that will expedite matters.

    .. Roelof

    Philipp Grigoryev
  • Roelof_vS
    Roelof_vS Member Posts: 17 Green Ribbon
    edited Jul 20, 2020 4:13AM

    Quoting the JDK relnotes:

    Native applications (including JNI) that have depended on and assumed the presence of MSCVR100.dll in the JDK/JRE directory will fail to run. When this happens, users will see an error such as:

    "The code execution cannot proceed because MSVCR100.dll was not found. Reinstalling the program may fix this problem."

    These applications should be rebuilt and shipped with modern C++ runtime dependencies that use a later instance of Visual Studio. Applications should not depend on DLLs included with the JDK/JRE that are not documented in the product as offering support for the specification or other functionality in Java SE.

    --------
    If I look at the DLLs in the SQL*Developer folder, then by naming it looks like there are several that do native/JNI calls.

  • Michael Ferrante-Oracle
    Michael Ferrante-Oracle Senior Principal Product Manager USMember Posts: 7,395 Employee
    edited Jul 20, 2020 12:36PM

    Apparently this behavior was described in the Release Notes:

    https://www.oracle.com/java/technologies/javase/8u261-relnotes.html

    If anyone has not already done so, please file a Service Request with Support and ask that a bug be reported so that this can be fixed.  I've been told that SqlDev Development is already investigating, but having a formal report is a better approach,


    Michael Ferrante

    Senior Principal Product Manager

    Oracle

    Twitter: @OracleFormsPM

  • Glen Conway
    Glen Conway Member Posts: 859 Gold Badge
    edited Jul 20, 2020 12:44PM

    So I guess SQL Developer 20.2 gets a pass on this since 8u261 is very new and the download with a bundled JRE uses 8u221.

    The 20.2 release notes have an inconvenient warning about the Data Miner and SVN client features requiring Java 8

    Capture.JPG

    but if you do not use those, then it looks like Java 11.0.x is the way of the future barring whatever fix it takes to make 20.2 or higher work with 8u261 or higher.

    You can't always get what you want.

    Rod Allen
  • Sudhakar-Oracle
    Sudhakar-Oracle Member Posts: 21 Employee
    edited Jul 21, 2020 2:53AM Answer ✓

    As pointed by Michael Ferrante, Bug has been filed for SQL Dev product to look for the issue with JDK 1.8 update 261.
    As a workaroud, I tested following which worked. Copied msvcr100.dll from previous JDK 1.8+ to JDK 1.8 update 261

    Glen ConwayRod Allenilker ozupakUser_QCBKD
  • Roelof_vS
    Roelof_vS Member Posts: 17 Green Ribbon
    edited Jul 21, 2020 3:47AM

    Hello Sudhakar,

    Thank you for your feedback.
    I previously tried manually installing MS Redistributable files 2010, which installs msvcr100.dll, albeit not into the JDK folder.

    Does SQL*Dev really need this DLL to be inside the JDK? Can the logic be updatedto pick it up from the MS Redistributable installation when not found inside the JDK?

  • thatJeffSmith-Oracle
    thatJeffSmith-Oracle Distinguished Product Manager Posts: 8,771 Employee
    edited Jul 21, 2020 5:01AM

    This will be fixed in the next SQLDev update.

    In the meantime, use an older JDK or manually copy the dll over.

    Roelof_vSGlen Conway
  • Roelof_vS
    Roelof_vS Member Posts: 17 Green Ribbon
    edited Jul 21, 2020 6:09AM
  • Glen Conway
    Glen Conway Member Posts: 859 Gold Badge
    edited Jul 21, 2020 12:34PM

    In the past (not really sure if that means the recent past or the far past), SQL Developer would not look for msvcr100.dll in the installed JDK (under C:\Program Files\Java). It had to be found somewhere of course, somewhere in a directory present in the PATH environment variable (or in the bundled JDK shipped with SQL Developer as noted in Newbie having problems starting sqldeveloper)).

    So before posting my initial answer on Saturday ( ) I made sure msvcr100.dll could be found in PATH, not understanding that the rules have changed!

    With 8u261 in the Java 8 series, and the lack of msvcr100.dll there, it is revealed that the search for msvcr100.dll goes specifically to the JDK. No doubt an improvement, as at least we should be assured of getting the expected version of msvcr100.dll and not something else.

    Edited.

    Cheers