You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "alex gugel (JIRA)" <xa...@xml.apache.org> on 2005/09/17 19:20:54 UTC

[jira] Commented: (XALANJ-2201) Can't compile stylesheet under jdk1.4 (jdk1.5 works): IncompatibleClassChangeError

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

alex gugel commented on XALANJ-2201:
------------------------------------

It works also under 1.4.2 on Mac Os X. All you have to do is to set the -Djava.endorsed.dirs variable and put xalan.jar and serializer.jar in the endorsed directory.

> Can't compile stylesheet under jdk1.4 (jdk1.5 works): IncompatibleClassChangeError
> ----------------------------------------------------------------------------------
>
>          Key: XALANJ-2201
>          URL: http://issues.apache.org/jira/browse/XALANJ-2201
>      Project: XalanJ2
>         Type: Bug
>   Components: XSLTC
>     Versions: 2.7
>  Environment: Mac Os X, JDK.1.4.2_09
>     Reporter: alex gugel
>  Attachments: music-exporter-index.xsl
>
> xalan-j_2_7_0$ java -version
> java version "1.4.2_09"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_09-232)
> Java HotSpot(TM) Client VM (build 1.4.2-54, mixed mode)
> xsltc:
>      [java] java.lang.IncompatibleClassChangeError
>      [java]     at org.apache.xalan.xsltc.compiler.Step.toString(Step.java:502)
>      [java]     at java.lang.String.valueOf(String.java:2131)
>      [java]     at java.lang.StringBuffer.append(StringBuffer.java:370)
>      [java]     at org.apache.xalan.xsltc.compiler.EqualityExpr.toString(EqualityExpr.java:74)
>      [java]     at java.lang.String.valueOf(String.java:2131)
>      [java]     at java.lang.StringBuffer.append(StringBuffer.java:370)
>      [java]     at org.apache.xalan.xsltc.compiler.Predicate.toString(Predicate.java:267)
>      [java]     at org.apache.xalan.xsltc.compiler.Predicate.compileFilter(Predicate.java:359)
>      [java]     at org.apache.xalan.xsltc.compiler.Predicate.translateFilter(Predicate.java:552)
>      [java]     at org.apache.xalan.xsltc.compiler.Step.translatePredicates(Step.java:472)
>      [java]     at org.apache.xalan.xsltc.compiler.Step.translate(Step.java:230)
>      [java]     at org.apache.xalan.xsltc.compiler.ParentLocationPath.translate(ParentLocationPath.java:186)
>      [java]     at org.apache.xalan.xsltc.compiler.AbsoluteLocationPath.translate(AbsoluteLocationPath.java:101)
>      [java]     at org.apache.xalan.xsltc.compiler.ForEach.translate(ForEach.java:129)
>      [java]     at org.apache.xalan.xsltc.compiler.SyntaxTreeNode.translateContents(SyntaxTreeNode.java:504)
>      [java]     at org.apache.xalan.xsltc.compiler.ForEach.translate(ForEach.java:148)
>      [java]     at org.apache.xalan.xsltc.compiler.SyntaxTreeNode.translateContents(SyntaxTreeNode.java:504)
>      [java]     at org.apache.xalan.xsltc.compiler.LiteralElement.translate(LiteralElement.java:410)
>      [java]     at org.apache.xalan.xsltc.compiler.SyntaxTreeNode.translateContents(SyntaxTreeNode.java:504)
>      [java]     at org.apache.xalan.xsltc.compiler.LiteralElement.translate(LiteralElement.java:410)
>      [java]     at org.apache.xalan.xsltc.compiler.SyntaxTreeNode.translateContents(SyntaxTreeNode.java:504)
>      [java]     at org.apache.xalan.xsltc.compiler.LiteralElement.translate(LiteralElement.java:410)
>      [java]     at org.apache.xalan.xsltc.compiler.SyntaxTreeNode.translateContents(SyntaxTreeNode.java:504)
>      [java]     at org.apache.xalan.xsltc.compiler.LiteralElement.translate(LiteralElement.java:410)
>      [java]     at org.apache.xalan.xsltc.compiler.SyntaxTreeNode.translateContents(SyntaxTreeNode.java:504)
>      [java]     at org.apache.xalan.xsltc.compiler.LiteralElement.translate(LiteralElement.java:410)
>      [java]     at org.apache.xalan.xsltc.compiler.SyntaxTreeNode.translateContents(SyntaxTreeNode.java:504)
>      [java]     at org.apache.xalan.xsltc.compiler.ForEach.translate(ForEach.java:148)
>      [java]     at org.apache.xalan.xsltc.compiler.SyntaxTreeNode.translateContents(SyntaxTreeNode.java:504)
>      [java]     at org.apache.xalan.xsltc.compiler.LiteralElement.translate(LiteralElement.java:410)
>      [java]     at org.apache.xalan.xsltc.compiler.SyntaxTreeNode.translateContents(SyntaxTreeNode.java:504)
>      [java]     at org.apache.xalan.xsltc.compiler.LiteralElement.translate(LiteralElement.java:410)
>      [java]     at org.apache.xalan.xsltc.compiler.SyntaxTreeNode.translateContents(SyntaxTreeNode.java:504)
>      [java]     at org.apache.xalan.xsltc.compiler.Template.translate(Template.java:335)
>      [java]     at org.apache.xalan.xsltc.compiler.TopLevelElement.compile(TopLevelElement.java:56)
>      [java]     at org.apache.xalan.xsltc.compiler.Mode.compileNamedTemplate(Mode.java:549)
>      [java]     at org.apache.xalan.xsltc.compiler.Mode.compileTemplates(Mode.java:566)
>      [java]     at org.apache.xalan.xsltc.compiler.Mode.compileApplyTemplates(Mode.java:818)
>      [java]     at org.apache.xalan.xsltc.compiler.Stylesheet.compileModes(Stylesheet.java:610)
>      [java]     at org.apache.xalan.xsltc.compiler.Stylesheet.translate(Stylesheet.java:725)
>      [java]     at org.apache.xalan.xsltc.compiler.XSLTC.compile(XSLTC.java:354)
>      [java]     at org.apache.xalan.xsltc.compiler.XSLTC.compile(XSLTC.java:253)
>      [java]     at org.apache.xalan.xsltc.compiler.XSLTC.compile(XSLTC.java:389)
>      [java]     at org.apache.xalan.xsltc.cmdline.Compile.main(Compile.java:129)
> This fails under jdk 1.4 but it works under jdk 1.5.
> public class DevIndexCreator  {
>   public static void main(String[] args) throws TransformerException, FileNotFoundException {
>     UniFile dir = new UniFile("/Users/alexgugel/_index");
>     System.setProperty("javax.xml.transform.TransformerFactory", "org.apache.xalan.xsltc.trax.SmartTransformerFactoryImpl");
>     StreamSource source = new StreamSource(dir.append("data.xml").asFile());
>     UniFile style = MacOsXUtil.getProgramHome().append("etc-dir/resources/music-exporter-index.xsl");
>     TransformerFactory transformerFactory = TransformerFactory.newInstance();
>     transformerFactory.setAttribute("debug", Boolean.TRUE);
>     
>     Templates templates = transformerFactory.newTemplates(new StreamSource(new FileInputStream(style.asFile())));
>     StreamResult result = new StreamResult(dir.append("xsltc-result.html").asFile());
>     Transformer transformer = templates.newTransformer();
>     transformer.transform(source, result);
>   }
> }

-- 
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: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org