Uploaded image for project: 'Thorntail'
  1. Thorntail
  2. THORN-1988

NoClassDefFoundError when using wildfly microprofile config through YAML file

    Details

    • Story Points:
      10
    • Steps to Reproduce:
      Hide
      1. Download attached reproducer project microprofile-config-yaml.zip .
      2. Extract into any directory and cd into it.
      3. Execute
        mvn clean package 
      4. Start uberjar by
         java -jar target/microprofile-config-yaml-1.0.0-swarm.jar 

      Expected behavior: should start without errors
      Actual behavior: it throws an error and exits.

      Show
      Download attached reproducer project microprofile-config-yaml.zip . Extract into any directory and cd into it. Execute mvn clean package Start uberjar by java -jar target/microprofile-config-yaml-1.0.0-swarm.jar Expected behavior: should start without errors Actual behavior: it throws an error and exits.

      Description

      It should be possible to configure some parameters for Microprofile config through YAML file (http://docs.wildfly-swarm.io/2018.5.0-SNAPSHOT/#_eclipse_microprofile_config).

      But when doing so, a NoClassDefFoundError is thrown:

      java.lang.RuntimeException: org.jboss.weld.exceptions.DefinitionException: Exception List with 1 exceptions:
      Exception 0 :
      java.lang.RuntimeException: java.lang.RuntimeException: java.lang.NoClassDefFoundError: org/wildfly/swarm/config/microprofile/config/ConfigSourceConsumer
      	at org.wildfly.swarm.container.runtime.cdi.FractionProducingExtension.lambda$afterBeanDiscovery$1(FractionProducingExtension.java:100)
      	at java.lang.Iterable.forEach(Iterable.java:75)
      	at org.wildfly.swarm.container.runtime.cdi.FractionProducingExtension.afterBeanDiscovery(FractionProducingExtension.java:96)
      	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.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:88)
      	at org.jboss.weld.injection.MethodInvocationStrategy$SpecialParamPlusBeanManagerStrategy.invoke(MethodInvocationStrategy.java:144)
      	at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:299)
      	at org.jboss.weld.event.ExtensionObserverMethodImpl.sendEvent(ExtensionObserverMethodImpl.java:124)
      	at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:277)
      	at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:255)
      	at org.jboss.weld.event.ObserverNotifier.notifySyncObservers(ObserverNotifier.java:269)
      	at org.jboss.weld.event.ObserverNotifier.notify(ObserverNotifier.java:258)
      	at org.jboss.weld.event.ObserverNotifier.fireEvent(ObserverNotifier.java:154)
      	at org.jboss.weld.event.ObserverNotifier.fireEvent(ObserverNotifier.java:148)
      	at org.jboss.weld.bootstrap.events.AbstractContainerEvent.fire(AbstractContainerEvent.java:53)
      	at org.jboss.weld.bootstrap.events.AbstractDefinitionContainerEvent.fire(AbstractDefinitionContainerEvent.java:44)
      	at org.jboss.weld.bootstrap.events.AfterBeanDiscoveryImpl.fire(AfterBeanDiscoveryImpl.java:62)
      	at org.jboss.weld.bootstrap.WeldStartup.deployBeans(WeldStartup.java:451)
      	at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:83)
      	at org.jboss.weld.environment.se.Weld.initialize(Weld.java:766)
      	at org.wildfly.swarm.container.runtime.ServerBootstrapImpl.lambda$null$0(ServerBootstrapImpl.java:149)
      	at org.wildfly.swarm.container.runtime.LogSilencer$SilentExecutor.execute(LogSilencer.java:75)
      	at org.wildfly.swarm.container.runtime.ServerBootstrapImpl.lambda$bootstrap$1(ServerBootstrapImpl.java:120)
      	at org.wildfly.swarm.spi.api.ClassLoading.withTCCL(ClassLoading.java:43)
      	at org.wildfly.swarm.container.runtime.ServerBootstrapImpl.bootstrap(ServerBootstrapImpl.java:113)
      	at org.wildfly.swarm.Swarm.start(Swarm.java:398)
      	at org.wildfly.swarm.Swarm.main(Swarm.java:742)
      	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.wildfly.swarm.bootstrap.MainInvoker.invoke(MainInvoker.java:53)
      	at org.wildfly.swarm.bootstrap.Main.run(Main.java:132)
      	at org.wildfly.swarm.bootstrap.Main.main(Main.java:85)
      Caused by: java.lang.RuntimeException: java.lang.NoClassDefFoundError: org/wildfly/swarm/config/microprofile/config/ConfigSourceConsumer
      	at org.wildfly.swarm.container.runtime.ConfigurableManager.createLambda(ConfigurableManager.java:630)
      	at org.wildfly.swarm.container.runtime.ConfigurableManager.scanSubresources(ConfigurableManager.java:567)
      	at org.wildfly.swarm.container.runtime.ConfigurableManager.scan(ConfigurableManager.java:318)
      	at org.wildfly.swarm.container.runtime.ConfigurableManager.scanFraction(ConfigurableManager.java:252)
      	at org.wildfly.swarm.container.runtime.ConfigurableManager.scanInternal(ConfigurableManager.java:244)
      	at org.wildfly.swarm.container.runtime.ConfigurableManager.scan(ConfigurableManager.java:233)
      	at org.wildfly.swarm.container.runtime.cdi.configurable.ConfigurableFractionBean.<init>(ConfigurableFractionBean.java:49)
      	at org.wildfly.swarm.container.runtime.cdi.FractionProducingExtension.lambda$afterBeanDiscovery$1(FractionProducingExtension.java:98)
      	... 36 more
      Caused by: java.lang.NoClassDefFoundError: org/wildfly/swarm/config/microprofile/config/ConfigSourceConsumer
      	at sun.misc.Unsafe.defineAnonymousClass(Native Method)
      	at java.lang.invoke.InnerClassLambdaMetafactory.spinInnerClass(InnerClassLambdaMetafactory.java:326)
      	at java.lang.invoke.InnerClassLambdaMetafactory.buildCallSite(InnerClassLambdaMetafactory.java:194)
      	at java.lang.invoke.LambdaMetafactory.metafactory(LambdaMetafactory.java:304)
      	at org.wildfly.swarm.container.runtime.ConfigurableManager.createLambda(ConfigurableManager.java:618)
      	... 43 more
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  mszynkie Michal Szynkiewicz
                  Reporter:
                  juagonza Juan Gonzalez
                • Votes:
                  1 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: