facebook

cannot access : bad class file:
💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #254328 Reply

    joelhull
    Member

    I just setup a new enironment. Installed eclipse 3.1 and MyEclipse 4.1. Pulled project source from CVS and imported eclipse projects into workspace. Create the need User Libraries in eclipse so the project libraries could resolve and the java code could compile. However, I am getting errors from the jsp saying it “cannot access” some of the java classes. It says the class is a “bad class file”. Why does it think the class is bad?

    #254411

    Riyad Kalla
    Member

    If the library is from the project, my guess is that it is infact bad. If you checked the JAR in and forgot to specify -kb it’s most likely that the project actually got checked in as a text file and corrupted the JAR. Check from your Windows Explorer shell and see if the JAR is only like 2 or 4k in side, most likely it’s corrupt.

    #254549

    joelhull
    Member

    thanks for the idea. However, the classes that it is having a problem with are the compiled classes from the same project in the workspace. The classes are not in a jar file. Below is a copy of the error message from the Problems pane.

    cannot access com.intellisync.auth.webui.taglib.BaseUrlTag: bad class file: E:\prof_services\MultiCarrierAuthentication\webapps\authadmin\WebRoot\WEB-INF\classes\com\intellisync\auth\webui\taglib\BaseUrlTag.class forgotPassword.jsp authP3/WebRoot/WEB-INF/jsp line 20 July 7, 2006 8:32:00 PM 4410

    #254560

    Riyad Kalla
    Member

    Does that class exist? How big is it? If you open it with text pad or notepad is it filled with garbled content (like it should be?)

    #256062

    rob12345
    Member

    I have the same error in all JSPs in my project, the class is built & deployed correctly and is 3.39 KB. Each JSP thinks that it has a bad class, very strange.

    #256066

    Riyad Kalla
    Member

    Just a heads up guys, I’ve never seen this problem happen when the project, build path and class were legit. I have seen this happen when something screwy was on the build path, the source file was corrupted or something else equally as squirrely. So as far as trouble shooting, start easy, like with a new empty project, and slowly start dropping source files from your main project into it until it throws up, that might help you narrow odwn what the problem is.

    Also don’t underestimate the importance of a Refresh then a Clean on your project.

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: cannot access : bad class file:

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