JBOSS 4.2.2: Class file name must end with .class

  1. MyEclipse Archived > Application Servers and Deployment

This topic contains 11 replies, has 5 voices, and was last updated by  support-joy 11 years, 4 months ago.

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #281678 Reply

    Whenever we get errors in our JBOSS 4.2.2 java code, and if you click on the error in the console you get an error that pops up stating the following:

    “Class file name must end with a .class”.

    The weird thing about this is that if you click on an error that is not from one of our java classes it works just fine.

    Here are the things that I have tried:
    1. added -clean -refresh to the eclipse.ini
    a. restarted eclipse
    b. did a clean build of entire workspace
    c. did a re-deploy
    d. started Jboss myeclipse application server
    e. still get “class file name must end with a .class” error. ;-(
    2. manually deleted all .class files in my workspace
    a. restarted eclipse
    b. did a clean build of entire workspace
    c. did a re-deploy
    d. started Jboss myeclipse application server
    e. still get “class file name must end with a .class” error. ;-(
    3. deleted entire workspace
    a. restarted eclipse
    b. re-checked out projects from cvs
    c. did a clean build of entire workspace
    d. did deploy
    e. started Jboss myeclipse application server
    f. still get “class file name must end with a .class” error. ;-(
    4. freshly installed the myEclipse/eclipse
    a. downloaded installed “MyEclipse_6.0.1GA_E3.3.1_FullStackInstaller.exe”
    b. re-checked out projects from cvs
    c. did a clean build of entire workspace
    d. did deploy
    e. started Jboss myeclipse application server
    f. still get “class file name must end with a .class” error. ;-(

    I’m not sure what else I can do/try. ;-( Anyone else ever get this error?

    Greatly appreciate any suggestions with this!

    THANK YOU,
    Anthony
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    myEclipse Summary Info:
    *** Date:
    Tuesday, February 12, 2008 8:01:17 AM PST

    ** System properties:
    OS=WindowsXP
    OS version=5.1
    Java version=1.5.0_11

    *** MyEclipse details:
    MyEclipse Enterprise Workbench
    Version: 6.0.1 GA
    Build id: 6.0.1-GA-200710

    *** Eclipse details:
    MyEclipse Enterprise Workbench

    Version: 6.0.1 GA
    Build id: 6.0.1-GA-200710

    Eclipse Graphical Editing Framework

    Version: 3.3.1.v20070814
    Build id: 20070814-1555

    Eclipse Platform

    Version: 3.3.2.R33x_v20071022-_19UEksF-G8Yc6bUv3Dz
    Build id: M20071023-1652

    Eclipse RCP

    Version: 3.3.2.R33x_r20071022-8y8eE9CEV3FspP8HJrY1M2dS
    Build id: M20070921-1145

    Eclipse Java Development Tools

    Version: 3.3.1.r331_v20070629-7o7jE72EDlXAbqAcnbmyg1rf8RIL
    Build id: M20070921-1145

    Eclipse Plug-in Development Environment

    Version: 3.3.2.R33x_r20071022-7N7M4CYWLBCz-yHkMIuHN
    Build id: M20070921-1145

    Eclipse Project SDK

    Version: 3.3.2.R33x_r20071022-7M7J7C_Mu2gop0b_GAwplOBhyuKO
    Build id: M20071023-1652

    Eclipse startup command=-os
    win32
    -ws
    win32
    -arch
    x86
    -showsplash
    -launcher
    C:\Program Files\MyEclipse 6.0\eclipse\eclipse.exe
    -name
    Eclipse
    –launcher.library
    C:\Program Files\MyEclipse 6.0\eclipse\plugins\org.eclipse.equinox.launcher.win32.win32.x86_1.0.2.R331_v20071019\eclipse_1021.dll
    -startup
    C:\Program Files\MyEclipse 6.0\eclipse\plugins\org.eclipse.equinox.launcher_1.0.1.R33x_v20070828.jar
    -exitdata
    b78_74
    -vm
    C:\Program Files\MyEclipse 6.0\jre\bin\javaw.exe

    #281680 Reply

    Loyal Water
    Member

    Whenever we get errors in our JBOSS 4.2.2 java code,

    Can you give me some information about the application that you are working with. When do you get this error ? When you depoloy / run an app ?

    #281683 Reply

    The errors that I am referring to are errors in our code (such a a NullPointerException). We use to be able to click on the message in the console window and our source file will be opened and scrolled to where the error occurred; however, now when we click on the console message it pops up an error message dialog stating: “Class file name must end with a .class”. I have no idea what the heck that means. ;-(

    We have two applications (both throw the same “Class file name must end with a .class” message):
    1. Struts based Application
    a) ear project
    b) war project
    c) jar project
    d) 2 har projects
    2. JSF/Seam Application
    a) ear project
    b) war project
    c) 2 EJB3 projects

    You can easily create this:
    1. In any Java file (ActionClass, ActionForm, EJB3, SLB, SFB, or Entity Bean) add the following line of code:
    Long NPF = null;
    if (NPF.longValue() == 0); //this will throw a NullPointerException
    2. In the Console window click on the line that represents the error.

    #281710 Reply

    Loyal Water
    Member

    I was unable to reproduce this at my end. Can you switch to a new workspace, create an new project and test this again. Do you still run into the same issue ?

    #281791 Reply

    I created a new workspace and I still get the error. I even tried the following:
    1. downloaded Eclipse Europa
    2. Installed MyEclipse plugin
    3. Re-checked out all my projects from CVS
    4. Added NPE code
    5. Ran server
    6. And console window still displayed the “Class file name must end with .class” message.

    I am 99.9991% sure this is not a MyEclipse bug (I was just hoping that someone has seen this and has a workaround/fix). I opened up an Eclipse bug for anyone that may be reading this thread and may want to see its progress (lol):
    https://bugs.eclipse.org/bugs/show_bug.cgi?id=218987

    Thanks,
    Anthony

    #281835 Reply

    Riyad Kalla
    Member

    Anthony,
    Very strange… I guess you could try double-checking your build path… is there anything weird there? Like your output dirs are external dirs or something like that?

    #281836 Reply

    Nope I just use the default output paths (ejb’s goes to classes and war’s goes to WebRoot/WEB-INF/classes). But you did make me think of something I haven’t tried yet. All our projects have periods in their names (i.e. enterprise.ejb.jar and enterprise.ear and enterprise.war are the actual names of our projects). I am thinking that maybe the “period” in the names of the projects could be the cause of this error being thrown.

    #281837 Reply

    Riyad Kalla
    Member

    Hmm, good pt… lemme know if that does the trick (can you try changing them to just underscores? Flerg_ear)

    #282115 Reply

    That worked! I renamed all our projects to use underscores and voila. Go figure.

    !!!! DON’T USE PERIODS IN YOUR PROJECT NAMES! 🙂 !!!!

    Hopefully this thread will help someone some day,
    Anthony

    #282153 Reply

    Riyad Kalla
    Member

    Anthony,
    I’m glad that helped and do recognize that we definately need to fix this for a future release.

    #301013 Reply

    patco
    Member

    Hi,

    I had the same problem, and realized that I had some .class files opened in the editor.

    After I closed them, it worked for me!

    #301043 Reply

    support-joy
    Member

    Hi,

    Good to hear that you are all set. 🙂

Viewing 12 posts - 1 through 12 (of 12 total)
Reply To: JBOSS 4.2.2: Class file name must end with .class

This topic is marked as closed to new replies, however your posting capabilities still allow you to do so.

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