cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 12949] New: - Cocoon silently fails for long XSPs (java.lang.ClassFormatError)
Date Tue, 24 Sep 2002 10:29:44 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12949>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12949

Cocoon silently fails for long XSPs (java.lang.ClassFormatError)

           Summary: Cocoon silently fails for long XSPs
                    (java.lang.ClassFormatError)
           Product: Cocoon 2
           Version: 2.0.3
          Platform: All
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: core
        AssignedTo: cocoon-dev@xml.apache.org
        ReportedBy: harms@vivai.de


I had some XSPs which were not displayed on the browser (the html was empty) 
and there wasn´t any error message in the logs. 
Having a look at the Cocoon source I finally found out that there was a try-
catch block missing in method load() of class 
org.apache.cocoon.components.language.programming.CompiledProgrammingLanguage.
So I put a try-catch block for Throwable around 

Class program = this.loadProgram(filename, baseDirectory);

and got the following Exception:

java.lang.ClassFormatError: org/apache/cocoon/www/Foo (Code of a method longer 
than 65535 bytes)

In my opinion there are two issues which should be addressed. The first is that 
Throwables (including subclasses of java.lang.Error) should be catched 
(probably at some higher level) and reported to the user/developer. The second 
is that the component generating the Java code for the XSP should be optimized 
for size. 

My XSP is about 80 KB in size (mostly markup, not much java code). The 
generated java source file in the cocoon work directory has about 600 KB, 
resulting in a class file of about 200 KB. 

I am using SUNs JDK 1.3.1 on Windows 2000, but the error is also reproducible 
on Linux with IBMs JDK 1.3. The Coocon Version I use is the 2.0.3 production 
release.

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


Mime
View raw message