Link to home
Start Free TrialLog in
Avatar of sureshramu
sureshramu

asked on

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

ASKER CERTIFIED SOLUTION
Avatar of Kevin Cross
Kevin Cross
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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
Avatar of sureshramu
sureshramu

ASKER

This file is present in the aar file.
hi mwvisa1,
I am not including the jar files in the aar file.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.