Error while deploying Axis2 web service on Tomcat

Hi,
I have a Axis2 web service developed on Eclipse. Deploying and access to Tomcat test server within Eclipse work fine. My test program is able to access the service via the generated stub.
I am using Tomcat 5.5.26 and Axis2-1.4 and eclipse "Europa" release.
The trouble is, when I generate a .aar file and attempt to deploy it on Tomcat external to Eclipse, the attached error occurs when Tomcat reads and attempts to deploy it.
I have been looking at suggestions on the web and just FYI, one approach I tried and worked just half is that remove the <messageReceivers> tags and just retain the <messageReceiver element in the services.xml file. This appears to work just halfway in the sense that Tomcat deploys it and everything looks good from the Axis2's Happy page and I access the WSDL from the
URL and such. What fails is my test program when it tries to instantiate the stub to access the service (error message is attached after the dotted line delimiter). This means that any client program attempting to access the web service would fail. And while building the .aar file, I am including the WSDL and the already generated services.xml files.

Any suggestions?
Regards
Suresh
INFO: Server startup in 11391 ms
org.apache.axis2.deployment.DeploymentException: A ClassNotFoundException error occurred in loading the message receiver com.di.ext.webservice.wshost.ServiceMessageReceiverInOut
	at org.apache.axis2.deployment.repository.util.ArchiveReader.processServiceGroup(ArchiveReader.java:151)
	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.RepositoryListener.startListener(RepositoryListener.java:324)
	at org.apache.axis2.deployment.scheduler.SchedulerTask.checkRepository(SchedulerTask.java:64)
	at org.apache.axis2.deployment.scheduler.SchedulerTask.run(SchedulerTask.java:71)
	at org.apache.axis2.deployment.scheduler.Scheduler$SchedulerTimerTask.run(Scheduler.java:83)
	at java.util.TimerThread.mainLoop(Unknown Source)
	at java.util.TimerThread.run(Unknown Source)
Caused by: org.apache.axis2.deployment.DeploymentException: A ClassNotFoundException error occurred in loading the message receiver com.di.ext.webservice.wshost.ServiceMessageReceiverInOut
	at org.apache.axis2.deployment.ServiceGroupBuilder.populateServiceGroup(ServiceGroupBuilder.java:106)
	at org.apache.axis2.deployment.repository.util.ArchiveReader.buildServiceGroup(ArchiveReader.java:110)
	at org.apache.axis2.deployment.repository.util.ArchiveReader.processServiceGroup(ArchiveReader.java:144)
	... 12 more
Caused by: org.apache.axis2.deployment.DeploymentException: A ClassNotFoundException error occurred in loading the message receiver com.di.ext.webservice.wshost.ServiceMessageReceiverInOut
	at org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.java:431)
	at org.apache.axis2.deployment.ServiceGroupBuilder.populateServiceGroup(ServiceGroupBuilder.java:101)
	... 14 more
Caused by: org.apache.axis2.deployment.DeploymentException: A ClassNotFoundException error occurred in loading the message receiver com.di.ext.webservice.wshost.ServiceMessageReceiverInOut
	at org.apache.axis2.deployment.DescriptionBuilder.loadMessageReceiver(DescriptionBuilder.java:195)
	at org.apache.axis2.deployment.DescriptionBuilder.processMessageReceivers(DescriptionBuilder.java:171)
	at org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.java:275)
	... 15 more
Caused by: java.lang.ClassNotFoundException: com.di.ext.webservice.wshost.ServiceMessageReceiverInOut
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1363)
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1209)
	at java.lang.ClassLoader.loadClassInternal(Unknown Source)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Unknown Source)
	at org.apache.axis2.util.Loader.loadClass(Loader.java:261)
	at org.apache.axis2.util.Loader.loadClass(Loader.java:229)
	at org.apache.axis2.deployment.DescriptionBuilder.loadMessageReceiver(DescriptionBuilder.java:191)
	... 17 more
[ERROR] The tempprojectservice.aar service, which is not valid, caused A ClassNotFoundException error occurred in loading the message receiver com.di.ext.webservice.wshost.ServiceMessageReceiverInOut
org.apache.axis2.deployment.DeploymentException: A ClassNotFoundException error occurred in loading the message receiver com.di.ext.webservice.wshost.ServiceMessageReceiverInOut
	at org.apache.axis2.deployment.repository.util.ArchiveReader.processServiceGroup(ArchiveReader.java:151)
	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.RepositoryListener.startListener(RepositoryListener.java:324)
	at org.apache.axis2.deployment.scheduler.SchedulerTask.checkRepository(SchedulerTask.java:64)
	at org.apache.axis2.deployment.scheduler.SchedulerTask.run(SchedulerTask.java:71)
	at org.apache.axis2.deployment.scheduler.Scheduler$SchedulerTimerTask.run(Scheduler.java:83)
	at java.util.TimerThread.mainLoop(Unknown Source)
	at java.util.TimerThread.run(Unknown Source)
