You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Nils <co...@lolili.de> on 2004/05/07 15:33:10 UTC

65K limitation

Does that mean, that a xml-file is only allowed to be less than 65k in file
size (s. below)?

Regards,
Nils

org.apache.cocoon.ProcessingException: Language Exception:
org.apache.cocoon.components.language.LanguageException: Error compiling
projects_xml: ERROR 1
(org\apache\cocoon\www\nkpm_int\content\projects_xml.java): ... /** *
Generate XML data. */ // start error (lines 72-72) "The code of method
generate() is exceeding the 65535 bytes limit" public void generate() throws
SAXException, IOException, ProcessingException { // end error Session
session = request.getSession(true); ... Line 72, column 0: The code of
method generate() is exceeding the 65535 bytes limit


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


Re: 65K limitation

Posted by Ugo Cei <u....@cbim.it>.
Nils wrote:
> Does that mean, that a xml-file is only allowed to be less than 65k in file
> size (s. below)?

No, this means that the bytecode for a compiled method cannot exceed 64k 
  bytes. If you're having this problem with an XSP doc, you might try to 
factor out some tags into helper methods, but this might turn out to be 
neither easy nor pretty.

	Ugo


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


AW: AW: AW: 65K limitation

Posted by Nils <co...@lolili.de>.
Yes ;-)

Unfortunately i first learned how to code xsp and afterwards i got to know
aggregations ;-(

anyway, thanks for the help!

bye,
nils

> -----Ursprüngliche Nachricht-----
> Von: news [mailto:news@sea.gmane.org] Im Auftrag von Olivier Billard
> Gesendet: Montag, 10. Mai 2004 16:40
> An: users@cocoon.apache.org
> Betreff: Re: AW: AW: 65K limitation
> 
> 
> Nils wrote:
> > Hi Oliver,
> > 
> > in my case, i used xsp in a kind of "hacky" way:
> > 
> > <xsp:page>
> > <xsp:logic>
> > some logic here
> > </xsp:logic>
> > 
> > <content>
> >   about 67K of XML-Data without any XSP here
> > </content>
> > </xsp:page>
> > 
> > So my solution was to sperate the XSP from the XML Content by using 
> > the aggregation in the sitemap:
> > 
> > <map:aggregate name="root">
> > <map:part src="cocoon:/xsp-logix.xsp"/>
> > <map:part src="static-xml.xml"/>
> > </map:aggregate>
> > 
> > regards,
> > Nils
> 
> Ok, then, that's exactly the use of aggregation :)
> 
> --
> Olivier
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 


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


Re: AW: AW: 65K limitation

Posted by Olivier Billard <ob...@jouve.fr>.
Nils wrote:
> Hi Oliver,
> 
> in my case, i used xsp in a kind of "hacky" way:
> 
> <xsp:page>
> <xsp:logic>
> some logic here
> </xsp:logic>
> 
> <content>
>   about 67K of XML-Data without any XSP here
> </content>
> </xsp:page>
> 
> So my solution was to sperate the XSP from the XML Content by using the
> aggregation in the sitemap:
> 
> <map:aggregate name="root">
> <map:part src="cocoon:/xsp-logix.xsp"/>
> <map:part src="static-xml.xml"/>
> </map:aggregate>
> 
> regards,
> Nils

Ok, then, that's exactly the use of aggregation :)

--
Olivier


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


AW: AW: 65K limitation

Posted by Nils <co...@lolili.de>.
Hi Oliver,

in my case, i used xsp in a kind of "hacky" way:

<xsp:page>
<xsp:logic>
some logic here
</xsp:logic>

<content>
  about 67K of XML-Data without any XSP here
</content>
</xsp:page>

So my solution was to sperate the XSP from the XML Content by using the
aggregation in the sitemap:

<map:aggregate name="root">
<map:part src="cocoon:/xsp-logix.xsp"/>
<map:part src="static-xml.xml"/>
</map:aggregate>

regards,
Nils

> -----Ursprüngliche Nachricht-----
> Von: news [mailto:news@sea.gmane.org] Im Auftrag von Olivier Billard
> Gesendet: Montag, 10. Mai 2004 14:21
> An: users@cocoon.apache.org
> Betreff: Re: AW: 65K limitation
> 
> 
> Nils,
> 
> Don't confuse : it's not a XSP limitation. It's the use of the XSP 
> technology (that tends to be deprecated in favor of the flowscript) : 
> XSP are compiled as Java classes and all code is put in a 
> method called 
> generate(). So if you put too much business code in your XSP, 
> you will 
> get that error.
> 
> Like Ugo wrote, the best way if you still want to use XSP, is to put 
> your code in a Java object and then use this object directly 
> in your XSP 
> or use a logicsheet to access your component (the best way, 
> and not that 
> difficult, really). This will make your code far cleaner and 
> more readable.
> 
> But the best way now (but I'm very new to it) is to use 
> flowscript. With 
> this, you put the logic where it has to be (Java or 
> javascript) and then 
> you can use a pipeline to render the result.
> 
> You can find all you need in the cocoon doc and the wiki.
> 
> Hope this helps
> 
> --
> Olivier
> 
> 
> Nils wrote:
> > Hi all,
> > 
> > thanks for your answers. It seemed to be some kind of limitation in 
> > xsp. I seperated the file in an xml and an xsp part and no it works.
> > 
> > regards,
> > Nils
> > 
> > 
> >>-----Ursprüngliche Nachricht-----
> >>Von: Rob Gregory [mailto:Minty@RosesGroup.com]
> >>Gesendet: Sonntag, 9. Mai 2004 12:49
> >>An: users@cocoon.apache.org
> >>Betreff: RE: 65K limitation
> >>
> >>
> >>No I think it means that the method can only return less than
> >>65k. I don't think there is a max size for an xml document?
> >>
> >>
> >>>-----Original Message-----
> >>>From: Nils [mailto:cocoon_list@lolili.de]
> >>>Sent: 07 May 2004 14:33
> >>>To: users@cocoon.apache.org
> >>>Subject: 65K limitation
> >>>
> >>>
> >>>Does that mean, that a xml-file is only allowed to be less 
> than 65k 
> >>>in file size (s. below)?
> >>>
> >>>Regards,
> >>>Nils
> >>>
> >>>org.apache.cocoon.ProcessingException: Language Exception:
> >>>org.apache.cocoon.components.language.LanguageException:
> >>>Error compiling
> >>>projects_xml: ERROR 1
> >>>(org\apache\cocoon\www\nkpm_int\content\projects_xml.java):
> >>
> >>... /** *
> >>
> >>>Generate XML data. */ // start error (lines 72-72) "The
> >>
> >>code of method
> >>
> >>>generate() is exceeding the 65535 bytes limit" public void
> >>>generate() throws
> >>>SAXException, IOException, ProcessingException { // end 
> >>
> >>error Session
> >>
> >>>session = request.getSession(true); ... Line 72, column 0:
> >>
> >>The code of
> >>
> >>>method generate() is exceeding the 65535 bytes limit
> >>>
> >>>
> >>>
> >>
> >>------------------------------------------------------------
> ---------
> >>
> >>>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> >>>For additional commands, e-mail: users-help@cocoon.apache.org
> >>>
> >>>
> >>
> >>
> >>
> >>------------------------------------------------------------
> ---------
> >>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> >>For additional commands, e-mail: users-help@cocoon.apache.org
> > 
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 


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


Re: AW: 65K limitation

Posted by Olivier Billard <ob...@jouve.fr>.
Nils,

Don't confuse : it's not a XSP limitation. It's the use of the XSP 
technology (that tends to be deprecated in favor of the flowscript) : 
XSP are compiled as Java classes and all code is put in a method called 
generate(). So if you put too much business code in your XSP, you will 
get that error.

Like Ugo wrote, the best way if you still want to use XSP, is to put 
your code in a Java object and then use this object directly in your XSP 
or use a logicsheet to access your component (the best way, and not that 
difficult, really). This will make your code far cleaner and more readable.

But the best way now (but I'm very new to it) is to use flowscript. With 
this, you put the logic where it has to be (Java or javascript) and then 
you can use a pipeline to render the result.

You can find all you need in the cocoon doc and the wiki.

Hope this helps

--
Olivier


Nils wrote:
> Hi all,
> 
> thanks for your answers. It seemed to be some kind of limitation in xsp. I
> seperated the file in an xml and an xsp part and no it works.
> 
> regards,
> Nils
> 
> 
>>-----Ursprüngliche Nachricht-----
>>Von: Rob Gregory [mailto:Minty@RosesGroup.com] 
>>Gesendet: Sonntag, 9. Mai 2004 12:49
>>An: users@cocoon.apache.org
>>Betreff: RE: 65K limitation
>>
>>
>>No I think it means that the method can only return less than 
>>65k. I don't think there is a max size for an xml document?
>>
>>
>>>-----Original Message-----
>>>From: Nils [mailto:cocoon_list@lolili.de]
>>>Sent: 07 May 2004 14:33
>>>To: users@cocoon.apache.org
>>>Subject: 65K limitation
>>>
>>>
>>>Does that mean, that a xml-file is only allowed to be less
>>>than 65k in file
>>>size (s. below)?
>>>
>>>Regards,
>>>Nils
>>>
>>>org.apache.cocoon.ProcessingException: Language Exception:
>>>org.apache.cocoon.components.language.LanguageException:
>>>Error compiling
>>>projects_xml: ERROR 1
>>>(org\apache\cocoon\www\nkpm_int\content\projects_xml.java): 
>>
>>... /** *
>>
>>>Generate XML data. */ // start error (lines 72-72) "The 
>>
>>code of method
>>
>>>generate() is exceeding the 65535 bytes limit" public void 
>>>generate() throws
>>>SAXException, IOException, ProcessingException { // end 
>>
>>error Session
>>
>>>session = request.getSession(true); ... Line 72, column 0: 
>>
>>The code of
>>
>>>method generate() is exceeding the 65535 bytes limit
>>>
>>>
>>>
>>
>>---------------------------------------------------------------------
>>
>>>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>>>For additional commands, e-mail: users-help@cocoon.apache.org
>>>
>>>
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>>For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 


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


AW: 65K limitation

Posted by Nils <co...@lolili.de>.
Hi all,

thanks for your answers. It seemed to be some kind of limitation in xsp. I
seperated the file in an xml and an xsp part and no it works.

regards,
Nils

> -----Ursprüngliche Nachricht-----
> Von: Rob Gregory [mailto:Minty@RosesGroup.com] 
> Gesendet: Sonntag, 9. Mai 2004 12:49
> An: users@cocoon.apache.org
> Betreff: RE: 65K limitation
> 
> 
> No I think it means that the method can only return less than 
> 65k. I don't think there is a max size for an xml document?
> 
> > -----Original Message-----
> > From: Nils [mailto:cocoon_list@lolili.de]
> > Sent: 07 May 2004 14:33
> > To: users@cocoon.apache.org
> > Subject: 65K limitation
> > 
> > 
> > Does that mean, that a xml-file is only allowed to be less
> > than 65k in file
> > size (s. below)?
> > 
> > Regards,
> > Nils
> > 
> > org.apache.cocoon.ProcessingException: Language Exception:
> > org.apache.cocoon.components.language.LanguageException:
> > Error compiling
> > projects_xml: ERROR 1
> > (org\apache\cocoon\www\nkpm_int\content\projects_xml.java): 
> ... /** *
> > Generate XML data. */ // start error (lines 72-72) "The 
> code of method
> > generate() is exceeding the 65535 bytes limit" public void 
> > generate() throws
> > SAXException, IOException, ProcessingException { // end 
> error Session
> > session = request.getSession(true); ... Line 72, column 0: 
> The code of
> > method generate() is exceeding the 65535 bytes limit
> > 
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> > For additional commands, e-mail: users-help@cocoon.apache.org
> > 
> > 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 


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


RE: 65K limitation

Posted by Rob Gregory <Mi...@RosesGroup.com>.
No I think it means that the method can only return less than 65k. I
don't think there is a max size for an xml document?

> -----Original Message-----
> From: Nils [mailto:cocoon_list@lolili.de] 
> Sent: 07 May 2004 14:33
> To: users@cocoon.apache.org
> Subject: 65K limitation
> 
> 
> Does that mean, that a xml-file is only allowed to be less 
> than 65k in file
> size (s. below)?
> 
> Regards,
> Nils
> 
> org.apache.cocoon.ProcessingException: Language Exception:
> org.apache.cocoon.components.language.LanguageException: 
> Error compiling
> projects_xml: ERROR 1
> (org\apache\cocoon\www\nkpm_int\content\projects_xml.java): ... /** *
> Generate XML data. */ // start error (lines 72-72) "The code of method
> generate() is exceeding the 65535 bytes limit" public void 
> generate() throws
> SAXException, IOException, ProcessingException { // end error Session
> session = request.getSession(true); ... Line 72, column 0: The code of
> method generate() is exceeding the 65535 bytes limit
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 



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