Axis2服务部署异常:The following error occurred du ring schema generation: null 解决方案

 

前不久将一个用Axis2-1.4.1实现的webservice服务部署在tomcat6.0.18上时遇到以下异常:

 

 

org.apache.axis2.deployment.DeploymentException: The following error occurred during schema generation: null

at org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.java:431)

at org.apache.axis2.deployment.repository.util.ArchiveReader.buildServiceGroup(ArchiveReader.java:102)

at org.apache.axis2.deployment.repository.util.ArchiveReader.processServiceGroup(ArchiveReader.java:179)

at org.apache.axis2.deployment.ServiceDeployer.deploy(ServiceDeployer.java:81)

at org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:136)

at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:597)

at org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:144)

at org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:330)

at org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:227)

at org.apache.axis2.deployment.DeploymentEngine.loadServices(DeploymentEngine.java:131)

at org.apache.axis2.deployment.WarBasedAxisConfigurator.loadServices(WarBasedAxisConfigurator.java:284)

at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:82)

at org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:516)

at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:436)

at org.apache.axis2.transport.http.AxisAdminServlet.init(AxisAdminServlet.java:55)

at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1172)

at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:992)

at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4058)

at org.apache.catalina.core.StandardContext.start(StandardContext.java:4371)

at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)

at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)

at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)

at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)

at org.apache.catalina.core.StandardService.start(StandardService.java:516)

at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)

at org.apache.catalina.startup.Catalina.start(Catalina.java:578)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)

at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

Caused by: org.apache.axis2.deployment.DeploymentException: The following error occurred during schema generation: null

at org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.java:394)

... 31 more

Caused by: java.lang.NullPointerException

 

后来经过逐步排查发现引发该异常的原因是在要通过soap协议传输的POJO对象(主要是getter/setter方法)中包含了不能序列化的对象。

 

 

当然导致这种异常还可能有许多其他的原因,这只是其中的一个。

你可能感兴趣的:(webservice)