简体   繁体   中英

Why i cant deploy java webservice with some external jar file are included ..?

I m Deploying A java Web service With the axis2.

I had Created Demo of web service with no external jar included in my java web service and that Works So fine. but the same thing not working when im trying to create web service of java with the use of some external library..Why this happening?

While Deployment of that web service im getting this exception

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 

I think While creating .aar file i need to make some changes??if yes then what that changes should be??

in following image there is three library i had included as external library sphinx4.jar jsapi.jar wsj...jar

在此输入图像描述

I have Solved this question with the adding lib folder in projects and including jar in build path.

just copy all jar u want in lib folder and then right click on jar ->go to build path->add to build path

just that and u will be succeeded .

Thanks for the answer from Bhavik Kama. I encountered the same problem, and got ides from the blog, and my answer is jar files should be copied into folder webserviceproject\\webcontent\\web-inf\\lib.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM