[ 
http://issues.apache.org/jira/browse/XALANJ-1805?page=comments#action_12370541 
] 

Henry Zongaro commented on XALANJ-1805:
---------------------------------------

There are two situations in which this problem is most commonly encountered:

1) Stylesheets that contain very large xsl:templates or many global variable 
declarations that contain lengthy instructions.

2) Stylesheets with many template rules.

The problem described by this bug report sounds like it might fall into the 
second category.  I have requested a test case from Dan Holman, but I've not 
received a response, so I can't be certain.

The patch for XALANJ-1324 attempts to break up any extremely large methods 
created for case 1).  That patch is unable to do anything for case 2).  The 
byte code generated for xsl:apply-templates would have to be reworked and a 
more general framework for identifying chunks of byte code that could be moved 
into new methods would have to be devised.

> class file generated by xsltc is too large to run: java.lang.ClassFormatError
> -----------------------------------------------------------------------------
>
>          Key: XALANJ-1805
>          URL: http://issues.apache.org/jira/browse/XALANJ-1805
>      Project: XalanJ2
>         Type: Bug
>   Components: XSLTC
>     Versions: 2.5
>  Environment: Operating System: Linux
> Platform: PC
>     Reporter: Dan Holman

>
> There is a master stylesheet that imports other stylesheets and they in turn 
> import others and so on for a total of 390 xsl files (there are a large 
> number 
> of stylesheets partially because some of the files are duplicated for 
> multiple 
> language outputs). Using XSLTC from the command line, a single class file is 
> generated without error or warning. It has a size of 1.76 MB.
> SHELL SCRIPT USED TO COMPILE:
> classpath=lib/xalan.jar:lib/xercesImpl.jar:lib/xml-apis.jar
> java -Xmx250MB -classpath $classpath org.apache.xalan.xsltc.cmdline.Compile 
> -x 
> xsl/html_master.xsl
> However, it won't transform from the command line.
> SHELL SCRIPT USED TO TRANSFORM:
> classpath=lib/xalan.jar:lib/xercesImpl.jar:lib/xml-apis.jar:class
> java -classpath $classpath org.apache.xalan.xsltc.cmdline.Transform $1 
> html_master
> The following error occurs:
> Exception in thread "main" java.lang.ClassFormatError: html_master (Code of a 
> method longer than 65535 bytes)
>     at java.lang.ClassLoader.defineClass0(Native Method)
>     at java.lang.ClassLoader.defineClass(ClassLoader.java:509)
>     at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
>     at java.net.URLClassLoader.defineClass(URLClassLoader.java:246)
>     at java.net.URLClassLoader.access$100(URLClassLoader.java:54)
>     at java.net.URLClassLoader$1.run(URLClassLoader.java:193)
>     at java.security.AccessController.doPrivileged(Native Method)
>     at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
>     at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
>     at java.lang.ClassLoader.loadClass(ClassLoader.java:262)
>     at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:322)
>     at java.lang.Class.forName0(Native Method)
>     at java.lang.Class.forName(Class.java:207)
>     at org.apache.xalan.xsltc.runtime.TransletLoader.loadTranslet
> (TransletLoader.java:120)
>     at 
> org.apache.xalan.xsltc.cmdline.Transform.loadTranslet(Transform.java:152)
>     at 
> org.apache.xalan.xsltc.cmdline.Transform.doTransform(Transform.java:158)
>     at org.apache.xalan.xsltc.cmdline.Transform.main(Transform.java:370)
> I could send the xsl file bundle upon request. [EMAIL PROTECTED]

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to