facebook

J2EE Library / NoClassDefFound problem

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #206473 Reply

    bcholmes
    Member

    I’ve just recently started a new J2EE Project using MyEclipse and I’m having a strange problem with the J2EE libraries.

    I have a JUnit test case, running a test of a filter class. I’m using a Mock implementation of the HttpServletRequest and HttpServletResponse. When I try to run the JUnit test case (using the “Run” button), I get the following error:

    java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequest

    The code compiles correctly. The Run configuration is based on the same classpath as the build class path, and yet, for some reason, JUnit isn’t able to see the javax.servlet.http.HttpServletRequest class (which lives in the J2EE library from MyEclipse).

    Have you seen anything like this before? I am using Eclipse 3.0M8 and MyEclipse _030702, and (a few months ago) when I was running Eclipse 2.1.1 and much earlier version of MyEclipse, this all worked just fine.

    BC

    #206476 Reply

    Scott Anderson
    Participant
    #206483 Reply

    bcholmes
    Member

    @support-scott wrote:

    It might be related to this…

    Oh, that looks right. So if I read it right, this’ll be fixed in your next version?

    Based on the description of the problem, then, the obvious thing for me to do is to add the j2ee.jar separately to my classpath and not rely on the one in MyEclipse until next release… (and, hey, that works! Cool!).

    Thanks bunches,
    BC

    (you guys are so fast in your responses. I think that’s great!)

    #206493 Reply

    Riyad Kalla
    Member

    (and, hey, that works! Cool!).

    Awesome, we like it when workarounds work 😀

    (you guys are so fast in your responses. I think that’s great!)

    Thanks! Our support crew really values the time of our users, and we know that when our users are hung up on something, that means they are just sitting waiting for a reply (Which can be VERY frustrating if it takes days to get one).

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: J2EE Library / NoClassDefFound problem

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