PDA

View Full Version : java.lang.ClassNotFoundException: com.extjs.gxt.ui.client.data.PagingLoadResult



RaulDM
30 May 2009, 1:34 AM
Hello All

I have came up with an error again..

I am trying to add a PagingGrid in my application and cannot instantiate my Servlet class as console showing Servlet MyServlet is not available. Right now I have two servlet in my application and the first one is working fine which I have used in the LogIn phase. The second servlet is responsible for create a PagingLoadResult object and return it to the client so that client Grid can display the paged result.

I am fetching my user record table from database to fill the PagingLoadResult<UserBeanModel> object.


The error log displays :

org.apache.catalina.core.ApplicationContext log
INFO: Marking servlet MyServlet as unavailable


org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Allocate exception for servlet MyServlet
java.lang.ClassNotFoundException: com.extjs.gxt.ui.client.data.PagingLoadResult
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1386)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1232)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
at java.lang.Class.getConstructor0(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1089)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:791)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:127)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Unknown Source)



I have a function in my servlet class to create the PagingLoadResult as:

@Override
public PagingLoadResult<UserBeanModel> getActiveUsers(PagingLoadConfig config) {

if(userList==null){
loadData(); //<---Function for load data from database and put it to [I]userList
}

ArrayList<UserBeanModel> sublist = new ArrayList<UserBeanModel>();

int start = config.getOffset();
int limit = userList.size();

if (config.getLimit() > 0) {
limit = Math.min(start+config.getLimit(), limit);
}

for (int i = config.getOffset(); i < limit; i++) {
sublist.add(userList.get(i));
}

return new BasePagingLoadResult<UserBeanModel>(sublist, config.getOffset(), userList.size());
}



From the stack trace it can be pointed out that the servlet container may not be able to locate the PagingLoadResult class, but this is available in the gxt library.

Kindly help...!!


Thanks
Raul

RaulDM
30 May 2009, 5:17 AM
It was because I used Interfaces rather than classes for my return types.

I have changed PagingLoader to BasePagingLoader, PagingLoadResult to BasePagingLoadResult.


It has solved the problem but now I am sticking with the following:

An IncompatibleRemoteServiceException was thrown while processing this call.

com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException: Parameter 0 of is of an unknown type 'com.extjs.gxt.ui.client.data.PagingLoadConfig'

at com.google.gwt.user.server.rpc.RPC.decodeRequest(RPC.java:277)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:164)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:86)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Unknown Source)



Caused by: java.lang.ClassNotFoundException: com.extjs.gxt.ui.client.data.PagingLoadConfig
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1386)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1232)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at com.google.gwt.user.server.rpc.RPC.getClassFromSerializedName(RPC.java:657)
at com.google.gwt.user.server.rpc.RPC.decodeRequest(RPC.java:274)
... 18 more


Any Idea please...!!