Bug 573404 - default javax.xml.transform.TransformerFactory results in "Branch target offset too large for short" failure.
Summary: default javax.xml.transform.TransformerFactory results in "Branch target offs...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: java-1.6.0-openjdk
Version: 13
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Omair Majid
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 573239
TreeView+ depends on / blocked
 
Reported: 2010-03-14 17:21 UTC by Caolan McNamara
Modified: 2011-06-27 15:09 UTC (History)
11 users (show)

Fixed In Version:
Clone Of: 573239
Environment:
Last Closed: 2011-06-27 15:09:54 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Caolan McNamara 2010-03-14 17:21:16 UTC
+++ This bug was initially created as a clone of Bug #573239 +++

To reproduce on the command line:
yum -y install openoffice.org-wiki-publisher xalan-j2-xsltc
export CLASSPATH=/usr/share/java/xsltc.jar:/usr/share/java/bcel.jar:/usr/share/java/java_cup.jar
cp -r /usr/share/openoffice.org/extensions/wiki-publisher.oxt/filter /tmp
cd /tmp/filter
java org.apache.xalan.xsltc.cmdline.Compile odt2mediawiki.xsl 

com.sun.org.apache.bcel.internal.generic.ClassGenException: Branch target offset too large for short
	at com.sun.org.apache.bcel.internal.generic.BranchInstruction.dump(BranchInstruction.java:102)
	at com.sun.org.apache.bcel.internal.generic.InstructionList.getByteCode(InstructionList.java:983)
	at com.sun.org.apache.bcel.internal.generic.MethodGen.getMethod(MethodGen.java:619)
	at com.sun.org.apache.xalan.internal.xsltc.compiler.Mode.compileNamedTemplate(Mode.java:560)
	at com.sun.org.apache.xalan.internal.xsltc.compiler.Mode.compileTemplates(Mode.java:570)
	at com.sun.org.apache.xalan.internal.xsltc.compiler.Mode.compileApplyTemplates(Mode.java:822)
	at com.sun.org.apache.xalan.internal.xsltc.compiler.Stylesheet.compileModes(Stylesheet.java:619)
	at com.sun.org.apache.xalan.internal.xsltc.compiler.Stylesheet.translate(Stylesheet.java:734)
	at com.sun.org.apache.xalan.internal.xsltc.compiler.XSLTC.compile(XSLTC.java:358)
	at com.sun.org.apache.xalan.internal.xsltc.compiler.XSLTC.compile(XSLTC.java:433)
	at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:796)
	at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:618)
	at XSLTransformer$1.run(XSLTransformer.java:296)
ERROR:  'Branch target offset too large for short'
FATAL ERROR:  'Could not compile stylesheet'

As an aside, using pretty much any alternative jaxp_transform_impl via -Djavax.xml.transform.TransformerFactory= typically works and I sort of naively expected given the defaults of...

readlink -f /usr/share/java/jaxp_transform_impl.jar
/usr/share/java/xalan-j2-2.7.0.jar

that xalan's transformerfactory would be the default. It clearly doesn't work that way though now (if it ever did ?)

Comment 1 man lung wong 2010-03-19 21:07:10 UTC
When I run the above commands to try and reproduce the problem, I get the following (it is the same error I believe but it uses a different set of code):

org.apache.bcel.generic.ClassGenException: Branch target offset too large for short
	at org.apache.bcel.generic.BranchInstruction.dump(BranchInstruction.java:65)
	at org.apache.bcel.generic.InstructionList.getByteCode(InstructionList.java:940)
	at org.apache.bcel.generic.MethodGen.getMethod(MethodGen.java:615)
	at org.apache.xalan.xsltc.compiler.Mode.compileNamedTemplate(Mode.java:556)
	at org.apache.xalan.xsltc.compiler.Mode.compileTemplates(Mode.java:566)
	at org.apache.xalan.xsltc.compiler.Mode.compileApplyTemplates(Mode.java:818)
	at org.apache.xalan.xsltc.compiler.Stylesheet.compileModes(Stylesheet.java:610)
	at org.apache.xalan.xsltc.compiler.Stylesheet.translate(Stylesheet.java:725)
	at org.apache.xalan.xsltc.compiler.XSLTC.compile(XSLTC.java:354)
	at org.apache.xalan.xsltc.compiler.XSLTC.compile(XSLTC.java:253)
	at org.apache.xalan.xsltc.compiler.XSLTC.compile(XSLTC.java:389)
	at org.apache.xalan.xsltc.cmdline.Compile.main(Compile.java:129)
Compiler errors:
  Branch target offset too large for short

Wondering if you can post your java version through $java -version, or if you actually know how to produce it such that it runs off the openjdk code instead.

Thanks,
Man Lung Wong

Comment 2 man lung wong 2010-08-05 22:23:17 UTC
Is the problem still occurring, because from the error I got, it seems as though the default is indeed xalan's transformerfactory and not the OpenJDK one.

If the problem still exists, but with the xalan's code instead, maybe a separate bug report should be filed in upstream.

Thanks,
Man Lung Wong

Comment 3 Omair Majid 2010-08-20 14:05:16 UTC
(In reply to comment #2)
> Is the problem still occurring, because from the error I got, it seems as
> though the default is indeed xalan's transformerfactory and not the OpenJDK
> one.
> 

OpenJDK includes a copy (or a derivation, rather) of xalan. Steps that I used to reproduce this problem:

yum install openoffice.org-wiki-publisher xalan-j2-xsltc
cp -r /usr/share/openoffice.org/extensions/wiki-publisher.oxt/filter /tmp
cd /tmp/filter
java com.sun.org.apache.xalan.internal.xsltc.cmdline.Compile odt2mediawiki.xsl

Comment 4 Omair Majid 2010-08-20 20:04:54 UTC
This bug has been fixed in xalan-j2 2.7.1 (https://issues.apache.org/jira/browse/XALANJ-1324). JAXP uses an older version of xalan-j2, so it does not have the fix.

Comment 5 Omair Majid 2010-11-16 18:31:45 UTC
JAXP is being updated to use xalan-j2 2.7.1 upstream. See http://jaxp.java.net/1.4/1.4.4/ReleaseNotes.html.

Comment 6 Andrew John Hughes 2010-11-24 23:41:13 UTC
1.4.4 is being used by OpenJDK6 hg which will (eventually) become b21.

Comment 7 Bug Zapper 2011-06-02 16:11:00 UTC
This message is a reminder that Fedora 13 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 13.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '13'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 13's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 13 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 8 Bug Zapper 2011-06-27 15:09:54 UTC
Fedora 13 changed to end-of-life (EOL) status on 2011-06-25. Fedora 13 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.