注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

love3400wind的blog

like

 
 
 

日志

 
 
 
 

javax.xml.stream.FactoryConfigurationError: Provider null could not be instantiated: java.lang.NullPointerException  

2011-12-13 12:33:53|  分类: IT |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

环境:aix + weblogic8.1.6 + oracle  

在xp,win2003的weblogic8上运行正常,但在小机上不行,报如下错误:

Dec 12, 2011 12:23:52 PM GMT+08:00> <Warning> <Security> <BEA-090481> <NO_CERTIFICATE alert was received from 10.119.84.205 - 10.119.84.205. Verify the SSL configuration has a proper SSL certificate chain and private key specified.>
[Fatal Error] :1:851: An invalid XML character (Unicode: 0x0) was found in the element content of the document.
<Dec 12, 2011 12:24:04 PM GMT+08:00> <Error> <HTTP> <BEA-101017> <[ServletContext(id=1777286744,name=ServiceCrime,context-path=/ServiceCrime)] Root cause of ServletException.
java.lang.NoClassDefFoundError: org/codehaus/xfire/util/STAXUtils
        at org.codehaus.xfire.util.jdom.StaxBuilder.<init>(StaxBuilder.java:150)
        at org.codehaus.xfire.wsdl.AbstractWSDL.<clinit>(AbstractWSDL.java:43)
        at org.codehaus.xfire.wsdl11.builder.DefaultWSDLBuilderFactory.createWSDLBuilder(DefaultWSDLBuilderFactory.java:25)
        at org.codehaus.xfire.wsdl11.builder.WSDLBuilderAdapter.write(WSDLBuilderAdapter.java:40)
        at org.codehaus.xfire.DefaultXFire.generateWSDL(DefaultXFire.java:104)
        at org.codehaus.xfire.transport.http.XFireServletController.generateWSDL(XFireServletController.java:380)
        at org.codehaus.xfire.transport.http.XFireServletController.doService(XFireServletController.java:125)
        at org.codehaus.xfire.transport.http.XFireServlet.doGet(XFireServlet.java:107)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
        at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
        at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java(Inlined Compiled Code))
        at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java(Compiled Code))
        at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java(Inlined Compiled Code))
        at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java(Compiled Code))
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java(Compiled Code))
        at weblogic.security.service.SecurityManager.runAs(SecurityManager.java(Inlined Compiled Code))
        at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java(Compiled Code))
        at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java(Compiled Code))
        at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java(Compiled Code))
        at weblogic.kernel.ExecuteThread.run(ExecuteThread.java(Compiled Code))
>


<Dec 12, 2011 12:47:00 PM GMT+08:00> <Error> <HTTP> <BEA-101017> <[ServletContext(id=179911494,name=ServiceCrime,context-path=/ServiceCrime)] Root cause of ServletException.
javax.xml.stream.FactoryConfigurationError: Provider null could not be instantiated: java.lang.NullPointerException
        at javax.xml.stream.FactoryFinder.newInstance(FactoryFinder.java:75)
        at javax.xml.stream.FactoryFinder.find(FactoryFinder.java:136)
        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.util.jdom.StaxBuilder.<init>(StaxBuilder.java:150)
        at org.codehaus.xfire.wsdl.AbstractWSDL.<clinit>(AbstractWSDL.java:43)
        at org.codehaus.xfire.wsdl11.builder.DefaultWSDLBuilderFactory.createWSDLBuilder(DefaultWSDLBuilderFactory.java:25)
        at org.codehaus.xfire.wsdl11.builder.WSDLBuilderAdapter.write(WSDLBuilderAdapter.java:40)
        at org.codehaus.xfire.DefaultXFire.generateWSDL(DefaultXFire.java:104)
        at org.codehaus.xfire.transport.http.XFireServletController.generateWSDL(XFireServletController.java:380)
        at org.codehaus.xfire.transport.http.XFireServletController.doService(XFireServletController.java:125)
        at org.codehaus.xfire.transport.http.XFireServlet.doGet(XFireServlet.java:107)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
        at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
        at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java(Inlined Compiled Code))
        at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java(Compiled Code))
        at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java(Inlined Compiled Code))
        at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java(Compiled Code))
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java(Compiled Code))
        at weblogic.security.service.SecurityManager.runAs(SecurityManager.java(Inlined Compiled Code))
        at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java(Compiled Code))
        at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java(Compiled Code))
        at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java(Compiled Code))
        at weblogic.kernel.ExecuteThread.run(ExecuteThread.java(Compiled Code))
