facebook

No Class Def Found [Closed]

  1. MyEclipse IDE
  2.  > 
  3. Installation, Configuration & Updates
Viewing 15 posts - 1 through 15 (of 20 total)
  • Author
    Posts
  • #211905 Reply

    elmilo
    Member

    Hey,

    I just downloaded eclipse 3 and MyEclipse. I’m more than impressed with the IDE and am hoping to push it forward in my company.

    However, whenever i try to launch jboss from eclipse, i get a no class def found error:

    java.lang.NoClassDefFoundError: C:\java\bin

    I’ve set the JBoss JDK name to point to a Java Installed JRE which is my actual jdk install at c:\java, not a JRE

    I can run jboss separately, and deploy an ear from eclipse to the running server, but i can’t start jboss from eclipse!?

    Probably done something stupid, any ideas?

    Thanks

    #211915 Reply

    Scott Anderson
    Participant

    Elmilo,

    The most common problem people have is that even though they installed a full JDK, when they told Eclipse about it they set the directory to be the jre subdirectory inside the JDK, rather than the top level JDK directory. Another possibility is that you’re using JBoss 4.0 RC1 and need to set the document builder factory and parser to be xerces instead of crimson. Crimson is correct for all prior versions, but for 4.0 RC1 you’ll need to change the preferences to read <package>.xerces.<restofpackage> instead of <package>.crimson.<restofpackage>

    If that doesn’t do it, can you please post all the information we request in the [URL=http://www.myeclipseide.com/PNphpBB2+file-viewtopic-t-393.html]Posting Guidelines[/URL] thread at the top of this forum? That will give us some context so that we can determine if this is an installation issue, a configuration problem, or a bug. Thanks.

    #211917 Reply

    elmilo
    Member

    Hi,

    Thanks for getting back to me. I have pointed to c:\java, this is the top level of the jdk install. I’m using Jboss 3.2.5.

    My info is as follow:
    What operating system and version are you running?
    XP
    What Eclipse version and build id are you using? (Help > About Eclipse Platform)
    version 3.0.0
    build – 200406251208
    – Was Eclipse freshly installed for MyEclipse?
    Yes
    – Are any other external plugins installed?
    No
    – How many plugins in the <eclipse>/plugins directory are like org.eclipse.pde.*
    8
    What MyEclipse version are you using? (Help > About Eclipse Platform > Features)
    3.7.2
    What JDK version are you using to run Eclipse? (java -version)
    1.4.2_05
    What JDK version are you using to launch your application server?
    1.4.2_05
    What steps did you take that resulted in the issue?
    Tried starting JBoss from eclipse
    What application server are you using?
    Jboss 3.2.5
    Are there any exceptions in the Eclipse log file? (<workspace>/.metadata/.log)
    No

    Thanks
    Paul

    #211923 Reply

    Riyad Kalla
    Member

    Paul,
    What do you get when you run:

    
    c:\java\bin\java.exe -version
    

    Are you sure you are selecting the correct JDK for running JBoss? Do you have JBoss enabled? Have you tried run & debug mode? Do you have any Optioanl VM arguments?

    #211927 Reply

    elmilo
    Member

    Hi,

    I get the following:

    java version “1.4.2_05”
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04)
    Java HotSpot(TM) Client VM (build 1.4.2_05-b04, mixed mode)

    JBoss is enabled, I’ve tried debug and run mode and there are no optional vm args

    I’ll check the vm required for JBoss

    cheers

    #211934 Reply

    Riyad Kalla
    Member

    What is your path for JBoss home set to? The error seems to be indicative of a screwed up execution path meaning its not getting parsed right…

    #211973 Reply

    elmilo
    Member

    Hey,

    well, eclipse can successfully deploy an ear to jboss if i start it manually, so i presume it knows where jboss is.

    do you mean my system path or the value set in preferences/app servers in eclipse?

    eclipse; i point to C:\jboss-3.2.5\, it seems happy with this for deployment

    I also put a JBOSS_HOME in my path with the same directory to see if this made any difference. Still get the no class def found!

    Any ideas 😉

    cheers

    #211974 Reply

    elmilo
    Member

    One thing that seems odd, the error I get is:

    java.lang.NoClassDefFoundError: C:\java\bin
    Exception in thread “main”

    Does this mean that eclipse is trying to start C:\java\bin? Normally with no class def found errors, the actual class that can’t be found is printed.

    thanks

    #211977 Reply

    Riyad Kalla
    Member

    Yea that’s the weird part, I believe its parsing the path wrong (maybe because of spaces?) and somehow thinks the first part of your java.exe path is the class its suppose to run…

    Can you shut down Eclipse, go delete the <workspace dir>\configuration dir and restart it and then try?

    Also try navigating to your <myeclipse dir>\eclipse\plugins\com.genuitec.eclipse.easie.jboss3_3.8.0 directory (it is probably called 3.7.2 at the end, that’s fine) and open the preferences.ini file… anything interesting/odd in there?

    #211983 Reply

    elmilo
    Member

    I’ll try that now, one thing though, when I installed the jdk with the standard name, so:

    c:\jdk1.4.2_205 (i think)

    the name was parsed wrong, and it tried to find jdk1/4/2 etc…, which would infer there is a problem with the parsing.

    when you say parse though, what’s trying to parse the directory name? should it not just point to what i provide?

    thanks, get back to you after trying your last mail

    #211984 Reply

    elmilo
    Member

    before i delete anything, there is no <workspace>/configuration directoy, there is a c:\eclipse\configuration directory.

    should i delete that?

    cheers

    #211985 Reply

    Riyad Kalla
    Member

    before i delete anything, there is no <workspace>/configuration directoy, there is a c:\eclipse\configuration directory.

    should i delete that?

    Woops yes delete that one (its a config cache, so Eclipse will just recreate it when you start back up).

    c:\jdk1.4.2_205 (i think)

    the name was parsed wrong, and it tried to find jdk1/4/2 etc…, which would infer there is a problem with the parsing.

    Wait, what do you mean “the name was parsed wrong and it tried to find…” how did you know this? Was there an error messages? Where in the Eclipse console?

    There should be no problem with any of this, that is why I’m thinking its something totally different… do me a favor and check if you have an environment variable defined for your system called “CLASSPATH”, what is its value? Do you need it (can you get rid of it?)

    Also check other Java related environment variables (JAVA_HOME) and also check your PATH variable value… do they all look sane? Any stray spaces or incorrect semicolons?

    #211986 Reply

    elmilo
    Member

    Well,

    I just changed to point to a jdk in my program files, and that couldn’t work, gving a no class def found error trying to run:

    c:\Program

    so, maybe it’s trying to run a program with a space after c:\java\bin, or for some reason is putting a space in by mistake?

    looking at what it is trying to run at the top of the console window:
    <terminated>jbossServer[Remote Java Application] C:\java\bin\javaw.exe

    there are no spaces!

    cheers

    #211987 Reply

    Riyad Kalla
    Member

    1) Any luck with the environment variables?

    2) This is strange! Are you using a non-english Locale as your default for windows? Do you have a lot of JDKs or JREs installed?

    #211988 Reply

    elmilo
    Member

    Hey,

    yeh, i actually renamed the jdk to c:\java as i had initial problems (apologies, should have mentioned),

    C:\eclipse\workspace\.metadata: log entry:
    !ENTRY com.genuitec.eclipse.easie.jboss3 1 1 Aug 11, 2004 15:25:12.40
    !MESSAGE Error starting JBoss: java.lang.NoClassDefFoundError: C:\j2sdk1/4/2_05\bin
    Exception in thread “main”

    However, using c:\java, there are no entries in the log file, i just get the no class def error in the console

    Tried deleting the config, no joy. Looked through classpath, nothing out of the ordinary that i can see

Viewing 15 posts - 1 through 15 (of 20 total)
Reply To: No Class Def Found [Closed]

You must be logged in to post in the forum log in