Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

WebSphere class loading issue

Bharathi Kongara
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

We ran into this issue and have been trying to resolve since yesterday with no luck. I'm wondering if anybody else has encountered this and has any thoughts ...

We are trying to call the methods of the class in a utility class that is packaged into a jar and put onto the JVM classpath in WebSphere 6.1. And we are running into NoClassDefFound errors. So we just did Class.forName("") in that utility class and got the ClassNotFoundException as expected. But when we do the same in a separate utility class that is outside of the classpath, both the forName and the actual method calls work without any problem.

That kind of suggested that the class is not "available"(/loaded) by the time our utility class gets loaded, may be. So we turned on the Verbose Class Loading to see the order in which the classes are loaded when the JVM starts up. But the class is loaded way before our utility class from the jar in the classpath.

So I'm wondering:

Why would it give me a ClassNotFound exception in my utility class (which is put on the classpath) when the log shows that the utility class is already loaded by the time this class starts loading?

Any feedback or thoughts would be greatly appreciated.

  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic