Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » Virgo OSGi with custom Vaadin component IncompatibleClassChangeError
Virgo OSGi with custom Vaadin component IncompatibleClassChangeError [message #1148100] Mon, 21 October 2013 05:01 Go to next message
Csaba Pocsai is currently offline Csaba Pocsai
Messages: 1
Registered: October 2013
Junior Member
Hello everybody,

I keep getting an IncompatibleClassChangeError in the following scenario, and I'm not entirely sure why. Let's say we have the following two bundles deployed in Virgo:

webapp.war
|
+ bin
| |
| + (web application UI code)
|
+ lib
|
+ vaadin.jar

extension.jar
|
+ bin
| |
| + AdditionalUIComponent.class
|
+ lib
|
+ vaadin.jar

The webapp.war bundle is a web application based on Vaadin, which works fine on its own in Virgo. However, I'm trying to contribute a new UI component to the web application from extension.jar. In order to make AdditionalUIComponent compile, I need to add the Vaadin JARs to the extension.jar bundle as well. Unfortunately, due to some outstanding bugs in Vaadin I can't simply deploy the Vaadin JARs as separate bundles, so the only option seems to be to include them in each bundle.

I can instantiate AdditionalUIComponent in the webapp.war code, but as soon as I'm trying to add it to a parent UI component, I get an IncompatibleClassChangeError. The Vaadin JAR versions are the same everywhere, so that can't be the problem. My guess is that the problem is related to having Vaadin objects coming from two different classloaders. Do you have a suggestion for getting around this problem?

Thanks,
Csaba
Re: Virgo OSGi with custom Vaadin component IncompatibleClassChangeError [message #1148256 is a reply to message #1148100] Mon, 21 October 2013 07:30 Go to previous messageGo to next message
Dmitry Sklyut is currently offline Dmitry Sklyut
Messages: 271
Registered: January 2010
Senior Member
Hello Csaba,

What is the issue with vaadin that does not allow you to deploy it as a bundle?
Do you deploy wars as "war" or as "wab" (web application bundle)?

I have no experience with vaadin so don't know what else can be done to ease the pain.

You could try few things:

1. Export all vaadin packages from wab 1 and import all packages in wab 2. This way everything will be shared.
2. Try to use scoped plans or par. Scoped plans will lift all of the shared dependencies into a shared classloader across all included bundles.

Does vaadin.jar you are deploying contain valid osgi manifest? I seem to remember that vaadin had a set of bundles. Here is a bit of discussion from way back -> http://www.eclipse.org/forums/index.php/t/241621/

Regards,
Dmitry
Re: Virgo OSGi with custom Vaadin component IncompatibleClassChangeError [message #1149621 is a reply to message #1148100] Tue, 22 October 2013 03:40 Go to previous messageGo to next message
Mihael Schmidt is currently offline Mihael Schmidt
Messages: 22
Registered: August 2010
Junior Member
I am using Vaadin on Virgo and I don't have any problems installing the vaadin shared and server libs as bundles. I added the client and theme libs to WEB-INF/lib. No problem at all. Didn't even have to touch the vaadin bundles to get it to work in Virgo.

You also need to install some deps of vaadin as bundles (though I didn't needed all of them in my app).

Re: Virgo OSGi with custom Vaadin component IncompatibleClassChangeError [message #1150397 is a reply to message #1149621] Tue, 22 October 2013 14:58 Go to previous message
Eduardo Frazão is currently offline Eduardo Frazão
Messages: 118
Registered: January 2012
Senior Member
Hi!
I'm also using Vaadin (7.1.x) here, with no problems with their bundles. In my case, vaadin is a normal bundle library, inside a repository, as any other bundle. I'm using Virgo 3.6.2, but it was also working fine in 3.6.0 and 3.5.0.

My application is a WEB Bundle, and even other bundles that are not Web can use Vaadin classes to contribute with "views" on the main Web Bundle.
Previous Topic:Example of a custom {ContextPath}.xml file
Next Topic:javax.management error in virgo
Goto Forum:
  


Current Time: Wed Jul 23 20:30:00 EDT 2014

Powered by FUDForum. Page generated in 0.01454 seconds