XMLStreamException:名称空间URI尚未绑定到前缀,IBM jre [英] XMLStreamException: The namespace URI has not been bound to a prefix,IBM jre

查看:258
本文介绍了XMLStreamException:名称空间URI尚未绑定到前缀,IBM jre的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的项目在tomcat服务器上正常工作,现在我试图在WebSphere Liberty Profile(WLP)上运行项目,但是它给我带来了以下错误,无法进行stax实现

My project working fine with tomcat server and now I am trying to run project on WebSphere Liberty Profile(WLP) but its giving me below error for stax implementation

     javax.xml.stream.XMLStreamException: The namespace URI "http://www.example.com/ns1" has not bound to a prefix.
  at  com.ibm.xml.xlxp.api.stax.msg.StAXMessageProvider.throwXMLStreamException(StAXMessageProvider.java:59)
  at com.ibm.xml.xlxp.api.stax.XMLStreamWriterBase.writeAttribute(XMLStreamWriterBase.java:464)
  at com.ibm.xml.xlxp.api.stax.XMLOutputFactoryImpl$XMLStreamWriterProxy.writeAttribute(XMLOutputFactoryImpl.java:157)
  at org.apache.olingo.odata2.core.ep.producer.XmlMetadataProducer.writeAnnotationAttributes(XmlMetadataProducer.java:599)
  at org.apache.olingo.odata2.core.ep.producer.XmlMetadataProducer.writeMetadata(XmlMetadataProducer.java:134)

在WLP中,我已将类加载器策略设置为父代-后代". 如何在IBM jre中实现stax

i have set the classloader policy to parent-last in WLP. how to implement stax in IBM jre

推荐答案

问题已解决,感谢您的答复. 解决方法是:我在项目中添加了stax2-api和woodstox-core-asl jar,并在项目的system.properties中设置了以下属性

Issue is resolved,thanks for your reply. Here is solution:I have added stax2-api and woodstox-core-asl jar into my project and set below property in my project system.properties

javax.xml.stream.XMLOutputFactory=com.ctc.wstx.stax.WstxOutputFactory
javax.xml.stream.XMLInputFactory=com.ctc.wstx.stax.WstxInputFactory

这篇关于XMLStreamException:名称空间URI尚未绑定到前缀,IBM jre的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