Bug 148502

Summary: Broken links in tomcat5 package
Product: [openSUSE] SUSE Linux 10.1 Reporter: Forgotten User v5inq2MBSE <forgotten_v5inq2MBSE>
Component: JavaAssignee: Daniel Bornkessel <dbornkessel>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: jsmeix
Version: Beta 3   
Target Milestone: ---   
Hardware: i686   
OS: SuSE Linux 10.1   
Whiteboard:
Found By: Beta-Customer Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Forgotten User v5inq2MBSE 2006-02-06 20:25:49 UTC
linux:/usr/share/tomcat5/common/lib # ls -la | grep find
lrwxrwxrwx 1 root root     38 2006-02-04 18:38 [jdbc-stdext].jar -> /could/not/find/extension/for/this/jvm
lrwxrwxrwx 1 root root     38 2006-02-04 18:38 [jndi].jar -> /could/not/find/extension/for/this/jvm

Both links are broken, both links have no target, tomcat can not be started.
Comment 1 Daniel Bornkessel 2006-02-06 20:34:08 UTC
Hi Manfred.
Thanks for the bug report.
Could you tell me which java you are using? The best to do that is with:

rpm -qa | grep "java-"

Furthermore the output of

find /usr/lib/jvm-exports | grep "\(jndi\|jdbc\)"

That would help narrowing down the problem.
Thanks,
Daniel
Comment 2 Forgotten User v5inq2MBSE 2006-02-06 21:12:38 UTC
linux:~ # rpm -qa | grep "java-"
java-1_5_0-sun-1.5.0_06-2
mysql-connector-java-3.1.8-4
java-1_5_0-sun-plugin-1.5.0_06-2
gcc-java-4.1.0_20060123-5
java-1_5_0-sun-devel-1.5.0_06-2
java-1_5_0-sun-alsa-1.5.0_06-2

But at first test, I had no java-1_5_0-sun-plugin, java-1_5_0-sun-devel and java-1_5_0-sun-alsa installed, instead there was java-1_4_2-gcj-compat and java-1_4_2-gcj-compat-devel installed. Changing this packages didn't fix the links (not even the SuSEconfi YaST started).

linux:~ # find /usr/lib/jvm-exports | grep "\(jndi\|jdbc\)"
/usr/lib/jvm-exports/jndi-1.4.2.jar
/usr/lib/jvm-exports/jndi-ldap.jar
/usr/lib/jvm-exports/jndi.jar
/usr/lib/jvm-exports/jdbc-stdext-1.4.2.jar
/usr/lib/jvm-exports/java-1.5.0-sun-1.5.0_06/jdbc-stdext-1.5.0_06.jar
/usr/lib/jvm-exports/java-1.5.0-sun-1.5.0_06/jndi-ldap.jar
/usr/lib/jvm-exports/java-1.5.0-sun-1.5.0_06/jndi-1.5.0.jar
/usr/lib/jvm-exports/java-1.5.0-sun-1.5.0_06/jndi.jar
/usr/lib/jvm-exports/java-1.5.0-sun-1.5.0_06/jdbc-stdext-3.0.jar
/usr/lib/jvm-exports/java-1.5.0-sun-1.5.0_06/jdbc-stdext.jar
/usr/lib/jvm-exports/java-1.5.0-sun-1.5.0_06/jdbc-stdext-1.5.0.jar
/usr/lib/jvm-exports/java-1.5.0-sun-1.5.0_06/jndi-ldap-1.5.0_06.jar
/usr/lib/jvm-exports/java-1.5.0-sun-1.5.0_06/jndi-cos-1.5.0_06.jar
/usr/lib/jvm-exports/java-1.5.0-sun-1.5.0_06/jndi-cos-1.5.0.jar
/usr/lib/jvm-exports/java-1.5.0-sun-1.5.0_06/jndi-cos.jar
/usr/lib/jvm-exports/java-1.5.0-sun-1.5.0_06/jndi-1.5.0_06.jar
/usr/lib/jvm-exports/java-1.5.0-sun-1.5.0_06/jndi-rmi-1.5.0_06.jar
/usr/lib/jvm-exports/java-1.5.0-sun-1.5.0_06/jndi-rmi-1.5.0.jar
/usr/lib/jvm-exports/java-1.5.0-sun-1.5.0_06/jndi-rmi.jar
/usr/lib/jvm-exports/java-1.5.0-sun-1.5.0_06/jndi-ldap-1.5.0.jar
/usr/lib/jvm-exports/jndi-cos-1.4.2.jar
/usr/lib/jvm-exports/jdbc-stdext-3.0.jar
/usr/lib/jvm-exports/jdbc-stdext.jar
/usr/lib/jvm-exports/jndi-1.4.2.0.jar
/usr/lib/jvm-exports/jndi-ldap-1.4.2.0.jar
/usr/lib/jvm-exports/jndi-cos-1.4.2.0.jar
/usr/lib/jvm-exports/jndi-rmi-1.4.2.jar
/usr/lib/jvm-exports/jndi-cos.jar
/usr/lib/jvm-exports/jndi-ldap-1.4.2.jar
/usr/lib/jvm-exports/jndi-rmi.jar
/usr/lib/jvm-exports/jndi-rmi-1.4.2.0.jar
/usr/lib/jvm-exports/jdbc-stdext-1.4.2.0.jar
Comment 3 Daniel Bornkessel 2006-02-07 12:40:32 UTC
Ok, there was a missing dependency on Java. However, if you say that you already had Java installed, this is still strange.
Did you install the Beta3 from scratch or did you do an update? 
If this was a clean install, it probably installed tomcat before Java and the issue would be resolved with this new requirement. 
If you however had an installed Java and installed tomcat definitely after Java, this needs further investigation.
Thanks,
Daniel
Comment 4 Daniel Bornkessel 2006-02-07 12:59:53 UTC
Sorry, I was to quick. This last comment is not correct as there is a dependency on java-devel which has a dependency on java.
Please ignore the last comment ... will investigate further on this topic.
Comment 5 Daniel Bornkessel 2006-02-07 13:27:02 UTC
Ok, another assumption: Could you check whether
a) /usr/lib/jvm-exports/java exists ... if so:
b) if it is a symbolic link to /etc/alternatives/java_sdk_exports/

