Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-70559

ClassNotFoundException using ssh git repository in blue ocean Pipeline editor

XMLWordPrintable

      Trying to set up blue ocean pipeline with git repo in format `git@host:user/repo.git` throws exception and the flow gets stuck.

      Could be related to JENKINS-70379.

      I am running latest jenkins version (2.389) through docker and latest blueocean plugin (1.27.1) installed through plugins.txt

       

      There are actually two different exceptions.

      1. Exception when I just paste in the repo address and javascript automatically triggers some background action.
      2. Different exception (different class not found) when I click on the "Create pipeline" button

       

      I used find to look for `jsch*` in file system, and it is not there when installing blueocean plugin. I tried adding jsch to plugin list manually (even though you are not supposed to) and it did not help either.

       

      Exception 1:

       

      2023-02-03 18:48:43.482+0000 [id=25]    WARNING    o.e.j.s.h.ContextHandler$Context#log: Error while serving http://localhost:8080/blue/rest/organizations/jenkins/user/publickey/
       java.lang.NoClassDefFoundError: com/jcraft/jsch/JSch
           at io.jenkins.blueocean.ssh.SSHKeyUtils.generateKey(SSHKeyUtils.java:49)
      

       

      Exception 2:

      2023-02-03 18:48:58.576+0000 [id=72] WARNING o.e.j.s.h.ContextHandler$Context#log: Error while serving http://localhost:8080/blue/rest/organizations/jenkins/pipelines/
      java.lang.ClassNotFoundException: org.eclipse.jgit.transport.ssh.jsch.JschConfigSessionFactory
       at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:476)
       at jenkins.util.URLClassLoader2.findClass(URLClassLoader2.java:35)
       at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
       at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
      Caused: java.lang.NoClassDefFoundError: org/eclipse/jgit/transport/ssh/jsch/JschConfigSessionFactory
       at java.base/java.lang.ClassLoader.defineClass1(Native Method)
       at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
       at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
       at java.base/java.net.URLClassLoader.defineClass(URLClassLoader.java:555)
       at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:458)
       at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:452)
       at java.base/java.security.AccessController.doPrivileged(Native Method)
       at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:451)
       at jenkins.util.URLClassLoader2.findClass(URLClassLoader2.java:35)
       at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
       at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
       at io.jenkins.blueocean.blueocean_git_pipeline.GitPipelineCreateRequest.validate(GitPipelineCreateRequest.java:64)

            Unassigned Unassigned
            janhouse Janis
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: