2013-10-21 51 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

相关问题