MyEclipse: JBOSS 4.2.2: Class file name must end with .class anthonyestelita - Feb 12, 2008 - 04:02 PM Post subject: JBOSS 4.2.2: Class file name must end with .class
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:
Quote:
"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
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.exesupport-nipun - Feb 12, 2008 - 05:08 PM Post subject: RE: JBOSS 4.2.2: Class file name must end with .class
Quote:
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 ?anthonyestelita - Feb 12, 2008 - 08:56 PM Post subject: RE: JBOSS 4.2.2: Class file name must end with .class
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.support-nipun - Feb 13, 2008 - 03:16 PM Post subject: RE: JBOSS 4.2.2: Class file name must end with .class
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 ?anthonyestelita - Feb 14, 2008 - 06:04 PM Post subject: RE: JBOSS 4.2.2: Class file name must end with .class
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,
Anthonysupport-rkalla - Feb 15, 2008 - 08:24 PM Post subject: RE: JBOSS 4.2.2: Class file name must end with .class
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?anthonyestelita - Feb 15, 2008 - 08:32 PM Post subject: RE: JBOSS 4.2.2: Class file name must end with .class
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.support-rkalla - Feb 15, 2008 - 08:34 PM Post subject: RE: JBOSS 4.2.2: Class file name must end with .class
Hmm, good pt... lemme know if that does the trick (can you try changing them to just underscores? Flerg_ear)anthonyestelita - Feb 26, 2008 - 01:25 AM Post subject: RE: JBOSS 4.2.2: Class file name must end with .class
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,
Anthonysupport-rkalla - Feb 26, 2008 - 06:51 PM Post subject: RE: JBOSS 4.2.2: Class file name must end with .class
Anthony,
I'm glad that helped and do recognize that we definately need to fix this for a future release.patco - Aug 03, 2009 - 02:23 PM Post subject: Maybe it is related to the ".class" files edited
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!support-joy - Aug 04, 2009 - 04:51 AM Post subject: RE: Maybe it is related to the ".class" files edit
Hi,