Failed to load application class when starting example project

Hello, I’m new to vaadin thus I’m going step by step with the “Book of vaadin” first example (Your Firs Project in vaadin) but when launching the application I get

javax.servlet.ServletException: Failed to load application class: com.example.testingvaadin.myproject
at com.vaadin.terminal.gwt.server.ApplicationServlet.init(ApplicationServlet.java:71)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1206)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:827)
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:103)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Unknown Source)

Notes:

a) Same error with Tomacat 6 and 7
b) Yes, vaadin’s jar is in the lib directory (…WebContent\WEB-INF\lib\vaadin-6.8.4.jar)

I’ve seen that is a very common error (googling “ApplicationServlet.java:71”) but I did not find the solution for my problem, any guess?

thanks in advance

Are you sure that ‘com.example.testingvaadin.myproject’ is the complete qualified name of your actual Application class, and not just the package name? How do you deploy your application?

Hi Thomas,

Tnx for your answer.

Yes I’m sure. The lowercase
m
of myproject is because I’ve read somewhere that the problem comes from a lower/upper case problem… (yes, it sounds stupid but trying it cost nothing)

Thus I can add a new note to my original post:

  1. I’ve used
    Myproject
    and
    myproject
    as classname for the application class

  2. I’ve also deployed the vaadin sampler.war and works fine

Can you tell me what are the expected files under …WebContent\WEB-INF ? I can not find the compiled version (.class) of my Application class

Thanks

WEB-INF should contain the web.xml, and a lib folder with at least the Vaadin JAR file. The built classes are usually found in the JAR root, under their respective packages. Java conventions say that classnames should start with a capital letter, but it deosn’t force you to do so; the important thing is that Java is case-sensitive, so the name in web.xml has to be exactly the same as in your fully qualified class name.

How do you build/deploy your war?