axis 连接过程中的异常解决方法

2008-07-03 14:07:25.0     推荐:0    收藏:0    评论:0     来源:qqread

Exception in thread "main" java.lang.NoClassDefFoundError:

javax/wsdl/OperationType

缺少:wsdl4j.jar

将其加入工程中即可


Unable to find required classes (javax.activation.DataHandler and

javax.mail.internet.MimeMultipart). Attachment support is disabled

缺少:mail.jar, Activation.jar

将其加入工程中即可

Exception: Communication link failure: java.io.IOException,underlying cause: Unexpected end

of input stream ** BEGIN NESTED EXCEPTION ** java.io.IOExceptionMESSAGE: Unexpected end of

input stream

原因:mysql的版本不同,即在axis服务器端连接的JDBC driver的版本与Client端的mysql包的版本不一

致。

解决方法:如在axis工程的lib中加入:mysql-connector-java-5.1.5-bin.jar,即可,不要再加入其它

版本的mysql。

No deserializer for {urn:BeanService} UndueStmtDTO

原因:在连接axis web service时没有对此类型进行序列化和返序列化。

解决方法:在方法中加入,

如:QName dtoqn = new QName("urn:BeanService","UndueStmtDTO");

Class dtocls = UndueStmtDTO.class;

call.registerTypeMapping(dtocls, dtoqn,

new org.apache.axis.encoding.ser.BeanSerializerFactory(dtocls,

dtoqn),

new org.apache.axis.encoding.ser.BeanDeserializerFactory(dtocls,

dtoqn));

即可。

java.io.FileNotFoundException:config.properties

在工程中对配置信息存放在文件config.properties中,但是却提示此错误。

java.io.FileNotFoundException:config.properties(系统找不到指定的文件)

原因:在调用config.properties的地方没有指定其确切位置,它是根据tomcat的位置而定的,可以通过

以下语句找到。

将config.properties文件存放到工程的src目录下。

如:

InputStream in = this.getClass().getClassLoader().getResourceAsStream("config.properties");

Properties conProp = new Properties();

conProp.load(in);

String applicationId = conProp.getProperty("applicationId").trim();

String action = conProp.getProperty("action").trim();

您可以针对本文进行:[评论]  [收藏]  [推荐]  
  • 共有0条评论  点击查看更多评论
  • 网友评论仅供网友表达个人看法,并不表明e800同意其观点或证实其描述
我想发表评论:
用户名密码
  • 匿名发表
    验证码: