You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Uwe Schindler (JIRA)" <ji...@apache.org> on 2015/06/12 08:49:01 UTC

[jira] [Updated] (LUCENE-6556) TestQueryTemplateManager always fails on J9

     [ https://issues.apache.org/jira/browse/LUCENE-6556?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Uwe Schindler updated LUCENE-6556:
----------------------------------
    Labels: IBM-J9  (was: )

> TestQueryTemplateManager always fails on J9
> -------------------------------------------
>
>                 Key: LUCENE-6556
>                 URL: https://issues.apache.org/jira/browse/LUCENE-6556
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Robert Muir
>              Labels: IBM-J9
>
> from lucene/queryparser: 
> ant test  -Dtestcase=TestQueryTemplateManager -Dtests.method=testFormTransforms
> This is a little strange. I think we can boil it down to something simple. From what I can tell, this code isn't doing anything evil and should not need to grant this permission to a IBM-internal class just to do XSL? So maybe a misconfiguration in the J9 JDK here...
> always fails like this:
> {noformat}
>    [junit4] Suite: org.apache.lucene.queryparser.xml.TestQueryTemplateManager
>    [junit4]   2> NOTE: reproduce with: ant test  -Dtestcase=TestQueryTemplateManager -Dtests.method=testFormTransforms -Dtests.seed=AC2742D2D8B36B97 -Dtests.locale=fi -Dtests.timezone=Europe/Zurich -Dtests.asserts=true -Dtests.file.encoding=US-ASCII
>    [junit4] ERROR   0.45s | TestQueryTemplateManager.testFormTransforms <<<
>    [junit4]    > Throwable #1: java.lang.ExceptionInInitializerError
>    [junit4]    > 	at __randomizedtesting.SeedInfo.seed([AC2742D2D8B36B97:1DB6A290E79AD085]:0)
>    [junit4]    > 	at java.lang.J9VMInternals.ensureError(J9VMInternals.java:137)
>    [junit4]    > 	at java.lang.J9VMInternals.recordInitializationFailure(J9VMInternals.java:126)
>    [junit4]    > 	at com.ibm.xtq.xslt.drivers.XSLTCompiler.compile(Unknown Source)
>    [junit4]    > 	at com.ibm.xtq.xslt.jaxp.compiler.TransformerFactoryImpl.createTemplates(Unknown Source)
>    [junit4]    > 	at com.ibm.xtq.xslt.jaxp.AbstractTransformerFactory.newTemplates(Unknown Source)
>    [junit4]    > 	at org.apache.lucene.queryparser.xml.QueryTemplateManager.getTemplates(QueryTemplateManager.java:201)
>    [junit4]    > 	at org.apache.lucene.queryparser.xml.QueryTemplateManager.addQueryTemplate(QueryTemplateManager.java:71)
>    [junit4]    > 	at org.apache.lucene.queryparser.xml.TestQueryTemplateManager.testFormTransforms(TestQueryTemplateManager.java:84)
>    [junit4]    > 	at java.lang.Thread.run(Thread.java:785)
>    [junit4]    > Caused by: java.util.MissingResourceException: Can't find bundle for base name com.ibm.xtq.xslt.res.ErrorMessages, locale fi
>    [junit4]    > 	at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:1590)
>    [junit4]    > 	at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1406)
>    [junit4]    > 	at java.util.ResourceBundle.getBundle(ResourceBundle.java:856)
>    [junit4]    > 	at com.ibm.xtq.xslt.res.ErrorMsg.<clinit>(Unknown Source)
>    [junit4]    > 	... 42 more
>    [junit4]    > Caused by: java.security.AccessControlException: Access denied ("java.lang.RuntimePermission" "accessClassInPackage.com.ibm.xtq.xslt.res")
>    [junit4]    > 	at java.security.AccessController.throwACE(AccessController.java:157)
>    [junit4]    > 	at java.security.AccessController.checkPermissionHelper(AccessController.java:216)
>    [junit4]    > 	at java.security.AccessController.checkPermission(AccessController.java:263)
>    [junit4]    > 	at java.lang.SecurityManager.checkPermission(SecurityManager.java:562)
>    [junit4]    > 	at java.lang.SecurityManager.checkPackageAccess(SecurityManager.java:1655)
>    [junit4]    > 	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:322)
>    [junit4]    > 	at java.lang.ClassLoader.loadClass(ClassLoader.java:752)
>    [junit4]    > 	at java.util.ResourceBundle$RBClassLoader.loadClass(ResourceBundle.java:514)
>    [junit4]    > 	at java.util.ResourceBundle$Control.newBundle(ResourceBundle.java:2666)
>    [junit4]    > 	at java.util.ResourceBundle.loadBundle(ResourceBundle.java:1527)
>    [junit4]    > 	at java.util.ResourceBundle.findBundle(ResourceBundle.java:1491)
>    [junit4]    > 	at java.util.ResourceBundle.findBundle(ResourceBundle.java:1445)
>    [junit4]    > 	at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1380)
>    [junit4]    > 	... 44 more
>    [junit4]   2> NOTE: test params are: codec=Asserting(Lucene53), sim=DefaultSimilarity, locale=fi, timezone=Europe/Zurich
>    [junit4]   2> NOTE: Linux 3.13.0-49-generic amd64/IBM Corporation 1.8.0 (64-bit)/cpus=8,threads=2,free=1595832,total=12779520
>    [junit4]   2> NOTE: All tests run in this JVM: [TestQueryTemplateManager]
>    [junit4] Completed [1/1] in 0.67s, 1 test, 1 error <<< FAILURES!
> {noformat}
> The code in question just looks like this:
> {code}
> // in cinit
> static DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
> static TransformerFactory tFactory = TransformerFactory.newInstance();
> ...
>   public static Templates getTemplates(InputStream xslIs) {
>     dbf.setNamespaceAware(true);
>     DocumentBuilder builder = dbf.newDocumentBuilder();
>     org.w3c.dom.Document xslDoc = builder.parse(xslIs);
>     DOMSource ds = new DOMSource(xslDoc);
>     return tFactory.newTemplates(ds);
>   }
> {code}
> pinging xml policeman [~thetaphi] in case i am missing something.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org