`
悠悠我心2010
  • 浏览: 16713 次
  • 性别: Icon_minigender_2
  • 来自: 上海
社区版块
存档分类
最新评论

部署Axis2 在weblogic上出错

阅读更多
部署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以前的都可以成功部署

<!--
  ~ Licensed to the Apache Software Foundation (ASF) under one
  ~ or more contributor license agreements. See the NOTICE file
  ~ distributed with this work for additional information
  ~ regarding copyright ownership. The ASF licenses this file
  ~ to you under the Apache License, Version 2.0 (the
  ~ "License"); you may not use this file except in compliance
  ~ with the License. You may obtain a copy of the License at
  ~
  ~ http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing,
  ~ software distributed under the License is distributed on an
  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  ~ KIND, either express or implied. See the License for the
  ~ specific language governing permissions and limitations
  ~ under the License.
  -->
<!DOCTYPE weblogic-web-app PUBLIC "-//BEA
Systems, Inc.//DTD Web Application 7.0//EN"
"http://www.bea.com/servers/wls700/dtd/weblogic700-web-jar.dtd">
<weblogic-web-app>
<container-descriptor>
<prefer-web-inf-classes>true</prefer-web-inf-classes>
</container-descriptor>
</weblogic-web-app>

然后还有一个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 <prefer-web-inf-classes> element in WEB-INF/weblogic.xml to true. An example of weblogic.xml is shown below:
<weblogic-web-app>
  <container-descriptor>
    <prefer-web-inf-classes>true</prefer-web-inf-classes>
  </container-descriptor>
</weblogic-web-app>If set to true, the <prefer-web-inf-classes> 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.
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics