LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-11-2005, 04:49 PM   #1
salvatore
Member
 
Registered: Oct 2003
Location: Florida
Distribution: Fedora Core 1 and 3
Posts: 68

Rep: Reputation: 15
Java Exceptions On FC4


Im attempting to run a Java application called JavaHMO on FC4 and haven't been able to debug the exceptions Im seeing in the logs. Here's the relevant text from JVM log:

STATUS | wrapper | 2005/09/10 20:51:40 | --> Wrapper Started as Console
STATUS | wrapper | 2005/09/10 20:51:41 | Launching a JVM...
INFO | jvm 1 | 2005/09/10 20:51:42 | Exception in thread "main"
INFO | jvm 1 | 2005/09/10 20:51:42 | java.lang.NoClassDefFoundError: while resolving class: org.tanukisoftware.wrapper.resources.ResourceManager
INFO | jvm 1 | 2005/09/10 20:51:42 | at java.lang.VMClassLoader.transformException(java.lang.Class, java.lang.Throwable) (/usr/lib/libgcj.so.6.0.0)
INFO | jvm 1 | 2005/09/10 20:51:42 | at java.lang.VMClassLoader.resolveClass(java.lang.Class) (/usr/lib/libgcj.so.6.0.0)
INFO | jvm 1 | 2005/09/10 20:51:42 | at java.lang.Class.initializeClass() (/usr/lib/libgcj.so.6.0.0)
INFO | jvm 1 | 2005/09/10 20:51:42 | at org.tanukisoftware.wrapper.WrapperManager.<clinit>() (Unknown Source)
INFO | jvm 1 | 2005/09/10 20:51:42 | at java.lang.Class.initializeClass() (/usr/lib/libgcj.so.6.0.0)
INFO | jvm 1 | 2005/09/10 20:51:42 | at org.lnicholls.javahmo.server.ServiceWrapper.main(java.lang.S tring[]) (Unknown Source)
INFO | jvm 1 | 2005/09/10 20:51:42 | at gnu.java.lang.MainThread.call_main() (/usr/lib/libgcj.so.6.0.0)
INFO | jvm 1 | 2005/09/10 20:51:42 | at gnu.java.lang.MainThread.run() (/usr/lib/libgcj.so.6.0.0)
INFO | jvm 1 | 2005/09/10 20:51:42 | Caused by: java.lang.ClassNotFoundException: com.sun.image.codec.jpeg.JPEGImageDecoder not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:/usr/share/javaHMO/lib/xercesImpl.jar,file:./,file:/usr/share/javaHMO/lib/silib.jar,file:/usr/share/javaHMO/lib/jdai.jar,file:./,file:/usr/share/javaHMO/lib/jcaching.jar,file:/usr/share/javaHMO/lib/commons-net.jar,file:./,file:/usr/share/javaHMO/lib/jicyshout.jar,file:/usr/share/javaHMO/lib/mp3dings.jar,file:./,file:/usr/share/javaHMO/lib/jiu.jar,file:/usr/share/javaHMO/lib/jshortcut.jar,file:./,file:/usr/share/javaHMO/lib/pja.jar,file:/usr/share/javaHMO/lib/commons-betwixt.jar,file:./,file:/usr/share/javaHMO/lib/httpunit.jar,file:/usr/share/javaHMO/lib/jdom.jar,file:./,file:/usr/share/javaHMO/lib/activation.jar,file:/usr/share/javaHMO/lib/commons-collections.jar,file:./,file:/usr/share/javaHMO/lib/Tidy.jar,file:/usr/share/javaHMO/lib/javahmo.jar,file:./,file:/usr/share/javaHMO/lib/looks.jar,file:/usr/share/javaHMO/lib/calpahtml.jar,file:./,file:/usr/share/javaHMO/lib/js.jar,file:/usr/share/javaHMO/lib/xml-apis.jar,file:./,file:/usr/share/javaHMO/lib/commons-digester.jar,file:/usr/share/javaHMO/lib/forms.jar,file:./,file:/usr/share/javaHMO/lib/org.mortbay.jetty.jar,file:/usr/share/javaHMO/lib/mytunes.jar,file:./,file:/usr/share/javaHMO/lib/MHS.jar,file:/usr/share/javaHMO/lib/jasper-compiler.jar,file:./,file:/usr/share/javaHMO/lib/javax.servlet.jar,file:/usr/share/javaHMO/lib/log4j.jar,file:./,file:/usr/share/javaHMO/lib/xalan.jar,file:/usr/share/javaHMO/lib/wrapper.jar,file:./,file:/usr/share/javaHMO/lib/commons-lang.jar,file:/usr/share/javaHMO/lib/informa.jar,file:./,file:/usr/share/javaHMO/lib/jasper-runtime.jar,file:/usr/share/javaHMO/lib/concurrent.jar,file:./,file:/usr/share/javaHMO/lib/commons-logging.jar,file:/usr/share/javaHMO/lib/commons-beanutils.jar,file:./,file:/usr/share/javaHMO/lib/newsgreed.jar,file:/usr/share/javaHMO/lib/mail.jar,file:./,file:/usr/share/javaHMO/lib/commons-httpclient.jar], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
INFO | jvm 1 | 2005/09/10 20:51:42 | at java.net.URLClassLoader.findClass(java.lang.String) (/usr/lib/libgcj.so.6.0.0)
INFO | jvm 1 | 2005/09/10 20:51:42 | at java.lang.ClassLoader.loadClass(java.lang.String, boolean) (/usr/lib/libgcj.so.6.0.0)
INFO | jvm 1 | 2005/09/10 20:51:42 | at java.lang.ClassLoader.loadClass(java.lang.String) (/usr/lib/libgcj.so.6.0.0)
INFO | jvm 1 | 2005/09/10 20:51:42 | at java.lang.Class.forName(java.lang.String, boolean, java.lang.ClassLoader) (/usr/lib/libgcj.so.6.0.0)
INFO | jvm 1 | 2005/09/10 20:51:42 | ...7 more
ERROR | wrapper | 2005/09/10 20:51:42 | JVM exited while loading the application.
STATUS | wrapper | 2005/09/10 20:51:44 | Shutting down.
STATUS | wrapper | 2005/09/10 20:51:44 | <-- Wrapper Stopped

Im nowhere near a Java programmer, and all of my searches at Google, www.tivocommunity.com and www.dealdatabase.com/forum/ have been unsuccessful.

Any kick in the right direction would be appreciated.
Thanks.
 
Old 09-11-2005, 05:03 PM   #2
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 96
Hi.

The problem is that the Java environment you're using (GCJ) is still a work in progress.
Install the Sun JVM (or SDK, if you want to program yourself), and try running it again.

http://java.sun.com

Dave
 
Old 09-11-2005, 06:52 PM   #3
salvatore
Member
 
Registered: Oct 2003
Location: Florida
Distribution: Fedora Core 1 and 3
Posts: 68

Original Poster
Rep: Reputation: 15
Thanks for the quick reply Dave. Ive previosly installed Java's JRE and JAI as required for the JavaHMO app, yet its still failing when I try to start it.

You mention the virtual machine (JVM), but it looks like that's a part of the runtime environment (JRE) package.

Here's the output from 'java -version', if that helps:
[root@tiefighter java]# java -version
java version "1.4.2"
gij (GNU libgcj) version 4.0.1 20050727 (Red Hat 4.0.1-5)

Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Thanks again.
 
Old 09-11-2005, 07:00 PM   #4
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 96
Have you added the new Java's bin directory to your path? If not, do so. If you already have, then you'll have to add it at the front of $PATH, not the end, so that the new java executable is found before the GCJ one.
 
Old 09-11-2005, 07:49 PM   #5
salvatore
Member
 
Registered: Oct 2003
Location: Florida
Distribution: Fedora Core 1 and 3
Posts: 68

Original Poster
Rep: Reputation: 15
The JavaHMO startup script attempts to do that for me:

<snip from /etc/init.d/JavaHMO>
for java in `ls /usr/java 2>/dev/null` ; do
if [ "${java%j2re*}" == "" ] ; then
export JAVA_HOME=/usr/java/$java
break
echo $JAVA_HOME
elif [ "${java%j2sdk*}" == "" ] ; then
export JAVA_HOME=/usr/java/$java/jre
echo $JAVA_HOME
break
fi
done

if [ "$JAVA_HOME" == "" ] ; then
for java in `ls /usr/local/java 2>/dev/null` ; do
if [ "${java%j2re*}" == "" ] ; then
export JAVA_HOME=/usr/local/java/$java
break
elif [ "${java%j2sdk*}" == "" ] ; then
export JAVA_HOME=/usr/local/java/$java/jre
break
fi
done
fi
</snip>

The JRE is in /usr/java/j2re1.4.2_09/
Here's the current value of PATH:

[root@tiefighter log]# echo $PATH
/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:
/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin:/usr/java
 
Old 09-11-2005, 07:56 PM   #6
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 96
JAVA_HOME and PATH both have to be set.

Try doing:
export PATH=/usr/java/j2re1.4.2_09/bin:$PATH

Then try running your program again.
 
Old 09-11-2005, 08:21 PM   #7
salvatore
Member
 
Registered: Oct 2003
Location: Florida
Distribution: Fedora Core 1 and 3
Posts: 68

Original Poster
Rep: Reputation: 15
Cool, this appears to be working.

Ive altered the script used to start the service so it calls the export PATH line each time its run,
as well as logged out and back in to make sure it wasnt a session-only thing.

Thanks for the good quick work Dave.
 
Old 09-11-2005, 08:35 PM   #8
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 96
If you want the Sun Java runtime to be the default for everyone, look for "pathmunge /usr/X11R6/bin after" in /etc/profile and add the following line just after it:

pathmunge /usr/java/j2re1.4.2_09/bin

(Log out and log back in for this to take effect).

That should remove the need to modify $PATH before you run any Java apps.

Dave
 
Old 09-11-2005, 08:40 PM   #9
salvatore
Member
 
Registered: Oct 2003
Location: Florida
Distribution: Fedora Core 1 and 3
Posts: 68

Original Poster
Rep: Reputation: 15
Done. Thanks for the tip.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
java fc4 firefox tuxrox07 Fedora 8 11-10-2005 01:21 AM
FC4 and java UmneyDurak Fedora 13 10-27-2005 03:13 PM
FC4 sun java Visko Fedora 4 09-23-2005 05:48 PM
Installing Java on FC4 ltracy Linux - Software 2 06-24-2005 12:27 AM
FC4 and JAVA if050204 Fedora 13 06-20-2005 02:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration