Thanks Waruna and Abimaran.

I tried the sample in [1] to create a spring service in AS 5.2.1. I was
able to upload and test it when I compile it as a "war" file and upload to
AS. But when I uploaded the jar file and the content.xml (under Spring
service), the service is indicated as an "axis2" service (not as a "spring"
service) in the admin console (under Services). And when I deleted the
service, in the terminal it mentions:

*Removing Axis2 Service: HelloService {super=tenant}*

But in the Admin console, it is denoted as a "Faulty service" with the
error given below. After this, even if I delete the faulty service and try
to upload it again as a Spring service, I get the error as a faulty service.

*Error: 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:397)
at
org.apache.axis2.deployment.ServiceGroupBuilder.populateServiceGroup(ServiceGroupBuilder.java:101)
at
org.apache.axis2.deployment.repository.util.ArchiveReader.buildServiceGroup(ArchiveReader.java:109)
at
org.apache.axis2.deployment.repository.util.ArchiveReader.processServiceGroup(ArchiveReader.java:143)
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:807)
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.RepositoryListener.startListener(RepositoryListener.java:371)
at
org.apache.axis2.deployment.scheduler.SchedulerTask.checkRepository(SchedulerTask.java:59)
at
org.apache.axis2.deployment.scheduler.SchedulerTask.run(SchedulerTask.java:67)
at
org.wso2.carbon.core.deployment.CarbonDeploymentSchedulerTask.runAxisDeployment(CarbonDeploymentSchedulerTask.java:79)
at
org.wso2.carbon.core.deployment.CarbonDeploymentSchedulerTask.run(CarbonDeploymentSchedulerTask.java:124)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304) at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724) Caused by:
java.lang.ClassNotFoundException: javax.ws.rs.Produces at
org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)
at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 25 more*

[1] - https://spring.io/guides/gs/rest-service/

Regards,
Nira

On Thu, Jan 15, 2015 at 9:10 PM, Abimaran Kugathasan <[email protected]>
wrote:

> Hi Niranjan,
>
>
> I jave written MDM client for WSO2 Enterprise Mobility Manager. You can
> find it here [1]
>
> [1] :
> https://svn.wso2.com/wso2/interns/2013/abimaran/training/modules/project-windows-rest-mdm/
>
> On Fri, Jan 16, 2015 at 10:23 AM, Waruna Perera <[email protected]> wrote:
>
>> Hi,
>>
>> Pls see if this helps [1].
>>
>> [1] https://spring.io/guides/gs/consuming-rest/
>>
>> On Fri, Jan 16, 2015 at 12:47 AM, Niranjan Karunanandham <
>> [email protected]> wrote:
>>
>>> Hi all,
>>>
>>> $Subject plz.
>>>
>>> Regards,
>>> Nira
>>>
>>> --
>>>
>>> *Niranjan Karunanandham*
>>> WSO2 Inc.: http://www.wso2.com
>>>
>>> _______________________________________________
>>> Dev mailing list
>>> [email protected]
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Waruna Perera
>> Senior Software Engineer - Test Automation
>> Mobile: +94 77 3867037
>> WSO2, Inc.; http://wso2.com/
>> lean . enterprise . middlewear.
>>
>> _______________________________________________
>> Dev mailing list
>> [email protected]
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Thanks
> Abimaran Kugathasan
>
> Software Engineer | WSO2 Inc
> Data & APIs Technologies Team
> Mobile : +94 773922820
>
> <http://stackoverflow.com/users/515034>
> <http://lk.linkedin.com/in/abimaran>
> <http://www.lkabimaran.blogspot.com/>  <https://github.com/abimaran>
> <https://twitter.com/abimaran>
>
>


-- 

*Niranjan Karunanandham*
Senior Software Engineer - WSO2 Inc.
WSO2 Inc.: http://www.wso2.com
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to