,當我試圖運行grails -Dgrails.env=local run-app
,我得到了下面的錯誤後如何Grails的依賴,報告刪除犯的jar文件
Server failed to start: java.lang.LinkageError: loader constraint violation: loader (instance of) previously initiated loading for a different type with name "javax/management/MBeanServer"
分析我瞭解,它是與後「兩個依賴連結相同不同版本的」
我跑grails dependency-report
,這裏罈子觀察:
commons-beanutils by commons-beanutils 1.8.3 release default false 227 kB
commons-beanutils by commons-beanutils 1.8.0 release default true 0 kB(evicted by 1.8.3)
如何排除這個罐子或刪除linkag è?
這裏是依賴報告輸出:org.apache.shiro \t四郎核心\t 1.1.0 \t默認情況下,編譯,運行時,掌握\t 1.8.3 org.grails.internal \t \t嚮導0.1 \t默認情況下,編譯\t 1.8.0 – Techie
所以我如何包括1.8.3這裏作爲運行時('org.apache.shiro:四郎核:1.8.3'){ 不包括('commons-beanutils') },其不工作 – Techie
對於shi應該是1.1.0 ro的版本號,比如'runtime('org.apache.shiro:shiro-core:1.1.0'){excludes('commons-beanutils')}' – ataylor