简体   繁体   English

用户异常Tomcat OK-> Websphere NOK

[英]User Exception Tomcat OK -> Websphere NOK

I am very new to Java and I try to understand user exceptions in webservices. 我对Java还是很陌生,我尝试了解Web服务中的用户异常。

Now, I have copied the following example to Netbeans: http://mprabhat.com/2014/11/03/744/ 现在,我已将以下示例复制到Netbeans: http : //mprabhat.com/2014/11/03/744/

I am using jax-ws 2.2 and java 1.6 我正在使用jax-ws 2.2和Java 1.6

In this classes I have delete @Stateless and build it. 在此类中,我删除了@Stateless并将其构建。 Alright. 好的。 It works ... And the deploy to the local TomcatEE works too. 它可以工作...并且部署到本地TomcatEE也可以。 I get a user exception. 我收到用户异常。

BUT ... I use this war file and put in on Websphere 8.5.5 Server. 但是...我使用这个war文件并将其放在Websphere 8.5.5 Server中。 I get the excpetion "java.lang.NoSuchMethodError: javax/xml/ws/WebFault.messageName()Ljava/lang/String;" 我得到了“ java.lang.NoSuchMethodError:javax / xml / ws / WebFault.messageName()Ljava / lang / String;”的专有名词。 I have no idea, what the problem is. 我不知道是什么问题。

Can you help me ?? 你能帮助我吗 ??

Thank you 谢谢

Library mismatch. 库不匹配。 The version of the library that was used to compile had the method WebFault.messageName() (returning String), but the version that was used to run. 用于编译的库的版本具有方法WebFault.messageName() (返回String),但是具有用于运行的版本。

Therefore the code is trying to call the method that is no longer present -> NoSuchMethodError . 因此,代码尝试调用不再存在的方法-> NoSuchMethodError

Possible and likely reason for this is that WebSphere has its own version of the library. 造成这种情况的可能原因可能是WebSphere具有自己的库版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM