论坛首页 Java企业应用论坛

tomcat下部署成功,可是运行客户端失败 选项

浏览 2321 次
该帖已经被评为隐藏帖
作者 正文
   发表时间:2008-04-10  
SOA

我按照网上的说明开始做,在eclipse->open run dialog里面运行成功了,可是我在部署到tomcat上时遇到了很多麻烦
1 jar包的导入 网上说只要把apache-cxf-2.1-incubator-SNAPSHOT\lib下的jar包复制到tomcat/
shared/lib底下就行了,另外我还把catalina.properties里面的shared.loader赋值为$
{catalina.home}/shared,${catalina.home}/shared/*.jar。可是tomcat还是不能加载那些
jar包,最后我只好把这些jar包弄到tomcat/lib下了,虽然能运行了,但我知道这样不好,希望明白人指导一下

2 war在tomcat上的部署 我把wsdl文件build package之后生成war文件,发现该war文件里面没有classes这个文件
夹(我的工程的default output folder是WebContent/WEB-INF/classes),所以我即使部署到tomcat
下也缺少classes文件夹,而导致加载我自己编写的java文件失败而不能运行。于是我就把我工程下的classes文件夹直接拷到tomcat下
的指定工程下,虽然tomcat能启动了,但是我感觉这是凑的,没找到病根。而且一重新启动服务器,就又没了 苦啊

3 tomcat用上面的办法勉强部署成功了,可是一运行client就报错如下
信息: Creating Service {http://
bishe.wzw.bupt/}ScientificCalculatorService from class
bupt.wzw.bishe.ScientificCalculator
1.2 + 3.6 =2008-4-10 17:49:46
org.apache.cxf.phase.PhaseInterceptorChain doIntercept
信息: Interceptor has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Could not send Message.
        at org.apache.cxf.interceptor.MessageSenderInterceptor
$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java­:
64)
        at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChai­n.java:
220)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:276)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:222)
        at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:
73)
        at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:
177)
        at $Proxy32.add(Unknown Source)
        at
bupt.wzw.bishe.ScientificCalculatorClient.main(ScientificCalculatorClient.j­ava:
31)
...
我编的这个小程序就是实现一个计算器的功能,差不多就是1.2+3.6=4.8的那个意思
在之前我搜了一下,有过类似的错误说是修改client-bean.xml,可是我的项目没加spring等一些东西,没有这些配置文件。
有个cxf-servlet.xml,还有个点错
<jaxws:endpoint
    id="JiSuanQiII_xml_bare"
    implementor="bupt.wzw.bishe.ScientificCalculatorImpl"
    wsdlLocation="WEB-INF/wsdl/JiSuanQiII.wsdl"
    address="/JiSuanQiII" >
       <jaxws:features>
            <bean class="org.apache.cxf.feature.LoggingFeature"/>
       </jaxws:features>
</jaxws:endpoint>
旁边报错为 the matching wildcard is strict, but no declaration can be found
for the element 'jaxws:endpoint'  但是前几次不在tomcat下运行没报错,部署tomcat时也没出错,我就没
管他

 

望各位明白人告之...
不胜感激

论坛首页 Java企业应用版

跳转论坛:
Global site tag (gtag.js) - Google Analytics