You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Nathaniel Alfred <Al...@swx.com> on 2003/06/10 16:12:05 UTC

Eclipse compiler and complex XSPs

I am currently trying M2 to prepare our Cocoon based websites for
2.1final and came across a problem with the Eclipse compiler.

Out most complex XSP+logicsheet fails with the message:

=============================================================
org.apache.cocoon.ProcessingException: Language Exception:
org.apache.cocoon.components.language.LanguageException: Error compiling
iblform_generator_xsp:
ERROR 1
(org/apache/cocoon/www/swx_cocoon/logic/ibl/iblform_generator_xsp.java):
...

        /**
         * Generate XML data.
         */

// start error (lines 103-103) "The code of method generate() is
exceeding the 65535 bytes limit"
        public void generate() throws SAXException, IOException,
ProcessingException {

// end error
            
            

            this.contentHandler.startDocument();

...
Line 103, column 0: The code of method generate() is exceeding the 65535
bytes limit
===================================================================
NB this is a standard Java limit.  Each method has its own 16-bit
address space for the JVM bytecode.

We already had similar trouble with the Pizza compiler but always
managed to shrink the XSP generated Java and stay below the limit on the
method size. 

Since Eclipse is now the proposed default XSP Java compiler, I
investigated and found that it is in the Eclipse design to produce
slightly larger bytecode:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=38637

As workaround, for the moment I am going to revert to Pizza in my
cocoon.xconf for 2.1final:  

      <parameter name="compiler"
value="org.apache.cocoon.components.language.programming.java.Pizza"/>
      <!--parameter name="compiler"
value="org.apache.cocoon.components.language.programming.java.Jikes"/-->
      <!--parameter name="compiler"
value="org.apache.cocoon.components.language.programming.java.EclipseJav
aCompiler"/-->

In the near future we need to extend the functionality of our XSP by
more than just a few percent.  I have some ideas how to push the XSP
limit by an order of magnitude.  But it means going into the guts of
Cocoon (xsp.xsl), and I wouldn't want to hold up 2.1final for it.

Anyone else experiencing the same problem?

Cheers, Alfred.

This message is for the named person's use only. It may contain
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission.
If you receive this message in error, please notify the sender urgently
and then immediately delete the message and any copies of it from your
system. Please also immediately destroy any hardcopies of the message.
You must not, directly or indirectly, use, disclose, distribute, print,
or copy any part of this message if you are not the intended recipient.
The sender's company reserves the right to monitor all e-mail
communications through their networks. Any views expressed in this
message are those of the individual sender, except where the message
states otherwise and the sender is authorised to state them to be the
views of the sender's company. 



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