Integrating the webcomponent l2t-paper-slider with Vaadin Elements Addon

I would love to see that paper-slider in my application. So I tried to create a component. But didn’t get very far :frowning:

package org.vaadin.elements;
@Tag(“l2t-paper-slider”)
@Import(“VAADIN/bower_components/l2t-paper-slider/l2t-paper-slider.html”)
interface UxPaperSliderElement extends Element {
static UxPaperSliderElement create() { return Elements.create(UxPaperSliderElement.class); }
}

package org.vaadin.elements;
@JavaScript(“vaadin://bower_components/webcomponentsjs/webcomponents-lite.min.js”)
public class UxPaperSlider extends AbstractElementComponent {
private UxPaperSliderElement element;
public UxPaperSlider() {
element = UxPaperSliderElement.create();
Root root = ElementIntegration.getRoot(this);
root.appendChild(element);
}
}

Gives:
net.sf.cglib.core.CodeGenerationException: java.lang.reflect.InvocationTargetException–>null
at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:237)
at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:377)
at net.sf.cglib.proxy.Enhancer.create(Enhancer.java:304)
at org.vaadin.elements.impl.ElementReflectHelper.wrapElement(ElementReflectHelper.java:115)
at org.vaadin.elements.impl.ElementReflectHelper.wrap(ElementReflectHelper.java:39)
at org.vaadin.elements.Elements.create(Elements.java:42)
at org.vaadin.elements.UxPaperSliderElement.create(UxPaperSliderElement.java:11)
at org.vaadin.elements.UxPaperSlider.(UxPaperSlider.java:23)
… and a lot of rows … and finally:
Caused by: java.lang.IllegalAccessError: class org.vaadin.elements.impl.ElementImpl$$EnhancerByCGLIB$$f9f8ea0c cannot access its superinterface org.vaadin.elements.UxPaperSliderElement
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:760)

That error is usually seen when there are some classpath inconsistencies, but I am generating the class?!?

Anyone with an idea of where to look? The elements-0.1.4.jar is in the classpath and both of my classes is in the class path. The l2t-slider stuff is there as well, even though I suppose that doesn’t matter at this point.

Hi Jonas, Did you get this solved? I am bumping into the same problem.

Hello Jorge,

I decided to not complete this integration this time unfortunately. Vaadin in general seems to move very fast in the direction of Web Components so I just wait for something magical to happen with Vaadin or an Add-on so this integration will be a piece of cake :slight_smile: Unfortunately, that doesn’t help you right now…