vaadin error

org.apache.catalina.core.StandardWrapperValve invoke
GRAVE: Exception lors de l’allocation pour la servlet Testvaadin Application
javax.servlet.ServletException: Failed to load application class: com.example.testvaadin.TestvaadinApplication
at com.vaadin.terminal.gwt.server.ApplicationServlet.init(ApplicationServlet.java:71)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1173)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:809)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:129)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:662)

any answer guys , i kind need it urgently

Probably a classpath error, however there should be an additional cause , are you sure you gave all the exceptions from the log ?

Somewhere there should be a ClassNotFoundException or some other cause.

yes i did put all the exception


All
you’ve given us is the stacktrace.

In turn,
all
we can tell you from that is that Tomcat can’t load the com.example.testvaadin.TestvaadinApplication class.

We’ve no idea what’s in the source code.
We’ve no idea how you’ve built the class.
We’ve no idea what the web archive looks like.

Without those things, we can’t off any practical help.

All that said - often this is caused by the application class importing a class that is not on the classpath. Are all the dependent jars in the WEB-INF/lib directory of the web application?

Cheers,

Charles.

What might cause this (no way to tell from the supplied information) is if you have a Vaadin JAR as a shared library that gets loaded with a separate classloader before the web application classloader is used, and thus doesn’t have access to your application classes.

If that is the case, two options: put the Vaadin JAR in the WAR instead of sharing it or create your own servlet class (inheriting AbstractApplicationServlet if using Vaadin 6) that loads the application class explicitly and doesn’t use reflection.