You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by shri636 <sh...@evolvussolutions.com> on 2012/04/18 13:24:34 UTC

Missing Requirement package com.sun.jersey.api.client

Hello Readers,
      I got an issue in servimix 4.0, I have an osgi bundle(blueprint.xml)
where i am calling  amethod called 'callMe'

                <route>
			<from uri="timer://myTimer?fixedRate=true&amp;period=2000" />
			<bean ref="serviceClient" method="callMe" />
			<to uri="activemq:queue://example.B" />
		</route>
 in the callMe() method i am calling a webservice which is deployed in the
tomcat 6.0 like below:

                ClientConfig config = new DefaultClientConfig();
		Client client = Client.create(config);
		WebResource service = client.resource(UriBuilder.fromUri(
				"http://localhost:9090/de.vogella.jersey.first").build());
		// Fluent interfaces
		System.out.println(service.path("rest").path("hello")
				.accept(MediaType.TEXT_PLAIN).get(ClientResponse.class)
				.toString());

when I call this method through a single java main program  it works
fine(its is calling the webservice and showing the ouput) BUT the same thing
which i mention above is trying to call through servicemix for every 2
seconds .
 The osgi bundle itself not deploying with its giving follwoing error
/karaf@root> ERROR: Bundle activemq-camel-blueprint [158] Error starting
file:/D:
/My-Servers/apache-servicemix-4.4.0/deploy/activemq-camel-blueprint-4.4.0.jar
(o
rg.osgi.framework.BundleException: Unresolved constraint in bundle
activemq-came
l-blueprint [158]: Unable to resolve 158.2: missing requirement [158.2]
package;
 (package=com.sun.jersey.api.client))
org.osgi.framework.BundleException: Unresolved constraint in bundle
activemq-cam
el-blueprint [158]: Unable to resolve 158.2: missing requirement [158.2]
package
; (package=com.sun.jersey.api.client)
        at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3446)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:1734)
        at
org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1163)

        at
org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264
)
        at java.lang.Thread.run(Thread.java:619)/



please if anybody knows the solution ,reply soon

Thank you in advance


--
View this message in context: http://servicemix.396122.n5.nabble.com/Missing-Requirement-package-com-sun-jersey-api-client-tp5648816p5648816.html
Sent from the ServiceMix - Dev mailing list archive at Nabble.com.

Re: Missing Requirement package com.sun.jersey.api.client

Posted by "michal.warecki" <mi...@gmail.com>.
Try to install jersey-bundle to your servicemix. It has support for OSGi.

BTW. use users mailing list instead of dev.

--
View this message in context: http://servicemix.396122.n5.nabble.com/Missing-Requirement-package-com-sun-jersey-api-client-tp5648816p5656658.html
Sent from the ServiceMix - Dev mailing list archive at Nabble.com.