我正在使用axis2 部署一个java Web 服务。
我已经创建了 Web 服务的演示,但我的 java Web 服务中没有包含外部 jar,而且效果很好。但是当我尝试使用一些外部库创建java的Web服务时,同样的事情不起作用..为什么会发生这种情况?
虽然部署该 Web 服务我得到了这个异常
This Web axisService has deployment faults
Error: org.apache.axis2.deployment.DeploymentException: The following error occurred during schema generation: edu.cmu.sphinx.demo.transcriber.TranscribeSimpleGrammar
at org.apache.axis2.deployment.repository.util.ArchiveReader.processServiceGroup(ArchiveReader.java:150)
at org.apache.axis2.deployment.ServiceDeployer.deploy(ServiceDeployer.java:82)
at org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:136)
at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:813)
at org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:144)
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:512)
at java.util.TimerThread.run(Timer.java:462)
Caused by: org.apache.axis2.deployment.DeploymentException: The following error occurred during schema generation: edu.cmu.sphinx.demo.transcriber.TranscribeSimpleGrammar
at org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.java:432)
at org.apache.axis2.deployment.repository.util.ArchiveReader.buildServiceGroup(ArchiveReader.java:101)
at org.apache.axis2.deployment.repository.util.ArchiveReader.processServiceGroup(ArchiveReader.java:143)
... 12 more
Caused by: org.apache.axis2.deployment.DeploymentException: The following error occurred during schema generation: edu.cmu.sphinx.demo.transcriber.TranscribeSimpleGrammar
at org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.java:396)
... 14 more
Caused by: org.apache.axis2.AxisFault: edu.cmu.sphinx.demo.transcriber.TranscribeSimpleGrammar
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
at org.apache.axis2.util.Utils.getServiceClass(Utils.java:804)
at org.apache.axis2.deployment.util.Utils.fillAxisService(Utils.java:430)
at org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.java:388)
... 14 more
Caused by: java.lang.ClassNotFoundException: edu.cmu.sphinx.demo.transcriber.TranscribeSimpleGrammar
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
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:801)
... 16 more
我认为在创建 .aar 文件时我需要进行一些更改?如果是,那么更改应该是什么?
在下图中,我包含三个库作为外部库 sphinx4.jar jsapi.jar wsj...jar