aspose file tools*
The moose likes Servlets and the fly likes java.lang. NoClassDefFoundError Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "java.lang. NoClassDefFoundError" Watch "java.lang. NoClassDefFoundError" New topic
Author

java.lang. NoClassDefFoundError

VIV sharma
Greenhorn

Joined: Jan 01, 2004
Posts: 18
Hello Ranchers,


Getting this Error

i've kept required jar file in WEB-INF/lib folder
commons-beanutils.jar, commons-collections-3.1.jar

IN GetResult.java
import org.apache.commons.beanutils.BeanComparator;

//For Sorting

BeanComparator beanComparator = new BeanComparator("txtCandidateFName");
Collections.sort(lstFinalCandidateDetails,beanComparator);


ERROR :

Servlet Error: org/apache/commons/logging/LogFactory:
java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
at org.apache.commons.beanutils.MethodUtils.<clinit>(MethodUtils.java:103)
at org.apache.commons.beanutils.PropertyUtils.getReadMethod(PropertyUtils.java:1114)
at org.apache.commons.beanutils.PropertyUtils.getSimpleProperty(PropertyUtils.java:1178)
at org.apache.commons.beanutils.PropertyUtils.getNestedProperty(PropertyUtils.java:772)
at org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:801)
at org.apache.commons.beanutils.BeanComparator.compare(BeanComparator.java:140)
at java.util.Arrays.mergeSort(Arrays.java:1182)
at java.util.Arrays.mergeSort(Arrays.java:1189)
at java.util.Arrays.sort(Arrays.java:1129)
at java.util.Collections.sort(Collections.java:122)
at com.bitwise.smart.obj.GetResults.getDBSearchResults(GetResults.java:364)
at com.bitwise.smart.ResumeSearchAction.navigateRecords(ResumeSearchAction.java:999)
at com.bitwise.smart.ResumeSearchAction.resumeSearch(ResumeSearchAction.java:787)
at com.bitwise.smart.ResumeSearchAction.perform(ResumeSearchAction.java:175)
at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1787)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1586)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager.java:827)
at com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycleServlet.java:167)
at com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServlet.java:297)
at com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycleServlet.java:110)
at com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:472)
at com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletManager.java:1012)
at com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManager.java:913)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:523)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:282)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:112)
at com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:91)
at com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:184)
at com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:67)
at com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:122)
at com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListener.java:315)
at com.ibm.servlet.engine.http11.HttpConnection.handleRequest(HttpConnection.java:60)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:323)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:252)
at com.ibm.ws.util.CachedThread.run(ThreadPool.java:122)


Thanks in Advance

VIVEK
vishwa venkat
Ranch Hand

Joined: Nov 22, 2003
Posts: 185
u need common-logging.jar file.
Susanta Chatterjee
Ranch Hand

Joined: Aug 12, 2002
Posts: 102
Put the common-logging.jar in the application lib folder.
VIV sharma
Greenhorn

Joined: Jan 01, 2004
Posts: 18
HAY THanks visu and Susanta

now it's working fine, but i still have one Question on it,
actually i m using WSAD 5.0 for my Application developement and WAS 4.0
in WSAD i am not getting any error but when i deploy this on the server
then i m getting this error.


Thanks again

Vivek
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java.lang. NoClassDefFoundError