ITeye博客

部署Axis2 在weblogic上出错

悠悠我心2010 · 2011-07-08 12:55 · webservice · 编程语言 · Markdown

部署Axis2 能成功部署在tomcat上,但是在weblogic上出错 "AxisServlet" failed to preload on startup in Web application: "axis2.war". java.lang.ExceptionInInitializerError at org.apache.axis2.transport.http.AxisServlet.initConfigContext 网上找了很多办法都没解决问题,最后用下面的方法解决了:

加入weblogic.xml 在Axis2.xml 的WEB-INF文件夹,这文件从AXIS2_1.3的源文件里拷过来的,因为我发现1.3以前的都可以成功部署

然后还有一个Log的错误是这样解决的: environment --> server--> select your server --> logging --> advance --> change logger from jdk to log4j

http://ws.apache.org/axis/java/install.html#depend

WebLogic 8.1 WebLogic 8.1 ships with webservices.jar that conflicts with Axis' saaj.jar and prevents Axis 1.2 from working right out of the box. This conflict exists because WebLogic uses an older definition of javax.xml.soap.* package from Java Web Services Developer Pack Version 1.0, whereas Axis uses a newer revision from J2EE 1.4.

However, there are two alternative configuration changes that enable Axis based web services to run on Weblogic 8.1.

•In a webapp containing Axis, set element in WEB-INF/weblogic.xml to true. An example of weblogic.xml is shown below: true If set to true, the element will force WebLogic's classloader to load classes located in the WEB-INF directory of a web application in preference to application or system classes. This is a recommended approach since it only impacts a single web module.

•In a script used to start WebLogic server, modify CLASSPATH property by placing Axis's saaj.jar library in front of WebLogic's webservices.jar. NOTE: This approach impacts all applications deployed on a particular WebLogic instance and may prevent them from using WebLogic's webservices.

For more information on how WebLogic's class loader works, see WebLogic Server Application Classloading.

Step 3: starting the web server This varies on a product-by-product basis. In many cases it is as simple as double clicking on a startup icon or running a command from the command line.

Step 4: Validate the Installation After installing the web application and dependencies, you should make sure that the server is running the web application.

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。