Vaadin Application deployment error

Hi,

I have a Vaadin-maven project, and when I deploy it I’m getting such exception:
WARNING: StandardWrapperValve[VaadinApplication]
: PWC1382: Allocate exception for servlet VaadinApplication
javax.servlet.ServletException: Failed to load application class: com.example.vaadin.MyApplication
at com.vaadin.terminal.gwt.server.ApplicationServlet.init(ApplicationServlet.java:71

What’s wrong??

Glassfish 3.1.2
Vaadin 6.8.0

Does the class com.example.vaadin.MyApplication exist and does it inherit from com.vaadin.Application? If not you need to point the context-parameter “application” in web.xml towards the right class.

One more possible issue: maybe the Vaadin JAR is loaded with a (shared) classloader that does not have access to the classes in your WAR (loaded by your server with some web application classloader).

Thanks for your responce,

I’m deploying wep app to glassfish server, and under %GlassFishHome%/glassfish/domains/domain1/lib
I have vaadin library (shared to use by all applications).

If I deploy WebApp with vaadin lib inside war, then I got another error when using this WebApp:
Caused by: java.lang.LinkageError: loader constraint violation: when resolving interface method “kz.smartlabs.wfront.epm.interfaces.EpmBoxView.getView()Lcom/vaadin/ui/Layout;” the class loader (instance of org/glassfish/web/loader/WebappClassLoader) of the current class, com/example/vaadin/MyApplication, and the class loader (instance of java/net/URLClassLoader) for resolved class, kz/smartlabs/wfront/epm/interfaces/EpmBoxView, have different Class objects for the type in/ui/Layout; used in the signature

Trying to solve this problem three days in a row!
Please, help me somehow

Two ways to solve this:

  1. Put Vaadin JAR only in the WAR, not in the shared library directory
  2. Write your own MyApplicationServlet returning “new MyApplication()” instead of using reflection based on a parameter in web.xml

The latter approach, while it might sound complicated, is very short and only requires one or two one-line methods in a subclass of AbstractApplicationServlet to create a new application instance and minor changes in your web.xml (change which servlet is used, remove the “application” parameter).

Thank you! It really helped me!
Problem is solved!

Hello. I have exactly the same problem. However, I don’t understand when u said “shared library”
Please kindly give a screen-shot. thank.