Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8225425

java.lang.UnsatisfiedLinkError: net.dll: Can't find dependent libraries

    Details

    • Subcomponent:
    • Resolved In Build:
      b11
    • CPU:
      x86_64
    • OS:
      windows_10

      Backports

        Description

        ADDITIONAL SYSTEM INFORMATION :
        Java 8 update 202 + is installed into a docker image, based on mcr.microsoft.com/powershell:nanoserver-1809 (nanoserver)

        A DESCRIPTION OF THE PROBLEM :
        Most likely this is a confirmation of the issue https://bugs.java.com/bugdatabase/view_bug.do?bug_id=8218486 (could not find how to re-open it).

        We're using windows/nanoserver as a base docker image for our application (TeamCity server), and we install OpenJDK8 to run it.

        Since Java update 202, all OpenJDK 8 packages from different vendors (AdoptOpenJDK, AmazonCorretto) fail with the same exception when trying to start Apache Tomcat under nanoserver image.



        REGRESSION : Last worked in version 8u192

        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        - build docker image with JDK based on mcr.microsoft.com/powershell:nanoserver-1809 (or any other windows nanoserver image)
        - add Apache tomcat into this image
        - Start docker container based on this image

        Sample start of the Dockerfile:
        ```
        FROM mcr.microsoft.com/powershell:nanoserver-1809 AS base

        SHELL ["pwsh", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]

        # Install JRE
        RUN [Net.ServicePointManager]::SecurityProtocol = 'tls12, tls11, tls' ; \
            Invoke-WebRequest https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u212-b03/OpenJDK8U-jre_x64_windows_hotspot_8u212b03.zip -OutFile jre.zip; \
            Expand-Archive jre.zip -DestinationPath $Env:ProgramFiles\Java ; \
            Get-ChildItem $Env:ProgramFiles\Java | Rename-Item -NewName "OpenJDK" ; \
            Remove-Item -Force jre.zip

        ```


        EXPECTED VERSUS ACTUAL BEHAVIOR :
        EXPECTED -
        Process starts successfully.
        ACTUAL -
        Exception like:

        java.lang.UnsatisfiedLinkError: C:\Program Files\Java\OpenJDK\bin\net.dll: Can't find dependent libraries
                at java.lang.ClassLoader$NativeLibrary.load(Native Method)
                at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
                at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1845)
                at java.lang.Runtime.loadLibrary0(Runtime.java:870)
                at java.lang.System.loadLibrary(System.java:1122)
                at sun.nio.ch.IOUtil$1.run(IOUtil.java:359)
                at sun.nio.ch.IOUtil$1.run(IOUtil.java:357)
                at java.security.AccessController.doPrivileged(Native Method)
                at sun.nio.ch.IOUtil.<clinit>(IOUtil.java:356)
                at sun.nio.ch.FileChannelImpl.<clinit>(FileChannelImpl.java:1218)
                at sun.management.ManagementFactoryHelper.getBufferPoolMXBeans(ManagementFactoryHelper.java:214)
                at java.lang.management.PlatformComponent$11.getMXBeans(PlatformComponent.java:215)
                at java.lang.management.PlatformComponent.getMXBeans(PlatformComponent.java:377)
                at java.lang.management.ManagementFactory.getPlatformMBeanServer(ManagementFactory.java:472)
                at org.apache.tomcat.util.modeler.Registry.getMBeanServer(Registry.java:440)
                at org.apache.catalina.mbeans.MBeanUtils.createServer(MBeanUtils.java:576)
                at org.apache.catalina.mbeans.MBeanUtils.<clinit>(MBeanUtils.java:77)
                at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.<clinit>(GlobalResourcesLifecycleListener.java:66)
                at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
                at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
                at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
                at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
                at org.apache.tomcat.util.digester.ObjectCreateRule.begin(ObjectCreateRule.java:117)
                at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1250)
                at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:509)
                at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:182)
                at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1339)
                at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2784)
                at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602)
                at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505)
                at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:842)
                at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:771)
                at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
                at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
                at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643)
                at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1518)
                at org.apache.catalina.startup.Catalina.load(Catalina.java:611)
                at org.apache.catalina.startup.Catalina.load(Catalina.java:662)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.lang.reflect.Method.invoke(Method.java:498)
                at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:309)
                at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:492)

        CUSTOMER SUBMITTED WORKAROUND :
        Use jdk8u192-b12 instead of 202 or 212.

        FREQUENCY : always


          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  chegar Chris Hegarty
                  Reporter:
                  webbuggrp Webbug Group
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  9 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: