RE: NoClassDefFoundError after upgrade to FC3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Do you have the Sun JDK installed?  The Jdeveloper install probably included
a JDK.  It could be that after the upgrade, the first "java" in your path is
the gcc java, which I am not familiar with.  You may have to adjust your
path/symlinks so that the correct JVM is invoked.

Try running...

java -version

And see what it says.
The command...

which java  

Will show you which java is first in your path.

-----Original Message-----
From: fedora-list-bounces@xxxxxxxxxx [mailto:fedora-list-bounces@xxxxxxxxxx]
On Behalf Of Cyrus Adkisson
Sent: Monday, November 15, 2004 4:50 PM
To: For users of Fedora Core releases
Subject: Re: NoClassDefFoundError after upgrade to FC3

Correction: The error below is only if the java file is executed from the
wrong directory. When executed from the correct directory, the same error
from before happens: 

java.lang.NoClassDefFoundError
at java.lang.Class.forName0(Native Method) at
java.lang.Class.forName(Class.java:141)
at oracle.ide.IdeCore.class$(IdeCore.java:89)
at oracle.ide.IdeCore.startupImpl(IdeCore.java:775)
at oracle.ide.Ide.startup(Ide.java:539)
at oracle.jdeveloper.JDeveloper.launch(JDeveloper.java:58)
at oracle.jdeveloper.JDeveloper.main(JDeveloper.java:37)

Cyrus Adkisson wrote:

> Well, there are about 200 jar files in the jdev installation 
> directory, so the shotgun approach isn't very appealing. I don't see 
> any kind of log files anywhere, either... I was able to do one thing, 
> which was print out the actual java command (which is HUGE) with an 
> echo in the jdev launch script. Cutting and pasting it, I was able to 
> get more descriptive NoClassDefFoundError output:
>
> Exception in thread "main" java.lang.NoClassDefFoundError: 
> oracle/jdeveloper/JDeveloper
>
> I'm probably an idiot for not knowing right away what the problem is 
> now.  I know that java can't find the correct jar file containing the 
> JDeveloper class, but how do I know where that is?
> jdevinstalldir/jdev/lib/jdev.jar has already been inserted into the 
> classpath... what now?
>
> Cyrus
>
> Cortezzo, Jason wrote:
>
>> Usually, a NoClassDefFoundError will have a message, which specifies 
>> the missing class, before the stack trace like...
>>
>> Exception in thread "main" java.lang.NoClassDefFoundError:
>> com/somepackage/SomeClass
>> Without it, it's  a lot harder to figure out what is missing.  Does 
>> Jdev have a log file that you could look at to try to find out which 
>> class is missing?  Otherwise, you can try a shotgun approach. Locate 
>> all your jar files in your Jdev installation (find /jdevinstalldir 
>> -name *.jar) and make sure that they are all in your classpath.
>>
>> Check the script that starts the IDE and see if it is setting a 
>> classpath.
>> Sometimes the CP is set using a command line option of the java 
>> command (i.e. something like: java -cp {classpath} 
>> com.oracle.IDEStartup).  Make sure all the jar files that the script
expects to find actually exist.
>>
>> The Eclipse error message is a little more descriptive.  It's looking 
>> for a native library (as opposed to a Java class file) and it's 
>> telling you exactly which one it is looking for 
>> "/usr/local/eclipse/plugins/org.eclipse.swt.gtk64_3.0.1/os/linux/amd6
>> 4/libsw
>>
>> t-pi-gtk-3063.so"
>>
>> -Jason
>>
>> -----Original Message-----
>> From: fedora-list-bounces@xxxxxxxxxx 
>> [mailto:fedora-list-bounces@xxxxxxxxxx]
>> On Behalf Of Cyrus Adkisson
>> Sent: Monday, November 15, 2004 1:22 PM
>> To: For users of Fedora Core releases
>> Subject: Re: NoClassDefFoundError after upgrade to FC3
>>
>> Thanks for the reply. That's the whole error as far as jdev is 
>> concerned.
>> When I try to run eclipse I get the following error, which may or may 
>> not be
>> related:
>>
>> java.lang.UnsatisfiedLinkError: 
>> /usr/local/eclipse/plugins/org.eclipse.swt.gtk64_3.0.1/os/linux/amd64
>> /libswt
>>
>> -pi-gtk-3063.so: 
>> /usr/local/eclipse/plugins/org.eclipse.swt.gtk64_3.0.1/os/linux/amd64
>> /libswt
>>
>> -pi-gtk-3063.so: cannot open shared object file: No such file or 
>> directory
>>        at java.lang.ClassLoader$NativeLibrary.load(Native Method)
>>        at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586)
>>        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1495)
>>        at java.lang.Runtime.loadLibrary0(Runtime.java:788)
>>        at java.lang.System.loadLibrary(System.java:834)
>>        at org.eclipse.swt.internal.Library.loadLibrary(Library.java:100)
>>        at org.eclipse.swt.internal.gtk.OS.<clinit>(OS.java:19)
>>        at
>> org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:63)
>>        at
>> org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:54)
>>        at org.eclipse.swt.widgets.Display.<clinit>(Display.java:118)
>>        at
>> org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:268)
>>        at org.eclipse.ui.PlatformUI.createDisplay(PlatformUI.java:153)
>>        at
>> org.eclipse.ui.internal.ide.IDEApplication.createDisplay(IDEApplicati
>> on.java
>>
>> :122)
>>        at
>> org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:72)
>>        at
>>
org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.

