Exist: OS X installation problems: with user installed Saxon

Created on 21 Feb 2017  Â·  26Comments  Â·  Source: eXist-db/exist

What is the problem

Installation on os x fails using the dmg provided here downloaded using safari 10.0.3.

What did you expect

Installation to succeed.

Describe how to reproduce or add a test

system specs below: I uninstalled exist 2.2 and deleted /Users/$username$/Library/Application Support/org.exist. I logged out and back in. I then dragged the exist-db app from the /dmg into app folder. After copying I started exist via the app icon in my Application folder, and was greeted with the config window as expected (the one where you configure memory settings). I was told that admin pw would be empty and that I could set it via Dashboard. There was a slash screen, apps where installed etc. When trying to access Dashboard via the menu bar item I saw this:
screenshot 2017-02-21 19 42 04
tried java admin client, which silently fails, after clicking connect.
Quit exist, but the dock icon kept running. Quit that manually, logged out and back in. tried again same result. According to the log exist seems to have started normally.

Maybe the dmg file requires installation as root?

Context information

Please always add the following information

  • eXist-db 3.0 / acd0c14
  • Java version Java8u121
  • MacOs 10.12.3
  • 64 bit

All 26 comments

The jar installer doesn't keep a dock icon around after start, but still has the same error. Here is a link to the full log.
two things stand out.
2017-02-21 20:06:58,448 [AWT-EventQueue-0] ERROR (Configuration.java [lookupModuleClass]:448) - Configuration problem: class not found for module 'http://exist-db.org/xquery/jndi' (ClassNotFoundException); class:'org.exist.xquery.modules.jndi.JNDIModule'; message:'org.exist.xquery.modules.jndi.JNDIModule'

and

2017-02-21 20:07:03,472 [Thread-3] WARN  (WebAppContext.java [doStart]:529) - Failed startup of context eXist-db Open Source Native XML Database 
javax.servlet.ServletException: de.betterform.xml.config.XFormsConfigException: java.lang.reflect.InvocationTargetException
    at de.betterform.agent.web.filter.XFormsFilter.init(XFormsFilter.java:76) ~[betterform-exist-5.1-SNAPSHOT-20160615.jar:?]
…
Caused by: de.betterform.xml.config.XFormsConfigException: java.lang.reflect.InvocationTargetException

interestingly, It works for me, flawlessly.

@dizzzz are you starting by double-clicking on icon? or via CLI?

in essence: open dmg, pull out of dmg, double click on icon ; no cli

The problem starts when trying to use exist, the installer seemingly runs as expected. The jar worked on WIn7 (some mysterious messages aside) and AWS linux. Its not like haven't reinstalled 2.2 a couple of times. But neither .jar nor .dmg work on my copy of mac OS. Why would it complain about a betterform error though? and whats JNDI?

do you have 'polluted' system? firewall?

No firewall, the system is less then 4 months old, and had a clean install of Mac OS (no restore from backup). 2.2 installs fine.

The JNDI thing is not to worry about; i have this too. In the log i see

Caused by: java.lang.NoSuchMethodError: net.sf.saxon.functions.SystemFunctionLibrary.getSystemFunctionLibrary(I)Lnet/sf/saxon/functions/SystemFunctionLibrary;
    at de.betterform.xml.xpath.impl.saxon.XPathCache.<clinit>(XPathCache.java:51) ~[betterform-exist-5.1-SNAPSHOT-20160615.jar:?]
    at de.betterform.xml.config.DefaultConfig.load(DefaultConfig.java:101) ~[betterform-exist-5.1-SNAPSHOT-20160615.jar:?]
    at de.betterform.xml.config.DefaultConfig.<init>(DefaultConfig.java:51) ~[betterform-exist-5.1-SNAPSHOT-20160615.jar:?]
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_121]
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_121]
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_121]
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_121]
    at de.betterform.xml.config.Config.initSingleton(Config.java:129) ~[betterform-exist-5.1-SNAPSHOT-20160615.jar:?]
    at de.betterform.xml.config.Config.getInstance(Config.java:166) ~[betterform-exist-5.1-SNAPSHOT-20160615.jar:?]
    at de.betterform.agent.web.WebFactory.initConfiguration(WebFactory.java:153) ~[betterform-exist-5.1-SNAPSHOT-20160615.jar:?]
    at de.betterform.agent.web.filter.XFormsFilter.init(XFormsFilter.java:68) ~[betterform-exist-5.1-SNAPSHOT-20160615.jar:?]
