Batik and Rhino 1.6R7

View: Old framed views
6 Messages — Rating Filter:   Alert me  
Praveen Nayak2
Batik and Rhino 1.6R7
Reply More
Rate this Message:
Reply to author
Print
Show in thread view
Show in list view (by date)
Permalink

Hi,

I am working with Batik 1.7, and using Rhino 1.6R7 (I know Batik ships with 1.6R5). I see a problem with some javascript that comes up in Rhino 1.6R7 and not in 1.6R5.

        setTimeout("gop();", 2000);

attached the svg file.

When I use the above line, Rhino throws an exception now because RhinoClassShutter.visibleToScripts is returning false and Rhino is making an extra check somewhere.

So, Batik 1.7 has at least this one problem with Rhino1.6R7. I can change code either in Batik, or Rhino to fix this issue. I wanted to know which jar Batik or Rhino was a more logical site for this change.

Thanks,
Praveen
Helder Magalhães
Re: Batik and Rhino 1.6R7
Reply More
Rate this Message:
Reply to author
Print
Show in thread view
Show in list view (by date)
Permalink
> attached the svg file.

The attachment seems to be missing...


> When I use the above line, Rhino throws an exception now because
> RhinoClassShutter.visibleToScripts is returning false and Rhino is making an
> extra check somewhere.

Well, by performing a quick check it seems related to a bug [1] which
was fixed in 1.6R7 [2].


> So, Batik 1.7 has at least this one problem with Rhino1.6R7. I can change
> code either in Batik, or Rhino to fix this issue. I wanted to know which jar
> Batik or Rhino was a more logical site for this change.

As this was considered an issue with 1.6R7, I believe it is due to an
issue on the way Batik uses reflection to access the ClassShutter.
Could this be confirmed and/or should a bug report be created?
Unfortunately, I'm afraid I don't have the Java expertise (nor Batik
internals knowledge in order to understand why was it done that way)
to take a deeper look into this...

In the meantime, you may try experimenting with 1.6R6 [3], which
brings the relevant features and bug fixes but should go around that
particular issue. ;-)


Hope this helps,

 Helder Magalhães


[1] https://bugzilla.mozilla.org/show_bug.cgi?id=392825
[2] http://developer.mozilla.org/en/New_in_Rhino_1.6R7
[3] http://developer.mozilla.org/En/New_in_Rhino_1.6R6

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@...
For additional commands, e-mail: batik-users-help@...

Praveen Nayak2
Re: Batik and Rhino 1.6R7
Reply More
Rate this Message:
Reply to author
Print
Show in thread view
Show in list view (by date)
Permalink

Sorry, attached now. It was essentially the problem with settimeout put into an SVG file.

Thanks,
Praveen




"Helder Magalhães" <helder.magalhaes@...>

18/09/2008 11:30 AM
Please respond to
batik-users@...

To
batik-users@...
cc
Subject
Re: Batik and Rhino 1.6R7





> attached the svg file.

The attachment seems to be missing...


> When I use the above line, Rhino throws an exception now because
> RhinoClassShutter.visibleToScripts is returning false and Rhino is making an
> extra check somewhere.

Well, by performing a quick check it seems related to a bug [1] which
was fixed in 1.6R7 [2].


> So, Batik 1.7 has at least this one problem with Rhino1.6R7. I can change
> code either in Batik, or Rhino to fix this issue. I wanted to know which jar
> Batik or Rhino was a more logical site for this change.

As this was considered an issue with 1.6R7, I believe it is due to an
issue on the way Batik uses reflection to access the ClassShutter.
Could this be confirmed and/or should a bug report be created?
Unfortunately, I'm afraid I don't have the Java expertise (nor Batik
internals knowledge in order to understand why was it done that way)
to take a deeper look into this...

In the meantime, you may try experimenting with 1.6R6 [3], which
brings the relevant features and bug fixes but should go around that
particular issue. ;-)


Hope this helps,

Helder Magalhães


