java.lang.NoClassDefFound

Hi All,

In my web application i have a class ClassA inside package package1. When i am trying to access ClassA from some other class I am getting java.lang.NoClassDefFound error package1/ClassA. I know the runtime couldn't find the class. But it is an existing application. But we recently migrated to Jdk1.4 from jdk1.3. This would be problem?

Regards,

Mari

[384 byte] By [MarimuthuCa] at [2007-11-27 10:48:50]
# 1

Presumably you have changed your classpath, or had classes in the ext directory of your old JVM (which is exactly why that's a bad idea).

dcmintera at 2007-7-28 23:03:33 > top of Java-index,Java Essentials,New To Java...
# 2

Thanks dcminter,

The interesting part here is all the other modules are working fine. Only when accessing that particular class gives the same error.

Regards,

Mari

MarimuthuCa at 2007-7-28 23:03:33 > top of Java-index,Java Essentials,New To Java...
# 3

Regardless of what JVM you're using, if you get that message it always means that the class in question is missing from the classpath (unless for some reason your application synthesizes and throws the exception - there's no good reason to do that though).

If the only change is the JVM, then you must have been picking up the class from the old JVM. If the classpath has changed as well, then the class is no longer visible to the new path.

It really is that simple.

dcmintera at 2007-7-28 23:03:33 > top of Java-index,Java Essentials,New To Java...