GlassFish v3 and EE Application

Hello. Vaadin doesn’t work with ee application.
Glassfish v3.1
NetBeans 7.1.2
Vaadin 6.8.2

I created Java EE Application and added simple web modue with vaadin application.
In runtime getting this exception.

ARNING: 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(
	at org.apache.catalina.core.StandardWrapper.initServlet(
	at org.apache.catalina.core.StandardWrapper.allocate(
	at org.apache.catalina.core.StandardWrapperValve.invoke(
	at org.apache.catalina.core.StandardContextValve.invoke(
	at org.apache.catalina.core.StandardPipeline.doInvoke(
	at org.apache.catalina.core.StandardPipeline.invoke(
	at org.apache.catalina.core.StandardHostValve.invoke(
	at org.apache.catalina.connector.CoyoteAdapter.doService(
	at org.apache.catalina.connector.CoyoteAdapter.service(
	at com.sun.grizzly.http.ProcessorTask.invokeAdapter(
	at com.sun.grizzly.http.ProcessorTask.doProcess(
	at com.sun.grizzly.http.ProcessorTask.process(
	at com.sun.grizzly.http.DefaultProtocolFilter.execute(
	at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(
	at com.sun.grizzly.DefaultProtocolChain.execute(
	at com.sun.grizzly.DefaultProtocolChain.execute(
	at com.sun.grizzly.http.HttpProtocolChain.execute(
	at com.sun.grizzly.ProtocolChainContextTask.doCall(
	at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(
	at com.sun.grizzly.util.AbstractThreadPool$

Is it bug in glassfish or ?

Vaadin should work just fine with Glassfish 3.1.

First check:
Are you able to deploy the same WAR successfully to some other server?

the same exception on IntelijIdea and Jboss AS7
But my friend working with no problem from maven project and GlassFish v3. Dunno why.

What i did.
1.Create EE app
2. Create vaadin app
3. Deploy

mb i need to do some special things ?

You’re running into a simple classpath issue, but the answer depends on what your app looks like. Did you create a .ear file or .war file? Maybe you could share the output of “jar tvf filename” as a help. The GlassFish user’s list might also be a help since this issue probably isn’t related specifically to Vaadin also.

For what it’s worth, I’ve been running Java EE applications with Vaadin for a long time and they work out just fine – it’s very nice to be able to extend Vaadin’s AbstractApplicationServlet and inject EJBs into it to pass on to the Application object(s).


Yes i creating ear and war
mb i’m doing something wrong.
Here is screens, how i creating simple application


jar tvf app1.ear

bellski@bellskiPC:~/data/projects/app1/dist$ jar tvf app1.ear
     0 Thu Aug 23 12:15:50 MSK 2012 META-INF/
   103 Thu Aug 23 12:15:48 MSK 2012 META-INF/MANIFEST.MF
     0 Thu Aug 23 12:15:48 MSK 2012 lib/
  3909 Thu Aug 23 12:15:48 MSK 2012 app1-war.war
5018623 Thu Aug 23 12:15:48 MSK 2012 lib/vaadin-6.8.2.jar

The .ear file looks ok from what I can see. What’s in the .war file inside there? Since you say you have a friend who has an example working, you should try comparing your pom.xml and file layout to his/hers – that could be faster than waiting on the forum.

For whatever it’s worth, if you only have the web module inside the ear file, then you really don’t need the ear file. You can just build and deploy the war file instead. If you’re using Java EE 6, then you can even include EJBs inside the war file if you want to use them. I have an example of pom.xml for building a Vaadin web app in
this blog
if it helps.