我在部署axis2 webservices时遇到异常
org.apache.axis2.deployment.DeploymentException: The following error occurred during schema generation: com.unilib.service.BookOrderingServiceImpl
at org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.java:441)
at org.apache.axis2.deployment.repository.util.ArchiveReader.buildServiceGroup(ArchiveReader.java:109)
at org.apache.axis2.deployment.repository.util.ArchiveReader.processServiceGroup(ArchiveReader.java:232)
at org.apache.axis2.deployment.ServiceDeployer.deploy(ServiceDeployer.java:154)
at org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:149)
at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:585)
at org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:164)
at org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:377)
at org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:254)
at org.apache.axis2.deployment.RepositoryListener.startListener(RepositoryListener.java:371)
at org.apache.axis2.deployment.scheduler.SchedulerTask.checkRepository(SchedulerTask.java:73)
at org.apache.axis2.deployment.scheduler.SchedulerTask.run(SchedulerTask.java:94)
at org.apache.axis2.deployment.scheduler.Scheduler$SchedulerTimerTask.run(Scheduler.java:93)
at java.util.TimerThread.mainLoop(Timer.java:555)
at java.util.TimerThread.run(Timer.java:505)
Caused by: org.apache.axis2.deployment.DeploymentException: The following error occurred during schema generation: com.unilib.service.BookOrderingServiceImpl
at org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.java:404)
... 14 more
Caused by: org.apache.axis2.AxisFault: com.unilib.service.BookOrderingServiceImpl
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
at org.apache.axis2.util.Utils.getServiceClass(Utils.java:780)
at org.apache.axis2.deployment.util.Utils.fillAxisService(Utils.java:412)
at org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.java:396)
... 14 more
Caused by: java.lang.ClassNotFoundException: com.unilib.service.BookOrderingServiceImpl
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1333)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1167)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at org.apache.axis2.util.Loader.loadClass(Loader.java:261)
at org.apache.axis2.util.Loader.loadClass(Loader.java:229)
at org.apache.axis2.util.Utils.getServiceClass(Utils.java:777)
... 16 more
[ERROR] The BookOrderingServiceImpl service, which is not valid, caused The following error occurred during schema generation: com.unilib.service.BookOrderingServiceImpl
org.apache.axis2.deployment.DeploymentException: The following error occurred during schema generation: com.unilib.service.BookOrderingServiceImpl
at org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.java:441)
at org.apache.axis2.deployment.repository.util.ArchiveReader.buildServiceGroup(ArchiveReader.java:109)
at org.apache.axis2.deployment.repository.util.ArchiveReader.processServiceGroup(ArchiveReader.java:232)
at org.apache.axis2.deployment.ServiceDeployer.deploy(ServiceDeployer.java:154)
at org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:149)
at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:585)
at org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:164)
at org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:377)
at org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:254)
at org.apache.axis2.deployment.RepositoryListener.startListener(RepositoryListener.java:371)
at org.apache.axis2.deployment.scheduler.SchedulerTask.checkRepository(SchedulerTask.java:73)
at org.apache.axis2.deployment.scheduler.SchedulerTask.run(SchedulerTask.java:94)
at org.apache.axis2.deployment.scheduler.Scheduler$SchedulerTimerTask.run(Scheduler.java:93)
at java.util.TimerThread.mainLoop(Timer.java:555)
at java.util.TimerThread.run(Timer.java:505)
Caused by: org.apache.axis2.deployment.DeploymentException: The following error occurred during schema generation: com.unilib.service.BookOrderingServiceImpl
at org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.java:404)
... 14 more
Caused by: org.apache.axis2.AxisFault: com.unilib.service.BookOrderingServiceImpl
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
at org.apache.axis2.util.Utils.getServiceClass(Utils.java:780)
at org.apache.axis2.deployment.util.Utils.fillAxisService(Utils.java:412)
at org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.java:396)
... 14 more
Caused by: java.lang.ClassNotFoundException: com.unilib.service.BookOrderingServiceImpl
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1333)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1167)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at org.apache.axis2.util.Loader.loadClass(Loader.java:261)
at org.apache.axis2.util.Loader.loadClass(Loader.java:229)
at org.apache.axis2.util.Utils.getServiceClass(Utils.java:777)
... 16 more
[INFO] org.apache.axis2.deployment.DeploymentException: The following error occurred during schema generation: com.unilib.service.BookOrderingServiceImpl
但是如果你检查com.unilib.service.BookOrderingServiceImpl类就在那里。
成功部署了所有三项(BookInformationServiceImpl
,BookInventoryServiceImpl
和StudentServiceImpl
)服务。但无法部署BookOrderingServiceImpl
。我已经检查过axis2的所有库都在那里(在构建路径中)。我不知道为什么它没有被公开。
BookOrderingServiceImpl.java
package com.unilib.service;
public class BookOrderingServiceImpl implements BookOrderingService {
@Override
public String orderBook(Integer studentId, String studentPin, String bookIsbn) {
// TODO Auto-generated method stub
return null;
}
}