When running scilab under openjdk-11 it fails to open the preferences windows with the following error (see bellow for the full output):
ERROR: 'Could not compile stylesheet'
FATAL ERROR: 'The xsl:import element children must precede all other element children of an xsl:stylesheet element, including any xsl:include element children.'
:The xsl:import element children must precede all other element children of an xsl:stylesheet element, including any xsl:include element children.
Could not load file: /usr/share/scilab//modules/preferences/src/xslt/XConfiguration.xsl
$ cat /etc/os-release
NAME="Ubuntu"
VERSION="18.04.2 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.2 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
$ apt policy scilab
scilab:
Installed: 6.0.1-7ubuntu1~18.04
Candidate: 6.0.1-7ubuntu1~18.04
Version table:
*** 6.0.1-7ubuntu1~18.04 500
500 http://192.168.122.1:9999/ubuntu bionic-proposed/universe amd64 Packages
500 http://192.168.122.1:9999/ubuntu bionic-proposed/universe i386 Packages
100 /var/lib/dpkg/status
6.0.1-1ubuntu1 500
500 http://192.168.122.1:9999/ubuntu bionic/universe amd64 Packages
500 http://192.168.122.1:9999/ubuntu bionic/universe i386 Packages
The IP and port are due to the proxy (approx) I am running to speed up installs.
How to reproduce:
1. open scilab in a terminal
2. go to Edit -> Preferences (or click the Preferences icon in the toolbar)
3. notice that the Preferences window does not show up and that the console/terminal will output an exception
Expected result:
Preferences window should show up.
Full output from scilab:
$ scilab
Picked up _JAVA_OPTIONS: -Djava.class.path=/usr/share/java/flexdock.jar:/usr/share/java/skinlf.jar:/usr/share/java/looks.jar:/usr/share/java/commons-logging.jar:/usr/share/java/jhall.jar:/usr/share/java/lucene-core-4.10.4.jar:/usr/share/java/lucene-analyzers-common-4.10.4.jar:/usr/share/java/lucene-queryparser-4.10.4.jar:/usr/share/maven-repo/org/freehep/freehep-util/debian/freehep-util-debian.jar:/usr/share/maven-repo/org/freehep/freehep-io/debian/freehep-io-debian.jar:/usr/share/maven-repo/org/freehep/freehep-graphicsio/debian/freehep-graphicsio-debian.jar:/usr/share/java/freehep-graphicsio-emf-2.1.jar:/usr/share/java/freehep-graphics2d-2.1.1.jar:/usr/share/java/jrosetta-API.jar:/usr/share/java/jrosetta-engine-1.0.4.jar:/usr/share/java/jgraphx.jar:/usr/share/java/jogl2.jar:/usr/share/java/gluegen2-rt.jar:/usr/share/java/jeuclid-core.jar:/usr/share/java/jlatexmath-fop-1.0.7.jar:/usr/share/java/fop.jar:/usr/share/java/saxon.jar:/usr/share/java/batik.jar:/usr/share/java/xml-apis-ext.jar:/usr/share/java/commons-io.jar:/usr/share/java/xmlgraphics-commons.jar:/usr/share/java/avalon-framework.jar:/usr/share/java/jlatexmath-1.0.7.jar:/usr/share/java/ecj.jar:/usr/share/java/javax.activation.jar:/usr/share/java/jaxb-runtime.jar:/usr/share/scilab/modules/console/jar/org.scilab.modules.console.jar:/usr/share/scilab/modules/localization/jar/org.scilab.modules.localization.jar:/usr/share/scilab/modules/core/jar/org.scilab.modules.core.jar:/usr/share/scilab/modules/ui_data/jar/org.scilab.modules.ui_data.jar:/usr/share/scilab/modules/preferences/jar/org.scilab.modules.preferences.jar:/usr/share/scilab/modules/scirenderer/jar/scirenderer.jar:/usr/share/scilab/modules/scinotes/jar/org.scilab.modules.scinotes.jar:/usr/share/scilab/modules/external_objects_java/jar/org.scilab.modules.external_objects_java.jar:/usr/share/scilab/modules/types/jar/org.scilab.modules.types.jar:/usr/share/scilab/modules/gui/jar/org.scilab.modules.gui.jar:/usr/share/scilab/modules/renderer/jar/org.scilab.modules.renderer.jar:/usr/share/scilab/modules/history_manager/jar/org.scilab.modules.history_manager.jar:/usr/share/scilab/modules/graphic_export/jar/org.scilab.modules.graphic_export.jar:/usr/share/scilab/modules/graphic_objects/jar/org.scilab.modules.graphic_objects.jar:/usr/share/scilab/modules/javasci/jar/org.scilab.modules.javasci.jar:/usr/share/scilab/modules/history_browser/jar/org.scilab.modules.history_browser.jar:/usr/share/scilab/modules/jvm/jar/org.scilab.modules.jvm.jar:/usr/share/scilab/modules/xcos/jar/org.scilab.modules.xcos.jar:/usr/share/scilab/modules/graph/jar/org.scilab.modules.graph.jar:/usr/share/scilab/modules/action_binding/jar/org.scilab.modules.action_binding.jar:/usr/share/scilab/modules/completion/jar/org.scilab.modules.completion.jar:/usr/share/scilab/modules/helptools/jar/scilab_images.jar:/usr/share/scilab/modules/helptools/jar/scilab_ru_RU_help.jar:/usr/share/scilab/modules/helptools/jar/scilab_en_US_help.jar:/usr/share/scilab/modules/helptools/jar/org.scilab.modules.helptools.jar:/usr/share/scilab/modules/commons/jar/org.scilab.modules.commons.jar:
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.scilab.modules.jvm.LibraryPath (file:/usr/share/scilab/modules/jvm/jar/org.scilab.modules.jvm.jar) to field java.lang.ClassLoader.sys_paths
WARNING: Please consider reporting this to the maintainers of org.scilab.modules.jvm.LibraryPath
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
libEGL warning: DRI2: failed to authenticate
commons module not found.
graphic_objects module not found.
ui_data module not found.
graph module not found.
history_browser module not found.
slint module not found.
coverage module not found.
ERROR: 'Could not compile stylesheet'
FATAL ERROR: 'The xsl:import element children must precede all other element children of an xsl:stylesheet element, including any xsl:include element children.'
:The xsl:import element children must precede all other element children of an xsl:stylesheet element, including any xsl:include element children.
Could not load file: /usr/share/scilab//modules/preferences/src/xslt/XConfiguration.xsl
java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.scilab.modules.gui.events.callback.JavaCallBack$2.callBack(Unknown Source)
at org.scilab.modules.gui.events.callback.CommonCallBack.actionPerformed(Unknown Source)
at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1967)
at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2308)
at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405)
at java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262)
at java.desktop/javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:279)
at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297)
at java.desktop/java.awt.Component.processMouseEvent(Component.java:6632)
at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3342)
at java.desktop/java.awt.Component.processEvent(Component.java:6397)
at java.desktop/java.awt.Container.processEvent(Container.java:2263)
at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5008)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4840)
at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4918)
at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4547)
at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4488)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307)
at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2772)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4840)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:772)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:743)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Caused by: java.lang.NullPointerException
at org.scilab.modules.preferences.XCommonManager.generateViewDOM(Unknown Source)
at org.scilab.modules.preferences.XCommonManager.refreshDisplay(Unknown Source)
at org.scilab.modules.preferences.XConfigManager.displayAndWait(Unknown Source)
at org.scilab.modules.preferences.XConfigManager.openPreferences(Unknown Source)
The file /usr/share/ scilab/ /modules/ preferences/ src/xslt/ XConfiguration. xsl is there and belongs to scilab-data:
$ dpkg -S /usr/share/ scilab/ modules/ preferences/ src/xslt/ XConfiguration. xsl scilab/ modules/ preferences/ src/xslt/ XConfiguration. xsl
scilab-data: /usr/share/
It has xsl:import clauses but they seem to be in the right place:
$ grep import /usr/share/ scilab/ modules/ preferences/ src/xslt/ XConfiguration. xsl xsl"/> toolbars. xsl"/> xsl"/>
<xsl:import href="XCommon.
<xsl:import href="XCommon-
<xsl:import href="XGeneric.
In fact all xsl under /usr/share/ scilab/ modules/ preferences/ src/xslt/ seem to be fine:
$ grep -n import /usr/share/ scilab/ modules/ preferences/ src/xslt/ *.xsl scilab/ modules/ preferences/ src/xslt/ XConfiguration. xsl:4: <xsl:import href="XCommon. xsl"/> scilab/ modules/ preferences/ src/xslt/ XConfiguration. xsl:5: <xsl:import href="XCommon- toolbars. xsl"/> scilab/ modules/ preferences/ src/xslt/ XConfiguration. xsl:6: <xsl:import href="XGeneric. xsl"/> scilab/ modules/ preferences/ src/xslt/ XWizard. xsl:9: <xsl:import href="XCommon. xsl"/> scilab/ modules/ preferences/ src/xslt/ XWizard. xsl:10: <xsl:import href="XWizard/ XWizard- any.xsl" /> scilab/ modules/ preferences/ src/xslt/ XWizard. xsl:11: <xsl:import href="XWizard/ XWizard- function. xsl"/> scilab/ modules/ preferences/ src/xslt/ XWizard. xsl:12: <xsl:import href="XWizard/ XWizard- expression. xsl"/> scilab/ modules/ preferences/ src/xslt/ XWizard. xsl:13: <xsl:import href="XWizard/ XWizard- xcos.xsl" /> scilab/ modules/ preferences/ src/xslt/ XWizard. xsl:21: <xsl:variable name="imports" scilab/ modules/ preferences/ src/xslt/ XWizard. xsl:22: select= "document( '')/xsl: stylesheet/ xsl:import/ @import" /> scilab/ modules/ preferences/ src/xslt/ XWizard. xsl:24: select= "document( $imports) /xsl:stylesheet /descendant: :xsl-variable" />
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
including the ones that XWizards itself imports: scilab/ modules/ preferences/ src/xslt/ XWizard/ *.xsl
$ grep -n import /usr/share/
[no results]