expertsit
asked on
NoClassDefFoundError while starting the application
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.NoClassDefFoundE rror: custom/app/workorder/CustW OSet
at java.lang.ClassLoader.defi neClass0(N ative Method)Tue Jul 18 15:55:05 CDT 2006
at java.lang.ClassLoader.defi neClass(Cl assLoader. java:488)T ue Jul 18 15:55:05 CDT 2006
at java.security.SecureClassL oader.defi neClass(Se cureClassL oader.java :106)Tue Jul 18 15:55:05 CDT 2006
at weblogic.utils.classloader s.GenericC lassLoader .findLocal Class(Gene ricClassLo ader.java: 401)Tue Jul 18 15:55:05 CDT 2006
at weblogic.utils.classloader s.GenericC lassLoader .findClass (GenericCl assLoader. java:162)T ue Jul 18 15:55:05 CDT 2006
at java.lang.ClassLoader.load Class(Clas sLoader.ja va:294)Tue Jul 18 15:55:05 CDT 2006
at java.lang.ClassLoader.load Class(Clas sLoader.ja va:250)Tue Jul 18 15:55:05 CDT 2006
at java.lang.ClassLoader.load ClassInter nal(ClassL oader.java :310)Tue Jul 18 15:55:05 CDT 2006
at java.lang.Class.forName0(N ative Method)Tue Jul 18 15:55:05 CDT 2006
at java.lang.Class.forName(Cl ass.java:1 15)Tue Jul 18 15:55:05 CDT 2006
at psdi.mbo.MboSetInfo.getMbo SetClass(M boSetInfo. java:115)T ue Jul 18 15:55:05 CDT 2006
at psdi.server.AppService.get MboSet(App Service.ja va:350)Tue Jul 18 15:55:05 CDT 2006
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.NoClassDefFoundE
at java.lang.ClassLoader.defi
at java.lang.ClassLoader.defi
at java.security.SecureClassL
at weblogic.utils.classloader
at weblogic.utils.classloader
at java.lang.ClassLoader.load
at java.lang.ClassLoader.load
at java.lang.ClassLoader.load
at java.lang.Class.forName0(N
at java.lang.Class.forName(Cl
at psdi.mbo.MboSetInfo.getMbo
at psdi.server.AppService.get
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
The custom.app.workorder.CustW OSet 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.
thanks for the quick response.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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.
thanks for your ideas.
>> 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.
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.
ASKER
So where else should I define the classpath if the weblogic ignores the system class-path?
thanks,
thanks,
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).
ASKER
I am building the ear file using the build.xml
That's fine. The classes the application needs have to be locatable.
ASKER
Actually that error is fixed. I modified the build.xml and rebuilt the ear files and it worked.
thanks,
thanks,
If its in workorder package then u need to add custom/app to your classpath
and call
Class.forName("workorder.C