2013-11-21 26 views
2

按照說明http://wiki.hl7.org/index.php?title=FHIR_Build_Process我的FHIR構建失敗。我修改了publish.bat以確保它使用正確的JDK。在帶有JDK 1.6的Windows 7 64位計算機上運行它(也嘗試過JDK 1.7),並且都出現相同的錯誤。FHIR編譯失敗,出現NoSuchMethodError錯誤:net.sf.saxon.Configuration.newConfiguration()

看起來像一些撒克遜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

是,SAXON罐子地獄。仍試圖整理出來。我不知道我更討厭什麼。 Java的。或撒克遜。 :-( –

+0

Lol,我能夠從Eclipse內部運行它,我確實注意到,當我拉入項目時,Eclispe項目中的saxon9he.jar引用是c:\ work \的絕對路徑。而所有其他人都從.. \進口中抓取,所以我調整了它,並從Eclipse裏面運行,並且運行完成,我將嘗試按照說明構建工具包,然後看看現在是否可以使用。 –

+0

嗯,重建來自源代碼的發佈者工具jar解決了我從命令行構建的問題,也許在我從SVN下拉的那個jar裏面出現了錯誤, –

回答

0

解決方法...從源代碼中新建一個發佈者工具jar。

按照構建/ buildhowto.txt中的說明,我能夠在Eclipse內部構建工具jar,從Eclipse內部成功運行Publisher,然後將其作爲覆蓋從SVN提取的工具的新工具jar導出。新建的一個然後從命令行完成。

可能是目前SVN中的工具版本出現問題。

爲了記錄我正在使用版本0.12-1953。

0

在類路徑中有兩個類net.sf.saxon.Configuration。一個包含newConfiguration()方法,另一個不包含。

該方法可能是從Saxon-HE 9.x中調用的,而net.sf.saxon.Configuration類是在saxon 8.x中找到的,而類應該在Saxon-HE 9.x中找到,它也是這樣,並且確實有這種方法。

所以,檢查你的依賴,看看撒克遜8.x中被調用,並嘗試更換與撒克遜-HE 9.x中,那麼你的問題就解決了

相關問題