Fedora Linux Support Community & Resources Center
Sections ›› Home | Forums | Guidelines | Forum Help | Fedora FAQ | Fedora News 

Go Back   FedoraForum.org > Fedora Support > Software

Software Help on software problems.

Closed Thread
 
Thread Tools Search this Thread Display Modes
  #31  
Old 2005-06-21, 03:15 PM CDT
ghodgins Offline
Registered User
 
Join Date: Jun 2005
Posts: 5
Hi all. I just replace the gcj JVM with Sun's after hours of trying to install a servlet that was working on another box, only to find it was the gcj JVM causing the problem. I missed modifying some symbolic links and Tomcat was still using the gcj JVM. I wish I had seen the other posts about how to modify the alternatives.

Anyway, now I would like to wipe the gcj packages from my system just to keep things clean and make absolutely sure it doesn't inadvertently happen again. However, when I try to do a yum remove java-1.4.2-gcj* I get a list of 27 odd packages it wants to delete, including Tomcat. I obviously don't want Tomcat deleted.

Can I remove or over ride the dependencies?

Thanks.
  #32  
Old 2005-06-21, 03:34 PM CDT
bytesniper's Avatar
bytesniper Offline
Registered User
 
Join Date: May 2005
Location: Abq, NM
Age: 32
Posts: 1,153
yes.
{insert appropriate disclaimer here becuase it could have unwanted side effects}

use the --nodeps rpm option:
rpm -e --nodeps java-1.4.2-gcj*

my opinion: i would leave it there. removing it could quite possibly mess up your system but you take pretty much zero chance by leaving it there.
__________________
I am root. If you see me laughing you better have a backup.

Last edited by bytesniper; 2005-06-21 at 03:36 PM CDT.
  #33  
Old 2005-06-22, 05:56 AM CDT
wiedz Offline
Registered User
 
Join Date: Jun 2005
Posts: 10
hi, just wanna thanks bytesniper for the tips
thanks alot for ending my 4 days of agony.

note : for others with similar problem, try command : alternatives --display java and you will see complete configuration of your current jdk.
you have to add not only the java link but also jre link.

this is my configuration :

