Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 362094 - org.mozilla.javascript should not be exported from org.eclipse.rap.rwt
Summary: org.mozilla.javascript should not be exported from org.eclipse.rap.rwt
Status: RESOLVED FIXED
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: unspecified   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 1.5 M3   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-26 11:44 EDT by Xihui Chen CLA
Modified: 2011-10-26 17:15 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Xihui Chen CLA 2011-10-26 11:44:08 EDT
Build Identifier: 20110916-0149

In RAP 1.5.0, org.eclipse.rap.rwt exported the package org.mozilla.javascript. This causes a package conflict problem with my project, because my project is also using Rhino JS engine. Since org.eclipse.rap.rwt is loaded before my plugin was loaded, my code always points to the org.mozilla.javascript package in org.eclipse.rap.rwt, which is not a full set of Rhino JS engine library, so I got an error like this:

Caused by: java.lang.IllegalStateException: Failed to create VMBridge instance
at org.mozilla.javascript.VMBridge.makeInstance(VMBridge.java:68)
at org.mozilla.javascript.VMBridge.<clinit>(VMBridge.java:48)
... 35 more


Reproducible: Always

Steps to Reproduce:
1.Use both Rhino JS Engine and org.eclipse.rap.rwt in a plugin will trigger this problem.
2.
3.
Comment 1 Ralf Sternberg CLA 2011-10-26 15:38:03 EDT
Thanks for the hint, this package export must have slipped in by mistake. Of course, the rwt bundle cannot provide rhino. It only contains a few classes from the mozilla.javascript package. Removed the package export.
Comment 2 Ralf Sternberg CLA 2011-10-26 17:15:54 EDT
Turned out that I was too fast. Since rwt.test is now a bundle, it needs to import the rhino classes to compile. As a quick fix, I copied the rhino classes from rwt to rwt.test. I opened bug 362134 for cleanup.