Solved

NoClassDefFoundError while starting the application

Posted on 2006-07-18
15
554 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
  • 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 32 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
 
LVL 1

Assisted Solution

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

java custom.app.workorder.CustWOSet  

and see what happens
0
 
LVL 26

Assisted Solution

by:ksivananth
ksivananth earned 31 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:mayankeagle
mayankeagle earned 31 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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 

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:mayankeagle
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:mayankeagle
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:mayankeagle
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
countX 22 71
Systems talking to each other 5 110
Java Message handling in Service Layer 3 39
Java / Linux and Regular Expressions 11 48
For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

744 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now