>>
>> java:335)
>>        at
>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.ja
>> va:273)
>>
>>        at
>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.ja
>> va:129)
>>
>>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>        at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
>> java:39
>>
>> )
>>        at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
>> sorImpl
>>
>> .java:25)
>>        at java.lang.reflect.Method.invoke(Method.java:324)
>>        at org.eclipse.core.launcher.Main.basicRun(Main.java:185)
>>        at org.eclipse.core.launcher.Main.run(Main.java:704)
>>        at org.eclipse.core.launcher.Main.main(Main.java:688)
>>
>> Also, I just upgraded my java rpm (and set JAVA_HOME to the new 
>> location), so I know all the files are there. It must be a jar file 
>> that isn't in the classpath. What jar files would normally be in the 
>> CLASSPATH?
>>
>> Cyrus
>>
>>
>> Cortezzo, Jason wrote:
>>
>>  
>>
>>> Are you giving us the entire exception message?  It should tell you 
>>> which class it is looking for.  I think it usually prints right 
>>> before the stack trace.
>>>
>>> A NoClassDefFoundError means either a .jar file is missing or your 
>>> CLASSPATH enviornment no longer contains the necessary file.
>>>
>>> -Jason
>>>
>>> -----Original Message-----
>>> From: fedora-list-bounces@xxxxxxxxxx 
>>> [mailto:fedora-list-bounces@xxxxxxxxxx]
>>> On Behalf Of Cyrus Adkisson
>>> Sent: Monday, November 15, 2004 1:10 PM
>>> To: For users of Fedora Core releases
>>> Subject: Re: NoClassDefFoundError after upgrade to FC3
>>>
>>> Well, I uncovered one big clue. Whenever you upgrade to FC3, the 
>>> system attempts to install gcc-java (and does) which can screw up 
>>> the workings of your Sun java considerably. Among other things, FC3 
>>> installs a /usr/bin/java script that points to the gcc-java code so 
>>> when you type java -version it gives you a bunch of gcc output. If 
>>> you disable the /usr/bin/java script, then it will revert back to 
>>> the Sun java.
>>>
>>> However, doing that did not fix my problem. Jdeveloper still gives 
>>> the same error I posted previously, as if it's searching for 
>>> something in the classpath. Eclipse does something similar. Can 
>>> anyone help me understand what I might need in the classpath for 
>>> this to work again?
>>>
>>> Cyrus
>>>
>>> Cyrus Adkisson wrote:
>>>
>>>
>>>
>>>   
>>>
>>>> Hi everybody. I use jDeveloper from Oracle to program, create GUIs 
>>>> and manage my various projects. It's not open-source, but it's a 
>>>> very good program. I have been using it without errors for at least 
>>>> a year.
>>>> Then, when I upgraded to Fedora Core 3, it was the only thing on my 
>>>> computer that stopped working. When I click on the icon on my 
>>>> desktop, nothing pops up, and top shows a massive load on the CPU 
>>>> for "jdev".
>>>> When I run it in a terminal window, I get the following error:
>>>>
>>>> java.lang.NoClassDefFoundError
>>>>      at java.lang.Class.forName0(Native Method)
>>>>      at java.lang.Class.forName(Class.java:141)
>>>>      at oracle.ide.IdeCore.class$(IdeCore.java:89)
>>>>      at oracle.ide.IdeCore.startupImpl(IdeCore.java:775)
>>>>      at oracle.ide.Ide.startup(Ide.java:539)
>>>>      at oracle.jdeveloper.JDeveloper.launch(JDeveloper.java:58)
>>>>      at oracle.jdeveloper.JDeveloper.main(JDeveloper.java:37)
>>>>
>>>> I've got the same java SDK I had before, and the configuration 
>>>> files are pointing to it. Can anybody think of why an upgrade to 
>>>> Fedora Core
>>>> 3 would be causing this error?
>>>>
>>>> Thanks,
>>>> Cyrus
>>>>
>>>>  
>>>>     
>>>
>>> --
>>> fedora-list mailing list
>>> fedora-list@xxxxxxxxxx
>>> To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
>>>
>>>
>>>
>>>   
>>
>>
>>
>> --
>> __________________
>> Cyrus Adkisson
>> RooseveltMedia.com
>> 1833 New Hampshire Avenue NW
>> Washington, DC 20009
>> (202)465-4359
>>
>> --
>> fedora-list mailing list
>> fedora-list@xxxxxxxxxx
>> To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
>>
>>  
>>
>
>


--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux