Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

1.7R2 instead of 1.6R1, sealing an object leads to IllegalStateException: XMLList

256 views
Skip to first unread message

Merten Schumann

unread,
Jul 10, 2009, 9:26:10 AM7/10/09
to dev-tech-js-...@lists.mozilla.org
Hello,

I've got an application using Rhino 1.6R1 - there was no need to update it, no problems. :-)

Now I tried to make the step to 1.7R2.
My application compiles, so I'm not using any functionality which is gone for some reason - if there's such a difference between 1.6R2 and 1.7R2 at all.

But when I run the application, I end up with

java.lang.IllegalStateException: XMLList
at org.mozilla.javascript.LazilyLoadedCtor.getValue(LazilyLoadedCtor.java:101)
at org.mozilla.javascript.ScriptableObject.getImpl(ScriptableObject.java:2034)
at org.mozilla.javascript.ScriptableObject.get(ScriptableObject.java:287)
at org.mozilla.javascript.IdScriptableObject.get(IdScriptableObject.java:387)
at org.mozilla.javascript.LazilyLoadedCtor.buildValue(LazilyLoadedCtor.java:118)
at org.mozilla.javascript.LazilyLoadedCtor.init(LazilyLoadedCtor.java:89)
at org.mozilla.javascript.ScriptableObject.sealObject(ScriptableObject.java:1567)
at [my class]

Anyone else experiencing such a problem? I was searching for IllegalStateException and XMLList - but seems there's no issue like this out there.

XMLList is a class within Rhino itself.
I think I read here in the past about changes to ScriptableObject.sealObject() - in terms of Context.enter/exit - not sure about it.
There was a fix for a problem with Rhino loading it's own properties lazy - suggested by wolffiex - I tried it, but it's not helping me out here (should it?)

I'll debug my code and step into Rhino code next. I do not use this XMLList class from my code - so I don't feal guilty ;-)
If I cannot fix my problem, I'll try to write a test case to demonstrate the problem.

Thanx
Merten


Bediako George

unread,
Jul 10, 2009, 9:30:51 AM7/10/09
to Merten Schumann, dev-tech-js-...@lists.mozilla.org
Hullo Merten,

I don't have an answer to your problem, but I do have a small clue. I
believe XMLList is used by E4x which 1.6 supports. Are you using E4x in
your code? Perhaps there was a change of some sort in how E4X is
implemented in 1.7 versus 1.6?

Regards,

Bediako

> _______________________________________________
> dev-tech-js-engine-rhino mailing list
> dev-tech-js-...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino
>

--
Bediako George
Partner - Lucid Technics, LLC
Think Clearly, Think Lucid
(p) 202.683.7486 (f) 703.563.6279

Merten Schumann

unread,
Jul 13, 2009, 2:41:26 AM7/13/09
to dev-tech-js-...@lists.mozilla.org
Hello Bediako,

no, I don't use E4X - but thanx anyway.

What I'm doing, I'm playing around with setting parent and prototype, defining some properties like this
ScriptableObject.defineProperty(root_scope, "$$Args", null, ScriptableObject.PERMANENT | ScriptableObject.READONLY);
and then I try to seal the ScriptableObject().

cu
Merten

From: Bediako George [mailto:bediako...@lucidtechnics.com]
Sent: Friday, July 10, 2009 3:31 PM
To: Merten Schumann
Cc: dev-tech-js-...@lists.mozilla.org
Subject: Re: 1.7R2 instead of 1.6R1, sealing an object leads to IllegalStateException: XMLList

Hullo Merten,

I don't have an answer to your problem, but I do have a small clue. I believe XMLList is used by E4x which 1.6 supports. Are you using E4x in your code? Perhaps there was a change of some sort in how E4X is implemented in 1.7 versus 1.6?

Regards,

Bediako
dev-tech-js-...@lists.mozilla.org<mailto:dev-tech-js-...@lists.mozilla.org>

David P. Caldwell

unread,
Jul 13, 2009, 1:50:42 PM7/13/09
to
Merten Schumann wrote:
> I've got an application using Rhino 1.6R1 - there was no need to update it, no problems. :-)
>
> Now I tried to make the step to 1.7R2.

> But when I run the application, I end up with
>
> java.lang.IllegalStateException: XMLList

I worked to re-implement E4X support for the 1.6R7 release, removing the
dependency on XMLBeans.

When I was working on this, I had trouble managing the state for the
LazilyLoadedCtor stuff; I believe I ended up having to use some sort of
hack in the end. If no one has been in there recently, it's quite
possible that there was some sort of precondition or set of possible
conditions I didn't anticipate. That said, I have at least two
suggestions of test cases that (in my dim recollection) might shed some
light.

(1) Do you have Apache XMLBeans in the classpath available to Rhino?
If so, take it out and see what happens.

(2) Have you set the JavaScript version variable to something less than
1.6? If so, Rhino would try to disable E4X, which may be a condition I
didn't test.

-- David P. Caldwell
http://www.inonit.com/

rehzon

unread,
Apr 6, 2010, 8:11:58 AM4/6/10
to
I was getting the same problem but it went away when i removed xalan.jar and xercesImpl.jar from the classpath (im using jdk 1.6)

---
frmsrcurl: http://mozilla-xp.com/mozilla.dev.tech.js-engine.rhino/1.7R2-instead-of-1.6R1-sealing-an-object-leads-to-IllegalSta

Merten Schumann

unread,
Apr 6, 2010, 8:26:29 AM4/6/10
to rehzon, dev-tech-js-...@lists.mozilla.org
kind of "glad" someone else xperienced this problem ;-)
For some reasons, I had to keep Apache Xerces in my classpath in the past - now this issue is resolved for me too, even JDK 1.5 is enough for my XML usage

cu
Merten

-----Original Message-----
From: dev-tech-js-engine-rhino-bounces+merten.schumann=asg...@lists.mozilla.org [mailto:dev-tech-js-engine-rhino-bounces+merten.schumann=asg...@lists.mozilla.org] On Behalf Of rehzon
Sent: Tuesday, April 06, 2010 2:12 PM
To: dev-tech-js-...@lists.mozilla.org
Subject: Re: 1.7R2 instead of 1.6R1, sealing an object leads to IllegalStateException: XMLList

0 new messages