Jenkins Startup error

92 views
Skip to first unread message

Karthikeyan S

unread,
Apr 4, 2012, 5:33:20 AM4/4/12
to jenkins...@googlegroups.com
Today, I installed jenkins in new server. After installation, while trying to start it, notice below error

    <Snip>
 
          Starting Jenkins Jenkins requires Java5 or later, but you are running 1.4.2 from /usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre
java.lang.UnsupportedClassVersionError: 48.0
   at Main.main(Main.java:90)
   
  </Snip>

I have set the java home to point new JDK. For instance, echo $JAVA_HOME provides the output as /Path/to/jdk1.6.0_31. I searched with the error in google and one of them suggested to use update-alternatives. Since i am not clear, could you please help me to resolve this issue.


Regards,
Karthik

Jan Seidel

unread,
Apr 4, 2012, 6:45:35 AM4/4/12
to Jenkins Users
Hi,

I am a bloody *nix n00b but something jumped me instantly.

Is the server running in the same environment as the JDK?
e.g. do you have a java_home output of /Path/to/jdk1.6.0_31 as system
or user context?
And does the Jenkins server run in the same context?
It makes no sense to have a correct java_home as user and an old java
version in system context if Jenkins is started by the system and not
the user. That would always result in a wrong java version ;)

Take care
Jan

Karthikeyan S

unread,
Apr 4, 2012, 6:49:48 AM4/4/12
to jenkins...@googlegroups.com
Hi Jan,
    While you posted the reply, I figured it out myself. It appears, jenkins is trying to find the java that came along with the OS. Since the new version of JDK was a bin directory downloaded from Oracle site, jenkins recognize this by default. So, I looked in the file /etc/sysconfig/jenkins and added jdk 1.6 path  for the variable  JENKINS_JAVA_CMD.

      It resolved.

Regards,
Karthik

Les Mikesell

unread,
Apr 4, 2012, 8:55:37 AM4/4/12
to jenkins...@googlegroups.com
On Wed, Apr 4, 2012 at 5:49 AM, Karthikeyan S <karth...@gmail.com> wrote:
> Hi Jan,
>     While you posted the reply, I figured it out myself. It appears, jenkins
> is trying to find the java that came along with the OS. Since the new
> version of JDK was a bin directory downloaded from Oracle site, jenkins
> recognize this by default. So, I looked in the file /etc/sysconfig/jenkins
> and added jdk 1.6 path  for the variable  JENKINS_JAVA_CMD.
>

If the OS is RHEL/CentOS 5 or 6, you could have used:
yum install java-1.6.0-openjdk
to get a stock version that works fine with jenkins. This also sets
up the OS 'alternatives' (a system of symlinks) to make it the default
jave in PATH. That advantage of this approach is that subsequent 'yum
update's take care of all security/bug fixes where with non-stock
programs you have to keep checking for those yourself.

--
Les Mikesell
lesmi...@gmail.com

V A

unread,
Feb 23, 2017, 12:08:18 PM2/23/17
to Jenkins Users
Hey karthik,
 Do you have any documentation regarding the installation of  jenkins in new server .
Thanks
Reply all
Reply to author
Forward
0 new messages