You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Andreas Neumann <ne...@karto.baug.ethz.ch> on 2006/02/02 16:08:30 UTC

problem with dynamically created ECMAScript

Hi,

I have a problem with a SVG prototype:

http://www.geofoto.ch/prototype/unstable/index.svg
(you need to login with user "geofotos", pw "schweiz")

One of the ECMAScripts is dynamically generated using a PHP script. When 
I include that script (URL: 
http://www.geofoto.ch/prototype/unstable/extractAdminUnits.php) I get 
the following error message:

---------------
InterpExcept: org.apache.batik.script.InterpreterException: 
java.lang.ClassFormatError: Invalid method Code length 197395 in class 
file org/mozilla/javascript/gen/c655
---------------

Is there an encoding problem or a mime-type problem that this ECMAScript 
can't be interpreted? It works in Mozilla SVG and Adobe SVG.

Thank you for any help on that issue.

Andreas

PS: I tested with the latest SVN version on Linux

-- 
----------------------------------------------
Andreas Neumann - Institute of Cartography
Swiss Federal Institute of Technology (ETH)
ETH Hoenggerberg
CH-8093  Zurich, Switzerland
Phone: ++41-1-633 3031, Fax: ++41-1-633 1153
e-mail: neumann@karto.baug.ethz.ch
www: http://www.carto.net/neumann/
SVG.Open: http://www.svgopen.org/
Carto.net: http://www.carto.net/

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


Re: problem with dynamically created ECMAScript

Posted by Andreas Neumann <ne...@karto.baug.ethz.ch>.
Hi Thomas,

thanks for your feedback.

How can I turn off the "optimizer" for testing?

Do you have an idea on the function size limits? In my case, I feed in 
3 db-generated js arrays with a size of >3000 elements each. It is 
basically a list of swiss communities and ids to districts and provinces.

Would it be better to load this data with getURL() in XML format and 
feed it into js arrays?

Thanks for any feedback on this problem.

Andreas

thomas.deweese@kodak.com wrote:
> Hi Andreas,
> 
>    The problem is that our JavaScript engine (Rhino) tries to compile the 
> JavaScript into Java Bytecodes,
> for very large functions this fails.  Apparently if you turn off the 
> 'optimizer' it can run arbitrarily large
> JavaScript functions but I'm not sure it's feasible to do this 
> 'intelligently'.  I'll try and look at where
> the exception occurs and see if there is an easy way to 'retry' but I 
> suspect this will be difficult.
> 
> Andreas Neumann <ne...@karto.baug.ethz.ch> wrote on 02/02/2006 10:08:30 
> AM:
> 
>> One of the ECMAScripts is dynamically generated using a PHP script. When 
> 
>> I include that script (URL: 
>> http://www.geofoto.ch/prototype/unstable/extractAdminUnits.php) I get 
>> the following error message:
>>
>> ---------------
>> InterpExcept: org.apache.batik.script.InterpreterException: 
>> java.lang.ClassFormatError: Invalid method Code length 197395 in class 
>> file org/mozilla/javascript/gen/c655
>> ---------------
>>
>> Is there an encoding problem or a mime-type problem that this ECMAScript 
> 
>> can't be interpreted? It works in Mozilla SVG and Adobe SVG.
>>
>> Thank you for any help on that issue.
>>
>> Andreas
>>
>> PS: I tested with the latest SVN version on Linux
>>
>> -- 
>> ----------------------------------------------
>> Andreas Neumann - Institute of Cartography
>> Swiss Federal Institute of Technology (ETH)
>> ETH Hoenggerberg
>> CH-8093  Zurich, Switzerland
>> Phone: ++41-1-633 3031, Fax: ++41-1-633 1153
>> e-mail: neumann@karto.baug.ethz.ch
>> www: http://www.carto.net/neumann/
>> SVG.Open: http://www.svgopen.org/
>> Carto.net: http://www.carto.net/
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
>> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
> 


-- 
----------------------------------------------
Andreas Neumann - Institute of Cartography
Swiss Federal Institute of Technology (ETH)
ETH Hoenggerberg
CH-8093  Zurich, Switzerland
Phone: ++41-1-633 3031, Fax: ++41-1-633 1153
e-mail: neumann@karto.baug.ethz.ch
www: http://www.carto.net/neumann/
SVG.Open: http://www.svgopen.org/
Carto.net: http://www.carto.net/

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


Re: problem with dynamically created ECMAScript

Posted by th...@kodak.com.
Hi Andreas,

   The problem is that our JavaScript engine (Rhino) tries to compile the 
JavaScript into Java Bytecodes,
for very large functions this fails.  Apparently if you turn off the 
'optimizer' it can run arbitrarily large
JavaScript functions but I'm not sure it's feasible to do this 
'intelligently'.  I'll try and look at where
the exception occurs and see if there is an easy way to 'retry' but I 
suspect this will be difficult.

Andreas Neumann <ne...@karto.baug.ethz.ch> wrote on 02/02/2006 10:08:30 
AM:

> One of the ECMAScripts is dynamically generated using a PHP script. When 

> I include that script (URL: 
> http://www.geofoto.ch/prototype/unstable/extractAdminUnits.php) I get 
> the following error message:
> 
> ---------------
> InterpExcept: org.apache.batik.script.InterpreterException: 
> java.lang.ClassFormatError: Invalid method Code length 197395 in class 
> file org/mozilla/javascript/gen/c655
> ---------------
> 
> Is there an encoding problem or a mime-type problem that this ECMAScript 

> can't be interpreted? It works in Mozilla SVG and Adobe SVG.
> 
> Thank you for any help on that issue.
> 
> Andreas
> 
> PS: I tested with the latest SVN version on Linux
> 
> -- 
> ----------------------------------------------
> Andreas Neumann - Institute of Cartography
> Swiss Federal Institute of Technology (ETH)
> ETH Hoenggerberg
> CH-8093  Zurich, Switzerland
> Phone: ++41-1-633 3031, Fax: ++41-1-633 1153
> e-mail: neumann@karto.baug.ethz.ch
> www: http://www.carto.net/neumann/
> SVG.Open: http://www.svgopen.org/
> Carto.net: http://www.carto.net/
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
> 


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