SCIENTIFIC-LINUX-USERS Archives

May 2007

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Troy Dawson <[log in to unmask]>
Reply To:
Troy Dawson <[log in to unmask]>
Date:
Tue, 15 May 2007 12:07:26 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (531 lines)
Hi,
First off, thank you for the information and letting us know how you got 
it installed.

I would like to have tomcat5 work correctly out of the box with SL5.  I 
am not a tomcat user, so to me, it appeared to work.

What would it take for us to have tomcat5 work out of the box so that 
users don't have to use the jpackage repository?
(Not that I'm against jpackage, but what's the use of having something 
in the distribution if it doesn't work.)

I know Steve said to have java packaged the jpackage way instead of just 
the one big jdk rpm.  I can do that, have done that, have it ready. 
That was something I was debating on before we released, which way to 
release it, and in the end, I picked the one big rpm because that was 
the way we had always done it.  If there is a real reason we need to 
switch, I'll see what I can do.

Do I need to recompile tomcat5 with the sun java?  What about jakarta?
Since there is an errata for tomcat5 right now, this isn't much of a 
problem, we have to recompile it anyway.  Now would be the time.

Troy

Alessio Curri wrote:
> Steve Traylen wrote:
>>
>> On May 8, 2007, at 8:08 PM, Alessio Curri wrote:
>>
>>> Hi Steve,
>>> thank you for your reply,
>>> my comments follow below
>>>
>>>
>>> Steve Traylen wrote:
>>>>
>>>> On May 8, 2007, at 3:49 PM, Alessio Curri wrote:
>>>>
>>>>> Hi,
>>>>> I'm testing the new SL5 (i'm using the i386-RC2) and I tried to 
>>>>> install tomcat5 ("yum install tomcat5").
>>>>> The resulted installation is broken (tomcat won't start out of the 
>>>>> box, and there are both sun and gcj jvm). I think the problem is 
>>>>> related to the java-sun-compat and the related sun jdk inclusion in 
>>>>> the SL5.
>>>>>
>>>>>
>>>>> After a complete reinstall, I tried to install tomcat5, but this 
>>>>> time excluding the sun-related packages ("yum install 
>>>>> --exclude=java-1.5.0-sun-compat --exclude=jdk tomcat5").
>>>>> It worked fine. Tomcat start and run fine, but of course with 
>>>>> java-1.4.2-gcj jvm.
>>>>>
>>>>> The last try involved directly jpacked.org yum repos (after another 
>>>>> complete reinstall).
>>>>> After installing the java-1.5.0-sun-compat and the 
>>>>> jta-1.0.1-0.b.4jpp.noarch.rpm, I used yum forcing not to use the sl 
>>>>> repo ("yum install tomcat5-webapps xml-commons\* 
>>>>> --disablerepo=sl-\*").
>>>>> Yum installed the tomcat5 (from jpackage repos). This version used 
>>>>> correctly the sun jvm, as I wish. But at the first "yum update", 
>>>>> the jpackage tomcat5 is replaced with the "SL" one .
>>>>>
>>>>> How can I install a tomcat5 that use the sun jvm using yum (and\or 
>>>>> rpms)?
>>>>>
>>>>> Thanks in advance,
>>>>> Alessio
>>>>
>>>>
>>>> Alessio,
>>>>
>>>>   You are in luck I've just written up this very topic:
>>>>
>>>>    https://twiki.cern.ch/twiki/bin/view/EGEE/GLite31JPackage
>>>>
>>>>    One of the solutions there is to install jpackage's tomcat5 with 
>>>> sun's JDK but you have to take care when you
>>>>    do so. In particular tomcat5 requires xml-commons-jaxp-1.3-apis 
>>>> but this package obsoletes "xml-commons-apis"
>>>>    which has the result of removing SUN's JDK since this provides 
>>>> xml-commons-apis.
>>>>
>>>>    In short you must enable the jpackage repositories, install 
>>>> xml-commons-apis followed by SUN's JDK and
>>>>    then java-1.5.0-sun-compat.
>>>>
>>>>    After this a simple
>>>>
>>>>    yum install tomcat5
>>>>
>>>>    will then work.
>>>>
>>>>     I would recommend however that you use jpackage's rebuild of JDK 
>>>> rather than SUN's rpm, it avoids all
>>>>     the headaches above.
>>>>
>>>>    In fact I was considering requesting asking SL to distribute the 
>>>> jpackage rebuilds of JDK rather than SUN's
>>>>    JDK since they are better and avoid this problem.
>>>>
>>>>    Note I've never tried this on SL5 but it should work as you hit 
>>>> the same problems as I observed on SL4.
>>>>
>>>>     Steve
>>>>
>>>>>
>>>>>
>>>>> -- Alessio Curri +39 040 375 8064 Software for Measurement Group 
>>>>> Experiments Division Sincrotrone Trieste S.c.p.A. S.S. 14 Km 163.5, 
>>>>> in Area Science Park 34012 Basovizza - Trieste 
>>>>> (Italy)<alessio.curri.vcf>
>>>>
>>>> --Steve Traylen
>>>> [log in to unmask]
>>>> CERN, IT-GD-OPS.
>>>>
>>>>
>>>>
>>>
>>> I tried to follow the howto you provided me,
>>> but it doesn't work.
>>> I think this is due to the inclusion of the "redhat" tomcat (and 
>>> related dependencies, included the java-1.4.2-gcj-compat _and_ the 
>>> sl-base java-1.5.0-compat)
>>> in the "base" repository.
>>>
>>> In fact I build the rpm as the howto said (using the not sun-rpm way) 
>>> and then installed with yum (simple yum install tomcat5) but the 
>>> result was the same as installing with yum out of the box with a 
>>> fresh SL5
>>>
>>> I made a second try (reinstalling the whole machine) excluding the 
>>> sl-base repo from the dependence  resolution (yum install tomcat5 
>>> --disablerepo=sl-\*).
>>> The result was that tomcat was installed correctly, but the next 
>>> update (enabling the sl-base repo, of course) the tomcat was replaced 
>>> by the redhat version.
>>>
>>> I have some SL4 installation working (fine...) with tomcat5 and sun 
>>> java (picked by yum...).
>>> Now I want to move to SL5 (there are some really interesting think, 
>>> like the "integrated" xen, new kernel and so on).
>>>
>>> I see 2 different kind of solution:
>>>
>>> 1) Tell yum (i don't know how...) to pick some packages (and related 
>>> dependencies) to a specific repository (even if there are a newer 
>>> version is in another repository).
>>>
>>> 2) Moved tomcat (and other programs) to a separate repos.
>>>
>>> I don't now if the point above are realistic.
>>>
>>> Below I attach the yum log (related to the last attempt)
>>> I made several attempts, and i have the logs of the installations 
>>> (so, if anybody wants them, mail me)
>>>
>>>
>>> Any comment / hint / proposal is most appreciated
>>>
>>
>>
>> So to summarise  what happens if you clean the box up
>>
>> # rpm -e jdk  `rpm -qa | grep jpp`
>>
>> and then using the SL repos without jpackage
>>
>> # yum install xml-commons-apis
>>
>> # yum install jdk
>>
>> # yum install java-1.5.0-sun-compat tomcat5
>>
>>   Steve
>>
>>
>>
>>>
>>>
>>> Alessio Curri
>>> <alessio.curri.vcf>
>>
>> --Steve Traylen
>> [log in to unmask]
>> CERN, IT-GD-OPS.
>>
>>
>>
> Hi Steve,
> 
> sorry for the late answer.
> 
> I tried what you told me to do.
> When I install the xml-commons-apis (fresh installation, without any 
> jdk/gcj and only sl* yum repos enabled),
> yum give me this dependence resolution:
> 
> 
> ============================================================================= 
> 
> Package                 Arch       Version          Repository        Size
> ============================================================================= 
> 
> Installing:
> xml-commons-apis        i386       1.3.02-0.b2.7jpp.10  
> sl-base           334 k
> Installing for dependencies:
> antlr                   i386       2.7.6-4jpp.2     sl-base           978 k
> gjdoc                   i386       0.7.7-12.el5     sl-base           793 k
> java-1.4.2-gcj-compat   i386       1.4.2.0-40jpp.112  sl-base            
> 28 k
> jpackage-utils          noarch     1.7.3-1jpp.2.el5  sl-base            
> 61 k
> libXtst                 i386       1.0.1-3.1        sl-base            15 k
> libgcj                  i386       4.1.1-52.el5.2   sl-base            17 M
> xml-commons             i386       1.3.02-0.b2.7jpp.10  
> sl-base            19 k
> 
> Here is the resolution of  "yum install java-1.5.0-sun-compat tomcat5" 
> (jdk already installed)
> 
> ============================================================================= 
> 
> Package                 Arch       Version          Repository        Size
> ============================================================================= 
> 
> Installing:
> java-1.5.0-sun-compat   noarch     1.5.0.11-1jpp    sl-base            58 k
> tomcat5                 i386       5.5.17-8jpp.2    sl-base           317 k
> Installing for dependencies:
> ant                     i386       1.6.5-2jpp.2     sl-base           2.0 M
> axis                    i386       1.2.1-2jpp.6     sl-base           3.1 M
> bcel                    i386       5.1-8jpp.1       sl-base           995 k
> chkfontpath             i386       1.10.1-1.1       sl-base            15 k
> classpathx-jaf          i386       1.0-9jpp.1       sl-base           101 k
> classpathx-mail         i386       1.1.1-4jpp.2     sl-base           1.1 M
> eclipse-ecj             i386       1:3.2.1-18.el5   sl-base           7.9 M
> geronimo-specs          i386       1.0-0.M2.2jpp.12  sl-base           
> 231 k
> geronimo-specs-compat   i386       1.0-0.M2.2jpp.12  sl-base           
> 5.4 k
> jakarta-commons-beanutils  i386       1.7.0-5jpp.1     sl-base           
> 524 k
> jakarta-commons-collections  i386       3.1-6jpp.1       
> sl-base           1.0 M
> jakarta-commons-daemon  i386       1:1.0.1-6jpp.1   sl-base            44 k
> jakarta-commons-dbcp    i386       1.2.1-7jpp.1     sl-base           241 k
> jakarta-commons-digester  i386       1.7-5jpp.1       sl-base           
> 313 k
> jakarta-commons-discovery  i386       1:0.3-4jpp.1     sl-base           
> 133 k
> jakarta-commons-el      i386       1.0-7jpp.1       sl-base           240 k
> jakarta-commons-fileupload  i386       1:1.0-6jpp.1     
> sl-base            48 k
> jakarta-commons-httpclient  i386       1:3.0-7jpp.1     
> sl-base           513 k
> jakarta-commons-launcher  i386       0.9-6jpp.1       sl-base            
> 87 k
> jakarta-commons-logging  i386       1.0.4-6jpp.1     sl-base           
> 105 k
> jakarta-commons-modeler  i386       1.1-8jpp.1       sl-base           
> 229 k
> jakarta-commons-pool    i386       1.3-5jpp.1       sl-base           127 k
> libFS                   i386       1.0.0-3.1        sl-base            30 k
> libXfont                i386       1.2.2-1.0.2.el5  sl-base           240 k
> libfontenc              i386       1.0.2-2.2.el5    sl-base            19 k
> log4j                   i386       1.2.13-3jpp.2    sl-base           634 k
> mx4j                    i386       1:3.0.1-6jpp.4   sl-base           2.5 M
> regexp                  i386       1.4-2jpp.2       sl-base            91 k
> tomcat5-common-lib      i386       5.5.17-8jpp.2    sl-base           195 k
> tomcat5-jasper          i386       5.5.17-8jpp.2    sl-base           979 k
> tomcat5-jsp-2.0-api     i386       5.5.17-8jpp.2    sl-base            92 k
> tomcat5-server-lib      i386       5.5.17-8jpp.2    sl-base           3.6 M
> tomcat5-servlet-2.4-api  i386       5.5.17-8jpp.2    sl-base           
> 147 k
> ttmkfdir                i386       3.0.9-23.el5     sl-base            46 k
> wsdl4j                  i386       1.5.2-4jpp.1     sl-base           385 k
> xalan-j2                i386       2.7.0-6jpp.1     sl-base           4.1 M
> xerces-j2               i386       2.7.1-7jpp.2     sl-base           2.7 M
> xml-commons-resolver    i386       1.1-1jpp.12      sl-base           148 k
> xorg-x11-font-utils     i386       1:7.1-2          sl-base            75 k
> xorg-x11-xfs            i386       1:1.0.2-3.1      sl-base            68 k
> 
> But the tomcat5 won't start at all...
> Here is the output from /var/log/tomcat5/catalina.out
> 
> sun.misc.InvalidJarIndexException: Invalid index
>        at 
> sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:769)
>        at 
> sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:682)
>        at sun.misc.URLClassPath.getResource(URLClassPath.java:161)
>        at java.net.URLClassLoader$1.run(URLClassLoader.java:192)
>        at java.security.AccessController.doPrivileged(Native Method)
>        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>        at java.lang.ClassLoader.defineClass1(Native Method)
>        at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
>        at 
> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
>        at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
>        at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
>        at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
>        at java.security.AccessController.doPrivileged(Native Method)
>        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>        at java.lang.ClassLoader.defineClass1(Native Method)
>        at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
>        at 
> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
>        at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
>        at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
>        at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
>        at java.security.AccessController.doPrivileged(Native Method)
>        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>        at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:222)
>        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)
> 
> 
> 
> 
> 
> 
> After some try/error/retry I found a way to install tomcat5 (starting 
> from the link you provided).
> Here are the steps I followed...
> 
> 1) Install SL5 (ks network based)
> 
> ------- ks.cfg ------
> url --url http://10.211.55.2/sl5
> install
> lang en_US.UTF-8
> keyboard us
> rootpw --iscrypted ***************
> firewall --disabled
> authconfig --enableshadow --enablemd5
> selinux --disabled
> timezone --utc Europe/Rome
> bootloader --location=mbr --driveorder=hda
> text
> network --bootproto=dhcp --noipv6 firstboot --disable
> clearpart --all --initlabel
> reboot
> autopart
> 
> %packages
> @base
> @core
> @editors
> @fuse
> @misc-sl
> @text-internet
> yum
> yum-conf
> gzip
> bzip2
> rpm-build
> firefox
> xorg-x11-xauth
> ------- ks.cfg ------
> 
> 2) yum update
> ...
> 
> 3) setup jpackage.org repo
> 
> ------ jpackage.repo -------
> [jpackage17-generic]
> name=JPackage 1.7, generic
> baseurl=http://mirrors.dotsrc.org/jpackage/1.7/generic/free/
> enabled=1
> protect=1
> 
> [jpackage17-generic-nonfree]
> name=JPackage 1.7, generic non-free
> baseurl=http://mirrors.dotsrc.org/jpackage/1.7/generic/non-free/
> enabled=1
> protect=1
> 
> [jpackage5-generic]
> name=JPackage 5, generic
> baseurl=http://mirrors.dotsrc.org/jpackage/5.0/generic/free/
> enabled=1
> protect=1
> 
> [jpackage5-generic-nonfree]
> name=JPackage 5, generic non-free
> baseurl=http://mirrors.dotsrc.org/jpackage/5.0/generic/non-free/
> enabled=1
> protect=1
> 
> ------ jpackage.repo ------
> 
> # rpm --import jpackage.asc
> # yum install jpackage-utils
> 
> *4) Exclude in sl*.repo all the java/tomcat/jpp related packages
> 
> **# cd /etc/yum.repos.d
> # for a in sl*; do echo "exclude=jdk tomcat* *jpp* *ecj*" >> $a; done*
> 
> 5) create and install the sun jdk howto (many thanks  Steve :) )
> 
> $ mkdir -p ~/redhat/BUILD ~/redhat/SOURCES ~/redhat/SPECS 
> ~/redhat/RPMS/i586 ~/redhat/SRPMS
> $ cat <<EOF > ~/.rpmmacros
> %_topdir    $HOME/redhat
> %packager       Firstname Lastname <[log in to unmask]>
> EOF
> $  rpm -Uvh 
> http://mirrors.dotsrc.org/jpackage/1.7/generic/non-free/SRPMS/java-1.5.0-sun-1.5.0.11-1jpp.nosrc.rpm 
> 
> $ mv jdk-1_5_0_11-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-1.5.0.11-1jpp.i586.rpm
> # rpm -Uvh ~/redhat/RPMS/i586/java-1.5.0-sun-devel-1.5.0.11-1jpp.i586.rpm
> 
> 
> 
> 
> 6) Finally install tomcat
> 
> # yum install tomcat5
> 
> [...]
> 
> Dependencies Resolved
> 
> ============================================================================= 
> 
> Package                 Arch       Version          Repository        Size
> ============================================================================= 
> 
> Installing:
> tomcat5                 noarch     5.5.23-9jpp      jpackage17-generic  
> 317 k
> Installing for dependencies:
> bcel                    noarch     5.1-10jpp        jpackage17-generic  
> 460 k
> classpathx-jaf          noarch     1.0-10jpp        jpackage17-generic   
> 58 k
> classpathx-mail         noarch     1.1.1-4jpp       jpackage17-generic  
> 757 k
> ecj                     noarch     3.2.2-3jpp       jpackage17-generic  
> 1.2 M
> jakarta-commons-beanutils  noarch     1.7.0-5jpp       
> jpackage17-generic  348 k
> jakarta-commons-collections  noarch     3.1-11jpp        
> jpackage17-generic  488 k
> jakarta-commons-collections-tomcat5  noarch     3.1-11jpp        
> jpackage17-generic   28 k
> jakarta-commons-daemon  noarch     1:1.0.1-6jpp     jpackage17-generic   
> 31 k
> jakarta-commons-dbcp-tomcat5  noarch     1.2.1-12jpp      
> jpackage17-generic   99 k
> jakarta-commons-digester  noarch     1.7-6jpp         
> jpackage17-generic  176 k
> jakarta-commons-el      noarch     1.0-7jpp         jpackage17-generic  
> 107 k
> jakarta-commons-launcher  noarch     1.1-3jpp         
> jpackage17-generic   48 k
> jakarta-commons-logging  noarch     1.1-2jpp         jpackage17-generic  
> 112 k
> jakarta-commons-modeler  noarch     2.0-4jpp         jpackage17-generic  
> 150 k
> jakarta-commons-pool-tomcat5  noarch     1.3-10jpp        
> jpackage17-generic   47 k
> log4j                   noarch     1.2.14-3jpp      jpackage17-generic  
> 347 k
> mx4j                    noarch     3.0.1-7jpp       jpackage17-generic  
> 1.6 M
> regexp                  noarch     1.4-3jpp         jpackage17-generic   
> 35 k
> saxon                   noarch     6.5.3-5jpp       jpackage17-generic  
> 417 k
> tomcat5-common-lib      noarch     5.5.23-9jpp      jpackage17-generic   
> 91 k
> tomcat5-jasper          noarch     5.5.23-9jpp      jpackage17-generic  
> 466 k
> tomcat5-jsp-2.0-api     noarch     5.5.23-9jpp      jpackage17-generic   
> 64 k
> tomcat5-server-lib      noarch     5.5.23-9jpp      jpackage17-generic  
> 1.5 M
> tomcat5-servlet-2.4-api  noarch     5.5.23-9jpp      jpackage17-generic  
> 110 k
> xerces-j2               noarch     2.7.1-9jpp       jpackage17-generic  
> 1.0 M
> xml-commons             noarch     1.3.03-10jpp     jpackage17-generic  
> 9.2 k
> xml-commons-jaxp-1.3-apis  noarch     1.3.03-10jpp     
> jpackage17-generic  167 k
> xml-commons-resolver11  noarch     1.3.03-10jpp     jpackage17-generic   
> 63 k
> 
> Transaction Summary
> ============================================================================= 
> 
> Install     29 Package(s)        Update       0 Package(s)        
> Remove       0 Package(s)       
> Total download size: 10 M
> Is this ok [y/N]:y
> 
> 
> 
> I don't know if this is the right way to proceed... but it works
> 
> 
> As my first post,  comments / proposals are most appreciated
> 
> 
> 
> 
> 


-- 
__________________________________________________
Troy Dawson  [log in to unmask]  (630)840-6468
Fermilab  ComputingDivision/LCSI/CSI DSS Group
__________________________________________________

ATOM RSS1 RSS2