Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-1515

java.lang.ClassNotFoundException: javax.naming.NamingException on JDK 14 jlink build

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 1.3.0-alpha5
    • logback-classic
    • None
    • openjdk 14, windows.

    Description

      Building a project that uses logback-classic 1.3.0-alpha5, everything compiles ok.

       

      jlink successfully produces a jlink-image with a launcher.  Running the launcher gives:

       

      Caused by: java.lang.NoClassDefFoundError: javax/naming/NamingException
       at ch.qos.logback.classic/ch.qos.logback.classic.joran.JoranConfigurator.addInstanceRules(JoranConfigurator.java:48)
       at ch.qos.logback.core/ch.qos.logback.core.joran.GenericConfigurator.buildInterpreter(GenericConfigurator.java:134)
       at ch.qos.logback.core/ch.qos.logback.core.joran.JoranConfiguratorBase.buildInterpreter(JoranConfiguratorBase.java:95)
       at ch.qos.logback.core/ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:162)
       at ch.qos.logback.core/ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:152)
       at ch.qos.logback.core/ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:110)
       at ch.qos.logback.core/ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:53)
       at ch.qos.logback.classic/ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:82)
       at ch.qos.logback.classic/ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:157)
       at ch.qos.logback.classic/ch.qos.logback.classic.spi.LogbackServiceProvider.initializeLoggerContext(LogbackServiceProvider.java:49)
       at ch.qos.logback.classic/ch.qos.logback.classic.spi.LogbackServiceProvider.initialize(LogbackServiceProvider.java:40)
       at org.slf4j/org.slf4j.LoggerFactory.bind(LoggerFactory.java:152)
       at org.slf4j/org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:139)
       at org.slf4j/org.slf4j.LoggerFactory.getProvider(LoggerFactory.java:418)
       at org.slf4j/org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:404)
       at org.slf4j/org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:353)
       at org.slf4j/org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:379)
       at esa.sect.app@0.0.0-SNAPSHOT/esa.sect.tool.commands.BulkImportCommand.<clinit>(BulkImportCommand.java:56)
       at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
       at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
       at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
       at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
       at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
       at java.base/java.util.ServiceLoader$ProviderImpl.newInstance(ServiceLoader.java:782)
       ... 4 more
      Caused by: java.lang.ClassNotFoundException: javax.naming.NamingException
       at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:602)
       at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
       at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
       ... 28 more

       

      The line that fails is where it create an object of a class that has an import of jaxax.naming.NamingException.

       

      Any clues?

      Attachments

        Activity

          People

            logback-dev Logback dev list
            richard.melvin R A D Melvin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: