I have read through the documentation on the jenkins page as well as a few other message boards and they all seem to provide their tutorials using Tomcat (ewwww)!!!. My task is to provide Jenkins as a stand alone service for maintainability reasons. So far I have set HUDSONHOME, CLASSPATH, and JAVA_HOME. My version of java is
java version "1.6.0_20"
OpenJDK Runtime Environment (IcedTea6 1.9.7) (rhel-1.39.1.9.7.el6-x86_64)
OpenJDK 64-Bit Server VM (build 19.0-b09, mixed mode)
and I have a script in /etc/profile.d that does the following:
JAVA_HOME=/usr/java;
JRE_HOME=/usr/java/jre/bin;
if [ "${CLASSPATH}" == "" ]; then
CLASSPATH=/var/lib/jenkins/war/WEB-INF;
HUDSON_HOME=/var/lib/jenkins/war/WEB-INF;
else
CLASSPATH=${CLASSPATH}:/var/lib/jenkins/war/WEB-INF;
HUDSON_HOME=/var/lib/jenkins/war/WEB-INF;
fi
PATH=${PATH}:${JAVA_HOME}/bin:/opt/StarTeamCP_2009/bin:/opt/QtSDK/Desktop/Qt/474/gcc/bin:/opt/QtSDK/QtCreator/bin/:${CLASSPATH}:${HUDSON_HOME};
export JAVA_HOME;
export PATH;
export CLASPATH;
Looking in /etc/passwd, Jenkins default shell is bash so no need for a csh version of the script. As a user I can login as all variables are set correctly. I installed the Jenkins RPM from their homepage RPM link.
The error I am getting from Jenkins output window is:
FATAL: com/starbase/starteam/Folder
java.lang.NoClassDefFoundError: com/starbase/starteam/Folder
at hudson.plugins.starteam.StarTeamSCM.checkout(StarTeamSCM.java:127)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1195)
at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:576)
at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:465)
at hudson.model.Run.run(Run.java:1404)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:238)
Caused by: java.lang.ClassNotFoundException: com.starbase.starteam.Folder
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
... 8 more
What am I missing?
As for your "class not found" exception, you're pulling in libraries that aren't part of Tomcat or Jenkins, and they apparently depend on items that are also not in Tomcat or Jenkins. This leads to the question, "Why are you populating your environment with borland libraries if you want to run a non-borland application?"
In response to this, I am using the Starteam Plugin as part of Jenkins. Jenkins needs to know the definitions of the StarTeam classes contained within Borlands .jar files.