2013-10-21 66 views
2

我正在嘗試開發一個應用程序,它使用一個庫作爲依賴關係使用一個stax-api。構建作爲獨立的應用程序,它工作正常,但是當我試圖用JCL在我的應用程序安裝的依賴加載JAR,我得到以下錯誤:提供程序com.bea.xml.stream.MXParserFactory與JCL找不到

javax.xml.stream.FactoryConfigurationError: Provider com.bea.xml.stream.MXParserFactory not found 
at javax.xml.stream.FactoryFinder.newInstance(FactoryFinder.java:72) 
at javax.xml.stream.FactoryFinder.find(FactoryFinder.java:178) 
at javax.xml.stream.FactoryFinder.find(FactoryFinder.java:92) 
at javax.xml.stream.XMLInputFactory.newInstance(XMLInputFactory.java:136) 
at org.codehaus.xfire.util.STAXUtils.<clinit>(STAXUtils.java:48) 
at org.codehaus.xfire.transport.http.HttpChannel.writeWithoutAttachments(HttpChannel.java:54) 
at org.codehaus.xfire.transport.http.CommonsHttpMessageSender.getByteArrayRequestEntity(CommonsHttpMessageSender.java:422) 
at org.codehaus.xfire.transport.http.CommonsHttpMessageSender.send(CommonsHttpMessageSender.java:360) 
at org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel.java:123) 
at org.codehaus.xfire.transport.http.HttpChannel.send(HttpChannel.java:48) 
at org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java:26) 
at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131) 
at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:79) 
at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:114) 
at org.codehaus.xfire.client.Client.invoke(Client.java:336) 
at eu.unicore.security.xfireutil.client.ReliableProxy.handleRequest(ReliableProxy.java:122) 
at eu.unicore.security.xfireutil.client.ReliableProxy.doInvoke(ReliableProxy.java:102) 
at eu.unicore.security.xfireutil.client.ReliableProxy.invoke(ReliableProxy.java:69) 
at com.sun.proxy.$Proxy71.QueryResourceProperties(Unknown Source) 
at de.fzj.unicore.wsrflite.xmlbeans.client.BaseWSRFClient.queryResourceProperties(BaseWSRFClient.java:372) 
at de.fzj.unicore.wsrflite.xmlbeans.client.RegistryClient.listServices(RegistryClient.java:199) 
at de.fzj.unicore.wsrflite.xmlbeans.client.RegistryClient.listAccessibleServices(RegistryClient.java:214) 
at org.caebeans.wsrf.UNICOREModule.initialize(UNICOREModule.java:53) 
... 9 more 

這是相當奇怪,這個類是組裝成JAR,我可以在檔案中找到它。

+0

您可能想要刪除JCL標籤作爲JCL是IBM大型機作業控制語言 –

+0

哎呀, 我的錯。 – skayred

回答

0

當應用服務器庫在應用服務器庫加載之前,我已經看到過這種消息。通常有一個設置可以讓你指定相反的順序。如果,因爲它似乎,你使用的Weblogic,這可以通過在你的weblogic.xml文件中插入下面的定義來實現:

<container-descriptor> 
    <prefer-web-inf-classes>true</prefer-web-inf-classes> 
</container-descriptor> 
+0

我正在使用自己的容器來託管組件 - 這就是問題所在。另外,我將組件組裝成一個具有所有依賴關係的superJAR,並在那裏呈現類com.bea.xml.stream.MXParserFactory。 – skayred

相關問題