Caused by: org.apache.axis2.deployment.DeploymentException: A ClassNotFoundException error occurred in loading the message receiver com.di.ext.webservice.wshost.ServiceMessageReceiverInOut
	at org.apache.axis2.deployment.ServiceGroupBuilder.populateServiceGroup(ServiceGroupBuilder.java:106)
	at org.apache.axis2.deployment.repository.util.ArchiveReader.buildServiceGroup(ArchiveReader.java:110)
	at org.apache.axis2.deployment.repository.util.ArchiveReader.processServiceGroup(ArchiveReader.java:144)
	... 12 more
Caused by: org.apache.axis2.deployment.DeploymentException: A ClassNotFoundException error occurred in loading the message receiver com.di.ext.webservice.wshost.ServiceMessageReceiverInOut
	at org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.java:431)
	at org.apache.axis2.deployment.ServiceGroupBuilder.populateServiceGroup(ServiceGroupBuilder.java:101)
	... 14 more
Caused by: org.apache.axis2.deployment.DeploymentException: A ClassNotFoundException error occurred in loading the message receiver com.di.ext.webservice.wshost.ServiceMessageReceiverInOut
	at org.apache.axis2.deployment.DescriptionBuilder.loadMessageReceiver(DescriptionBuilder.java:195)
	at org.apache.axis2.deployment.DescriptionBuilder.processMessageReceivers(DescriptionBuilder.java:171)
	at org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.java:275)
	... 15 more
Caused by: java.lang.ClassNotFoundException: com.di.ext.webservice.wshost.ServiceMessageReceiverInOut
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1363)
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1209)
	at java.lang.ClassLoader.loadClassInternal(Unknown Source)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Unknown Source)
	at org.apache.axis2.util.Loader.loadClass(Loader.java:261)
	at org.apache.axis2.util.Loader.loadClass(Loader.java:229)
	at org.apache.axis2.deployment.DescriptionBuilder.loadMessageReceiver(DescriptionBuilder.java:191)
	... 17 more
[INFO] org.apache.axis2.deployment.DeploymentException: A ClassNotFoundException error occurred in loading the message receiver com.di.ext.webservice.wshost.ServiceMessageReceiverInOut
------------------------------------------------------------------
 
org.apache.axis2.AxisFault: Message Receiver not found for AxisOperation: {http://abc.abc.com/abc1222}GetInfo
	at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:512)
	at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:370)
	at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:416)
	at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
	at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)

Open in new window

sureshramuAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Kevin CrossChief Technology OfficerCommented:
Hopefully this helps, but double check the JARs/Libraries added to your project to ensure that they have been placed in the Tomcat startup classpath.  They are probably referenced in Eclipse, but not copied automatically in the .AAR.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Siva Prasanna KumarPrincipal Solutions ArchitectCommented:
This particular class is not found in the class path please make sure it in the project

or aar.

com.di.ext.webservice.wshost.ServiceMessageReceiverInOut
0
sureshramuAuthor Commented:
This file is present in the aar file.
0
Exploring SharePoint 2016

Explore SharePoint 2016, the web-based, collaborative platform that integrates with Microsoft Office to provide intranets, secure document management, and collaboration so you can develop your online and offline capabilities.

sureshramuAuthor Commented:
hi mwvisa1,
I am not including the jar files in the aar file.
0
Siva Prasanna KumarPrincipal Solutions ArchitectCommented:
does this message reciever class contain reference any class which is not contained in the aar file?

"A ClassNotFoundException error occurred in loading the message receiver"

check that its unable to resolve some imports I feel, first make sure the service is up and running and then we can see how do deal with the client.you can use eclipse WTP web service explorer as client for simple testing.
0
sureshramuAuthor Commented:
The problem was two fold.The first part as that I needed to add some jar files. Secondly, when I was creating the aar file using the Archiver Wizard, I was setting the path to the class file from WebContent onwards in order to include the web.xml file. After I changed the path to load the class files from the classes folder level in the web-inf folder, the error was resolved.

Thanks very much.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java App Servers

From novice to tech pro — start learning today.