Hi,
I am getting a java.lang.NoClassDefFoundError for one of the classes in a IBM Jar file being used in our application framework project. This IBM JAR file is no longer supported by IBM but is used by one of the application framework projects.
This jar file is not there in the application EAR file but it is referred using a variable from an external location
So in the classpath which is displayed in the error message, this Jar is not there.

I tried putting the Jar file in the application EAR as well but still the same error.
If anybody has any clues about this, please let me know.
I did change the Manifest file of this Jar since some of the Name values in the Manifest were more than 72 chars and RAD 7.0 gives error for it but WSAD 5.1 doesn't. So my guess is it is not able to read the Manifest file correctly?

I assume this is because WSAD 5.1 has the jar as a plugin or something and automatically lets you use it for your project. If you know the jar and have the jar, simply add it to your project library as an external jar (probably the easiest method).

Unfortunately I do not know the name of the WSAD jar which should be used in RAD.
I believe the problem could be because of the server runtime settings as well. I have used Classloader policy as Multiple. The other option available is Single with Classloading mode as Parent first

oh, your problem is after your app is deployed? so not a RAD problem but WAS? It will be different resolutions depending on your environment.

The error comes in Runtime. It is not a build error.
I have the Jar in the runtime (Module Depencies in RAD 7.0) as well as the build path.

In the deployment descriptor of the EAR file, I changed the class loader to Parent last but still the same error. In the server settings, I have class loader as multiple.

I am getting a little confused here, rad is not an application server so when you say runtime, have you deployed this to a server (e.g. WAS)?

If this is the case your references within the EAR are not setting the classpath for that particular jar/class correctly. You should find this and fix this, but as a quick fix you should be able to simply add the jar into your profile's lib directory (for WAS). The server needs to be restarted to pick up any classloading changes.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.