我写了一个使用axis调用webservice服务的java代理,在windows系统下都可以成功运行,可是当要部署到正式的os400环境时就会报错。另外我把axis jar包放在正式环境os400上的/QIBM/ProdData/LOTUS/DOMINO703/JVM/LIB/EXT目录下,不知道对不对?
请大家帮帮忙,我都块崩溃了,这个问题困扰我一个多月了。
java代理如下:
- Java code
import lotus.domino.*;//引用axis需要的类import org.apache.axis.client.Call;import org.apache.axis.client.Service;public class JavaAgent extends AgentBase { public void NotesMain() { Session session = null; AgentContext agentContext = null; Service service = null; Call call = null; String result = null; try { session = getSession(); agentContext = session.getAgentContext(); //用axis方式初始化webservice对象 service = new Service(); call = (Call) service.createCall(); call.setTargetEndpointAddress("http://127.0.0.1/hyzqoa/indiwscenter.nsf/wsCheckUser22"); call.setOperationName("wsCheckUser22"); //访问webservice,并返回数据 result = (String) call.invoke(new Object[]{}); System.out.println(result); } catch(Exception e) { e.printStackTrace(); } } }
错误信息如下:
2011-07-06 17:28:43 Agent error: java.lang.VerifyError: org/apache/axis/encoding/ser/BeanDeserializer 0000 0000
2011-07-06 17:28:43 Agent error: at java.lang.Throwable.<init>(Throwable.java:195)
2011-07-06 17:28:43 Agent error: at java.lang.VerifyError.<init>(VerifyError.java:34)
2011-07-06 17:28:43 Agent error: at java.lang.Class.forName(Class.java:164)
2011-07-06 17:28:43 Agent error: at org.apache.axis.encoding.ser.BeanDeserializerFactory.class$(BeanDeserializerFactory.java:43)
2011-07-06 17:28:43 Agent error: at org.apache.axis.encoding.ser.BeanDeserializerFactory.<init>(BeanDeserializerFactory.java:43)
2011-07-06 17:28:43 Agent error: at org.apache.axis.encoding.DefaultTypeMappingImpl.initMappings(DefaultTypeMappingImpl.java:471)
2011-07-06 17:28:43 Agent error: at org.apache.axis.encoding.DefaultTypeMappingImpl.<init>(DefaultTypeMappingImpl.java:91)
2011-07-06 17:28:43 Agent error: at org.apache.axis.encoding.DefaultTypeMappingImpl.getSingletonDelegate(DefaultTypeMappingImpl.java:85)
2011-07-06 17:28:43 Agent error: at org.apache.axis.encoding.TypeMappingRegistryImpl.<init>(TypeMappingRegistryImpl.java:155)
2011-07-06 17:28:43 Agent error: at org.apache.axis.encoding.TypeMappingRegistryImpl.<init>(TypeMappingRegistryImpl.java:149)
2011-07-06 17:28:43 Agent error: at org.apache.axis.deployment.wsdd.WSDDDeployment.<init>(WSDDDeployment.java:449)
2011-07-06 17:28:43 Agent error: at org.apache.axis.deployment.wsdd.WSDDDocument.setDocument(WSDDDocument.java:139)
2011-07-06 17:28:43 Agent error: at org.apache.axis.deployment.wsdd.WSDDDocument.<init>(WSDDDocument.java:65)
2011-07-06 17:28:43 Agent error: at org.apache.axis.configuration.FileProvider.configureEngine(FileProvider.java:179)
2011-07-06 17:28:43 Agent error: at org.apache.axis.AxisEngine.init(AxisEngine.java:172)
2011-07-06 17:28:43 Agent error: at org.apache.axis.client.AxisClient.<init>(AxisClient.java:52)
2011-07-06 17:28:43 Agent error: at org.apache.axis.client.Service.getAxisClient(Service.java:104)
2011-07-06 17:28:43 Agent error: at org.apache.axis.client.Service.<init>(Service.java:113)
2011-07-06 17:28:43 Agent error: at JavaAgent.NotesMain(JavaAgent.java:94)
2011-07-06 17:28:43 Agent error: at lotus.domino.AgentBase.runNotes(Unknown Source)
2011-07-06 17:28:43 Agent error: at lotus.domino.NotesThread.run(Unknown Source)
------解决方案--------------------