TWiki> EGEE Web>SA3>EGEEIntegration>GLite31JPackage (revision 10)EditAttachPDF

Use of JPackage for gLite 3.1 Release

There is standing target that JPackage rpms should be used where ever possible to supply java code within the gLite 3.1 release.

In particular the following software combination should be used.

Use of these repositories implies the following versions of relevant software are used.

  • tomcat - tomcat5-5.5.23-7jpp.noarch.rpm
  • axis - axis-1.4-2jpp.noarch.rpm
However as JPackage is updated so these packages will follow their updates of course.

Jpackage Setup

The configuration of jpackage is documented by jpackage but below is summary that includes EGEE/gLite particulars.

Configuration of YUM or APT for JPackage.

  • A yum configuration file should be created, say /etc/yum.repos.d/jpackage5.0.repo.
  • A apt configuration file should be created, say /etc/apt/sources.list.

name=JPackage 1.7, generic

name=JPackage 1.7, generic non-free

name=JPackage 5, generic

name=JPackage 5, generic non-free

Please someone who uses apt improve this section.
rpm     [JPackage] 1.7/generic free
rpm     [JPackage] 5.0/generic free
rpm     [JPackage] 1.7/generic non-free
rpm     [JPackage] 5.0/generic non-free

If at CERN you may wish to use instead of

Installation of GPG Key.

Install the gpg key ideally.
 rpm --import

Install JPackage Utils

The jpackage-utils package is supplied within the OS release of RHEL, SL, SLC or Debian and should be installed.
 yum install jpackage-utils

Installation of SUN's JDK 1.5.0.

There are three options for completing this, 2 of them very similar.

  • Option 1a Take SUN's binary tar ball jdk-1_5_0_12-linux-i586.bin and JPackage's .nosrc packages to build a JPackage's version of the RPM.
  • Option 1b If you are inside CERN on an SL*C*4 box then the packages are already available.
    • If acceptable to you one of these is the recommended solution as it avoids the problems with SUN's RPM.
  • Option 2 Take SUN's RPM jdk-1_5_0_12-linux-i586.rpm.bin
    • This may be consistent with what you already have but there are problems due to some imprecise properties that this RPM provides in its spec file which creates problems when using with jpackage.

Unless following the CERN only recipe download jdk-1_5_0_12-linux-i586.rpm.bin or jdk-1_5_0_12-linux-i586.bin from SUN's web pages. Once on this page Sun calls this version JDK 5.0 Update 12.

Option 1a: Installing JPackage's RPM of JDK.

This is described on JPackage's nosrc page. The process is as follows and can be run as a non-root user.

$ mkdir -p ~/redhat/BUILD ~/redhat/SOURCES ~/redhat/SPECS ~/redhat/RPMS/i586 ~/redhat/SRPMS
$ cat <<EOF > ~/.rpmmacros
%_topdir    $HOME/redhat
%packager       Firstname Lastname <>
$  rpm -Uvh
$ mv jdk-1_5_0_12-linux-i586.bin ~/redhat/SOURCES/.
$ rpmbuild -ba ~/redhat/SPECS/java-1.5.0-sun.spec
# rpm -Uvh ~/redhat/RPMS/i586/java-1.5.0-sun-
# rpm -Uvh ~/redhat/RPMS/i586/java-1.5.0-sun-devel-

You can just put these packages in a local yum or apt repository and then install them in the normal way. This is what CERN does effectively to offer solution 1b.

Option 1b: Installing JPackage's RPM of JDK if inside CERN.

Note that if using slC4 and inside CERN's network you can just issue.
# yum --enablerepo slc4-cernonly install java-1.5.0-sun java-1.5.0-sun-devel

Option 2: Installing SUN's RPM of JDK

Using the SUN's JDK package creates a headache though it can be used if care is taken. In particular tomcat5 requires the package xml-commons-jaxp-1.3-apis however this package is configured to Obsolete within RPM the property xml-commons-apis which is provided by SUN's JDK. The consequence is that installing xml-commons-apis removes SUN's JDK from your system! More details are here, there, else where and over there.

# yum install xml-commons-jaxp-1.3-apis
If you had SUN's JDK installed it will have just been removed!
# rpm -Uvh jdk-1_5_0_12-linux-i586.rpm
# yum install java-1.5.0-sun-compat

Note that when ever xml-commons-jaxp-1.3-apis is upgraded you risk removing SUN's JDK. Please consider using the JPackage RPM of JDK.

Continue to Install Packages,

It should now work to install furthur JPackage packages or gLite meta-packages. e.g one of the following.
# yum install glite-CE
#  yaim -i -s <location of site-info.def> -m <meta-package name>
Note that if you plan to install a service requiring tomcat e.g. MON box they be aware of the tomcat user issue below.

Install tomcat

One thing to be aware of is that tomcat package adds a tomcat user with the following in its spec file.
/usr/sbin/groupadd -g 91 -r tomcat 2> /dev/null || :
/usr/sbin/useradd -c "Apache Tomcat" -u 91 -g tomcat \
    -s /bin/sh -r -d /usr/share/tomcat5 tomcat 2> /dev/null || :

So this adds in a username/groupname tomcat/tomcat with uid/gid 91/91. If you already have a user called tomcat then you have nothing to do and everything will be okay, it does not matter what the uid/gid of this existing tomcat user is. However if you already have a username or group with uid or gid 91 but a different username, e.g. tomcat4 then you have a problem that needs correcting before you install the tomcat.

You can do one of the following.

  • Add a tomcat user with a different uid/gid. Run the commands above but with a number differing from 91.
  • Delete the existing user (tomcat4) and group (tomcat4). userdel tomcat4 && groupdel tomcat4. The RPM will then add the tomcat user.
  • Modify the existing user tomcat4 to tomcat. usermod -l tomcat tomcat && groupmod -n tomcat tomcat4

# yum install tomcat5
# yum install glite-MON

If you see an error message when tomcat5 is installed or started:

/usr/bin/build-jar-repository: error: Could not find xml-commons-apis Java extension for this JVM
/usr/bin/build-jar-repository: error: Some specified jars were not found for this jvm
Then you have opted to use SUN's JDK and have installed xml-commons-apis and SUN's JDK in the wrong order. Install xml-commons-apis and then reinstall SUN's JDK. Avoid this completely using JPackage's JDK package.

Last page update: SteveTraylen - 2007-09-21

Edit | Attach | Watch | Print version | History: r19 | r12 < r11 < r10 < r9 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r10 - 2007-09-21 - SteveTraylen
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    EGEE All webs login

This site is powered by the TWiki collaboration platform Powered by Perl This site is powered by the TWiki collaboration platformCopyright & by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Ask a support question or Send feedback