Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-17832

org.apache.sshd module take precedence over classloader from application war

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 23.0.1.Final, 23.0.2.Final
    • None
    • None
    • Hide

      Download application war `compiler-with-sshd-off.war` and server.log with TRACE jboss-modules log msg on

      https://drive.google.com/drive/folders/1Es7xkPylv4nVs3DOi6WfkK86VGAZCn20?usp=sharing

      Show
      Download application war `compiler-with-sshd-off.war` and server.log with TRACE jboss-modules log msg on https://drive.google.com/drive/folders/1Es7xkPylv4nVs3DOi6WfkK86VGAZCn20?usp=sharing
    • ---
    • ---

      There is a test application with Arquillian and managed Wildfly 23.0.2.Final container. The org.apache.sshd embedded in Wildfly as a private module provide sshd-common and sshd-core jars, but I need for the test sshd which is the latest one, so include them WEB-INF/lib and excluded private module in WF by jboss-deployment-structure.xml file.

      Now running the test org.kie.workbench.common.services.backend.compiler.rest.client.MavenRestClientTest  in application.war shows exception
      ```

      11:53:16,340 INFO  [org.eclipse.jgit.internal.ketch.KetchSystem] (MSC service thread 1-8) Using 12 threads
      11:53:16,390 ERROR [org.uberfire.java.nio.file.api.FileSystemProviders] (MSC service thread 1-8) Can't initialize FileSystemProviders: java.util.ServiceConfigurationError: org.uberfire.java.nio.file.spi.FileSystemProvider: Provider org.uberfire.java.nio.fs.jgit.JGitFileSystemProvider could not be instantiated
          at java.base/java.util.ServiceLoader.fail(ServiceLoader.java:582)
          at java.base/java.util.ServiceLoader$ProviderImpl.newInstance(ServiceLoader.java:804)
          at java.base/java.util.ServiceLoader$ProviderImpl.get(ServiceLoader.java:722)
          at java.base/java.util.ServiceLoader$3.next(ServiceLoader.java:1395)
          at deployment.compiler.war//org.uberfire.java.nio.file.api.FileSystemProviders.buildProviders(FileSystemProviders.java:71)
          at deployment.compiler.war//org.uberfire.java.nio.file.api.FileSystemProviders.setup(FileSystemProviders.java:53)
          at deployment.compiler.war//org.uberfire.java.nio.file.api.FileSystemProviders.getDefaultProvider(FileSystemProviders.java:99)
          at deployment.compiler.war//org.uberfire.java.nio.file.api.FileSystemUtils.isGitDefaultFileSystem(FileSystemUtils.java:48)
          at deployment.compiler.war//org.guvnor.structure.backend.repositories.LoadReposOnAppInit.isGitDefaultFileSystem(LoadReposOnAppInit.java:58)
          at deployment.compiler.war//org.guvnor.structure.backend.repositories.LoadReposOnAppInit.execute(LoadReposOnAppInit.java:50)
          at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
          at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.base/java.lang.reflect.Method.invoke(Method.java:566)
          at org.jboss.weld.core@3.1.6.Final//org.jboss.weld.injection.producer.DefaultLifecycleCallbackInvoker.invokeMethods(DefaultLifecycleCallbackInvoker.java:83)
          at org.jboss.weld.core@3.1.6.Final//org.jboss.weld.injection.producer.DefaultLifecycleCallbackInvoker.postConstruct(DefaultLifecycleCallbackInvoker.java:66)
          at org.jboss.weld.core@3.1.6.Final//org.jboss.weld.injection.producer.BasicInjectionTarget.postConstruct(BasicInjectionTarget.java:122)
          at org.jboss.weld.core@3.1.6.Final//org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:174)
          at org.jboss.weld.core@3.1.6.Final//org.jboss.weld.contexts.AbstractContext.get(AbstractContext.java:96)
          at org.jboss.weld.core@3.1.6.Final//org.jboss.weld.bean.ContextualInstanceStrategy$DefaultContextualInstanceStrategy.get(ContextualInstanceStrategy.java:100)
          at org.jboss.weld.core@3.1.6.Final//org.jboss.weld.bean.ContextualInstanceStrategy$ApplicationScopedContextualInstanceStrategy.get(ContextualInstanceStrategy.java:140)
          at org.jboss.weld.core@3.1.6.Final//org.jboss.weld.bean.ContextualInstance.get(ContextualInstance.java:50)
          at org.jboss.weld.core@3.1.6.Final//org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:102)
          at org.jboss.weld.core@3.1.6.Final//org.jboss.weld.bean.proxy.ProxyMethodHandler.getInstance(ProxyMethodHandler.java:131)
          at deployment.compiler.war//org.guvnor.structure.backend.repositories.LoadReposOnAppInit$Proxy$_$$_WeldClientProxy.toString(Unknown Source)
          at deployment.compiler.war//org.uberfire.backend.server.cdi.SystemConfigProducer.runPostConstruct(SystemConfigProducer.java:196)
          at deployment.compiler.war//org.uberfire.backend.server.cdi.SystemConfigProducer.afterDeploymentValidation(SystemConfigProducer.java:181)
          at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
          at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.base/java.lang.reflect.Method.invoke(Method.java:566)
          at org.jboss.weld.core@3.1.6.Final//org.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:95)
          at org.jboss.weld.core@3.1.6.Final//org.jboss.weld.injection.MethodInvocationStrategy$SpecialParamPlusBeanManagerStrategy.invoke(MethodInvocationStrategy.java:187)
          at org.jboss.weld.core@3.1.6.Final//org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:330)
          at org.jboss.weld.core@3.1.6.Final//org.jboss.weld.event.ExtensionObserverMethodImpl.sendEvent(ExtensionObserverMethodImpl.java:123)
          at org.jboss.weld.core@3.1.6.Final//org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:308)
          at org.jboss.weld.core@3.1.6.Final//org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:286)
          at javax.enterprise.api//javax.enterprise.inject.spi.ObserverMethod.notify(ObserverMethod.java:124)
          at org.jboss.weld.core@3.1.6.Final//org.jboss.weld.util.Observers.notify(Observers.java:166)
          at org.jboss.weld.core@3.1.6.Final//org.jboss.weld.event.ObserverNotifier.notifySyncObservers(ObserverNotifier.java:285)
          at org.jboss.weld.core@3.1.6.Final//org.jboss.weld.event.ObserverNotifier.notify(ObserverNotifier.java:273)
          at org.jboss.weld.core@3.1.6.Final//org.jboss.weld.event.ObserverNotifier.fireEvent(ObserverNotifier.java:177)
          at org.jboss.weld.core@3.1.6.Final//org.jboss.weld.event.ObserverNotifier.fireEvent(ObserverNotifier.java:171)
          at org.jboss.weld.core@3.1.6.Final//org.jboss.weld.bootstrap.events.AbstractContainerEvent.fire(AbstractContainerEvent.java:53)
          at org.jboss.weld.core@3.1.6.Final//org.jboss.weld.bootstrap.events.AbstractDeploymentContainerEvent.fire(AbstractDeploymentContainerEvent.java:35)
          at org.jboss.weld.core@3.1.6.Final//org.jboss.weld.bootstrap.events.AfterDeploymentValidationImpl.fire(AfterDeploymentValidationImpl.java:28)
          at org.jboss.weld.core@3.1.6.Final//org.jboss.weld.bootstrap.WeldStartup.validateBeans(WeldStartup.java:505)
          at org.jboss.weld.core@3.1.6.Final//org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:93)
          at org.jboss.as.weld@23.0.2.Final//org.jboss.as.weld.WeldStartService.start(WeldStartService.java:98)
          at org.jboss.msc@1.4.12.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1739)
          at org.jboss.msc@1.4.12.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1701)
          at org.jboss.msc@1.4.12.Final//org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1559)
          at org.jboss.threads@2.4.0.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
          at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
          at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
          at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
          at java.base/java.lang.Thread.run(Thread.java:829)
      Caused by: java.lang.NoSuchMethodError: 'boolean org.apache.sshd.common.util.OsUtils.isOSX()'
          at deployment.compiler.war//org.apache.sshd.common.file.nativefs.NativeFileSystemFactory.<clinit>(NativeFileSystemFactory.java:44)
          at deployment.compiler.war//org.apache.sshd.common.BaseBuilder.<clinit>(BaseBuilder.java:62)
          at deployment.compiler.war//org.uberfire.java.nio.fs.jgit.daemon.ssh.GitSSHService.buildSshServer(GitSSHService.java:73)
          at deployment.compiler.war//org.uberfire.java.nio.fs.jgit.daemon.ssh.GitSSHService.buildSSHServer(GitSSHService.java:185)
          at deployment.compiler.war//org.uberfire.java.nio.fs.jgit.daemon.ssh.GitSSHService.setup(GitSSHService.java:113)
          at deployment.compiler.war//org.uberfire.java.nio.fs.jgit.JGitFileSystemProvider.buildAndStartSSH(JGitFileSystemProvider.java:448)
          at deployment.compiler.war//org.uberfire.java.nio.fs.jgit.JGitFileSystemProvider.setupGitSSH(JGitFileSystemProvider.java:302)
          at deployment.compiler.war//org.uberfire.java.nio.fs.jgit.JGitFileSystemProvider.<init>(JGitFileSystemProvider.java:247)
          at deployment.compiler.war//org.uberfire.java.nio.fs.jgit.JGitFileSystemProvider.<init>(JGitFileSystemProvider.java:210)
          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.newInstance(Constructor.java:490)
          at java.base/java.util.ServiceLoader$ProviderImpl.newInstance(ServiceLoader.java:780)
          ... 55 more
      
      11:53:16,394 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC000001: Failed to start service jboss.deployment.unit."compiler.war".WeldStartService: org.jboss.msc.service.StartException in service jboss.deployment.unit."compiler.war".WeldStartService: Failed to start service
          at org.jboss.msc@1.4.12.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1731)
          at org.jboss.msc@1.4.12.Final//org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1559)
          at org.jboss.threads@2.4.0.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
          at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
          at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
          at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
          at java.base/java.lang.Thread.run(Thread.java:829)
      Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-000049: Unable to invoke public void org.guvnor.structure.backend.repositories.LoadReposOnAppInit.execute() on org.guvnor.structure.backend.repositories.LoadReposOnAppInit@28de28c1
          at org.jboss.weld.core@3.1.6.Final//org.jboss.weld.bootstrap.events.AbstractDeploymentContainerEvent.fire(AbstractDeploymentContainerEvent.java:38)
          at org.jboss.weld.core@3.1.6.Final//org.jboss.weld.bootstrap.events.AfterDeploymentValidationImpl.fire(AfterDeploymentValidationImpl.java:28)
          at org.jboss.weld.core@3.1.6.Final//org.jboss.weld.bootstrap.WeldStartup.validateBeans(WeldStartup.java:505)
          at org.jboss.weld.core@3.1.6.Final//org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:93)
          at org.jboss.as.weld@23.0.2.Final//org.jboss.as.weld.WeldStartService.start(WeldStartService.java:98)
          at org.jboss.msc@1.4.12.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1739)
          at org.jboss.msc@1.4.12.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1701)
          ... 6 more
      Caused by: org.jboss.weld.exceptions.WeldException: WELD-000049: Unable to invoke public void org.guvnor.structure.backend.repositories.LoadReposOnAppInit.execute() on org.guvnor.structure.backend.repositories.LoadReposOnAppInit@28de28c1
          at org.jboss.weld.core@3.1.6.Final//org.jboss.weld.injection.producer.DefaultLifecycleCallbackInvoker.invokeMethods(DefaultLifecycleCallbackInvoker.java:85)
          at org.jboss.weld.core@3.1.6.Final//org.jboss.weld.injection.producer.DefaultLifecycleCallbackInvoker.postConstruct(DefaultLifecycleCallbackInvoker.java:66)
          at org.jboss.weld.core@3.1.6.Final//org.jboss.weld.injection.producer.BasicInjectionTarget.postConstruct(BasicInjectionTarget.java:122)
          at org.jboss.weld.core@3.1.6.Final//org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:174)
          at org.jboss.weld.core@3.1.6.Final//org.jboss.weld.contexts.AbstractContext.get(AbstractContext.java:96)
          at org.jboss.weld.core@3.1.6.Final//org.jboss.weld.bean.ContextualInstanceStrategy$DefaultContextualInstanceStrategy.get(ContextualInstanceStrategy.java:100)
          at org.jboss.weld.core@3.1.6.Final//org.jboss.weld.bean.ContextualInstanceStrategy$ApplicationScopedContextualInstanceStrategy.get(ContextualInstanceStrategy.java:140)
          at org.jboss.weld.core@3.1.6.Final//org.jboss.weld.bean.ContextualInstance.get(ContextualInstance.java:50)
          at org.jboss.weld.core@3.1.6.Final//org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:102)
          at org.jboss.weld.core@3.1.6.Final//org.jboss.weld.bean.proxy.ProxyMethodHandler.getInstance(ProxyMethodHandler.java:131)
          at deployment.compiler.war//org.guvnor.structure.backend.repositories.LoadReposOnAppInit$Proxy$_$$_WeldClientProxy.toString(Unknown Source)
          at deployment.compiler.war//org.uberfire.backend.server.cdi.SystemConfigProducer.runPostConstruct(SystemConfigProducer.java:196)
          at deployment.compiler.war//org.uberfire.backend.server.cdi.SystemConfigProducer.afterDeploymentValidation(SystemConfigProducer.java:181)
          at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
          at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.base/java.lang.reflect.Method.invoke(Method.java:566)
          at org.jboss.weld.core@3.1.6.Final//org.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:95)
          at org.jboss.weld.core@3.1.6.Final//org.jboss.weld.injection.MethodInvocationStrategy$SpecialParamPlusBeanManagerStrategy.invoke(MethodInvocationStrategy.java:187)
          at org.jboss.weld.core@3.1.6.Final//org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:330)
          at org.jboss.weld.core@3.1.6.Final//org.jboss.weld.event.ExtensionObserverMethodImpl.sendEvent(ExtensionObserverMethodImpl.java:123)
          at org.jboss.weld.core@3.1.6.Final//org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:308)
          at org.jboss.weld.core@3.1.6.Final//org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:286)
          at javax.enterprise.api//javax.enterprise.inject.spi.ObserverMethod.notify(ObserverMethod.java:124)
          at org.jboss.weld.core@3.1.6.Final//org.jboss.weld.util.Observers.notify(Observers.java:166)
          at org.jboss.weld.core@3.1.6.Final//org.jboss.weld.event.ObserverNotifier.notifySyncObservers(ObserverNotifier.java:285)
          at org.jboss.weld.core@3.1.6.Final//org.jboss.weld.event.ObserverNotifier.notify(ObserverNotifier.java:273)
          at org.jboss.weld.core@3.1.6.Final//org.jboss.weld.event.ObserverNotifier.fireEvent(ObserverNotifier.java:177)
          at org.jboss.weld.core@3.1.6.Final//org.jboss.weld.event.ObserverNotifier.fireEvent(ObserverNotifier.java:171)
          at org.jboss.weld.core@3.1.6.Final//org.jboss.weld.bootstrap.events.AbstractContainerEvent.fire(AbstractContainerEvent.java:53)
          at org.jboss.weld.core@3.1.6.Final//org.jboss.weld.bootstrap.events.AbstractDeploymentContainerEvent.fire(AbstractDeploymentContainerEvent.java:35)
          ... 12 more
      Caused by: java.lang.reflect.InvocationTargetException
          at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
          at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.base/java.lang.reflect.Method.invoke(Method.java:566)
          at org.jboss.weld.core@3.1.6.Final//org.jboss.weld.injection.producer.DefaultLifecycleCallbackInvoker.invokeMethods(DefaultLifecycleCallbackInvoker.java:83)
          ... 42 more
      Caused by: java.lang.NullPointerException
          at deployment.compiler.war//org.uberfire.java.nio.file.api.FileSystemProviders.getDefaultProvider(FileSystemProviders.java:101)
          at deployment.compiler.war//org.uberfire.java.nio.file.api.FileSystemUtils.isGitDefaultFileSystem(FileSystemUtils.java:48)
          at deployment.compiler.war//org.guvnor.structure.backend.repositories.LoadReposOnAppInit.isGitDefaultFileSystem(LoadReposOnAppInit.java:58)
          at deployment.compiler.war//org.guvnor.structure.backend.repositories.LoadReposOnAppInit.execute(LoadReposOnAppInit.java:50)
          ... 47 more
      
      11:53:16,401 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 1) WFLYCTL0013: Operation ("add") failed - address: ([("deployment" => "compiler.war")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"compiler.war\".WeldStartService" => "Failed to start service
          Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-000049: Unable to invoke public void org.guvnor.structure.backend.repositories.LoadReposOnAppInit.execute() on org.guvnor.structure.backend.repositories.LoadReposOnAppInit@28de28c1
          Caused by: org.jboss.weld.exceptions.WeldException: WELD-000049: Unable to invoke public void org.guvnor.structure.backend.repositories.LoadReposOnAppInit.execute() on org.guvnor.structure.backend.repositories.LoadReposOnAppInit@28de28c1
          Caused by: java.lang.reflect.InvocationTargetException
          Caused by: java.lang.NullPointerException"}}
      11:53:16,403 ERROR [org.jboss.as.server] (management-handler-thread - 1) WFLYSRV0021: Deploy of deployment "compiler.war" was rolled back with the following failure message: 
      {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"compiler.war\".WeldStartService" => "Failed to start service
          Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-000049: Unable to invoke public void org.guvnor.structure.backend.repositories.LoadReposOnAppInit.execute() on org.guvnor.structure.backend.repositories.LoadReposOnAppInit@28de28c1
          Caused by: org.jboss.weld.exceptions.WeldException: WELD-000049: Unable to invoke public void org.guvnor.structure.backend.repositories.LoadReposOnAppInit.execute() on org.guvnor.structure.backend.repositories.LoadReposOnAppInit@28de28c1
          Caused by: java.lang.reflect.InvocationTargetException
          Caused by: java.lang.NullPointerException"}}
      

              bstansbe@redhat.com Brian Stansberry
              mnovotny@redhat.com Marek Novotny
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: