Document transformations using large XSLT stylesheets fail with Java exception "com.sun.org.apache.bcel.internal.generic.ClassGenException: Branch target offset too large for short" when used with SAP JVM 5.1, 6.1 or other derivates of Sun's JDK 5 or 6 (e.g the HP JDK 1.5). They formerly worked with JDKs of version 1.4.2. Other terms
SAP NetWeaver PI 7.1 Reason and Prerequisites
"Error initializing XSLT Mode:; caused by javax.xml.transform.TransformerConfigurationException: Could not compile stylesheet"
Template definitions contained in XSLT stylesheets are compiled by SAP JVM's XSLT compiler "Xalan" into Java methods for faster execution of transformations. Java bytecode branch instructions contained in these Java methods are limited to 32K offsets. Large template definitions can now lead to very large Java methods, where the branch offset would need to be larger than 32K. Therefore these stylesheets cannot be compiled to Java methods and therefore cannot be used for transformations. Solution
https://service.sap.com/sap/support/notes/1273115 (SAP Service marketplace login required)