dev@jersey.java.net

RE: [Jersey] OSGi/Grizzly/HttpsService support<was>Re: [Jersey] OSGi Support

From: David Tkaczyk <djt69_at_comcast.net>
Date: Thu, 4 Feb 2010 13:26:15 -0500

Great.. thank you Jakub..

-----Original Message-----
From: Jakub.Podlesak_at_Sun.COM [mailto:Jakub.Podlesak_at_Sun.COM]
Sent: Thursday, February 04, 2010 12:25 PM
To: dev_at_jersey.dev.java.net
Subject: Re: [Jersey] OSGi/Grizzly/HttpsService support<was>Re: [Jersey]
OSGi Support


Hi David,

Just an update to keep you informed.
I am able to reproduce the issue with Grizzly HttpService implementation,
but still investigating the root cause. Please stay tuned.

Thanks,

~Jakub

On Tue, Feb 02, 2010 at 11:27:44AM -0500, David Tkaczyk wrote:
> Jakub,
>
> Thanks for the maven instructions.. very helpful for a non-maven guy. I
> followed them and copied the jars in. I am still seeing the exact same
> stack trace.
>
> Below I will add my ps list, bundle activator, service tracker customizer,
> and my simple resource - should be easy to create a new test out of this.
>
> Thanks,
> Dave
>
> -> ps
> START LEVEL 1
> ID State Level Name
> [ 0] [Active ] [ 0] System Bundle (2.0.1)
> [ 1] [Active ] [ 1] Camiant MSR Core (0.1.0)
> [ 2] [Active ] [ 1] Camiant MSR JUL to SLF (0)
> [ 3] [Active ] [ 1] Camiant MSR REST (0.1.0)
> [ 4] [Active ] [ 1] Grizzly OSGi HttpService Bundle (1.9.18.k)
> [ 5] [Active ] [ 1] Camiant Hibernate (1.0.0)
> [ 6] [Active ] [ 1] jersey core - osgi bundle (1.2.0.SNAPSHOT)
> [ 7] [Active ] [ 1] jersey server - osgi bundle (1.2.0.SNAPSHOT)
> [ 8] [Active ] [ 1] jsr311-api - osgi bundle (1.2.0.SNAPSHOT)
> [ 9] [Active ] [ 1] jul-to-slf4j-1.5.8 (0)
> [ 10] [Active ] [ 1] Apache Felix Configuration Admin Service
> (1.2.4)
> [ 11] [Active ] [ 1] Apache Felix Declarative Services (1.4.0)
> [ 12] [Active ] [ 1] Apache Felix Shell Service (1.4.1)
> [ 13] [Active ] [ 1] Apache Felix Shell TUI (1.4.1)
> [ 14] [Active ] [ 1] Apache Felix Web Management Console (2.0.2)
> [ 15] [Resolved ] [ 1] Camiant MSR Log4JProperties (0.5.0)
> [ 16] [Active ] [ 1] Apache Jakarta log4j Plug-in
> (1.2.15.v200910021404)
> [ 17] [Active ] [ 1] osgi.cmpn (4.2.0.200908310645)
> [ 18] [Active ] [ 1] slf4j-api (1.5.8)
> [ 19] [Resolved ] [ 1] slf4j-log4j12 (1.5.8)
>
> package camiant.osgi.msr.rest;
>
> import java.util.List;
>
> import org.osgi.framework.BundleActivator;
> import org.osgi.framework.BundleContext;
> import org.osgi.service.http.HttpService;
> import org.osgi.util.tracker.ServiceTracker;
> import org.slf4j.Logger;
> import org.slf4j.LoggerFactory;
>
> public class RestBundleActivator implements BundleActivator {
>
> private static final Logger LOGGER =
> LoggerFactory.getLogger(RestBundleActivator.class);
>
> private ServiceTracker httpServiceTracker;
>
> @Override
> public void start(BundleContext bundleContext) throws Exception {
> LOGGER.info("Info - Starting Rest Bundle!!!!!!!!!!!!!");
>
> httpServiceTracker = new ServiceTracker(bundleContext,
> HttpService.class.getName(), new RestGrizzlyServiceTrackerCustomizer());
> httpServiceTracker.open();
> }
>
> @Override
> public void stop(BundleContext arg0) throws Exception {
> LOGGER.info("Info - Stopping Rest Bundle!!!!!!!!!!!!!");
>
> httpServiceTracker.close();
> }
> }
>
> package camiant.osgi.msr.rest;
>
> import java.util.Dictionary;
> import java.util.Hashtable;
>
> import org.osgi.framework.ServiceReference;
> import org.osgi.service.http.HttpService;
> import org.osgi.util.tracker.ServiceTrackerCustomizer;
> import org.slf4j.Logger;
> import org.slf4j.LoggerFactory;
>
> import com.sun.jersey.api.core.ClassNamesResourceConfig;
> import com.sun.jersey.spi.container.servlet.ServletContainer;
>
> import camiant.osgi.msr.rest.resource.Resource1;
>
> public class RestGrizzlyServiceTrackerCustomizer implements
> ServiceTrackerCustomizer {
>
> private static final Logger LOGGER =
> LoggerFactory.getLogger(RestGrizzlyServiceTrackerCustomizer.class);
> private HttpService grizzlyService = null;
>
> @Override
> public Object addingService(ServiceReference serviceRef) {
> LOGGER.info("Adding service: " +
> serviceRef.getBundle().getSymbolicName());
>
> Dictionary<String, String> jerseyServletParams = new Hashtable<String,
> String>();
>
>
jerseyServletParams.put("com.sun.jersey.config.property.resourceConfigClass"
> , ClassNamesResourceConfig.class.getName());
> jerseyServletParams.put("com.sun.jersey.config.property.classnames",
> Resource1.class.getName());
>
> grizzlyService =
>
(HttpService)serviceRef.getBundle().getBundleContext().getService(serviceRef
> );
> try {
> grizzlyService.registerServlet("/rs", new ServletContainer(),
> jerseyServletParams, null);
> } catch (Exception e) {
> e.printStackTrace();
> grizzlyService = null;
> }
>
> return grizzlyService;
> }
>
> @Override
> public void modifiedService(ServiceReference serviceRef, Object
> httpService) {
> LOGGER.info("Modifying service: " +
> serviceRef.getBundle().getSymbolicName());
> removedService(serviceRef, httpService);
> addingService(serviceRef);
> }
>
> @Override
> public void removedService(ServiceReference serviceRef, Object
> httpService) {
> LOGGER.info("Removing service: " +
> serviceRef.getBundle().getSymbolicName());
> ((HttpService)httpService).unregister("/rs");
> serviceRef.getBundle().getBundleContext().ungetService(serviceRef);
> httpService = null;
> }
>
> }
>
>
> package camiant.osgi.msr.rest.resource;
>
> import javax.ws.rs.GET;
> import javax.ws.rs.Path;
> import javax.ws.rs.Produces;
>
> @Path("/msr")
> public class Resource1 {
>
> @GET
> @Path("/keytypes")
> @Produces("text/plain")
> public String getKeyTypes() {
> return "this is a key type!!!!!!!!!";
> }
>
> }
> -----Original Message-----
> From: Jakub.Podlesak_at_Sun.COM [mailto:Jakub.Podlesak_at_Sun.COM]
> Sent: Tuesday, February 02, 2010 4:02 AM
> To: dev_at_jersey.dev.java.net
> Subject: Re: [Jersey] OSGi/Grizzly/HttpsService support<was>Re: [Jersey]
> OSGi Support
>
> On Mon, Feb 01, 2010 at 05:35:12PM -0500, David Tkaczyk wrote:
> > Jakub,
> >
> > I found the test, and added jersey-bundle-1.2.SNAPSHOT.jar to my
project.
>
> Instead of the jersey-bundle module, you need to use the individual
osgified
> jersey
> artifacts; look at the JerseyHttpServiceTest class at the test module:
>
> mavenBundle("com.sun.jersey.osgi","jsr311-api","1.2-SNAPSHOT"),
> mavenBundle("com.sun.jersey.osgi","jersey-core","1.2-SNAPSHOT"),
> mavenBundle("com.sun.jersey.osgi","jersey-server",
> "1.2-SNAPSHOT"),
> mavenBundle("com.sun.jersey.osgi","jersey-client",
> "1.2-SNAPSHOT"),
>
> You will need to build these by yourself as we still not deploy them
> to the publicly available maven repository. Just do the folowing:
>
> %svn co https://jersey.dev.java.net/svn/jersey/trunk/jersey/osgi
> %cd osgi
> %mvn clean install
>
> and you should see the following at your local maven repo:
>
> %ls ~/.m2/repository/com/sun/jersey/osgi
> http-service-test
> http-service-tests
> jersey-client
> jersey-core
> jersey-http-service-test
> jersey-json
> jersey-osgi-project
> jersey-server
> jetty-tests
> jsr250-api
> jsr311-api
> tests
>
>
> > Are there any other steps I've missed ? It still does not work for me.
> >
> > Dictionary<String, String> jerseyServletParams = new
Hashtable<String,
> > String>();
> >
> >
>
jerseyServletParams.put("com.sun.jersey.config.property.resourceConfigClass"
> > , ClassNamesResourceConfig.class.getName());
> > jerseyServletParams.put("com.sun.jersey.config.property.classnames",
> > Resource1.class.getName());
>
> The config above looks fine,
>
> >
> > grizzlyService =
> >
>
(HttpService)serviceRef.getBundle().getBundleContext().getService(serviceRef
> > );
>
> What you get (as grizzlyService) does not need to be grizzly based
> (at least in my test jetty provider is used instead, but it should not
> affect the functionality)
> I have talked to Oleksiy, who confirmed grizzly based provider is
available.
> I will try to add appropriate tests.
>
> > try {
> > grizzlyService.registerServlet("/rs", new ServletContainer(),
> > jerseyServletParams, null);
>
> looks good,
>
> ~Jakub
>
> > } catch (Exception e) {
> > e.printStackTrace();
> > grizzlyService = null;
> > }
> >
> > 2010-02-01 17:31:14,016-0500 INFO grizzly:765 - Starting Grizzly
> Framework
> > 1.9.18-k - Mon Feb 01 17:31:14 EST 2010
> > 2010-02-01 17:31:14,035-0500 INFO
RestGrizzlyServiceTrackerCustomizer:25
> -
> > Adding service: com.sun.grizzly.osgi.grizzly-httpservice-bundle
> > javax.servlet.ServletException: Resource configuration class,
> > com.sun.jersey.api.core.ClassNamesResourceConfig, is not a super class
of
> > class javax.ws.rs.core.Application
> > at
> >
>
com.sun.jersey.spi.container.servlet.WebComponent.createResourceConfig(WebCo
> > mponent.java:682)
> > at
> >
>
com.sun.jersey.spi.container.servlet.WebComponent.createResourceConfig(WebCo
> > mponent.java:619)
> > at
> >
>
com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:199
> > )
> > at
> >
>
com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.
> > java:307)
> > at
> >
>
com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.
> > java:470)
> > at javax.servlet.GenericServlet.init(GenericServlet.java:242)
> > at
> >
>
com.sun.grizzly.http.servlet.ServletAdapter.loadServlet(ServletAdapter.java:
> > 428)
> > at
> >
>
com.sun.grizzly.osgi.httpservice.OSGiServletAdapter.startServlet(OSGiServlet
> > Adapter.java:99)
> > at
> >
>
com.sun.grizzly.osgi.httpservice.OSGiMainAdapter.registerServletAdapter(OSGi
> > MainAdapter.java:178)
> > at
> >
>
com.sun.grizzly.osgi.httpservice.HttpServiceImpl.registerServlet(HttpService
> > Impl.java:92)
> > at
> >
>
camiant.osgi.msr.rest.RestGrizzlyServiceTrackerCustomizer.addingService(Rest
> > GrizzlyServiceTrackerCustomizer.java:34)
> > at
> >
>
org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker
> > .java:896)
> > at
> >
>
org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:261)
> > at
> > org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:233)
> > at
> >
>
org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.j
> > ava:840)
> > at
> >
>
org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallbac
> > k(EventDispatcher.java:878)
> > at
> >
>
org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDi
> > spatcher.java:732)
> > at
> >
>
org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispat
> > cher.java:662)
> > at
> > org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:3587)
> > at org.apache.felix.framework.Felix.access$000(Felix.java:40)
> > at org.apache.felix.framework.Felix$1.serviceChanged(Felix.java:625)
> > at
> >
>
org.apache.felix.framework.ServiceRegistry.registerService(ServiceRegistry.j
> > ava:90)
> > at org.apache.felix.framework.Felix.registerService(Felix.java:2711)
> > at
> >
>
org.apache.felix.framework.BundleContextImpl.registerService(BundleContextIm
> > pl.java:252)
> > at
> >
>
org.apache.felix.framework.BundleContextImpl.registerService(BundleContextIm
> > pl.java:230)
> > at
> > com.sun.grizzly.osgi.httpservice.Activator.start(Activator.java:89)
> > at
> >
>
org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.jav
> > a:639)
> > at org.apache.felix.framework.Felix.activateBundle(Felix.java:1700)
> > at org.apache.felix.framework.Felix.startBundle(Felix.java:1622)
> > at
> > org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1077)
> > at
> > org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
> > at java.lang.Thread.run(Thread.java:619)
> >
> > Is this a jar version problem with one of the other dependencies? Also,
I
> > hope that at some point you will start using 'resolution = optional' for
a
> > lot of the dependencies in the manifest at some point. Otherwise, it
> > requires pulling in way too many other jar files.
> >
> > Thanks,
> > Dave
> >
> > -----Original Message-----
> > From: Jakub.Podlesak_at_Sun.COM [mailto:Jakub.Podlesak_at_Sun.COM]
> > Sent: Monday, February 01, 2010 1:50 PM
> > To: dev_at_jersey.dev.java.net
> > Subject: Re: [Jersey] OSGi/Grizzly/HttpsService support<was>Re: [Jersey]
> > OSGi Support
> >
> >
> > Hi David,
> >
> > The HttpService based Jersey sample bundle has just been added to the
main
> > trunk together with a test. The scanning mechanism still does not work
> > in the OSGi environment, but you can register the Jersey resource
classes
> > explicitly, and then everything seems to work fine.
> >
> > You can svn checkout [1] for more details.
> > Please let me know if this works for you and if based on the example
> > you managed to fix your bundle.
> >
> > Thanks for your feedback and patience,
> >
> > ~Jakub
> >
> >
>
[1]https://jersey.dev.java.net/svn/jersey/trunk/jersey/osgi/http-service-tes
> > t/
> >
> > On Tue, Jan 26, 2010 at 12:17:59PM -0500, David Tkaczyk wrote:
> > > Excellent... thank you...
> > >
> > > -----Original Message-----
> > > From: Jakub.Podlesak_at_Sun.COM [mailto:Jakub.Podlesak_at_Sun.COM]
> > > Sent: Tuesday, January 26, 2010 12:08 PM
> > > To: dev_at_jersey.dev.java.net
> > > Subject: [Jersey] OSGi/Grizzly/HttpsService support<was>Re: [Jersey]
> OSGi
> > > Support
> > >
> > > On Tue, Jan 26, 2010 at 09:08:58AM -0500, David Tkaczyk wrote:
> > > > OK Paul. thank you. do you have an ETA for the next release? And
what
> > will
> > > > it be, 1.1.6? Any hints from Jakub would be greatly appreciated.
> > >
> > > Hi David, i am going to add one more test to the trunk using the
> > HttpService
> > > scenario
> > > based on your previous e-mail (just after commiting an OSGified WAR
> > > deployment
> > > test, which i have ready locally), as that would be the best way to
> ensure
> >
> > > the (HttpService) scenario works fine and also to show how to
configure
> > > things.
> > > I expect to have more information on that for you tomorow.
> > >
> > > ~Jakub
> > >
> > > >
> > > >
> > > >
> > > > _____
> > > >
> > > > From: Paul.Sandoz_at_Sun.COM [mailto:Paul.Sandoz_at_Sun.COM]
> > > > Sent: Tuesday, January 26, 2010 5:02 AM
> > > > To: dev_at_jersey.dev.java.net
> > > > Subject: Re: [Jersey] OSGi Support
> > > >
> > > >
> > > >
> > > > Hi David,
> > > >
> > > >
> > > >
> > > > We decided to defer OSGi to the next release (which will occur when
> OSGi
> > > > support is ready). We were not happy with the degree of testing.
> > > >
> > > >
> > > >
> > > > For now you need to check out the Jersey trunk
> > > >
> > > >
> > > >
> > > > svn checkout https://jersey.dev.java.net/svn/jersey/trunk/jersey
> > jersey
> > > > --username username
> > > >
> > > >
> > > >
> > > > and do:
> > > >
> > > >
> > > >
> > > > cd osgi
> > > >
> > > > mvn clean install
> > > >
> > > >
> > > >
> > > > and then use those built OSGi specific maven artifacts.
> > > >
> > > >
> > > >
> > > > Jakub can provide further details, especally w.r.t. your code.
> > > >
> > > >
> > > >
> > > > Paul.
> > > >
> > > >
> > > >
> > > > On Jan 25, 2010, at 7:59 PM, David Tkaczyk wrote:
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > Hi Paul,
> > > >
> > > >
> > > >
> > > > I had hoped that 1.1.5 would fix my issues with
felix/grizzly/jersey.
> I
> > > am
> > > > still unable to get grizzly to load my jersey servlet properly.
I've
> > > tried
> > > > a bunch of different things with no luck. I see a test case that
uses
> > > > embedded grizzly, but none that actually use HttpService. The
Grizzly
> > > test
> > > > cases use the Jersey client, but do not create a Jersey Servlet. I
> have
> > > > posted on Grizzly as well with no luck yet.
> > > >
> > > >
> > > >
> > > > I am able to successfully get an HttpService object from Felix and
the
> > > > Grizzly bundle. My trouble happens when trying to register a Jersey
> > > Servlet
> > > > with this HttpService object. I'll post my code and the error
message
> > > > below. There's not much to it, but I can't get it to work.
> > > >
> > > >
> > > >
> > > > Can you please have your OSGi guy see if he can get this to work?
> > There's
> > > > got to be something small I'm missing. I am getting very desperate
to
> > get
> > > > this to finally hitch up.
> > > >
> > > >
> > > >
> > > > Thanks for all your help past and present,
> > > >
> > > > Dave
> > > >
> > > >
> > > >
> > > > package camiant.osgi.msr.rest;
> > > >
> > > >
> > > >
> > > > import org.osgi.framework.ServiceReference;
> > > >
> > > > import org.osgi.service.http.HttpService;
> > > >
> > > > import org.osgi.util.tracker.ServiceTrackerCustomizer;
> > > >
> > > > import org.slf4j.Logger;
> > > >
> > > > import org.slf4j.LoggerFactory;
> > > >
> > > > import com.sun.jersey.spi.container.servlet.ServletContainer;
> > > >
> > > >
> > > >
> > > > public class RestGrizzlyServiceTrackerCustomizer implements
> > > > ServiceTrackerCustomizer {
> > > >
> > > >
> > > >
> > > > private static final Logger LOGGER =
> > > > LoggerFactory.getLogger(RestGrizzlyServiceTrackerCustomizer.class);
> > > >
> > > > private HttpService grizzlyService = null;
> > > >
> > > >
> > > >
> > > > @Override
> > > >
> > > > public Object addingService(ServiceReference serviceRef) {
> > > >
> > > > LOGGER.info("Adding service: " +
> > > > serviceRef.getBundle().getSymbolicName());
> > > >
> > > >
> > > >
> > > > grizzlyService =
> > > >
> > >
> >
>
(HttpService)serviceRef.getBundle().getBundleContext().getService(serviceRef
> > > > );
> > > >
> > > > try {
> > > >
> > > > ServletContainer jerseyServletContainer = new
> ServletContainer(new
> > > > MSRRestApplication());
> > > >
> > > > grizzlyService.registerServlet("/rs", jerseyServletContainer,
> > null,
> > > > null);
> > > >
> > > > } catch (Exception e) {
> > > >
> > > > e.printStackTrace();
> > > >
> > > > grizzlyService = null;
> > > >
> > > > }
> > > >
> > > >
> > > >
> > > > return grizzlyService;
> > > >
> > > > }
> > > >
> > > >
> > > >
> > > > @Override
> > > >
> > > > public void modifiedService(ServiceReference serviceRef, Object
> > > > httpService) {
> > > >
> > > > LOGGER.info("Modifying service: " +
> > > > serviceRef.getBundle().getSymbolicName());
> > > >
> > > > removedService(serviceRef, httpService);
> > > >
> > > > addingService(serviceRef);
> > > >
> > > > }
> > > >
> > > >
> > > >
> > > > @Override
> > > >
> > > > public void removedService(ServiceReference serviceRef, Object
> > > > httpService) {
> > > >
> > > > LOGGER.info("Removing service: " +
> > > > serviceRef.getBundle().getSymbolicName());
> > > >
> > > > ((HttpService)httpService).unregister("/rs");
> > > >
> > > >
> serviceRef.getBundle().getBundleContext().ungetService(serviceRef);
> > > >
> > > > httpService = null;
> > > >
> > > > }
> > > >
> > > > }
> > > >
> > > >
> > > >
> > > > package camiant.osgi.msr.rest;
> > > >
> > > >
> > > >
> > > > import java.util.Collections;
> > > >
> > > > import java.util.Set;
> > > >
> > > > import javax.ws.rs.ApplicationPath;
> > > >
> > > > import javax.ws.rs.core.Application;
> > > >
> > > > import camiant.osgi.msr.rest.resource.Resource1;
> > > >
> > > >
> > > >
> > > > @ApplicationPath("/rs")
> > > >
> > > > public class MSRRestApplication extends Application {
> > > >
> > > > @Override
> > > >
> > > > public Set<Class<?>> getClasses() {
> > > >
> > > > return Collections.<Class<?>>singleton(Resource1.class);
> > > >
> > > > }
> > > >
> > > > }
> > > >
> > > >
> > > >
> > > > package camiant.osgi.msr.rest.resource;
> > > >
> > > >
> > > >
> > > > import javax.ws.rs.GET;
> > > >
> > > > import javax.ws.rs.Path;
> > > >
> > > > import javax.ws.rs.Produces;
> > > >
> > > >
> > > >
> > > > @Path("/msr")
> > > >
> > > > public class Resource1 {
> > > >
> > > > @GET
> > > >
> > > > @Path("/keytypes")
> > > >
> > > > @Produces("text/plain")
> > > >
> > > > public String getKeyTypes() {
> > > >
> > > > return "this is a key type!!!!!!!!!";
> > > >
> > > > }
> > > >
> > > > }
> > > >
> > > >
> > > >
> > > > 2010-01-25 13:54:37,675-0500 INFO
> > RestGrizzlyServiceTrackerCustomizer:19
> > > -
> > > > Adding service: com.sun.grizzly.osgi.grizzly-httpservice-bundle
> > > >
> > > > ERROR: EventDispatcher: Error during dispatch.
> > > > (com.sun.jersey.spi.service.ServiceConfigurationError:
> > > > com.sun.jersey.spi.container.WebApplicationProvider: The class
> > > > com.sun.jersey.server.impl.container.WebApplicationProviderImpl
> > > implementing
> > > > provider interface
com.sun.jersey.spi.container.WebApplicationProvider
> > > could
> > > > not be instantiated: null)
> > > >
> > > > com.sun.jersey.spi.service.ServiceConfigurationError:
> > > > com.sun.jersey.spi.container.WebApplicationProvider: The class
> > > > com.sun.jersey.server.impl.container.WebApplicationProviderImpl
> > > implementing
> > > > provider interface
com.sun.jersey.spi.container.WebApplicationProvider
> > > could
> > > > not be instantiated: null
> > > >
> > > > at
> > > >
com.sun.jersey.spi.service.ServiceFinder.fail(ServiceFinder.java:380)
> > > >
> > > > at
> > > >
> > >
> >
>
com.sun.jersey.spi.service.ServiceFinder.access$600(ServiceFinder.java:144)
> > > >
> > > > at
> > > >
> > >
> >
>
com.sun.jersey.spi.service.ServiceFinder$LazyObjectIterator.hasNext(ServiceF
> > > > inder.java:683)
> > > >
> > > > at
> > > >
> > >
> >
>
com.sun.jersey.spi.container.WebApplicationFactory.createWebApplication(WebA
> > > > pplicationFactory.java:61)
> > > >
> > > > at
> > > >
> > >
> >
>
com.sun.jersey.spi.container.servlet.ServletContainer.create(ServletContaine
> > > > r.java:325)
> > > >
> > > > at
> > > >
> > >
> >
>
com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.c
> > > > reate(ServletContainer.java:240)
> > > >
> > > > at
> > > >
> > >
> >
>
com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:548
> > > > )
> > > >
> > > > at
> > > >
> > >
> >
>
com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:201
> > > > )
> > > >
> > > > at
> > > >
> > >
> >
>
com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.
> > > > java:307)
> > > >
> > > > at
> > > >
> > >
> >
>
com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.
> > > > java:470)
> > > >
> > > > at
> > javax.servlet.GenericServlet.init(GenericServlet.java:242)
> > > >
> > > > at
> > > >
> > >
> >
>
com.sun.grizzly.http.servlet.ServletAdapter.loadServlet(ServletAdapter.java:
> > > > 428)
> > > >
> > > > at
> > > >
> > >
> >
>
com.sun.grizzly.osgi.httpservice.OSGiServletAdapter.startServlet(OSGiServlet
> > > > Adapter.java:99)
> > > >
> > > > at
> > > >
> > >
> >
>
com.sun.grizzly.osgi.httpservice.OSGiMainAdapter.registerServletAdapter(OSGi
> > > > MainAdapter.java:178)
> > > >
> > > > at
> > > >
> > >
> >
>
com.sun.grizzly.osgi.httpservice.HttpServiceImpl.registerServlet(HttpService
> > > > Impl.java:92)
> > > >
> > > > at
> > > >
> > >
> >
>
camiant.osgi.msr.rest.RestGrizzlyServiceTrackerCustomizer.addingService(Rest
> > > > GrizzlyServiceTrackerCustomizer.java:24)
> > > >
> > > > at
> > > >
> > >
> >
>
org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker
> > > > .java:896)
> > > >
> > > > at
> > > >
> > >
> >
>
org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:261)
> > > >
> > > > at
> > > >
org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:233)
> > > >
> > > > at
> > > >
> > >
> >
>
org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.j
> > > > ava:840)
> > > >
> > > > at
> > > >
> > >
> >
>
org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallbac
> > > > k(EventDispatcher.java:878)
> > > >
> > > > at
> > > >
> > >
> >
>
org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDi
> > > > spatcher.java:732)
> > > >
> > > > at
> > > >
> > >
> >
>
org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispat
> > > > cher.java:662)
> > > >
> > > > at
> > > > org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:3587)
> > > >
> > > > at
> > org.apache.felix.framework.Felix.access$000(Felix.java:40)
> > > >
> > > > at
> > > > org.apache.felix.framework.Felix$1.serviceChanged(Felix.java:625)
> > > >
> > > > at
> > > >
> > >
> >
>
org.apache.felix.framework.ServiceRegistry.registerService(ServiceRegistry.j
> > > > ava:90)
> > > >
> > > > at
> > > > org.apache.felix.framework.Felix.registerService(Felix.java:2711)
> > > >
> > > > at
> > > >
> > >
> >
>
org.apache.felix.framework.BundleContextImpl.registerService(BundleContextIm
> > > > pl.java:252)
> > > >
> > > > at
> > > >
> > >
> >
>
org.apache.felix.framework.BundleContextImpl.registerService(BundleContextIm
> > > > pl.java:230)
> > > >
> > > > at
> > > > com.sun.grizzly.osgi.httpservice.Activator.start(Activator.java:89)
> > > >
> > > > at
> > > >
> > >
> >
>
org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.jav
> > > > a:639)
> > > >
> > > > at
> > > > org.apache.felix.framework.Felix.activateBundle(Felix.java:1700)
> > > >
> > > > at
> > > org.apache.felix.framework.Felix.startBundle(Felix.java:1622)
> > > >
> > > > at
> > > >
org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1077)
> > > >
> > > > at
> > > >
org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
> > > >
> > > > at java.lang.Thread.run(Thread.java:619)
> > > >
> > > > Caused by: java.lang.ClassCastException
> > > >
> > > > at java.lang.Class.cast(Class.java:2990)
> > > >
> > > > at
> > > >
> > >
> >
>
com.sun.jersey.spi.service.ServiceFinder$LazyObjectIterator.hasNext(ServiceF
> > > > inder.java:641)
> > > >
> > > > ... 34 more
> > > >
> > > > ->
> > > >
> > > >
> > > >
> > > > _____
> > > >
> > > > From: Paul.Sandoz_at_Sun.COM [mailto:Paul.Sandoz_at_Sun.COM]
> > > > Sent: Tuesday, January 05, 2010 4:11 AM
> > > > To: dev_at_jersey.dev.java.net
> > > > Subject: Re: [Jersey] OSGi Support
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > On Jan 4, 2010, at 7:02 PM, David Tkaczyk wrote:
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > Thanks Paul -
> > > >
> > > >
> > > >
> > > > I read your response. I'd be happy to do a bit of testing when
1.5.1
> is
> > > > ready for beta/release/candidate/whatever. My environment is
> > > > Felix/Grizzly/Jersey.
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > Great. We will make an announcement when Jakub has something
available
> > in
> > > > the trunk and SNAPSHOT builds.
> > > >
> > > >
> > > >
> > > > Paul.
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > Dave
> > > >
> > > >
> > > >
> > > >
> > > > _____
> > > >
> > > >
> > > > From: Paul.Sandoz_at_Sun.COM [mailto:Paul.Sandoz_at_Sun.COM]
> > > > Sent: Tuesday, December 29, 2009 5:31 AM
> > > > To: dev_at_jersey.dev.java.net
> > > > Subject: Re: [Jersey] OSGi Support
> > > >
> > > >
> > > >
> > > > Hi David,
> > > >
> > > >
> > > >
> > > > I will reply fully to your email on the users list.
> > > >
> > > >
> > > >
> > > > Paul.
> > > >
> > > >
> > > >
> > > > On Dec 28, 2009, at 9:03 PM, David Tkaczyk wrote:
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > Hi,
> > > >
> > > >
> > > >
> > > > I understand that Jersey 1.1.5 will support OSGi. Is there an
> estimated
> > > > delivery date for this version? In the meantime, does anyone have
an
> > > > example using Felix/HttpService? I have tried 1.1.5 ea and 1.1.4.1
> and
> > it
> > > > won't find my resource class no matter what I try. There are a few
> > > > seemingly outdated examples on the web that I could not get working
> > > either.
> > > > I keep telling myself I can't be the only one with this problem. Or
> > > should
> > > > I just be patient and wait for the official release?
> > > >
> > > >
> > > >
> > > > I have posted a similar question on the "users" mailing list as
well.
>
> > > >
> > > >
> > > >
> > > > Thanks,
> > > > Dave
> > > >
> > > >
> > > >
> > > > David Tkaczyk
> > > >
> > > > Member of Technical Staff
> > > >
> > > > Office: 508-303-4162
> > > >
> > > > Fax: 508-486-9595
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> >
>
<http://www.fiercewireless.com/special-reports/camiant-top-wireless-company-
> > > > 2009-fiercewireless-fierce-15> <image001.gif>
> > > >
> > > >
> > > >
> > > > <http://www.camiant.com> www.camiant.com
> > > >
> > > > 200 Nickerson Road, Marlborough, MA 01752-4603 USA
> > > >
> > > >
> > > >
> > > > <http://twitter.com/camiant> <image002.gif>
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> > > --
> > > http://blogs.sun.com/japod
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscribe_at_jersey.dev.java.net
> > > For additional commands, e-mail: dev-help_at_jersey.dev.java.net
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscribe_at_jersey.dev.java.net
> > > For additional commands, e-mail: dev-help_at_jersey.dev.java.net
> > >
> >
> > --
> > http://blogs.sun.com/japod
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe_at_jersey.dev.java.net
> > For additional commands, e-mail: dev-help_at_jersey.dev.java.net
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe_at_jersey.dev.java.net
> > For additional commands, e-mail: dev-help_at_jersey.dev.java.net
> >
>
> --
> http://blogs.sun.com/japod
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: dev-help_at_jersey.dev.java.net
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: dev-help_at_jersey.dev.java.net
>

-- 
http://blogs.sun.com/japod
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_jersey.dev.java.net
For additional commands, e-mail: dev-help_at_jersey.dev.java.net