Vaadin.jar conflict


i’m trying to create a master class which must be extended by every new Vaadin Portlet Application. In order to do this I have created and put this class, which extends Application, into a JAR that is loaded in the common ClassLoader, with vaadin.jar.

When I try to use this generic class creating a new application it works well during coding and compiles without errors, but at runtime throws exception because automatically Vaadin create a copy of Vaadin.jar into /lib of every deployed project, which is loaded in the project specific ClassLoader and goes in conflict with the other one in the common ClassLoader uses by the master class.

is there a way to prevent Vaadin from taking a copy of vaadin.jar in the project /lib?


I am quite sure Vaadin itself doesn’t copy anything. Do you perhaps mean the eclipse plugin, and the Web-inf/lib-folder?

Hi Thomas

You are right. I’m using the Eclipse pugin and I find the copy of vaadin.jar into the directory /WEB-INF/Lib/ in the deployed project.

The Vaadin eclipse plugin is meant for development, while you adding a common JAR to your server is more of a production solution. The only workaround I can think of is to include your custom JAR in all of your projects, or to modify the deployment descriptors for each project and removing the Vaadin JAR, making it shared instead.

You are confirming my suspects.
I’m already trying to have only the shared copy and not the single one in every project., but I don’t have found the right way to do this, yet.

I can’t put a copy of the custom JAR in every project because it will possibly generate conflic problems between the same class loaded in different ClassLoader and some other side effects.