users@jersey.java.net

Re: [Jersey] com.sun.jersey.core.spi.scanning.ScannerException: T he URI scheme bundle of the URI bundle://88.0:1/org/apache/camel/web is n ot supported. Package scanning deployment is not supported for such URIs.

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Fri, 08 Jan 2010 17:23:10 +0100

Hi,

There should be some other exception logged as well somewhere in the
logs saying something like it cannot instantiate the Application/
ResourceConfig class. Correct?

I think the difference between tests in the branch (most of which are
passing) and your set up is that the tests are declaring the classes
using the property:
   https://jersey.dev.java.net/nonav/apidocs/latest/jersey/com/sun/jersey/api/core/ClassNamesResourceConfig.html
#PROPERTY_CLASSNAMES


So it looks like we may have some issues to iron out when an
application is explicitly declared in a bundle.

Paul.

On Jan 8, 2010, at 5:10 PM, cmoulliard wrote:

> Hi Paul,
>
>
>
> I have installed the bundle of project jersey-servicemix and add the
> required bundles + done some cleanup in lib folder of WEB-INF in
> order to launch Jersey.
>
>
>
> Here is the error reported by Jersey now
>
>
>
> 17:06:36,671 | INFO | l Console Thread |
> SpringServlet | .container.servlet.SpringServlet
> 109 | Using default applicationContext
>
> 17:06:36,671 | INFO | l Console Thread |
> WebApplicationImpl | l.application.WebApplicationImpl
> 602 | Initiating Jersey application, version 'Jersey'
>
> 17:06:36,687 | INFO | l Console Thread |
> PackagesResourceConfig | .api.core.PackagesResourceConfig
> 107 | Scanning for root resource and provider classes in the packages:
>
> org.apache.camel.web
>
> 17:06:36,687 | ERROR | l Console Thread |
> SpringServlet | .container.servlet.SpringServlet
> 101 | Exception occurred when intialization
>
> com.sun.jersey.api.container.ContainerException:
>
> at
> com
> .sun
> .jersey
> .server
> .impl
> .application
> .DeferredResourceConfig.getApplication(DeferredResourceConfig.java:74)
>
> at
> com
> .sun
> .jersey
> .server
> .impl
> .application.WebApplicationImpl.initiate(WebApplicationImpl.java:784)
>
> at
> com
> .sun
> .jersey
> .spi
> .spring.container.servlet.SpringServlet.initiate(SpringServlet.java:
> 99)
>
> at com.sun.jersey.spi.container.servlet.ServletContainer
> $InternalWebComponent.initiate(ServletContainer.java:252)
>
> at
> com
> .sun
> .jersey.spi.container.servlet.WebComponent.load(WebComponent.java:550)
>
> 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:
> 641)
>
> at
> org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
>
> at
> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
> 50)
>
> at
> org
> .mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:
> 620)
>
> at
> org
> .mortbay
> .jetty.servlet.ServletHandler.updateMappings(ServletHandler.java:1011)
>
> at
> org
> .mortbay
> .jetty.servlet.ServletHandler.setFilterMappings(ServletHandler.java:
> 1047)
>
> at
> org
> .mortbay.jetty.servlet.ServletHandler.addFilter(ServletHandler.java:
> 886)
>
> at org.ops4j.pax.web.service.jetty.internal.JettyServerImpl
> $3.call(JettyServerImpl.java:301)
>
> at org.ops4j.pax.web.service.jetty.internal.JettyServerImpl
> $3.call(JettyServerImpl.java:297)
>
> at
> org
> .ops4j
> .pax
> .swissbox
> .core
> .ContextClassLoaderUtils
> .doWithClassLoader(ContextClassLoaderUtils.java:60)
>
> at org.ops4j.pax.web.service.jetty.internal.JettyServerImpl.addFilter
> (JettyServerImpl.java:296)
>
> at org.ops4j.pax.web.service.jetty.internal.ServerControllerImpl
> $Started.addFilter(ServerControllerImpl.java:273)
>
> at org.ops4j.pax.web.service.jetty.internal.ServerControllerImpl.addFilter
> (ServerControllerImpl.java:134)
>
> at org.ops4j.pax.web.service.internal.HttpServiceStarted.registerFilter
> (HttpServiceStarted.java:389)
>
> at org.ops4j.pax.web.service.internal.HttpServiceProxy.registerFilter
> (HttpServiceProxy.java:153)
>
> at org.ops4j.pax.web.extender.war.internal.RegisterWebAppVisitorWC.visit
> (RegisterWebAppVisitorWC.java:231)
>
> at org.ops4j.pax.web.extender.war.internal.model.WebApp.accept
> (WebApp.java:517)
>
> at
> org.ops4j.pax.web.extender.war.internal.WebAppPublisher
> $HttpServiceListener.register(WebAppPublisher.java:170)
>
> at
> org.ops4j.pax.web.extender.war.internal.WebAppPublisher
> $HttpServiceListener.serviceChanged(WebAppPublisher.java:155)
>
> at
> org.ops4j.pax.web.extender.war.internal.WebAppPublisher
> $HttpServiceListener.serviceChanged(WebAppPublisher.java:119)
>
> at
> org
> .ops4j
> .pax
> .swissbox
> .tracker.ReplaceableService.setService(ReplaceableService.java:114)
>
> at
> org.ops4j.pax.swissbox.tracker.ReplaceableService.access
> $100(ReplaceableService.java:28)
>
> at org.ops4j.pax.swissbox.tracker.ReplaceableService
> $CollectionListener.serviceAdded(ReplaceableService.java:183)
>
> at org.ops4j.pax.swissbox.tracker.ServiceCollection
> $Tracker.addingService(ServiceCollection.java:181)
>
> 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.trackInitial(AbstractTracked.java:
> 184)
>
> at
> org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:339)
>
> at
> org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:273)
>
> at
> org
> .ops4j
> .pax
> .swissbox.tracker.ServiceCollection.onStart(ServiceCollection.java:
> 139)
>
> at org.ops4j.pax.swissbox.lifecycle.AbstractLifecycle
> $Stopped.start(AbstractLifecycle.java:121)
>
> at
> org
> .ops4j
> .pax
> .swissbox.lifecycle.AbstractLifecycle.start(AbstractLifecycle.java:49)
>
> at
> org
> .ops4j
> .pax
> .swissbox.tracker.ReplaceableService.onStart(ReplaceableService.java:
> 146)
>
> at org.ops4j.pax.swissbox.lifecycle.AbstractLifecycle
> $Stopped.start(AbstractLifecycle.java:121)
>
> at
> org
> .ops4j
> .pax
> .swissbox.lifecycle.AbstractLifecycle.start(AbstractLifecycle.java:49)
>
> at org.ops4j.pax.web.extender.war.internal.WebAppPublisher.publish
> (WebAppPublisher.java:81)
>
> at org.ops4j.pax.web.extender.war.internal.WebXmlObserver.addingEntries
> (WebXmlObserver.java:131)
>
> at
> org
> .ops4j
> .pax.swissbox.extender.BundleWatcher.register(BundleWatcher.java:186)
>
> at org.ops4j.pax.swissbox.extender.BundleWatcher.access
> $000(BundleWatcher.java:45)
>
> at org.ops4j.pax.swissbox.extender.BundleWatcher
> $1.bundleChanged(BundleWatcher.java:127)
>
> at
> org
> .apache
> .felix
> .framework
> .util
> .EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:
> 800)
>
> at
> org
> .apache
> .felix
> .framework
> .util.EventDispatcher.fireEventImmediately(EventDispatcher.java:728)
>
> at
> org
> .apache
> .felix
> .framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:
> 610)
>
> at
> org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:3576)
>
> at
> org.apache.felix.framework.Felix.startBundle(Felix.java:1650)
>
> at
> org.apache.felix.framework.BundleImpl.start(BundleImpl.java:915)
>
> at
> org.apache.felix.framework.BundleImpl.start(BundleImpl.java:902)
>
> at
> org
> .apache
> .felix.karaf.shell.osgi.StartBundle.doExecute(StartBundle.java:29)
>
> at
> org
> .apache
> .felix.karaf.shell.osgi.BundlesCommand.doExecute(BundlesCommand.java:
> 49)
>
> at
> org
> .apache
> .felix
> .karaf
> .shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:41)
>
> at
> org
> .apache
> .felix
> .gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:34)
>
> at
> org
> .apache
> .felix.gogo.runtime.shell.CommandProxy.execute(CommandProxy.java:45)
>
> at
> org.apache.felix.gogo.runtime.shell.Closure.execute(Closure.java:211)
>
> at
> org
> .apache
> .felix.gogo.runtime.shell.Closure.executeStatement(Closure.java:146)
>
> at
> org.apache.felix.gogo.runtime.shell.Pipe.run(Pipe.java:91)
>
> at
> org.apache.felix.gogo.runtime.shell.Closure.execute(Closure.java:75)
>
> at
> org
> .apache
> .felix
> .gogo
> .runtime.shell.CommandSessionImpl.execute(CommandSessionImpl.java:71)
>
> at
> org.apache.felix.karaf.shell.console.jline.Console.run(Console.java:
> 174)
>
> at java.lang.Thread.run(Thread.java:619)
>
>
>
> Regards,
>
>
>
> Charles Moulliard
> Senior Enterprise Architect / Project Delivery Manager
>
> Xpectis
> 12, route d'Esch
> L-1470 Luxembourg
>
> Phone +352 25 10 70 470
> Mobile +352 621 45 36 22
> Fax +352 25 10 70 295
>
> e-mail [hidden email]
> web site www.xpectis.com
>
> From: Paul Sandoz [via Jersey] [mailto:[hidden email]]
> Sent: vendredi 8 janvier 2010 14:10
> To: cmoulliard
> Subject: Re: [Jersey]
> com.sun.jersey.core.spi.scanning.ScannerException: The URI scheme
> bundle of the URI bundle://88.0:1/org/apache/camel/web is not
> supported. Package scanning deployment is not supported for such URIs.
>
>
>
> Hi Charles,
>
> Jersey does not currently work properly in an OSGi container.
>
> Jakub is working on this, in a branch:
>
> https://jersey.dev.java.net/svn/jersey/branches/jersey-servicemix
>
> We need some help verify and testing this. If you have time would you
> like to check out and build the branch and use the artifacts generated
> from that?
>
> Note that the class scanning to detect root resource and provider
> classes is still an open issue with OSGi so you will need to
> explicitly register those classes.
>
> Paul.
>
> On Jan 8, 2010, at 1:57 PM, cmoulliard wrote:
>
>
> >
> > When deploying Jersey project 1.1.5 in OSGI server running HTTP
> > SErvice and
> > jeety, I have the following error :
> >
> > 13:50:55,828 | INFO | l Console Thread |
> > WebApplicationImpl |
> > l.application.WebApplicationImpl 602 | Initiating Jersey
> application,
> > version 'Jersey: 1.1.5-ea-SNAPSHOT 01/07/2010 02:57 PM'
> > 13:50:55,859 | INFO | l Console Thread |
> > PackagesResourceConfig |
> > .api.core.PackagesResourceConfig 107 | Scanning for root resource
> and
> > provider classes in the packages:
> > org.apache.camel.web
> > 13:50:55,875 | ERROR | l Console Thread |
> > ProviderFactory |
> > re.spi.component.ProviderFactory 190 | The provider class, class
> > org.apache.camel.web.util.CamelResourceConfig, could not be
> > instantiated.
> > Processing will continue but the class will not be utilized
> > com.sun.jersey.core.spi.scanning.ScannerException: The URI scheme
> > bundle of
> > the URI bundle://88.0:1/org/apache/camel/web is not supported.
> Package
> > scanning deployment is not supported for such URIs.
> > Try using a different deployment mechanism such as explicitly
> > declaring root
> > resource and provider classes using an extension of
> > javax.ws.rs.core.Application
> > at
> > com
> > .sun
> > .jersey
> >
> .core.spi.scanning.PackageNamesScanner.scan(PackageNamesScanner.java:
> > 137)
> > at
> > com
> > .sun
> > .jersey
> >
> .core.spi.scanning.PackageNamesScanner.scan(PackageNamesScanner.java:
> > 121)
> > at
> > com
> > .sun
> > .jersey
> > .api.core.ScanningResourceConfig.init(ScanningResourceConfig.java:
> 69)
> > at
> > com
> > .sun
> > .jersey
> > .api.core.PackagesResourceConfig.init(PackagesResourceConfig.java:
> 110)
> > at
> > com
> > .sun
> > .jersey
> > .api.core.PackagesResourceConfig.<init>(PackagesResourceConfig.java:
> > 76)
> > at
> > com
> > .sun
> > .jersey
> > .api.core.PackagesResourceConfig.<init>(PackagesResourceConfig.java:
> > 87)
> > at
> > org
> > .apache
> > .camel.web.util.CamelResourceConfig.<init>(CamelResourceConfig.java:
> > 37)
> > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> > Method)
> > at
> > sun
> > .reflect
> > .NativeConstructorAccessorImpl
> > .newInstance(NativeConstructorAccessorImpl.java:39)
> > at
> > sun
> > .reflect
> > .DelegatingConstructorAccessorImpl
> > .newInstance(DelegatingConstructorAccessorImpl.java:27)
> > at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
> > at java.lang.Class.newInstance0(Class.java:355)
> > at java.lang.Class.newInstance(Class.java:308)
> >
> > Any idea How to avoid this ?
> >
> > Regards,
> >
> > Charles
> > --
> > View this message in context: http://n2.nabble.com/com-sun-jersey-core-spi-scanning-ScannerException-The-URI-scheme-bundle-of-the-URI-bundle-88-0-1-org-tp4272221p4272221.html
> > Sent from the Jersey mailing list archive at Nabble.com.
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
> View message @ http://n2.nabble.com/com-sun-jersey-core-spi-scanning-ScannerException-The-URI-scheme-bundle-of-the-URI-bundle-88-0-1-org-tp4272221p4272281.html
> To unsubscribe from
> com.sun.jersey.core.spi.scanning.ScannerException: The URI scheme
> bundle of the URI bundle://88.0:1/org/apache/camel/web is not
> supported. Package scanning deployment is not supported for such
> URIs., click here.
>
>
>
> **********************************************************************
>
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. If you have received this email in error please
> notify the system manager.
>
> This footnote also confirms that this email message has been swept
> for the presence of computer viruses.
>
> XPECTIS - Streamlined Solutions & Services S.A.
>
> **********************************************************************
>
>
>
> View this message in context: RE: [Jersey]
> com.sun.jersey.core.spi.scanning.ScannerException: T he URI scheme
> bundle of the URI bundle://88.0:1/org/apache/camel/web is n ot
> supported. Package scanning deployment is not supported for such URIs.
> Sent from the Jersey mailing list archive at Nabble.com.