Bug 1237226

Summary: Caused by: java.lang.ClassNotFoundException: hudson.remoting.Callable
Product: [Fedora] Fedora Reporter: James Patterson <jamespatterson>
Component: jenkinsAssignee: Michal Srb <msrb>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 22CC: java-sig-commits, mizdebsk, msrb
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-19 15:07:57 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description James Patterson 2015-06-30 14:47:48 UTC
Description of problem:
jenkins seems broken out of the box with a missing class error.

$ cd /usr/share/jenkins/webroot/WEB-INF/lib

$ java -jar jenkins-core-1.609.jar 
Exception in thread "main" java.lang.NoClassDefFoundError: hudson/remoting/Callable
	at hudson.Main.getHudsonHome(Main.java:77)
	at hudson.Main.run(Main.java:63)
	at hudson.Main.main(Main.java:55)
Caused by: java.lang.ClassNotFoundException: hudson.remoting.Callable
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 3 more

That missing class is provided by remoting.jar in the same directory.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Mikolaj Izdebski 2015-06-30 14:56:43 UTC
(In reply to James Patterson from comment #0)
> $ java -jar jenkins-core-1.609.jar 

Running Jenkins this way is not supported in Fedora.

The recommended way to run Jenkins is using systemd:
  systemctl start jenkins
  systemctl stop jenkins

Comment 2 James Patterson 2015-06-30 15:00:11 UTC
The above is not my problem, it's the reproducer for the actual bug: monitoring external jobs is not possible.

Docs: https://wiki.jenkins-ci.org/display/JENKINS/Monitoring+external+jobs
See "Monitoring an execution"

Seems it's broken on Fedora.

Comment 3 Mikolaj Izdebski 2015-06-30 15:08:05 UTC
Then please describe the actual problem you are having.

Comment 4 James Patterson 2015-06-30 16:37:38 UTC
Using any combination of the jenkins-core*jar files, I always get the traceback from comment 1 while running the command for monitoring an execution from the jenkins wiki, i.e.

$ sudo updatedb
$ locate jenkins-core|grep jar$

For each of those results, I run:

$ export JENKINS_HOME=http://user:pw@myserver.acme.org/path/to/jenkins/
$ java -jar foundpathandfile.jar "job name" <program arg1 arg2...>

then the traceback from comment 1.

Comment 5 James Patterson 2015-06-30 16:38:05 UTC
s/combination//;

Comment 6 Mikolaj Izdebski 2015-06-30 19:04:32 UTC
Running Jenkins JAR directly is not supported in Fedora, but I think we can add a script for this purpose. Michal, do you agree?

Comment 7 Michal Srb 2015-07-01 07:44:18 UTC
Hi James,

thanks for the bug report. The problem is caused by missing Class-Path entry in MANIFEST.MF of our jenkins-core.jar. Having Class-Path in MANIFEST.MF is banned by packaging guidelines in Fedora. It's a bit unfortunate, but as Mikolaj suggested, we can add script for this purpose.

Comment 8 James Patterson 2015-07-02 06:26:28 UTC
That sounds great. Would it be possible to get a copy of this script to test?

Comment 9 Michal Srb 2015-07-02 06:32:18 UTC
I will prepare it later today/tomorrow and push it as an update for Fedora 22. It will be available for testing via fedora-updates-testing repository, or directly downloadable from http://koji.fedoraproject.org/koji/.

Comment 10 Fedora End Of Life 2016-07-19 15:07:57 UTC
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.