The output of the find command looks as if this is missing. If you find the time, the following info would help:
ls -lah /usr/lib/jvm-exports/java (if it exists)
rpm -qf /usr/lib/jvm-exports/java (if it exists and is not a symbolic link)
ls -l /etc/alternatives/java_sdk_exports

If it is a dir and you change it to a link pointing to /etc/alternatives/java_sdk_exports/ by executing (as root):
(cd /usr/lib/jvm-exports; mv java java.bak; ln -sf /etc/alternatives/java_sdk_exports/ java)

does then probably Bug #148504 not occur?

Thanks for your help,
Daniel
Comment 6 Forgotten User v5inq2MBSE 2006-02-07 18:32:33 UTC
Hello Daniel,

I'm just back from work. You have to coordinate your release planes better with my hollydays ;-)
First to the Installation. I've done a basic KDE installation with 10.1 beta1, from the rsynced inst-source directory. I've installed no apache, tomcat or other additional software. I've found no time to test beta2, so I've updated with beta3.
After som basic tests, I've started yast to install mysql, apache2, tomcat5, mysql-connector and all depending packages (all packages with one installation). I've taken over the database and configuration from two of my web-Project (servlets) and had the named problems. I've tried again with suns java version, but doesn't help. Then I've written the bug report ;-)

linux:~ # ls -lah /usr/lib/jvm-exports/java
lrwxrwxrwx 1 root root 34 2006-02-06 20:52 /usr/lib/jvm-exports/java -> /etc/alternatives/java_sdk_exports
linux:~ # rpm -qf /usr/lib/jvm-exports/java
file /usr/lib/jvm-exports/java is not owned by any package
linux:~ # rpm -qf /etc/alternatives/java_sdk_exports
file /etc/alternatives/java_sdk_exports is not owned by any package
linux:~ # ls -lah /etc/alternatives/java_sdk_exports
lrwxrwxrwx 1 root root 35 2006-02-06 20:52 /etc/alternatives/java_sdk_exports -> /usr/lib/jvm-exports/java-1.5.0-sun
linux:~ # rpm -qf /usr/lib/jvm-exports/java-1.5.0-sun
java-1_5_0-sun-devel-1.5.0_06-2
linux:~ # ls -l /etc/alternatives/java_sdk_exports
lrwxrwxrwx 1 root root 35 2006-02-06 20:52 /etc/alternatives/java_sdk_exports -> /usr/lib/jvm-exports/java-1.5.0-sun

