Vaadin Rhino libraries

Hi,

Have any of you ever had interoperabillity issues using the Vaadin framework with other frameworks, that use the js.jar from Mozilla Rhino? I’m using BIRT as my reporting back end, and they use a newer version of the library (1.7 R5) than Vaadin (1.7 R2). The parse() method of the Parse class takes different arguments, so I get an run time exception when I generate the report: java.lang.NoSuchMethodError: org.mozilla.javascript.Parser.parse(Ljava/lang/String;Ljava/lang/String;I)Lorg/mozilla/javascript/ast/AstRoot; I’ve lost days searching online for sollutions, but failed to find any. Any suggestions?

Regards,
Tomaz

Hi Tomaz

Rhino 1.7R2 is pulled as a dependency for the Vaadin SASS compiler.

As a workaround, it would probably be best to exclude this dependency (SASS compiler) and turn on production mode (SASS compiler is not needed when running in production mode). The unfortunate side-effect would be that you would need a compiled theme in your project during development time and couldn’t reload theme, but maybe it’s fine for you.

It all depends on which version of the library is actually loaded by the class loader.

Hi Mac,

Thanks, that worked! If the side effect that you mentioned is the only one, it is acceptable for me, as I can reenable the dependency in development as needed.

Thank you,
Tomaz

Great to hear that :slight_smile:

I hope you will enjoy developing your application with Vaadin!

Good luck!