resin 2.1 配置xfire 问题
错误 1 :
500 Servlet Exception
org.w3c.dom.DOMException: `null' prefix expects a namespace uriat com.caucho.xml.QDocument.createAttributeNS(QDocument.java:428)at com.caucho.xml.QAttributedNode.setAttributeNS(QAttributedNode.java:176)at org.apache.xbean.spring.context.v1.XBeanXmlBeanDefinitionParser.parseBeanFromExtensionElement(XBeanXmlBeanDefinitionParser.java:152)at org.apache.xbean.spring.context.v1.XBeanXmlBeanDefinitionParser.parseBeanFromExtensionElement(XBeanXmlBeanDefinitionParser.java:176)at org.apache.xbean.spring.context.v1.XBeanXmlBeanDefinitionParser.parseBeanDefinitions(XBeanXmlBeanDefinitionParser.java:807)at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.registerBeanDefinitions(DefaultXmlBeanDefinitionParser.java:191)at org.apache.xbean.spring.context.v1.XBeanXmlBeanDefinitionReader.registerBeanDefinitions(XBeanXmlBeanDefinitionReader.java:78)at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:223)at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:173)at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:148)at org.codehaus.xfire.spring.XFireConfigLoader.getXFireApplicationContext(XFireConfigLoader.java:103)at org.codehaus.xfire.spring.XFireConfigLoader.loadContext(XFireConfigLoader.java:41)at org.codehaus.xfire.transport.http.XFireConfigurableServlet.loadConfig(XFireConfigurableServlet.java:86)at org.codehaus.xfire.transport.http.XFireConfigurableServlet.createXFire(XFireConfigurableServlet.java:54)at org.codehaus.xfire.transport.http.XFireServlet.init(XFireServlet.java:45)at javax.servlet.GenericServlet.init(GenericServlet.java:82)at com.caucho.server.http.Application.createServlet(Application.java:3111)at com.caucho.server.http.Application.loadServlet(Application.java:3062)at com.caucho.server.http.QServletConfig.loadServlet(QServletConfig.java:435)at com.caucho.server.http.Application.getFilterChainServlet(Application.java:2806)at com.caucho.server.http.Application.buildFilterChain(Application.java:2762)at com.caucho.server.http.Invocation.service(Invocation.java:313)at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135)at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:246)at com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:163)at com.caucho.server.TcpConnection.run(TcpConnection.java:139)at java.lang.Thread.run(Thread.java:619)
解决方法:resin.conf文件中加入
<system-property javax.xml.transform.TransformerFactory="org.apache.xalan.processor.TransformerFactoryImpl"/>
<system-property javax.xml.parsers.DocumentBuilderFactory="org.apache.xerces.jaxp.DocumentBuilderFactoryImpl"/>
<system-property javax.xml.parsers.SAXParserFactory="org.apache.xerces.jaxp.SAXParserFactoryImpl"/>
<system-property org.xml.sax.driver="org.apache.xerces.parsers.SAXParser"/>
错误2
500 Servlet Exceptionjavax.xml.transform.TransformerFactoryConfigurationError: Provider org.apache.xalan.processor.TransformerFactoryImplnot foundat javax.xml.transform.TransformerFactory.newInstance(TransformerFactory.java:108)at org.codehaus.xfire.wsdl11.builder.SchemaSerializer.writeXml(SchemaSerializer.java:46)at org.codehaus.xfire.wsdl11.builder.SchemaSerializer.marshall(SchemaSerializer.java:35)at com.ibm.wsdl.xml.WSDLWriterImpl.printExtensibilityElements(Unknown Source)at com.ibm.wsdl.xml.WSDLWriterImpl.printTypes(Unknown Source)at com.ibm.wsdl.xml.WSDLWriterImpl.printDefinition(Unknown Source)at com.ibm.wsdl.xml.WSDLWriterImpl.writeWSDL(Unknown Source)at com.ibm.wsdl.xml.WSDLWriterImpl.writeWSDL(Unknown Source)at org.codehaus.xfire.wsdl11.builder.WSDLBuilder.write(WSDLBuilder.java:182)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:126)at javax.servlet.http.HttpServlet.service(HttpServlet.java:103)at com.caucho.server.http.FilterChainServlet.doFilter(FilterChainServlet.java:96)at com.caucho.server.http.Invocation.service(Invocation.java:315)at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135)at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:246)at com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:163)at com.caucho.server.TcpConnection.run(TcpConnection.java:139)at java.lang.Thread.run(Thread.java:619)
解决方法:xfire 1.2.6中没有xalan.jar包 自己下载 加入项目lib中