FHIR 构建失败并出现 NoSuchMethodError:net.sf.saxon.Configuration.newConfiguration()

2024-01-04

按照说明进行操作http://wiki.hl7.org/index.php?title=FHIR_Build_Process http://wiki.hl7.org/index.php?title=FHIR_Build_Process我的 FHIR 构建失败。我修改了publish.bat以确保它使用正确的JDK。在使用 JDK 1.6 的 Windows 7 64 位计算机上运行它(也尝试过 JDK 1.7),但都失败并出现相同的错误。

看起来像是某个 Saxon JAR 地狱。有任何想法吗?

 ...validate v2-tables                                                     441sec  755MB
 ...validate v3-codesystems                                                443sec  889MB
Reference Platform Validation.                                             447sec 1067MB
 ...test adversereaction-example                                           447sec 1067MB
Exception in thread "main" java.lang.NoSuchMethodError: net.sf.saxon.Configuration.newConfiguration()Lnet/sf/saxon/Configuration
;
        at net.sf.saxon.xpath.XPathFactoryImpl.<init>(XPathFactoryImpl.java:33)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at java.lang.Class.newInstance0(Class.java:355)
        at java.lang.Class.newInstance(Class.java:308)
        at javax.xml.xpath.XPathFactoryFinder.loadFromService(XPathFactoryFinder.java:401)
        at javax.xml.xpath.XPathFactoryFinder._newFactory(XPathFactoryFinder.java:222)
        at javax.xml.xpath.XPathFactoryFinder.newFactory(XPathFactoryFinder.java:143)
        at javax.xml.xpath.XPathFactory.newInstance(XPathFactory.java:185)
        at javax.xml.xpath.XPathFactory.newInstance(XPathFactory.java:99)
        at org.hl7.fhir.tools.publisher.Publisher.testSearchParameters(Publisher.java:2796)
        at org.hl7.fhir.tools.publisher.Publisher.testSearchParameters(Publisher.java:2785)
        at org.hl7.fhir.tools.publisher.Publisher.validateRoundTrip(Publisher.java:2759)
        at org.hl7.fhir.tools.publisher.Publisher.validateXml(Publisher.java:2656)
        at org.hl7.fhir.tools.publisher.Publisher.execute(Publisher.java:378)
        at org.hl7.fhir.tools.publisher.Publisher.main(Publisher.java:281)

解决方法...从源代码重新构建发布者工具 jar。

按照 build/buildhowto.txt 中的说明,我能够在 Eclipse 内构建工具 jar,从 Eclipse 内成功运行 Publisher,然后将其导出为一个新的工具 jar,覆盖我从 SVN 中提取的工具 jar。然后,新构建的程序从命令行运行至完成。

可能是目前 SVN 中的工具 jar 版本有问题。

根据记录,我正在使用版本 0.12-1953。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

FHIR 构建失败并出现 NoSuchMethodError:net.sf.saxon.Configuration.newConfiguration() 的相关文章

随机推荐