Cannot read property 'apply' of undefined


I created a new Vaadin Project using the maven archetype “vaadin-archetype-application”. It created a working project with a widgetset and a corresponding “MyAppWidgetset.gwt.xml” in my resources folder which I ignored as everything was working.

I then imported a self written component of type AbstractJavascriptExtension from an older test project - created with the IntelliJ-Plugin, no maven, no widgetset. There I throw my Javascript files right next to the extension and annotated it with “@JavaScript({“connector.js”}, …)”. Everything works fine in the other project.

Now my I have two problems. The first one seems to be, that my JS-files won’t get copied to the target/classes folder automatically. If I modify my pom.xml to add the JS-files as resources, they will be copied to the target/classes root, but not next to the corresponding extension java class in its own package. For now I can help myself by copying them manually, but…

The other more relevant problem is the widgetset. I ignored it before, but as soon as I include my extension with javascript files it throws errors in the console and my extension wont work.

The output looks like this:

SEVERE: Error performing server to client RPC (TypeError) : Cannot read property ‘apply’ of undefined
at Unknown.ICb(com.example.MyAppWidgetset-0.js)
at Unknown.vCb(com.example.MyAppWidgetset-0.js)
at Unknown.DPb(com.example.MyAppWidgetset-0.js)
at Unknown.SOb(com.example.MyAppWidgetset-0.js)
at Unknown.ROb(com.example.MyAppWidgetset-0.js)
at Unknown.ePb(com.example.MyAppWidgetset-0.js)
at Unknown.Hyb(com.example.MyAppWidgetset-0.js)
at Unknown.Xzb(com.example.MyAppWidgetset-0.js)
at Unknown.$zb(com.example.MyAppWidgetset-0.js)
at Unknown.EFb(com.example.MyAppWidgetset-0.js)

I did not create a MyAppWidgetset-0.js file and as far as I know I don’t use it and don’t want to.

Where do I need to digg to solve this error and make my extension work again? If you need any further information I’d be glad to provide it.

Kind regards