PDA

View Full Version : ClassNotFoundException: ListLoadResult



chalu
29 Jul 2010, 8:28 PM
I have this strange error when I try to run my code, it says


java.lang.NoClassDefFoundError: com/extjs/gxt/ui/client/data/ListLoadResult
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
at java.lang.Class.getConstructor0(Class.java:2699)
at java.lang.Class.getConstructor(Class.java:1657)
at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.createManagedObject(InjectionManagerImpl.java:301)
at com.sun.enterprise.web.WebContainer.createServletInstance(WebContainer.java:700)
at com.sun.enterprise.web.WebModule.createServletInstance(WebModule.java:1937)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1252)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:1059)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:187)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97)
at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:332)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:233)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:165)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.ClassNotFoundException: com.extjs.gxt.ui.client.data.ListLoadResult
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at org.glassfish.web.loader.WebappClassLoader.findClass(WebappClassLoader.java:949)
at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1420)
... 32 more


By the, this only started happening after I changed a Set to a List, apart from that, this app was already running. Very strange.

sven
30 Jul 2010, 6:01 AM
Make sure that you have the gxt.jar file on the classpath of your server. The exception indicates, that it cannot find it on the serverclasspath.

chalu
1 Aug 2010, 3:47 PM
I had my project set up properly, and I even have several projects using the same GXT library in Netbeans. The other works fine but this fails strangely saying it cant find ListLoadResult. I removed the Library from Netbeans and deleted its files, extracted it afresh and then added it again to Netbeans and then my projects. And funny enough, the others worked but this project still can't find ListLoadResult.

So I called it "a day", packed up my laptop and went home, came back two days later and now everything works well as though nothing ever happened.

Do U guys occasionally get such bizarre scenarios while building software, or is it just me ??

micgala
2 Aug 2010, 1:12 AM
Yeah, unfortunately these strange things happen... it is very frustrating.
Those IDE problems are very hard to identify... sometimes you spend the whole day on it.
Probably it was some cache (?) problem with netbeans.

Anyway, I use Eclipse.

sven
2 Aug 2010, 4:23 AM
On eclipse, i simple have to refresh the project and it works again. Netbeans probably has something similiar.

chalu
3 Aug 2010, 4:26 AM
Thanks for these hints guys, I really appreciate :)