Solr
  1. Solr
  2. SOLR-2271

XSL features fail using turkish locale in Java1.5 due to JVM/xalan bug

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.1
    • Fix Version/s: 4.0-ALPHA
    • Labels:
      None
    • Environment:

      Windows Vista 64

      java version "1.5.0_15"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_15-b04)
      Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_15-b04, mixed mode)

      Description

      Reproducible test failure, from solr/ directory:

      ant test -Dtestcase=TestXPathEntityProcessor -Dtestmethod=withDefaultSolrAndXsl -Dtests.seed=7349899226216392650:769123754625466766
      NOTE: test params are: locale=tr_TR, timezone=GB-Eire

      testCore:
      [junit] Testsuite: org.apache.solr.handler.dataimport.TestXPathEntityProcessor
      [junit] Testcase: withDefaultSolrAndXsl(org.apache.solr.handler.dataimport.TestXPathEntityProcessor): Caused an ERROR
      [junit] Error initializing XSL
      [junit] org.apache.solr.handler.dataimport.DataImportHandlerException: Error initializing XSL
      [junit] at org.apache.solr.handler.dataimport.XPathEntityProcessor.initXpathReader(XPathEntityProcessor.java:117)
      [junit] at org.apache.solr.handler.dataimport.XPathEntityProcessor.init(XPathEntityProcessor.java:87)
      [junit] at org.apache.solr.handler.dataimport.TestXPathEntityProcessor.withDefaultSolrAndXsl(TestXPathEntityProcessor.java:222)
      [junit] at org.apache.lucene.util.LuceneTestCase$LuceneTestCaseRunner.runChild(LuceneTestCase.java:829)
      [junit] at org.apache.lucene.util.LuceneTestCase$LuceneTestCaseRunner.runChild(LuceneTestCase.java:767)
      [junit] Caused by: javax.xml.transform.TransformerConfigurationException: Could not compile stylesheet
      [junit] at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:829)
      [junit] at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:623)
      [junit] at org.apache.solr.handler.dataimport.XPathEntityProcessor.initXpathReader(XPathEntityProcessor.java:112)
      [junit]
      [junit]
      [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 1.607 sec
      [junit]
      [junit] ------------- Standard Output ---------------
      [junit] NOTE: reproduce with: ant test -Dtestcase=TestXPathEntityProcessor -Dtestmethod=withDefaultSolrAndXsl -Dtests.seed=7349899226216392650:769123754625466766
      [junit] NOTE: test params are: locale=tr_TR, timezone=GB-Eire
      [junit] ------------- ---------------- ---------------
      [junit] ------------- Standard Error -----------------
      [junit] java.lang.RuntimeException: Instruction unknown: load?nstruction
      [junit] at com.sun.org.apache.bcel.internal.util.InstructionFinder.mapName(InstructionFinder.java:138)
      [junit] at com.sun.org.apache.bcel.internal.util.InstructionFinder.compilePattern(InstructionFinder.java:170)
      [junit] at com.sun.org.apache.bcel.internal.util.InstructionFinder.search(InstructionFinder.java:218)
      [junit] at com.sun.org.apache.bcel.internal.util.InstructionFinder.search(InstructionFinder.java:264)
      [junit] at com.sun.org.apache.xalan.internal.xsltc.compiler.Mode.peepHoleOptimization(Mode.java:1444)
      [junit] at com.sun.org.apache.xalan.internal.xsltc.compiler.Mode.compileApplyTemplates(Mode.java:1058)
      [junit] at com.sun.org.apache.xalan.internal.xsltc.compiler.Stylesheet.compileModes(Stylesheet.java:615)
      [junit] at com.sun.org.apache.xalan.internal.xsltc.compiler.Stylesheet.translate(Stylesheet.java:730)
      [junit] at com.sun.org.apache.xalan.internal.xsltc.compiler.XSLTC.compile(XSLTC.java:354)
      [junit] at com.sun.org.apache.xalan.internal.xsltc.compiler.XSLTC.compile(XSLTC.java:429)
      [junit] at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:796)
      [junit] at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:623)
      [junit] at org.apache.solr.handler.dataimport.XPathEntityProcessor.initXpathReader(XPathEntityProcessor.java:112)
      [junit] at org.apache.solr.handler.dataimport.XPathEntityProcessor.init(XPathEntityProcessor.java:87)
      [junit] at org.apache.solr.handler.dataimport.TestXPathEntityProcessor.withDefaultSolrAndXsl(TestXPathEntityProcessor.java:222)
      [junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [junit] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      [junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      [junit] at java.lang.reflect.Method.invoke(Method.java:585)
      [junit] at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
      [junit] at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
      [junit] at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
      [junit] at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
      [junit] at org.junit.rules.TestWatchman$1.evaluate(TestWatchman.java:48)
      [junit] at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
      [junit] at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
      [junit] at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
      [junit] at org.apache.lucene.util.LuceneTestCase$LuceneTestCaseRunner.runChild(LuceneTestCase.java:829)
      [junit] at org.apache.lucene.util.LuceneTestCase$LuceneTestCaseRunner.runChild(LuceneTestCase.java:767)
      [junit] at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
      [junit] at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
      [junit] at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
      [junit] at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
      [junit] at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
      [junit] at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
      [junit] at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
      [junit] at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
      [junit] at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:39)
      [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:422)
      [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:931)
      [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:785)
      [junit] ERROR: 'Instruction unknown: load?nstruction'
      [junit] FATAL ERROR: 'Could not compile stylesheet'
      [junit] NOTE: all tests run in this JVM:
      [junit] [TestXPathEntityProcessor]
      [junit] ------------- ---------------- ---------------
      [junit] Test org.apache.solr.handler.dataimport.TestXPathEntityProcessor FAILED

        Issue Links

          Activity

          Hide
          Hoss Man added a comment -

          rmuir: if i understand correctly, this issue is implicitly fixed in Solr/Lucene 4.0, because they will require Java6, and the underlying bug is fixed in Java6.

          correct?

          If so, i guess we can resolve - otherwise please clarify and remove the fix version.

          Show
          Hoss Man added a comment - rmuir: if i understand correctly, this issue is implicitly fixed in Solr/Lucene 4.0, because they will require Java6, and the underlying bug is fixed in Java6. correct? If so, i guess we can resolve - otherwise please clarify and remove the fix version.
          Hide
          Hoss Man added a comment -

          Bulk changing fixVersion 3.6 to 4.0 for any open issues that are unassigned and have not been updated since March 19.

          Email spam suppressed for this bulk edit; search for hoss20120323nofix36 to identify all issues edited

          Show
          Hoss Man added a comment - Bulk changing fixVersion 3.6 to 4.0 for any open issues that are unassigned and have not been updated since March 19. Email spam suppressed for this bulk edit; search for hoss20120323nofix36 to identify all issues edited
          Hide
          Robert Muir added a comment -

          3.4 -> 3.5

          Show
          Robert Muir added a comment - 3.4 -> 3.5
          Hide
          Robert Muir added a comment -

          Bulk move 3.2 -> 3.3

          Show
          Robert Muir added a comment - Bulk move 3.2 -> 3.3
          Hide
          Robert Muir added a comment -
          Show
          Robert Muir added a comment - Moving out all unassigned issues set to 3.1 per this email: http://www.lucidimagination.com/search/document/f026cc56081b5a51/unassigned_jira_issues_set_for_3_1
          Hide
          Robert Muir added a comment -

          Just to correct my previous comment, hossman and I discovered this doesn't only apply to contrib:
          there are problems in XSLT problems in solr core too, when using 1.5 jre with turkish/azeri locales.

          this can be seen with 'ant test-core -Dtests.locale=tr'

          Show
          Robert Muir added a comment - Just to correct my previous comment, hossman and I discovered this doesn't only apply to contrib: there are problems in XSLT problems in solr core too, when using 1.5 jre with turkish/azeri locales. this can be seen with 'ant test-core -Dtests.locale=tr'
          Hide
          Robert Muir added a comment -

          Hoss, the bug is fixed in 1.6 JREs, so the problem only affects 1.5.

          (one reason why the issue has Fix Version: 3.1 set, and not 4.0, since 4.0 requires 1.6 as a minimum).

          Worst case we could at least supply a documentation fix for 3.1 telling people how to use a newer XSL library: not really something I understand,
          and how big of a deal would it be to supply a fixed XSL library with this contrib for 3.1? (it wouldnt affect the core solr libs)

          Show
          Robert Muir added a comment - Hoss, the bug is fixed in 1.6 JREs, so the problem only affects 1.5. (one reason why the issue has Fix Version: 3.1 set, and not 4.0, since 4.0 requires 1.6 as a minimum). Worst case we could at least supply a documentation fix for 3.1 telling people how to use a newer XSL library: not really something I understand, and how big of a deal would it be to supply a fixed XSL library with this contrib for 3.1? (it wouldnt affect the core solr libs)
          Hide
          Hoss Man added a comment -

          Yeah .. definitely looks like a bug inherent in the Java 1.5 version of xalan. (and if i'm reading the comments correctly, 1.6 as well)

          note also the final link the in the Sun bug pointing to...
          https://issues.apache.org/bugzilla/show_bug.cgi?id=38787

          I've updated summary to clarify that this is a general problem with using an XSL related functionality when running with a turkish locale (no reason why this wouldn't also fail using the XSLT ResponseWriter as well)

          Show
          Hoss Man added a comment - Yeah .. definitely looks like a bug inherent in the Java 1.5 version of xalan. (and if i'm reading the comments correctly, 1.6 as well) note also the final link the in the Sun bug pointing to... https://issues.apache.org/bugzilla/show_bug.cgi?id=38787 I've updated summary to clarify that this is a general problem with using an XSL related functionality when running with a turkish locale (no reason why this wouldn't also fail using the XSLT ResponseWriter as well)
          Hide
          Steve Rowe added a comment -

          Likely a variant of LUCENE-2685.

          On IRC #lucene, Robert Muir said:

          its ultimately http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6240963

          Show
          Steve Rowe added a comment - Likely a variant of LUCENE-2685 . On IRC #lucene, Robert Muir said: its ultimately http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6240963

            People

            • Assignee:
              Robert Muir
              Reporter:
              Steve Rowe
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development