一个Web应用程序,在WTP里无法完成web services向导,手工配置axis后访问http://localhost:8080/myapp/servlet/AxisServlet时提示如下错误:
org.apache.axis.InternalException: org.apache.axis.ConfigurationException: org.apache.axis.deployment.wsdd.WSDDException: Must include type attribute for Handler deployment! org.apache.axis.deployment.wsdd.WSDDException: Must include type attribute for Handler deployment! at org.apache.axis.deployment.wsdd.WSDDHandler.<init>(WSDDHandler.java:50) at org.apache.axis.deployment.wsdd.WSDDDeployment.<init>(WSDDDeployment.java:176) at org.apache.axis.deployment.wsdd.WSDDDocument.setDocument(WSDDDocument.java:139) at org.apache.axis.deployment.wsdd.WSDDDocument.<init>(WSDDDocument.java:65) at org.apache.axis.configuration.FileProvider.configureEngine(FileProvider.java:179) at org.apache.axis.AxisEngine.init(AxisEngine.java:172) at org.apache.axis.AxisEngine.<init>(AxisEngine.java:156) at org.apache.axis.server.AxisServer.<init>(AxisServer.java:88) at org.apache.axis.server.DefaultAxisServerFactory.createServer(DefaultAxisServerFactory.java:109) at org.apache.axis.server.DefaultAxisServerFactory.getServer(DefaultAxisServerFactory.java:73) at org.apache.axis.server.AxisServer.getServer(AxisServer.java:73) at org.apache.axis.transport.http.AxisServletBase.getEngine(AxisServletBase.java:185) at org.apache.axis.transport.http.AxisServletBase.getOption(AxisServletBase.java:396) at org.apache.axis.transport.http.AxisServletBase.init(AxisServletBase.java:112) at org.apache.axis.transport.http.AxisServlet.init(AxisServlet.java:156) at javax.servlet.GenericServlet.init(GenericServlet.java:211)
经排除法发现只要删除WEB-INF/lib下的gnujaxp.jar即恢复正常。这个jar文件是因为应用程序使用到jfreechart带来的,按照jfree.org论坛里的说法,只有使用jre1.3.1版本jfreechart才真正需要此文件,所以删掉它问题解决,WTP里web services向导恢复正常。
BTW, 除了axis,这个gnujaxp.jar好像还和spring、ibatis等环境有冲突,见这个google查询结果。
本文转自博客园八进制的博客,原文链接:gnujaxp.jar与axis冲突问题,如需转载请自行联系原博主。