Jenkins - BuildSources Fails CommandLine

Two Stars

Jenkins - BuildSources Fails CommandLine

Following the instructions to setup a Jenkins BuildSources job as outlined in the best practices guide


The job is successfully hooked up to our GitHub repo, but upon running it fails with a NoClassDefFoundError. 



java.lang.NoClassDefFoundError: org/talend/commandline/client/util/ConsoleUtil

Output from Jenkins console:




[INFO] Scanning for projects...
[INFO] ----------------------< org.talend:buildsources >-----------------------
[INFO] Building buildsources 4.6.1
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] --- ci.builder:6.4.1:local-generate (default-cli) @ buildsources ---
[INFO] *****************************************************
[INFO] List projects from:/opt/talend/talend-6.4.1/cmdline/studio/commandline-workspace/
[INFO]   Not valid folder (no talend project) in:.JETEmitters
[INFO]   Not valid folder (no talend project) in:.Java
[INFO]   Not valid folder (no talend project) in:.metadata
[INFO]   Not valid folder (no talend project) in:.repositories
[INFO] Creating the detected projects for Commandline workspace.
[INFO]  Setting property: classpath.resource.loader.class => 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
[INFO]  Setting property: velocimacro.messages.on => 'false'.
[INFO]  Setting property: resource.loader => 'classpath'.
[INFO]  Setting property: resource.manager.logwhenfound => 'false'.
[ERROR] Exception in thread "Thread-3" java.lang.NoClassDefFoundError: org/talend/commandline/client/util/ConsoleUtil
[ERROR]     at org.talend.commandline.CommandLineApplication$
[ERROR] Caused by: java.lang.ClassNotFoundException: org.talend.commandline.client.util.ConsoleUtil cannot be found by org.talend.commandline_6.4.1.20170623_1246
[ERROR]     at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(
[ERROR]     at org.eclipse.osgi.internal.loader.BundleLoader.findClass(
[ERROR]     at org.eclipse.osgi.internal.loader.BundleLoader.findClass(
[ERROR]     at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(
[ERROR]     at java.lang.ClassLoader.loadClass(
[ERROR]     ... 1 more



Where do I find this missing class?


Re: Jenkins - BuildSources Fails CommandLine


Here is a related jira issue:

Could you please have a look at comments to see if your projects are checked out inside the workspace?

Best regards



Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.

Re: Jenkins - BuildSources Fails CommandLine

Please make sure you have a dedicated commandline for CI purposes.