Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

NoClassDefFoundError while starting the application

Posted on 2006-07-18
15
Medium Priority
?
585 Views
Last Modified: 2012-06-27
I am getting this exception while starting my application.

Here is the stack trace of the exception:

In my folder structure, I have this class CustWOSet.class in the workorder folder.  I also tried to add this in the classpath explicitly in the environmental variables but still didnt work.

Tue Jul 18 15:55:05 CDT 2006 java.lang.NoClassDefFoundError: custom/app/workorder/CustWOSet
      at java.lang.ClassLoader.defineClass0(Native Method)Tue Jul 18 15:55:05 CDT 2006
      at java.lang.ClassLoader.defineClass(ClassLoader.java:488)Tue Jul 18 15:55:05 CDT 2006
      at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:106)Tue Jul 18 15:55:05 CDT 2006
      at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:401)Tue Jul 18 15:55:05 CDT 2006
      at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:162)Tue Jul 18 15:55:05 CDT 2006
      at java.lang.ClassLoader.loadClass(ClassLoader.java:294)Tue Jul 18 15:55:05 CDT 2006
      at java.lang.ClassLoader.loadClass(ClassLoader.java:250)Tue Jul 18 15:55:05 CDT 2006
      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:310)Tue Jul 18 15:55:05 CDT 2006
      at java.lang.Class.forName0(Native Method)Tue Jul 18 15:55:05 CDT 2006
      at java.lang.Class.forName(Class.java:115)Tue Jul 18 15:55:05 CDT 2006
      at psdi.mbo.MboSetInfo.getMboSetClass(MboSetInfo.java:115)Tue Jul 18 15:55:05 CDT 2006
      at psdi.server.AppService.getMboSet(AppService.java:350)Tue Jul 18 15:55:05 CDT 2006
0
Comment
Question by:expertsit
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
  • 2
  • +2
15 Comments
 
LVL 92

Expert Comment

by:objects
ID: 17133816
what package is the class in?
If its in workorder package then u need to add custom/app to your classpath
and call
Class.forName("workorder.CustWOSet");
0
 
LVL 92

Accepted Solution

by:
objects earned 128 total points
ID: 17133824
If its in custom.app.workorder.CustWOSet then add the parent directory of custom to your classpath
0
 

Author Comment

by:expertsit
ID: 17133847
The custom.app.workorder.CustWOSet is in a folder called Maximo which is in E:\ drive. So I should include E:\Maximo in my classpath. I already have that in the classpath.

thanks for the quick response.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 1

Assisted Solution

by:soft_techy
soft_techy earned 124 total points
ID: 17135608
try

java custom.app.workorder.CustWOSet  

and see what happens
0
 
LVL 26

Assisted Solution

by:ksivananth
ksivananth earned 124 total points
ID: 17135858
make sure the class "CustWOSet" is in "E:\Maximo\custom\app\workorder" folder and u have "E:\Maximo" in classpath.
0
 
LVL 30

Assisted Solution

by:Mayank S
Mayank S earned 124 total points
ID: 17136102
If you're running this from the command-prompt and you're setting the class-path using My Computer -> Properties, you need to close the command-window and start a new one. If you are using some IDE like Eclipse, you need to set the class-path there instead of using the system class-path.
0
 

Author Comment

by:expertsit
ID: 17138355
I already have E:/Maximo in my classpath. Also, I am not running this application from the command line. The ear file is deployed in the weblogic server and I start the application by typing the url in a browser.

thanks for your ideas.
0
 
LVL 30

Expert Comment

by:Mayank S
ID: 17138462
>> I already have E:/Maximo in my classpath

Weblogic ignores the system class-path.

>> I start the application by typing the url in a browser.

Browser is the client :) the server would've been started somewhere else.
0
 

Author Comment

by:expertsit
ID: 17138486
So where else should I define the classpath if the weblogic ignores the system class-path?

thanks,
0
 
LVL 30

Expert Comment

by:Mayank S
ID: 17138567
If the class is JARed, place it in the lib directory of the project or server. Otherwise place the custom directory inside the classes directory (the entire hierarchy custom/app/workorder along with the class file should be present).
0
 

Author Comment

by:expertsit
ID: 17138597
I am building the ear file using the build.xml

0
 
LVL 30

Expert Comment

by:Mayank S
ID: 17138830
That's fine. The classes the application needs have to be locatable.
0
 

Author Comment

by:expertsit
ID: 17139214
Actually that error is fixed. I modified the build.xml and rebuilt the ear files and it worked.

thanks,
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
Suggested Courses

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question