[root@Wiedz ~]# alternatives --display java
java - status is manual.
link currently points to /opt/j2sdk1.4.2_08/bin/java
/usr/lib/jvm/jre-1.4.2-gcj/bin/java - priority 1420
slave rmiregistry: /usr/lib/jvm/jre-1.4.2-gcj/bin/rmiregistry
slave jre_exports: /usr/lib/jvm-exports/jre-1.4.2-gcj
slave jre: /usr/lib/jvm/jre-1.4.2-gcj
/opt/j2sdk1.4.2_08/bin/java - priority 2
slave rmiregistry: /opt/j2sdk1.4.2_08/jre/bin/rmiregistry
slave jre_exports: /opt/j2sdk1.4.2_08/jre/lib
slave jre: /opt/j2sdk1.4.2_08/jre
Current `best' version is /usr/lib/jvm/jre-1.4.2-gcj/bin/java.
  #34  
Old 2005-06-22, 06:17 AM CDT
ghodgins Offline
Registered User
 
Join Date: Jun 2005
Posts: 5
Thanks bytesniper. Only problem.... I read your post too late (not sure if I would have take the advice to leave things in place anyway ) and now I've got a bit of a mess with missing links and stuff that I am going to have to work through. Tomcat won't start now. Oh well. Thanks very much for the rpm help. The reason I don't want to leave it around is to leave the system as clean as possible and eliminate the possibility of it find it's way back into the working system. Obviously this is hampered by the packaging and "system" Fedora has build around jvm's.

Also, just curious, is anyone successfully running FC4, Apache, Tomcat with mod_jk? I'm getting some kind of Segmentation fault due to a failed jk_log_lock or something like that.
  #35  
Old 2005-06-22, 06:29 AM CDT
alphonsebrown's Avatar
alphonsebrown Offline
Registered User
 
Join Date: Feb 2005
Location: Sofia, Bulgaria
Age: 26
Posts: 799
post exactly what fault
__________________
Windows doesn't just crash - it opens a dialog box and lets you press OK first. Powered by RedHat since I know my self Fedora 12 #379190
  #36  
Old 2005-06-22, 07:21 AM CDT
ghodgins Offline
Registered User
 
Join Date: Jun 2005
Posts: 5
I was going to work through it myself, but someone more familiar might have faster answers - which would be greatly appreciated.

Here is the output during startup.
[root@newcontent ~]# /etc/rc.d/init.d/tomcat5 start
Starting tomcat5: lock file found but no process running for pid 8103, continuing
/usr/bin/rebuild-jar-repository: error: JVM_LIBDIR /usr/lib/jvm-exports/java does not exist or is not a directory
/usr/bin/rebuild-jar-repository: error: JVM_LIBDIR /usr/lib/jvm-exports/java does not exist or is not a directory
/usr/bin/rebuild-jar-repository: error: JVM_LIBDIR /usr/lib/jvm-exports/java does not exist or is not a directory
/usr/bin/rebuild-jar-repository: error: JVM_LIBDIR /usr/lib/jvm-exports/java does not exist or is not a directory
find: warning: you have specified the -mindepth option after a non-option argument -type, but options are not positional (-mindepth affects tests specified before it as well as those specified after it). Please specify options before other arguments.

find: warning: you have specified the -maxdepth option after a non-option argument -type, but options are not positional (-maxdepth affects tests specified before it as well as those specified after it). Please specify options before other arguments.

/usr/bin/rebuild-jar-repository: error: JVM_LIBDIR /usr/lib/jvm-exports/java does not exist or is not a directory
/usr/bin/rebuild-jar-repository: error: JVM_LIBDIR /usr/lib/jvm-exports/java does not exist or is not a directory
/usr/bin/rebuild-jar-repository: error: JVM_LIBDIR /usr/lib/jvm-exports/java does not exist or is not a directory
/usr/bin/rebuild-jar-repository: error: JVM_LIBDIR /usr/lib/jvm-exports/java does not exist or is not a directory
Using CATALINA_BASE: /usr/share/tomcat5
Using CATALINA_HOME: /usr/share/tomcat5
Using CATALINA_TMPDIR: /usr/share/tomcat5/temp
Using JAVA_HOME: /usr/lib/jvm/java
[ OK ]
[root@newcontent ~]#

Here is one error in catalina.out. It would appear the CLASSPATH was not being constructed at one point, likely due to missing links or improperly created links to the new jvm.

Bootstrap: Class loader creation threw exception
java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
at org.apache.tomcat.util.compat.JdkCompat.<clinit>(J dkCompat.java:55)
at org.apache.catalina.startup.ClassLoaderFactory.<cl init>(ClassLoaderFactory.java:63)
at org.apache.catalina.startup.Bootstrap.initClassLoa ders(Bootstrap.java:103)
at org.apache.catalina.startup.Bootstrap.init(Bootstr ap.java:196)
at org.apache.catalina.startup.Bootstrap.main(Bootstr ap.java:402)

However, in trying to fix this I've messed up something else, and now I get this in catalina.out

/usr/bin/dtomcat5: line 275: /usr/lib/jvm/java/bin/java: No such file or directory

Looks like I've messed up the /usr/lib/jvm link??



lrwxrwxrwx 1 root root 30 Jun 20 17:03 /usr/bin/java -> /usr/java/jdk1.5.0_03/bin/java
lrwxrwxrwx 1 root root 31 Jun 20 17:04 /usr/bin/javac -> /usr/java/jdk1.5.0_03/bin/javac
lrwxrwxrwx 1 root root 33 Jun 20 17:04 /usr/bin/javadoc -> /usr/java/jdk1.5.0_03/bin/javadoc
lrwxrwxrwx 1 root root 31 Jun 20 17:04 /usr/bin/javah -> /usr/java/jdk1.5.0_03/bin/javah


Here is the error that was logging in /var/log/httpd/error.log re: mod_jk
[Thu Jun 23 02:36:18 2005] [error] (13)Permission denied: apr_global_mutex_lock(jk_log_lock) failed
[Thu Jun 23 02:36:18 2005] [notice] child pid 2713 exit signal Segmentation fault (11)
[Thu Jun 23 02:40:47 2005] [notice] caught SIGTERM, shutting down


Is there any documentation around the whole java ecosystem in Fedora?

Thanks.

Last edited by ghodgins; 2005-06-22 at 07:23 AM CDT.
  #37  
Old 2005-06-22, 07:36 AM CDT
ghodgins Offline
Registered User
 
Join Date: Jun 2005
Posts: 5
Update, having updated the JAVA_HOME in my tomcat5.conf file to /usr/java/jdk1.5.0_03 I'm back to the following error in catalina.out.

Bootstrap: Class loader creation threw exception
java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
at org.apache.tomcat.util.compat.JdkCompat.<clinit>(J dkCompat.java:55)
at org.apache.catalina.startup.ClassLoaderFactory.<cl init>(ClassLoaderFactory.java:63)
at org.apache.catalina.startup.Bootstrap.initClassLoa ders(Bootstrap.java:103)
at org.apache.catalina.startup.Bootstrap.init(Bootstr ap.java:196)
at org.apache.catalina.startup.Bootstrap.main(Bootstr ap.java:402)
  #38  
Old 2005-06-23, 03:14 PM CDT
jerkykhanh Offline
Registered User
 
Join Date: Jun 2005
Posts: 3
This is what I did and it worked for me:

- Manually (not via rpm) install a copy of the JDK or JRE either Blackdown 1.4.2 or 1.5 from Sun.
- Modify $JAVA_HOME environment variable to the newly installed java.
- Modify the $PATH in your profile to put the $JAVA_HOME/bin directory in front so it picks up the java exe from this directory first. To make sure it's the correct one, type java -version and the output should say the version you just installed.
- Start tomcat and it should work. I think tomcat 5.5 works only with java5 and tomcat 5.0 works with java 1.4.2
  #39  
Old 2005-06-23, 04:03 PM CDT
Erikdenoorman Offline
Registered User
 
Join Date: Jun 2005
Posts: 16
Ik heb java ook op deze manier geinstalleerd en op zich werkt het goed. Echter, niet helemaal :P
Als ik limewire start, loopt het zo traag als traag kan zijn (was eerst niet zo) en in de terminal zie ik dat de volgende fouten misschien de oorzaak kunnen zijn:

at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierar chy(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarch y(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)


en dit dan zo ongeveer een paar honderd keer..... :S

Iemand een idee hoe dit verholpen kan worden?
  #40  
Old 2005-06-23, 05:53 PM CDT
pammiwhammi's Avatar
pammiwhammi Offline
Registered User
 
Join Date: Jan 2005
Location: Michigan
Posts: 26
I tried downloading the java plugin but the graphical installer returned an error; it suggested I use "--console" or "--silent" and I tried both of those and neither of them worked....
__________________
"Money is the hydraulic fluid of coercion" me.
  #41  
Old 2005-06-29, 09:24 PM CDT
wtogami Offline
Community Manager
 
Join Date: Mar 2005
Posts: 160
NEVER use rpm --nodeps. You will always screw your system. Removing gcj is not a good idea. You should instead use JAVA_HOME to use an alternate JVM/JDK.
  #42  
Old 2005-06-29, 10:03 PM CDT
strikeforce Offline
Registered User
 
Join Date: Jun 2004
Location: Perth, Western Australia
Age: 32
Posts: 1,462
There is a howto somwhere just use that it tells you step by step how to do it.
  #43  
Old 2005-06-30, 03:18 AM CDT
dipak_ks Offline
Registered User
 
Join Date: Jun 2005
Posts: 1
FC4 java error

Hi,
i installed jdk1.4_04 on FC4 on my machine. it is working fine.
but it is showing Warning for each class in programm like as follows

The serializable class TableDemo does not declare a static final
serialVersionUID field of type long

i am using eclipse provided in FC4 itself.


thanks

dipak dudhabhate
  #44  
Old 2005-06-30, 11:27 PM CDT
skoona's Avatar
skoona Offline
Registered User
 
Join Date: Feb 2004
Location: Indiana, USA
Posts: 426
Another Option

Quote:
Originally Posted by bytesniper
java works great. there is a link in /usr/bin/java that actually starts java so it needs to be pointed to the correct java installation. the easiest way to do this (to presserve both or all installations of java) is to use alternatives.

if you type alternatives --config java you will see a single entry pointing to something like /usr/lib/jvm/jre-1.4.2-gcj/bin/java.

all you need to do is add the link (path) to the new installation of java from sun

alternatives --install /usr/bin/java java /pathto/sunjava/java 2
(usage is alternatives <link> <name> <path> <priority>)

once you add the new java configuration to alternatives all you need to do is activate, to tell the system this is what should be run as /usr/bin/java:

alternatives --config java
this will give you a menu of java installations. choose the second option (hence, priority 2) and hit enter. now when you type something like java -jar filename.jar it will use the sun java instead of the inlcuded gcj.

note: you can also delete the /usr/bin/java and make a new symbolic link to the java binary of the new java installation, but i do not recommend this.
bytesniper's info IS THE CORRECT WAY to resolve the 'which java' will run question. One the FC4 eclipse and java rpm is implemented you only choice is to point to the correct executable using 'alternatives', or put the new paths as the first in the list.

Initially, i placed the new paths as the first ones in my path list, so java would be found in the new path before /usr/bin/java and alternatives got their fingers on it. example: change '/etc/profile' by adding two pathmunge statements using the 'before' flag. This adds the paths to Sun's Java 1.5 implementation in '/opt'. Here is a copy of my /etc/profile.

Code:
# /etc/profile

# System wide environment and startup programs, for login setup
# Functions and aliases go in /etc/bashrc

pathmunge () {
	if ! echo $PATH | /bin/egrep -q "(^|:)$1($|:)" ; then
	   if [ "$2" = "after" ] ; then
	      PATH=$PATH:$1
	   else
	      PATH=$1:$PATH
	   fi
	fi
}

# Path manipulation
if [ $EUID = 0 ]; then
	pathmunge /sbin
	pathmunge /usr/sbin
	pathmunge /usr/local/sbin
fi

pathmunge /usr/X11R6/bin after

#
## SUN Java V1.5.0 path fixups
#
pathmunge /opt/jdk1.5.0_04/bin before
pathmunge /opt/jdk1.5.0_04/jre/bin before
pathmunge "." before


# No core files by default
ulimit -S -c 0 > /dev/null 2>&1

USER="`id -un`"
LOGNAME=$USER
MAIL="/var/spool/mail/$USER"

HOSTNAME=`/bin/hostname`
HISTSIZE=1000

if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ]; then
    INPUTRC=/etc/inputrc
fi

LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/usr/X11R6/lib:/usr/X11R6/lib/modules/dri
LD_RUN_PATH=$LD_LIBRARY_PATH

export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC LD_LIBRARY_PATH LD_RUN_PATH

for i in /etc/profile.d/*.sh ; do
    if [ -r "$i" ]; then
    	. $i
    fi
done

unset i
unset pathmunge
Yes, I installed SUN self-extracting bin file. and followed its directions to add the java plugin for firefox.

Why all these Java moves? I installed FC4's eclipse package to tryout their version of a prepackaged eclispe. I could not get it to work after about two hours of tinkering. So to restore my old eclipse implementation I had to override FC4's new java packages. pathmunge got it done faster, and I have since used alternatives to cleanup FC4's mess. Since you can't simply 'rpm -e eclipse' and get rid of all the stuff that got loaded in.
__________________
-----------------------------------------------------------
Registered Linux User #270764
FC8 on Intel Q6600, 4Gb, ATI HD 2600Pro, Dual 20" Displays
FC9 on AMD MP2400+ Dual 2GbRegister, 700Gb Raid5
FC9 on AMD 64 X2 4800+ 4Gb, 960Gb Raid5
FC9 on AMD Athlon 1900+ 1Gb, 750Gb
Folding@home Team: 37988 FedoraFolders
Author: Gkrellfah2 Folding@Home Linux Monitor
Author: GFHCM Folding@Home Monitor
Author: GapcMon - UPS Status Monitor
Contributor: GIW - Gtk Instrumentation Library
  #45  
Old 2005-07-01, 12:38 AM CDT
alphonsebrown's Avatar
alphonsebrown Offline
Registered User
 
Join Date: Feb 2005
Location: Sofia, Bulgaria
Age: 26
Posts: 799
actually eclipse won't start with SUN in FC4 in wants alternatives to be gcj ??! help
__________________
Windows doesn't just crash - it opens a dialog box and lets you press OK first. Powered by RedHat since I know my self Fedora 12 #379190
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[F9 64-bit] jperf Java f/e for iperf - Java exception error techmum Software 0 2008-07-23 06:22 PM CDT
Can I update java by simply installing java? schwim Software 5 2007-12-20 06:34 AM CST
Gtk-WARNING and libgnomevfs-WARNING when loading programs from the terminal someuser77 General Support 1 2006-05-13 02:54 AM CDT
java prob: alternatives --config java peimankhosravi General Support 0 2005-08-12 09:06 AM CDT
Warning java -jar not understood anmb General Support 4 2005-06-06 02:44 AM CDT

Automatic Translations (Powered by Powered by Google):
Afrikaans Albanian Arabic Belarusian Bulgarian Catalan Chinese Croatian Czech Danish Dutch English Estonian Filipino Finnish French Galician German Greek Hebrew Hindi Hungarian Icelandic Indonesian Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Taiwanese Thai Turkish Ukrainian Vietnamese Yiddish

All times are GMT -7. The time now is 07:15 PM CST.

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
Hosting provided by ThePlanet



All trademarks, and forum posts in this site are property of their respective owner(s).

FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact | Founding Members
Designed By Ewdison Then | Powered by vBulletin ©2000-2009, Jelsoft Enterprises Ltd.
FedoraForum is Powered by Open Source Projects and Products
Thanks to NLP-er you enjoy automatic translations (vBET)