While attempting to get GnatService running, discovered an issue with scripts/startGnatService.sh.
For the binary release 1.31, the jaxen library version is incorrect and the linnaeus library is missing. It was:
nohup java -cp lib/gnat.jar:lib/jdom-1.0.jar:lib/jaxen-1.1-beta-9.jar gnat.server.GnatService start -p=8081 -log=0 &
but should be:
nohup java -cp lib/gnat.jar:lib/jdom-1.0.jar:lib/jaxen-1.1.3.jar:lib/linnaeus-2.0.jar gnat.server.GnatService start -p=8081 -log=0 &
Without the above fix, running scripts/startGnatService.sh will result in:
Exception in thread "main" java.lang.NoClassDefFoundError: martin/common/ArgParser
at gnat.server.GnatService.main(GnatService.java:110)
Caused by: java.lang.ClassNotFoundException: martin.common.ArgParser
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 1 more
Thanks for filing this issue. Let me take a look and update the binary downloads + example scripts.
Cool, thanks, Jörg!
On a related note...
When I got GnatService running with the above changes, I was able to successfully see the help page at http://localhost:8081.
However, when I try http://localhost:8081/?pmid=20832752&task=gner, I get the following error:
Haven't dug into it yet, but am I doing anything obviously wrong?
Cheers
Hi Jörg,
I'm trying to debug the above JDOMParseException, but I am unable to compile the GNAT source. Is there a build file or script (e.g. Maven pom.xml, Ant build.xml, etc.) that I can use?
Thanks
I believe NHI's PubMed XML output might have changed, that's why we're getting the Exception.
We don't have a build script :( --- what errors are you getting?
On http://localhost:8081/?pmid=20832752&task=gner , the error:
But yeah, I suppose Pubmed DTD change could be the cause.
I took a quick look at the code and the XML for PMID 20832752 and the expected format still appears to be valid:
Hard to say what's causing the JDomParseException without throwing a debugger on it.
Is there any chance of resurrecting the build script? :)
Last edit: Kuni Katsuya 2018-08-02