Caused by: java.lang.NoSuchMethodError: net.sf.saxon.functions.SystemFunctionLibrary.getSystemFunctionLibrary(I)Lnet/sf/saxon/functions/SystemFunctionLibrary;
    at de.betterform.xml.xpath.impl.saxon.XPathCache.<clinit>(XPathCache.java:51) ~[betterform-exist-5.1-SNAPSHOT-20160615.jar:?]
    at de.betterform.xml.config.DefaultConfig.load(DefaultConfig.java:101) ~[betterform-exist-5.1-SNAPSHOT-20160615.jar:?]
    at de.betterform.xml.config.DefaultConfig.<init>(DefaultConfig.java:51) ~[betterform-exist-5.1-SNAPSHOT-20160615.jar:?]
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_121]
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_121]
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_121]
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_121]
    at de.betterform.xml.config.Config.initSingleton(Config.java:129) ~[betterform-exist-5.1-SNAPSHOT-20160615.jar:?]
    at de.betterform.xml.config.Config.getInstance(Config.java:166) ~[betterform-exist-5.1-SNAPSHOT-20160615.jar:?]
    at de.betterform.agent.web.WebFactory.initConfiguration(WebFactory.java:153) ~[betterform-exist-5.1-SNAPSHOT-20160615.jar:?]
    at de.betterform.agent.web.filter.XFormsFilter.init(XFormsFilter.java:68) ~[betterform-exist-5.1-SNAPSHOT-20160615.jar:?]Caused by: java.lang.NoSuchMethodError: net.sf.saxon.functions.SystemFunctionLibrary.getSystemFunctionLibrary(I)Lnet/sf/saxon/functions/SystemFunctionLibrary;
    at de.betterform.xml.xpath.impl.saxon.XPathCache.<clinit>(XPathCache.java:51) ~[betterform-exist-5.1-SNAPSHOT-20160615.jar:?]
    at de.betterform.xml.config.DefaultConfig.load(DefaultConfig.java:101) ~[betterform-exist-5.1-SNAPSHOT-20160615.jar:?]
    at de.betterform.xml.config.DefaultConfig.<init>(DefaultConfig.java:51) ~[betterform-exist-5.1-SNAPSHOT-20160615.jar:?]
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_121]
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_121]
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_121]
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_121]
    at de.betterform.xml.config.Config.initSingleton(Config.java:129) ~[betterform-exist-5.1-SNAPSHOT-20160615.jar:?]
    at de.betterform.xml.config.Config.getInstance(Config.java:166) ~[betterform-exist-5.1-SNAPSHOT-20160615.jar:?]
    at de.betterform.agent.web.WebFactory.initConfiguration(WebFactory.java:153) ~[betterform-exist-5.1-SNAPSHOT-20160615.jar:?]
    at de.betterform.agent.web.filter.XFormsFilter.init(XFormsFilter.java:68) ~[betterform-exist-5.1-SNAPSHOT-20160615.jar:?]Caused by: java.lang.NoSuchMethodError: net.sf.saxon.functions.SystemFunctionLibrary.getSystemFunctionLibrary(I)Lnet/sf/saxon/functions/SystemFunctionLibrary;
    at de.betterform.xml.xpath.impl.saxon.XPathCache.<clinit>(XPathCache.java:51) ~[betterform-exist-5.1-SNAPSHOT-20160615.jar:?]
    at de.betterform.xml.config.DefaultConfig.load(DefaultConfig.java:101) ~[betterform-exist-5.1-SNAPSHOT-20160615.jar:?]
    at de.betterform.xml.config.DefaultConfig.<init>(DefaultConfig.java:51) ~[betterform-exist-5.1-SNAPSHOT-20160615.jar:?]
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_121]
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_121]
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_121]
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_121]
    at de.betterform.xml.config.Config.initSingleton(Config.java:129) ~[betterform-exist-5.1-SNAPSHOT-20160615.jar:?]
    at de.betterform.xml.config.Config.getInstance(Config.java:166) ~[betterform-exist-5.1-SNAPSHOT-20160615.jar:?]
    at de.betterform.agent.web.WebFactory.initConfiguration(WebFactory.java:153) ~[betterform-exist-5.1-SNAPSHOT-20160615.jar:?]
    at de.betterform.agent.web.filter.XFormsFilter.init(XFormsFilter.java:68) ~[betterform-exist-5.1-SNAPSHOT-20160615.jar:?]

