Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Error 500: java.lang.NoClassDefFoundError: packageName/className

I have created a jsp page that has a form to get the attributes needed to create a Work Item, the jsp calls on the class to create the Item, but I ran into this error and researched multiple times with multiple sources but none solve the problem for me. can you please help, what to you need to see (code, web.xml, MANIFEST, server.xml... etc.)?

0 votes

Comments

Full stack trace? We don't even know which component reports this error.

Class loader order was the problem, I had to change to parent last and WAR class loader policy to "Single class loader for application.

I am including and loading Plain java jars with my war files, not the best practice I think.



One answer

Permanent link

 The NoClassDefFoundError indicates that the classloader , which is responsible for dynamically loading classes, cannot find the .class file for the class that you're trying to use. The definition of a class can be requested during a method call , or while creating a new instance using a new expression. NoClassDefFoundError means that the class is present in the classpath at Compile time, but it doesn't exist in the classpath at Runtime. After you compile your code, you end up with .class files for each class in your program. These binary files are the bytecode that Java interprets to execute your program. 



0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,938

Question asked: Jun 08 '17, 12:26 p.m.

Question was seen: 2,060 times

Last updated: Aug 21 '20, 2:59 a.m.

Confirmation Cancel Confirm