title: ClassNotFoundException - axis2
body: <p>I am having following exception while deploying axis2 webservices</p>
  
  <pre><code>org.apache.axis2.deployment.DeploymentException: The following error occurred during schema generation: com.unilib.service.BookOrderingServiceImpl
      at org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.java:441)
      at org.apache.axis2.deployment.repository.util.ArchiveReader.buildServiceGroup(ArchiveReader.java:109)
      at org.apache.axis2.deployment.repository.util.ArchiveReader.processServiceGroup(ArchiveReader.java:232)
      at org.apache.axis2.deployment.ServiceDeployer.deploy(ServiceDeployer.java:154)
      at org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:149)
      at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:585)
      at org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:164)
      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:555)
      at java.util.TimerThread.run(Timer.java:505)
  Caused by: org.apache.axis2.deployment.DeploymentException: The following error occurred during schema generation: com.unilib.service.BookOrderingServiceImpl
      at org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.java:404)
      ... 14 more
  Caused by: org.apache.axis2.AxisFault: com.unilib.service.BookOrderingServiceImpl
      at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
      at org.apache.axis2.util.Utils.getServiceClass(Utils.java:780)
      at org.apache.axis2.deployment.util.Utils.fillAxisService(Utils.java:412)
      at org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.java:396)
      ... 14 more
  Caused by: java.lang.ClassNotFoundException: com.unilib.service.BookOrderingServiceImpl
      at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1333)
      at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1167)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:264)
      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:777)
      ... 16 more
  [ERROR] The BookOrderingServiceImpl service, which is not valid, caused The following error occurred during schema generation: com.unilib.service.BookOrderingServiceImpl
  org.apache.axis2.deployment.DeploymentException: The following error occurred during schema generation: com.unilib.service.BookOrderingServiceImpl
      at org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.java:441)
      at org.apache.axis2.deployment.repository.util.ArchiveReader.buildServiceGroup(ArchiveReader.java:109)
      at org.apache.axis2.deployment.repository.util.ArchiveReader.processServiceGroup(ArchiveReader.java:232)
      at org.apache.axis2.deployment.ServiceDeployer.deploy(ServiceDeployer.java:154)
      at org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:149)
      at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:585)
      at org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:164)
      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:555)
      at java.util.TimerThread.run(Timer.java:505)
  Caused by: org.apache.axis2.deployment.DeploymentException: The following error occurred during schema generation: com.unilib.service.BookOrderingServiceImpl
      at org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.java:404)
      ... 14 more
  Caused by: org.apache.axis2.AxisFault: com.unilib.service.BookOrderingServiceImpl
      at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
      at org.apache.axis2.util.Utils.getServiceClass(Utils.java:780)
      at org.apache.axis2.deployment.util.Utils.fillAxisService(Utils.java:412)
      at org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.java:396)
      ... 14 more
  Caused by: java.lang.ClassNotFoundException: com.unilib.service.BookOrderingServiceImpl
      at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1333)
      at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1167)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:264)
      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:777)
      ... 16 more
  [INFO] org.apache.axis2.deployment.DeploymentException: The following error occurred during schema generation: com.unilib.service.BookOrderingServiceImpl
  </code></pre>
  
  <p>But if you check the com.unilib.service.BookOrderingServiceImpl class is there.</p>
  
  <p><a href="https://i.stack.imgur.com/wsNca.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wsNca.png" alt="enter image description here"></a></p>
  
  <p>All three (<code>BookInformationServiceImpl</code>, <code>BookInventoryServiceImpl</code> and <code>StudentServiceImpl</code>) services were deployed successfully. But unable to deploy <code>BookOrderingServiceImpl</code>. I have checked that all libs of axis2 are there (in build path). I have no idea why its not been publised.</p>
  
  <p><strong>BookOrderingServiceImpl.java</strong></p>
  
  <pre><code>package com.unilib.service;
  
  public class BookOrderingServiceImpl implements BookOrderingService {
  
      @Override
      public String orderBook(Integer studentId, String studentPin, String bookIsbn) {
          // TODO Auto-generated method stub
          return null;
      }
  }
  </code></pre>