Websphere中间件中部署cxf服务

这个礼拜都在研究websphere下部署cxf开发的项目
was呢
版本是7.0 因为官方给的 was6 was7的处理方式是不一样的。
请看看下边 was6处理比较繁琐点 这里就不说啦。
 
For WebSphere 6.1.0.29+, V7 and V8

Follow the PDF download given within this IBM developerWorks article:http://www.ibm.com/developerworks/websphere/library/techarticles/1001_thaker/1001_thaker.html

As described in the PDF, you'll need to change the Classloader order to "Classes loaded with local class loader first (parent last)" and to disable the IBM web services engine, either for the JVM as a whole or for the particular module.

To disable for the whole JVM, set the JVM property

com.ibm.websphere.webservices.DisableIBMJAXWSEngine=true

or to disable the engine just for a specific module by adding

DisableIBMJAXWSEngine: true

to WAR/META-INF/MANIFEST.MF.

Another issue that comes up with certain versions of WebSphere is an incompatibility with the SAAJ implementation. It is recommended to use the org.apache.servicemix.bundles.saaj-impl-1.3.18_1.jar saaj impl available from http://repo1.maven.org/maven2/org/apache/servicemix/bundles/org.apache.servicemix.bundles.saaj-impl/1.3.18_1/ as that contains a recent version of SAAJ along with it's required DOM implementation which will work on the IBM JDK.


这段话的意思是当你创建ear项目的时候 需要在META-INF/MANIFEST.MF添加DisableIBMJAXWSEngine: true一句话
如下:
 

Manifest-Version: 1.0DisableIBMJAXWSEngine: trueClass-Path:

官方还说你需要把org.apache.servicemix.bundles.saaj-impl-1.3.18_1.jar 这个jar放入was自带的JDK中这样你先部署上去 看报错不报错如果不报错那就恭喜你 地址栏直接访问一下试试。好了就好了 不好了 那你就继续往下看有可能会报错看下 was日志 如果你的错误信息是这个
 
 Invocation of init method failed; nested exception is java.lang.NoSuchMethodError:

org/apache/ws/commons/schema/XmlSchemaCollection.read

(Lorg/w3c/dom/Document;Ljava/lang/String;)

Lorg/apache/ws/commons/schema/XmlSchema;

那么你需要做一件事情 ,
首先将你项目中的 这个包xmlschema-core-2.2.1.jar(版本可能有差异找到 这个包就行)
 
apache/ws/commons/schema/XmlSchema  
放入was的JDK/lib下,
第二:启动was登录进去 ,点击服务器》服务器类型》WebSphere Application Server》看到当前的服务server1 点开
修改类装入方式 为 “本地类装入父类最后” 完了应用保存。
第三:点击环境》共享库》新建共享库 (将你刚才放入was的jar包引用进来 )
第四:然后在 应用程序服务器 > server1 > 类装入器 >  右侧有个【服务器基础结构】点开【Java 和进程管理   】》类装入器 新建一个 》点开新建的 这个( Classloader_1489898969250) > 右侧有个 共享库引用 

将刚才添加的类库引用进来 完成后保存。
第五:重启服务器 。到此应该成功不报错误了。

如果你还遇到问题  就是有关这个包的错误 cxf-rt-ws-policy-3.0.9.jar  这个包删掉 重新部署 应该就好了
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值