which might indicate a conflict of betterForm with a saxon.

We need "Saxon-HE-9.6.0-7.jar" , but we found "Checking for Saxon, found version 9.7.0.14" ....

did you put another saxon version 'somewhere on your system class path' ?

I do have another Saxon installed. Is that preventing jetty or just creating the errors in the log

@duncdrum Did you install Saxon into your JRE?

I think it is on your java system class path ?

@adamretter, @dizzzz yes, it's on the path and installed as jre extension. I use it for cli xls tasks

@duncdrum Having it installed as a JRE extension will force any other Java app using that JRE to see that version of Saxon. I would suggest either:

1) Not having it installed as a JRE extension
2) Install a second JRE which you use just for eXist-db and set the JAVA_HOME to that when running eXist-db

@adamretter, @dizzzz not using Saxon as JRE extension fixes the installer problem. I ll have to fix the other instances where i actually depended on it being there.
I really think that either during install or in the documentation some kind of warning should have been generated.
That being said, thank you two so much for the extremely quick and effective help 🥇

I'll think on how to tackle ... the saxon version detection is not correct as it seems... it should check for an exact version

I ll keep it open then until there is a fix, want me to open a separate issue for the dock icon problem? This is installing from .dmg, after shutting down exist the dock icon sticks around, and activity monitor shows
screenshot 2017-02-21 22 34 45

@duncdrum Yes please a separate issue would be best.

@dizzzz Actually eXist version detection is just meant to look for a minimum version, however betterForm is tied to an exact version.

@adamretter will do about the dock icon. As for the installation error, if any other Saxon then the version required by betterForm is a no no for installation, exist should inform users.

  • @duncdrum new & split issues helps in fixing/trackiung
  • @adamretter I know, but as the exact version influences the stability of the software, we need to inform.
  • @adamretter in addition: what about reporting the full classpath during startup of eXist?

@dizzzz Full classpath is absolutely huge. I would rather not report it - it could be a debug/trace option maybe

Have we properly accounted for the fact that Betterform has a dependency on a specific version of Saxon? Should the presence of this version be checked and flagged on startup? If the classpath is useful for diagnosis, is it possible to output it only when an error is found, instead of all the time? Or is it best to always report it in debug/trace?

@joewiz First let me say that I am not anti-betterForm or anti-XForms before other people start shouting.

But... I would like to get an idea about whether we have users that are using betterForm. betterForm locks us to a specific Saxon version. Subsequently updating betterForm each time for a new Saxon version with API changes is a lot of work (I have done it in the past ;-)).

As we get very very few questions about betterForm, I have a feeling that there are not many eXist-db users using betterForm with eXist-db. There haven't been any betterForm releases for a significant period of time. Also I note that the W3C XForms WG was disbanded some time ago.

Perhaps @JoernT and/or @windauer could comment on any betterForm roadmap plans?

p.s. I want this to be a constructive dialogue :-)

The hard dependancy is indeed a problem, as you point out. I actually have no idea where/how it is used at this moment......

hi guys my issues was that users following the install instructions encounter a critical error on macOS. I think debating the pro's and con's of hard dependencies in general, and the state of betterform /xforms should be a separate issues.

Was this page helpful?
0 / 5 - 0 ratings