>

 

在IBM官网上查找,给了四种解释:

 

Selecting an XML processor

XML processor selection is performed using service providers. When using a factory finder, Java looks in the following places, in this order, to see which service provider to use:

  1. The system property with the same name as the service provider.
  2. The service provider specified in a properties file.
    • For XMLEventFactory, XMLInputFactory, and XMLOutputFactory only. The value of the service provider in the file /etc/java6_64/jre/lib/stax.properties.
    • For other factories. The value of the service provider in the file /etc/java6_64/jre/lib/jaxp.properties.
  3. The contents of the META-INF/services/<service.provider> file.
  4. The default service provider.

The following service providers control the XML processing libraries used by Java:

javax.xml.parsers.SAXParserFactory
Selects the SAX parser. By default, org.apache.xerces.jaxp.SAXParserFactoryImpl from the XML4J library is used.
javax.xml.parsers.DocumentBuilderFactory
Selects the document builder. By default, org.apache.xerces.jaxp.DocumentBuilderFactoryImpl from the XML4J library is used.
javax.xml.datatype.DatatypeFactory
Selects the datatype factory. By default, org.apache.xerces.jaxp.datatype.DatatypeFactoryImpl from the XML4J library is used.
javax.xml.stream.XMLEventFactory
Selects the StAX event factory. By default, com.ibm.xml.xlxp.api.stax.XMLEventFactoryImpl from the XL XP-J library is used.
javax.xml.stream.XMLInputFactory
Selects the StAX parser. By default, com.ibm.xml.xlxp.api.stax.XMLInputFactoryImpl from the XL XP-J library is used.
javax.xml.stream.XMLOutputFactory
Selects the StAX serializer. By default, com.ibm.xml.xlxp.api.stax.XMLOutputFactoryImpl from the XL XP-J library is used.
javax.xml.transform.TransformerFactory
Selects the XSLT processor. Possible values are:
com.ibm.xtq.xslt.jaxp.compiler.TransformerFactoryImpl
Use the XL TXE-J compiler. This value is the default.
org.apache.xalan.processor.TransformerFactoryImpl
Use the XSLT4J interpreter.
javax.xml.validation.SchemaFactory:http://www.w3.org/2001/XMLSchema
Selects the schema factory for the W3C XML Schema language. By default, org.apache.xerces.jaxp.validation.XMLSchemaFactory from the XML4J library is used.
javax.xml.xpath.XPathFactory
Selects the XPath processor. By default, org.apache.xpath.jaxp.XPathFactoryImpl from the XSLT4J library is used.

 

 

link: http://www.ibm.com/developerworks/java/jdk/aix/j664/sdkguide.aix64.html

后来感觉都不好使,最后决定修改启动文件startWebLogic.sh设置参数JAVA_OPTIONS:
JAVA_OPTIONS="${JAVA_OPTIONS}   -Djavax.xml.stream.XMLInputFactory=com.ctc.wstx.stax.WstxInputFactory  -Djavax.xml.stream.XMLOutputFactory=com.ctc.wstx.stax.WstxOutputFactory   -Djavax.xml.stream.XMLEventFactory=com.ctc.wstx.stax.WstxEventFactory  "
重启weblgoic,一切正常。

  评论这张
 
阅读(4180)| 评论(1)
推荐 转载

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017