I have 2 confluence add-on’s written in vaadin. Each of them are just working fine. Now, the problem is: When i startet one of them and then start the next in the same browser i get a ClassCastException.
Is it possible to run different confluence vaadin add-on’s in a browser?
Here the st:
Caused by: java.lang.ClassCastException: com.vaadin.terminal.gwt.server.WebApplicationContext cannot be cast to com.vaadin.terminal.gwt.server.WebApplicationContext
at com.vaadin.terminal.gwt.server.WebApplicationContext.getApplicationContext(WebApplicationContext.java:153)
at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.getApplicationContext(AbstractApplicationServlet.java:2373)
at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.getExistingApplication(AbstractApplicationServlet.java:2200)
at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.findApplicationInstance(AbstractApplicationServlet.java:769)
at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(AbstractApplicationServlet.java:456)
I have the same problem. But, what is strange, it works fine, when I run it from Eclipse, when one project is dependent on another. When I replace the project dependency, with the dependency on build jar, the ClassCastException occures.
Looks like you have two Vaadin jars on your classpath. I have no idea how confluence works, so can’t help you there; but look for a place where to put common libraries for either confluence or your server, and remove the vaadin JAR from the individual add-ons.
In my case all jars are in WEB-INF\lib and the classes for one project are WEB-INF\classes. The difference is in generated jar: the jar generated with Eclipse is a bit greater, than jar generated by ant. Also class files have different sizes (10 - 100 bytes).
Hi Mike,
I’m researching for a solution to integrate Vaadin within the Confluence add-on/plugin. You said that you have experience with it, can you help me to know how?
Thanks a lot!