Hi everybody

I'm using an instance of the SimpleHTTPServer class of Axis2 1.4 as server for 
my webservices. When I stop the SimpleHTTPServer instance from within my 
application and then restart it (still from wihin my application and without 
first quitting the Java VM) I randomly get a DeploymentException while Axis2 is 
initializing the webservice archives from the services directory in the 
repository. Axis2 is not able to load the service life cycle class for one of 
the services in the repository: 

org.apache.axis2.deployment.DeploymentException because of 
java.lang.ClassNotFoundException in 
org.apache.axis2.deployment.ServiceBuilder.loadServiceLifeCycleClass(ServiceBuilder.java:514)

The strange thing is that this never seems to happen when the SimpleHTTPServer 
instance is startet for the first time. It only happens randomly (not more than 
1 out of 5 times) when stopping and restarting the SimpleHTTPServer instance. 
The other strange thing is that only one  randomly selected service (1 out of 
3) using a life cycle class does not start because of the 
ClassNotFoundException. Also for a certain run of my application it is always 
the same service that cannot load. But the service that fails may change from 
run to run. Therefore the root of the problem seems to be some kind of race 
condition.

I noticed the exact same behaviour when replacing one of the service archives 
with a newer (or the same) version of the webservice in the archive using the 
hot deploy/update mechanism of Axis2. Deploying/updating exact the same service 
archive that failed before usually worked at the second try but would randomly 
fail later again.

Does anybody know of a solution or a workaround for this problem? 

Thanks a lot in advance for any help!

Marc Noma



      

Reply via email to