Hi,
I had the same problem updating from 2.1.7 to 2.1.10. I found a solution
in http://wiki.apache.org/cocoon/JavascriptForJavaProgrammers :
"*Note:* Be sure to make importPackage(...) the first code line in your
script, or you may get an "Ambiguous import" error on the second and
following runs of your script when attempting to reference an imported
class."
Hope it helps,
Regards,
Lionel
Niels van Kampenhout a ecrit le 5/02/07 17:50:
Hi,
I am trying to update my rather complex Cocoon application (guess
which one) from 2.1.8 to 2.1.10. I get a lot of exceptions like this one:
org.mozilla.javascript.EvaluatorException:
"file:/C:/dev/opensource/hippo-cms-trunk/editor/src/site/workflow/workflow.js",
line 49: Ambiguous import: "[JavaClass java.util.Vector]" and and
"[JavaClass java.util.Vector]".
I have a lot of flow script, each importing many Java packages and
classes, and loading other flow script using "cocoon.load(...)". The
whole configuration is a bit complex and maybe not always consistent
(there are also flowscripts loaded from the sitemap), but it worked in
Cocoon 2.1.8 and it doesn't in 2.1.10. So I guess Rhino has become a
little bit more strict in the meantime.
Obviously I need to reorganize the imports, but what is the best way
to do this? Only load flowscripts from the sitemap, and never using
"cocoon.load()"? Or the other way around? Put all imports in a
seperate file and load that one everywhere??
BTW all import statements are in the top of the files, before the
cocoon.loads and other statements, functions, etc.
Any help would be much appreciated!
Thanks,
Niels
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]