Thanks
Manfred
Comment 7 Daniel Bornkessel 2006-02-08 10:50:31 UTC
Good thing: Everything looks correctly.
Bad  thing: The idea I had is not the problem.
Will try to recreate the bug ...
Comment 8 Daniel Bornkessel 2006-02-08 21:16:08 UTC
I am pretty sure I found the Bug: The jars in 

/usr/lib/jvm-exports/

Should be in java-1.4.2-gcj-gcj-1.4.2.0 ... this is why they can't be found when the symbolic links are created.

Will fix java-1_4_2-gcj-compat.
Comment 9 Johannes Meixner 2006-02-09 07:43:35 UTC
Daniel,
many thanks for fixing java-1_4_2-gcj-compat!
Comment 10 Johannes Meixner 2006-02-09 13:56:21 UTC
Submitted fixed java-1_4_2-gcj-compat to STABLE.
Comment 11 Forgotten User v5inq2MBSE 2006-02-25 15:23:48 UTC
Ok, I've tried again with beta5 (wow, yast package management is realy extremely broken, had to install tomcat by commandline, because yast can't handle two installation-sources). I was not able to install tomcat without the sun java, but tomcat works fine now.
Comment 12 Daniel Bornkessel 2006-03-01 10:04:09 UTC
Manfred: Thanks for the positive feedback ... good to know that it works.
Best regards,
Daniel
Comment 13 Forgotten User v5inq2MBSE 2006-04-02 08:17:34 UTC
Sorry, I have to reopen this bug. After Updating from beta8 to beta9 with ftp://ftp4.gwdg.de/private/beta/SL-OSS-factory-beta9/inst-source as installation source (java-1_4_2-gcj-compat-1.4.2.0-25) the jaas links are broken again. The /usr/lib/jvm-exports/java-1.4.2-gcj directory is empty.
After reinstalling java-1_4_2-gcj-compat and tomcat5 the links are here again.
Maybe you should update the links with SuSEconfig, it seems not to work in any case correctly within the rpm.
Comment 14 Johannes Meixner 2006-04-03 07:50:57 UTC
As reinstalling java-1_4_2-gcj-compat and tomcat5 solves it,
it might be a problem because of the somewhat awkward sequence
in which scripts are executed on a single package upgrade, see
/usr/share/doc/packages/rpm/manual/triggers
----------------------------------------------------------------------------
new-%pre      for new version of package being installed
...           (all new files are installed)
new-%post     for new version of package being installed

any-%triggerin (%triggerin from other packages set off by new install)
new-%triggerin
old-%triggerun
any-%triggerun (%triggerun from other packages set off by old uninstall)

old-%preun    for old version of package being removed
...           (all old files are removed)
old-%postun   for old version of package being removed

old-%triggerpostun
any-%triggerpostun (%triggerpostun from other packages
                    set off by old uninstall)
---------------------------------------------------------------------------

Please wait some weeks until we found out what exactly goes wrong
here in case of an update ;-)
Comment 15 Johannes Meixner 2006-04-19 14:34:09 UTC
Probably found the reason:
It happens only in case of an update from 10.1 beta-x to 10.1 beta-y
because in java-1_4_2-gcj-compat.spec there is
---------------------------------------------------------------------
%postun
rm -rf %{jvmjardir}/*
if [ $1 -eq 0 ] ; then
   ...
fi
---------------------------------------------------------------------
I.e. 'rm -rf %{jvmjardir}/*' is executed in any case
and because of the order in which scripts are executed (see comment #14)
the links are removed at the end.
I changed it to
---------------------------------------------------------------------
%postun
if [ $1 -eq 0 ] ; then
   rm -rf %{jvmjardir}/*
   ...
fi
---------------------------------------------------------------------
so that 'rm -rf %{jvmjardir}/*' is executed only when the package
is removed (but not when it is updated).
Comment 16 Johannes Meixner 2006-04-19 14:58:58 UTC
Submitted fixed package to STABLE.
Let's hope that it is not too late for 10.1