Problem with deployment in ear

Hi!

I have a problem with deployment of my vaadin application in an ear-file.

The following ear-structure works as expected:
[font=Courier New]

EAR
±-myapp.war
…±-META-INF
…±-MANIFEST.MF
…±-WEB-INF
…±-classes
…±-MyUI.class
…±-lib
…±-lib1.jar
…±-lib2.jar
…±-web.xml

[/font]

When I move the lib-folder to the ear-root (which should work since jee5), it is not working anymore:

EAR
±-lib
…±-lib1.jar
…±-lib2.jar
±-myapp.war
…±-META-INF
…±-MANIFEST.MF
…±-WEB-INF
…±-classes
…±-MyUI.class
…±-web.xml

I get the following exception:
Caused by: java.lang.ClassNotFoundException: MyUI
at java.net.URLClassLoader.findClass(URLClassLoader.java:434)
at com.ibm.ws.bootstrap.ExtClassLoader.findClass(ExtClassLoader.java:198)
at java.lang.ClassLoader.loadClass(ClassLoader.java:646)
at com.ibm.ws.bootstrap.ExtClassLoader.loadClass(ExtClassLoader.java:113)
at java.lang.ClassLoader.loadClass(ClassLoader.java:612)
at com.ibm.ws.classloader.ProtectionClassLoader.loadClass(ProtectionClassLoader.java:62)
at com.ibm.ws.classloader.ProtectionClassLoader.loadClass(ProtectionClassLoader.java:58)
at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:564)
at java.lang.ClassLoader.loadClass(ClassLoader.java:612)
at com.vaadin.server.ServletPortletHelper.verifyUIClass(ServletPortletHelper.java:64)
… 31 more

I debugged into com.vaadin.server.ServletPortletHelper and saw that the WEB-INF/classes folder is not on the classpath when I have a lib-folder at the ear-root.

Is there something I can do to make it work? The above example is of course very minimalistic, in reality I have also ejbs in my ear and would really like to have common libs in lib instead of WEB-INF/lib of my war.

I am using Vaadin 7 Beta 10 on Glassfish 3 and Websphere 8.

Kind regards,
Hannes

The problem is that I also have vaadin-jars in the ear-lib-folder, so the VaadinServlet is not loaded by the war-classloader but the ear-classloader. It works by either putting the vaadin-jars in web-inf/lib oder extending VaadinServlet with a class in web-inf/classes. Other (common) jars can then be in ear-lib-folder.