title: Deployment exception while creating a webservice on Java, using Axis2
body: <p>i wrote a program in java that consumes a webservice, now i'm trying to put it into another webservice using eclipse, Axis 2 and Tomcat7.</p>
  
  <p>The original program runs perfectly, so i think it should work in a webservice, although i'm not sure (i'm new to webservices). I'm getting this deployment exception:</p>
  
  <pre><code>   INFO: Ha comenzado la recarga de Contexto [/webService4]
  [INFO] Clustering has been disabled
  [INFO] Deploying module: addressing-1.6.2 - file:/Users/argelramirezreyes/Dropbox/java/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/webService4/WEB-INF/modules/addressing-1.6.2.mar
  [INFO] Deploying module: metadataExchange-1.6.2 - file:/Users/argelramirezreyes/Dropbox/java/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/webService4/WEB-INF/modules/mex-1.6.2.mar
  [INFO] Deploying module: mtompolicy-1.6.2 - file:/Users/argelramirezreyes/Dropbox/java/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/webService4/WEB-INF/modules/mtompolicy-1.6.2.mar
  [INFO] Deploying module: ping-1.6.2 - file:/Users/argelramirezreyes/Dropbox/java/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/webService4/WEB-INF/modules/ping-1.6.2.mar
  [INFO] Deploying module: script-1.6.2 - file:/Users/argelramirezreyes/Dropbox/java/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/webService4/WEB-INF/modules/scripting-1.6.2.mar
  [INFO] Deploying module: soapmonitor-1.6.2 - file:/Users/argelramirezreyes/Dropbox/java/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/webService4/WEB-INF/modules/soapmonitor-1.6.2.mar
  [INFO] Deploying JAXWS annotated class SolicitarFactura as a service - SolicitarFacturaService
  [INFO] The SolicitarFactura service, which is not valid, caused java.lang.NoClassDefFoundError: javax/ws/rs/Produces
  at org.apache.axis2.jaxrs.JAXRSUtils.getClassModel(JAXRSUtils.java:53)
  at org.apache.axis2.description.java2wsdl.DefaultSchemaGenerator.generateSchema(DefaultSchemaGenerator.java:272)
  at org.apache.axis2.deployment.util.Utils.fillAxisService(Utils.java:468)
  at org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.java:388)
  at org.apache.axis2.deployment.repository.util.ArchiveReader.buildServiceGroup(ArchiveReader.java:101)
  at org.apache.axis2.deployment.repository.util.ArchiveReader.processServiceGroup(ArchiveReader.java:178)
  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.DeploymentEngine.loadServices(DeploymentEngine.java:142)
  at org.apache.axis2.deployment.WarBasedAxisConfigurator.loadServices(WarBasedAxisConfigurator.java:283)
  at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:95)
  at org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:584)
  at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:454)
  at org.apache.axis2.webapp.AxisAdminServlet.init(AxisAdminServlet.java:60)
  at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280)
  at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193)
  at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1088)
  at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5033)
  at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5317)
  at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
  at org.apache.catalina.core.StandardContext.reload(StandardContext.java:3926)
  at org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:426)
  at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1345)
  at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1530)
  at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1540)
  at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1540)
  at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1519)
  at java.lang.Thread.run(Thread.java:722)
  Caused by: java.lang.ClassNotFoundException: javax.ws.rs.Produces
  at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1713)
  at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1558)
  ... 32 more
  
  [INFO] org.apache.axis2.deployment.DeploymentException: java.lang.NoClassDefFoundError: javax/ws/rs/Produces
  [INFO] Deploying Web service: version.aar - file:/Users/argelramirezreyes/Dropbox/java/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/webService4/WEB-INF/services/version.aar
  [WARN] No transportReceiver for org.apache.axis2.transport.http.AxisServletListener found.    An instance for HTTP will be configured automatically. Please update your axis2.xml file!
  mar 26, 2013 7:45:52 PM org.apache.catalina.core.StandardContext reload
  INFO: Se ha completado la recarga de este Contexto
  </code></pre>
  
  <p>i tried to manually download a jar that contains javax.ws.rs.Produces and importing but the problem persists...</p>
  
  <p>¿could you help me?</p>
  
  <p>Thanks in advance.</p>