[1] https://bugzilla.mozilla.org/show_bug.cgi?id=392825
[2] http://developer.mozilla.org/en/New_in_Rhino_1.6R7
[3] http://developer.mozilla.org/En/New_in_Rhino_1.6R6

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@...
For additional commands, e-mail: batik-users-help@...






---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@...
For additional commands, e-mail: batik-users-help@...
Helder Magalhães
Re: Batik and Rhino 1.6R7
Reply More
Rate this Message:
Reply to author
Print
Show in thread view
Show in list view (by date)
Permalink
> Sorry, attached now. It was essentially the problem with settimeout put into
> an SVG file.

Did you try the "R6" release to check if the particular issue you are
facing is worked around? Did you test with further SVG content and
checked that nothing is broken? I agree that having external libraries
as updated as possible would be great (Rhino 1.7 [1], by chance?), but
I'd say a little more cooperation is needed so the Batik development
team can take a more informed look at this: some proof that R6 is
working properly (or, at least, that no other big surprises are
introduced) so the fix introduced by R7 (which is actually breaking
Batik) "deserves" being analyzed (and increase the possibility of
having the issue fixed). :-)

Hope this helps,

 Helder Magalhães

[1] http://developer.mozilla.org/en/New_in_Rhino_1.7R1

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@...
For additional commands, e-mail: batik-users-help@...

Praveen Nayak2
Re: Batik and Rhino 1.6R7
Reply More
Rate this Message:
Reply to author
Print
Show in thread view
Show in list view (by date)
Permalink

Hi,

I cannot use 16R6 because 16R7 is the officially approved version around here. But nevertheless, I will check with 1.6R6 and let you know if I see the problem there too.

Thanks for your help.

Praveen



"Helder Magalhães" <helder.magalhaes@...>

20/09/2008 05:00 PM
Please respond to
batik-users@...

To
batik-users@...
cc
Subject
Re: Batik and Rhino 1.6R7





> Sorry, attached now. It was essentially the problem with settimeout put into
> an SVG file.

Did you try the "R6" release to check if the particular issue you are
facing is worked around? Did you test with further SVG content and
checked that nothing is broken? I agree that having external libraries
as updated as possible would be great (Rhino 1.7 [1], by chance?), but
I'd say a little more cooperation is needed so the Batik development
team can take a more informed look at this: some proof that R6 is
working properly (or, at least, that no other big surprises are
introduced) so the fix introduced by R7 (which is actually breaking
Batik) "deserves" being analyzed (and increase the possibility of
having the issue fixed). :-)

Hope this helps,

Helder Magalhães

[1] http://developer.mozilla.org/en/New_in_Rhino_1.7R1

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@...
For additional commands, e-mail: batik-users-help@...




Cameron McCormack-4
Re: Batik and Rhino 1.6R7
Reply More
Rate this Message:
Reply to author
Print
Show in thread view
Show in list view (by date)
Permalink
Hi Praveen.

Praveen Nayak:
> Sorry, attached now. It was essentially the problem with settimeout put
> into an SVG file.

So it seems that with the tightened up class shutter of Rhino 1.6R7, the
objects that are returned from setTimeout(), setInterval() are being
flagged as inaccessible from script.  This is because the class names
are org.apache.batik.bridge.ScriptingEnvironment$Window$3 and similar,
and in org.apache.batik.script.rhino.RhinoClassShutter, any class that
begins with "org.apache.batik.script.rhino.ScriptingEnvironment" is
disallowed.

Technically, these functions should return integers that identify the
timeout/interval, rather than TimerTask objects.  So that will probably
change at some point, which’ll get around the problem here.

But in the meantime I’ve committed a change to get this to work in Rhino
1.6R7.  I haven’t updated the js.jar from 1.6R5 in the repository yet.

  http://svn.apache.org/viewvc?view=rev&revision=701300

--
Cameron McCormack ≝ http://mcc.id.au/

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@...
For additional commands, e-mail: batik-users-help@...