按照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)
答案 0 :(得分:0)
解决方法...从源代码中重新构建发布者工具jar。
按照build / buildhowto.txt中的说明,我能够在Eclipse中构建工具jar,从Eclipse内部成功运行Publisher,然后将其导出为一个新工具jar,覆盖我从SVN中提取的工具。然后,新构建的一个从命令行运行完成。
目前SVN中的工具版本可能存在问题。
我正在使用版本0.12-1953进行记录。
答案 1 :(得分:0)
您的类路径中有两个类net.sf.saxon.Configuration。一个包含newConfiguration()方法,另一个不包含。
该方法可能来自Saxon-HE 9.x,类net.sf.saxon.Configuration可以在saxon 8.x中找到,而类应该在Saxon-HE 9.x中找到,其中它也是,确实有这种方法。
所以,检查你的依赖关系以查看saxon 8.x是否被调用,并尝试用Saxon-HE 9.x替换它,然后你的问题就解决了