2016-06-22 28 views
3

當試圖從WebSphere服務器訪問XSD模式文件時,我收到以下異常。websphere應用服務器 - java.lang.IllegalArgumentException:不支持屬性重用 - instanceis

WebSphere版本是8.5.5.0。

[6/22/16 13:02:31:158 IST]  FFDC Exception:javax.servlet.ServletException SourceId:com.ibm.ws.websvcs.transport.http.WASAxis2Servlet.doGet ProbeId:231 Reporter:[email protected] 
javax.servlet.ServletException: java.lang.IllegalArgumentException: Property reuse-instance is not supported 
    at com.ibm.ws.websvcs.transport.http.WASAxis2Servlet.processXsdRequest(WASAxis2Servlet.java:1278) 
    at com.ibm.ws.websvcs.transport.http.WASAxis2Servlet.doGet(WASAxis2Servlet.java:522) 
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:575) 
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:668) 
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1227) 
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:776) 
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:458) 
    at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178) 
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:136) 
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:97) 
    ... 
    at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:195) 
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:91) 
    ... 
    at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:195) 
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:91) 
    at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:928) 
    at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1025) 
    at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3761) 
    at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:304) 
    at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:976) 
    at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1662) 
    at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:200) 
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:459) 
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:526) 
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:312) 
    at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:88) 
    at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175) 
    at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217) 
    at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161) 
    at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138) 
    at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204) 
    at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775) 
    at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905) 
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1862) 
Caused by: java.lang.IllegalArgumentException: Property reuse-instanceis not supported 
    at com.sun.xml.stream.ZephyrWriterFactory.setProperty(ZephyrWriterFactory.java:113) 
    at org.apache.axiom.util.stax.dialect.SJSXPDialect.makeThreadSafe(SJSXPDialect.java:75) 
    at org.apache.axiom.om.util.StAXUtils$8.run(StAXUtils.java:647) 
    at java.security.AccessController.doPrivileged(AccessController.java:229) 
    at org.apache.axiom.om.util.StAXUtils.newXMLOutputFactory(StAXUtils.java:623) 
    at org.apache.axiom.om.util.StAXUtils.getXMLOutputFactory_perClassLoader(StAXUtils.java:687) 
    at org.apache.axiom.om.util.StAXUtils.getXMLOutputFactory(StAXUtils.java:326) 
    at org.apache.axiom.om.util.StAXUtils.getXMLOutputFactory(StAXUtils.java:291) 
    at org.apache.axiom.om.util.StAXUtils.createXMLStreamWriter(StAXUtils.java:358) 
    at org.apache.axiom.om.util.StAXUtils.createXMLStreamWriter(StAXUtils.java:353) 
    at org.apache.axiom.om.impl.llom.OMSerializableImpl.serialize(OMSerializableImpl.java:139) 
    at com.ibm.ws.websvcs.transport.http.WASAxis2Servlet.processXsdRequest(WASAxis2Servlet.java:1257) 
    ... 34 more 

Reporter BEGIN:[email protected] 
javax.servlet.GenericServlet::config:null 
javax.servlet.http.HttpServlet::METHOD_DELETE:DELETE 
javax.servlet.http.HttpServlet::METHOD_HEAD:HEAD 
javax.servlet.http.HttpServlet::METHOD_GET:GET 
javax.servlet.http.HttpServlet::METHOD_OPTIONS:OPTIONS 
javax.servlet.http.HttpServlet::METHOD_POST:POST 
javax.servlet.http.HttpServlet::METHOD_PUT:PUT 
javax.servlet.http.HttpServlet::METHOD_TRACE:TRACE 
javax.servlet.http.HttpServlet::HEADER_IFMODSINCE:If-Modified-Since 
javax.servlet.http.HttpServlet::HEADER_LASTMOD:Last-Modified 
javax.servlet.http.HttpServlet::LSTRING_FILE:javax.servlet.http.LocalStrings 
javax.servlet.http.HttpServlet::lStrings BEGIN:[email protected] 
[email protected] 
END:[email protected] 

org.apache.axis2.transport.http.AxisServlet::serialVersionUID:3105135058353738906 
org.apache.axis2.transport.http.AxisServlet::log BEGIN:[email protected] 
org.apache.axis2.util.OnDemandLogger::c:class org.apache.axis2.transport.http.AxisServlet 
org.apache.axis2.util.OnDemandLogger::_log:null 
END:[email protected] 

org.apache.axis2.transport.http.AxisServlet::CONFIGURATION_CONTEXT:CONFIGURATION_CONTEXT 
org.apache.axis2.transport.http.AxisServlet::SESSION_ID:SessionId 
org.apache.axis2.transport.http.AxisServlet::metadataQueryParamNames BEGIN:[email protected] 
{ 
policy 
wsdl 
xsd 
wsdl2 
} 
END:[email protected] 

任何人都可以提供一些關於這個問題的啓示? 非常感謝!

回答

1

對於具有相同堆棧跟蹤日誌的「Property reuse-instance」相關錯誤,它們是關於apache公理的。 Websphere Application Server完整配置文件使用org.apache。*開放源代碼庫並將其暴露給服務器上運行的應用程序。 當應用程序在應用程序中部署的差異版本中使用相同的庫時,可能會遇到問題。 要解決此問題,可以將父類第一個類加載器上次更改爲父類。 Reference

1

堆棧跟蹤表明WebSphere中的JAX-WS運行時試圖使用SJSXP而不是WebSphere自己的StAX實現(XLXP 2)。事情可能在新的WebSphere版本已經改變,但it used to be the case,如果以下兩個條件都滿足纔會出現這種情況:

  • 該應用程序的類加載策略設置爲父母最後。
  • 該應用程序包含SJSXP。

因此,一種選擇是更改您的應用程序,以便至少有一個條件不再滿足。如果這是不可能的,因爲應用程序中的代碼依賴於它們,那麼最好的辦法就是嘗試切換到另一個SJSXP版本。