You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Dave Smith <da...@candata.com> on 2013/10/29 16:15:06 UTC

Declarative Services

I posted a bug a few weeks back and the thought was a new version is coming
soon. Since it was more of an annoyance I decided to wait. I am now having
an intermittent problem with a service not getting activated. Here is a
snippet from the log

2013-10-29 10:49:27 4
[com.candata.core.server.impl.ServiceConfigurationImpl]
getParameterClass: Found class
com.candata.core.server.services.RunAsService
com.candata.core.server_1.0.0 [141] null null
2013-10-29 10:49:27 4
[com.candata.core.server.impl.ServiceConfigurationImpl] doFindMethod:
No method taking ServiceReference found, checking method taking
com.candata.core.server.services.RunAsService
com.candata.core.server_1.0.0 [141] null null
2013-10-29 10:49:27 4
[com.candata.core.server.impl.ServiceConfigurationImpl] Found bind
method: protected void
com.candata.core.server.impl.ServiceConfigurationImpl.setRunAsService(com.candata.core.server.services.RunAsService)
com.candata.core.server_1.0.0 [141] null null
2013-10-29 10:49:27 4 [com.candata.core.server.impl.ServiceRunnerImpl]
dependency map already present, do not collect dependencies
com.candata.core.server_1.0.0 [141] null null
2013-10-29 10:49:27 4 [com.candata.core.server.impl.ServiceRunnerImpl]
getService did not win collecting dependencies, try creating object
anyway. com.candata.core.server_1.0.0 [141] null null
2013-10-29 10:49:27 3 FrameworkEvent WARNING
com.candata.core.server_1.0.0 [141] null null
2013-10-29 10:49:27 2
[com.candata.core.server.impl.ServiceConfigurationImpl] Could not get
service from ref {com.candata.core.server.services.ServiceRunner,
com.candata.core.server.services.RunAsService}={component.name=com.candata.core.server.impl.ServiceRunnerImpl,
 component.id=233, service.id=91} com.candata.core.server_1.0.0 [141] null null

 If -> getService did not win collecting dependencies, try creating object
anyway

then the service never gets activated , if it wins then it does.  I
can see by the logs that the service is registered with OSGI farther
up


2013-10-29 10:49:27 3 ServiceEvent REGISTERED
com.candata.core.server_1.0.0 [141]
{com.candata.core.server.services.ServiceRunner,
com.candata.core.server.services.RunAsService}={component.name=com.candata.core.server.impl.ServiceRunnerImpl,
component.id=233, service.id=91} null

Is the next release soon? Or has this code not changed and could be
considered a bug

Re: Declarative Services

Posted by Dave Smith <da...@candata.com>.
Both components are immediate components   (@Component(immediate=true))

Dave Smith
Candata Ltd.
416-493-9020x2413
Direct: 416-855-2413


On Wed, Oct 30, 2013 at 5:03 PM, Dave Smith <da...@candata.com> wrote:

> OK. So I managed to pull the Snapshot from last night. Same problem.
>
> So here is where it registers
>
> 2013-10-30 04:34:15 4 [com.candata.core.server.impl.ServiceConfigurationImpl(220)] dm KeyValueDAO tracking 5 SingleStatic added {com.candata.util.common.services.KeyValueDAO}=
>
> {component.name=com.candata.util.server.impl.KeyValueDAOImpl, component.id=39, service.exported.interfaces=*, service.id=130} (enter) com.candata.core.server_1.0.0 [141] null null
> 2013-10-30 04:34:15 4 [com.candata.core.server.impl.ServiceConfigurationImpl(220)] ActivateInternal com.candata.core.server_1.0.0 [141] null null
> 2013-10-30 04:34:15 4 [com.candata.core.server.impl.ServiceConfigurationImpl(220)] Activating component from state 4 com.candata.core.server_1.0.0 [141] null null
> 2013-10-30 04:34:15 4 [com.candata.core.server.impl.ServiceConfigurationImpl(220)] registration change queue [registered] com.candata.core.server_1.0.0 [141] null null
> 2013-10-30 04:34:15 3 ServiceEvent REGISTERED com.candata.core.server_1.0.0 [141] {com.candata.core.server.services.ServiceConfiguration}=
> {component.name=com.candata.core.server.impl.ServiceConfigurationImpl, component.id=220, service.id=133} null
>
>
>
> And when it is injecting the references ...
>
>
> 2013-10-30 04:34:15 4 [com.candata.core.server.impl.ServiceConfigurationImpl(220)] Declared Method com.candata.core.server.impl.ServiceConfigurationImpl.setRunAsService([interface org.osgi.framework.ServiceReference]) not found com.candata.core.server_1.0.0 [141] null null
> 2013-10-30 04:34:15 4 [com.candata.core.server.impl.ServiceConfigurationImpl(220)] getParameterClass: Looking for interface class com.candata.core.server.services.RunAsService through loader of com.candata.core.server.impl.ServiceConfigurationImpl com.candata.core.server_1.0.0 [141] null null
> 2013-10-30 04:34:15 4 [com.candata.core.server.impl.ServiceConfigurationImpl(220)] getParameterClass: Found class com.candata.core.server.services.RunAsService com.candata.core.server_1.0.0 [141] null null
> 2013-10-30 04:34:15 4 [com.candata.core.server.impl.ServiceConfigurationImpl(220)] doFindMethod: No method taking ServiceReference found, checking method taking com.candata.core.server.services.RunAsService com.candata.core.server_1.0.0 [141] null null
> 2013-10-30 04:34:15 4 [com.candata.core.server.impl.ServiceConfigurationImpl(220)] Found bind method: protected void com.candata.core.server.impl.ServiceConfigurationImpl.setRunAsService(com.candata.core.server.services.RunAsService) com.candata.core.server_1.0.0 [141] null null
> 2013-10-30 04:34:15 2 [com.candata.core.server.impl.ServiceConfigurationImpl(220)] Could not get service from ref {com.candata.core.server.services.ServiceRunner, com.candata.core.server.services.RunAsService}={component.name=com.candata.core.server.impl.ServiceRunnerImpl, component.id=223, service.id=92} com.candata.core.server_1.0.0 [141] null null
> 2013-10-30 04:34:15 3 FrameworkEvent WARNING com.candata.core.server_1.0.0 [141] null null
> 2013-10-30 04:34:15 4 [com.candata.core.server.impl.ServiceConfigurationImpl(220)] Deactivating dependency managers com.candata.core.server_1.0.0 [141] null null
>
> The only different thing about the RunAsService is that one impl is registered as more than service ..
>
>  Here is the registration above
> 2013-10-30 04:34:14 3 ServiceEvent REGISTERED com.candata.core.server_1.0.0 [141] {com.candata.core.server.services.ServiceRunner, com.candata.core.server.services.RunAsService}=
>
> {component.name=com.candata.core.server.impl.ServiceRunnerImpl, component.id=223, service.id=92} null
>
> and the activate
> 013-10-30 04:34:14 4 [com.candata.core.server.impl.ServiceRunnerImpl(223)] Found activate method: protected void com.candata.core.server.impl.ServiceRunnerImpl.activate(org.osgi.framework.BundleContext) throws java.lang.Exception com.candata.core.server_1.0.0 [141] null null
> 2013-10-30 04:34:14 4 [com.candata.core.server.impl.ServiceRunnerImpl(223)] invoking activate: activate com.candata.core.server_1.0.0 [141] null null
>
>
> Let me know if you need any more info , debugging code etc ...
>
>
>
>
> On Wed, Oct 30, 2013 at 1:09 PM, David Jencks <da...@yahoo.com>wrote:
>
>> There's another release candidate out that you could try, see the vote
>> email.
>>
>> I don't commit if I have test failures, and I've never seen the problem
>> you show below.  I suspect a maven issue.
>>
>> In the future please try to include enough information so that someone
>> who is not already having the exact same problem you are can figure out
>> what you are doing.  It's pretty safe to assume that the code in svn works
>> well for the developers  so they probably don't know how to reproduce a
>> problem you see.
>>
>> thanks
>> david jencks
>>
>> On Oct 30, 2013, at 6:32 AM, Dave Smith <da...@candata.com> wrote:
>>
>> > Now the test cases are failing ..
>> >
>> > FYI:
>> >
>> > [INFO] --- org.apache.aries.versioning.plugin:0.1.0:version-check
>> > (default-verify) @ org.apache.felix.scr ---
>> > [WARNING] Error injecting:
>> > org.apache.aries.versioning.mojo.VersionCheckerMojo
>> > java.lang.NoClassDefFoundError:
>> > org/sonatype/aether/resolution/ArtifactResolutionException
>> >
>> > Caused by: java.lang.ClassNotFoundException:
>> > org.sonatype.aether.resolution.ArtifactResolutionException
>> >        at
>> >
>> org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
>> >        at
>> >
>> org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:259)
>> >        at
>> >
>> org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:242)
>> >        at
>> >
>> org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:227)
>> >
>> >
>> > Looks like you are still a bit raw. Give me a heads up when you are a
>> > little closer and I will test here.....
>> >
>> >
>> >
>> > On Tue, Oct 29, 2013 at 7:39 PM, David Jencks <david_jencks@yahoo.com
>> >wrote:
>> >
>> >> Ah, I'm sort of in the middle of a release.
>> >>
>> >> You can alter the scr pom locally to point to 1.5.0-SNAPSHOT, get the
>> 1.4
>> >> release candidate from
>> >> https://repository.apache.org/content/repositories/orgapachefelix-024/
>> ,
>> >> or build the 1.4 release candidate from
>> >>
>> >>
>> >>
>> https://svn.apache.org/repos/asf/felix/releases/org.apache.felix.utils-1.4.0
>> >>
>> >> hope this helps
>> >> david jencks
>> >>
>> >> On Oct 29, 2013, at 11:36 AM, Dave Smith <da...@candata.com>
>> wrote:
>> >>
>> >>> [INFO] Building Apache Felix Declarative Services 1.7-SNAPSHOT
>> >>> [INFO]
>> >>>
>> ------------------------------------------------------------------------
>> >>> [WARNING] The POM for
>> org.apache.felix:org.apache.felix.utils:jar:1.4.0
>> >> is
>> >>> missing, no dependency information available
>> >>> [INFO]
>> >>>
>> ------------------------------------------------------------------------
>> >>>
>> >>> [ERROR] Failed to execute goal on project org.apache.felix.scr: Could
>> not
>> >>> resolve dependencies for project
>> >>> org.apache.felix:org.apache.felix.scr:bundle:1.7-SNAPSHOT: Failure to
>> >> find
>> >>> org.apache.felix:org.apache.felix.utils:jar:1.4.0 in
>> >>> http://repo.maven.apache.org/maven2 was cached in the local
>> repository,
>> >>> resolution will not be reattempted until the update interval of
>> central
>> >> has
>> >>> elapsed or updates are forced -> [Help 1]
>> >>>
>> >>>
>> >>>
>> >>> On Tue, Oct 29, 2013 at 2:04 PM, David Jencks <david_jencks@yahoo.com
>> >>> wrote:
>> >>>
>> >>>> Well, the 1.7-SNAPSHOT in the apache nexus snapshot repo is up to
>> date.
>> >>>>
>> >>>> I run mvn clean install in scr with no problems, using maven 3.0.4.
>> >> What
>> >>>> problems are you seeing?
>> >>>>
>> >>>> thanks
>> >>>> david jencks
>> >>>>
>> >>>> On Oct 29, 2013, at 10:54 AM, Dave Smith <da...@candata.com>
>> >> wrote:
>> >>>>
>> >>>>> I tried following the instructions but It seems the scr is not
>> built in
>> >>>> and
>> >>>>> when I try and run mvn in the scr dir that does not work either.
>> >>>>>
>> >>>>> I am following ...
>> >>>>>
>> >>>>> http://felix.apache.org/site/building-felix.html
>> >>>>>
>> >>>>> instructuctions
>> >>>>>
>> >>>>> Dave Smith
>> >>>>> Candata Ltd.
>> >>>>> 416-493-9020x2413
>> >>>>> Direct: 416-855-2413
>> >>>>>
>> >>>>>
>> >>>>> On Tue, Oct 29, 2013 at 11:41 AM, Dave Smith <
>> dave.smith@candata.com>
>> >>>> wrote:
>> >>>>>
>> >>>>>> Latest 1.6.2. I will grab the snapshot and report back...
>> >>>>>>
>> >>>>>> Dave Smith
>> >>>>>> Candata Ltd.
>> >>>>>> 416-493-9020x2413
>> >>>>>> Direct: 416-855-2413
>> >>>>>>
>> >>>>>>
>> >>>>>> On Tue, Oct 29, 2013 at 11:38 AM, David Jencks <
>> >> david_jencks@yahoo.com
>> >>>>> wrote:
>> >>>>>>
>> >>>>>>> Not telling us the exact version of the code you are using makes
>> it
>> >>>>>>> pretty much impossible to think about investigating this.
>> >>>>>>>
>> >>>>>>> Please see if this is a problem with the current trunk code which
>> you
>> >>>> can
>> >>>>>>> build yourself or use the 1.7-SNAPSHOT on the apache snapshot
>> repo.
>> >>>>>>>
>> >>>>>>> I'm working on a release and at this point we're finding and
>> fixing
>> >>>> bugs.
>> >>>>>>> When we've stopped finding bugs I'll release.
>> >>>>>>>
>> >>>>>>> thanks
>> >>>>>>> david jencks
>> >>>>>>>
>> >>>>>>> On Oct 29, 2013, at 8:15 AM, Dave Smith <da...@candata.com>
>> >>>> wrote:
>> >>>>>>>
>> >>>>>>>> I posted a bug a few weeks back and the thought was a new
>> version is
>> >>>>>>> coming
>> >>>>>>>> soon. Since it was more of an annoyance I decided to wait. I am
>> now
>> >>>>>>> having
>> >>>>>>>> an intermittent problem with a service not getting activated.
>> Here
>> >> is
>> >>>> a
>> >>>>>>>> snippet from the log
>> >>>>>>>>
>> >>>>>>>> 2013-10-29 10:49:27 4
>> >>>>>>>> [com.candata.core.server.impl.ServiceConfigurationImpl]
>> >>>>>>>> getParameterClass: Found class
>> >>>>>>>> com.candata.core.server.services.RunAsService
>> >>>>>>>> com.candata.core.server_1.0.0 [141] null null
>> >>>>>>>> 2013-10-29 10:49:27 4
>> >>>>>>>> [com.candata.core.server.impl.ServiceConfigurationImpl]
>> >> doFindMethod:
>> >>>>>>>> No method taking ServiceReference found, checking method taking
>> >>>>>>>> com.candata.core.server.services.RunAsService
>> >>>>>>>> com.candata.core.server_1.0.0 [141] null null
>> >>>>>>>> 2013-10-29 10:49:27 4
>> >>>>>>>> [com.candata.core.server.impl.ServiceConfigurationImpl] Found
>> bind
>> >>>>>>>> method: protected void
>> >>>>>>>>
>> >>>>>>>
>> >>>>
>> >>
>> com.candata.core.server.impl.ServiceConfigurationImpl.setRunAsService(com.candata.core.server.services.RunAsService)
>> >>>>>>>> com.candata.core.server_1.0.0 [141] null null
>> >>>>>>>> 2013-10-29 10:49:27 4
>> >> [com.candata.core.server.impl.ServiceRunnerImpl]
>> >>>>>>>> dependency map already present, do not collect dependencies
>> >>>>>>>> com.candata.core.server_1.0.0 [141] null null
>> >>>>>>>> 2013-10-29 10:49:27 4
>> >> [com.candata.core.server.impl.ServiceRunnerImpl]
>> >>>>>>>> getService did not win collecting dependencies, try creating
>> object
>> >>>>>>>> anyway. com.candata.core.server_1.0.0 [141] null null
>> >>>>>>>> 2013-10-29 10:49:27 3 FrameworkEvent WARNING
>> >>>>>>>> com.candata.core.server_1.0.0 [141] null null
>> >>>>>>>> 2013-10-29 10:49:27 2
>> >>>>>>>> [com.candata.core.server.impl.ServiceConfigurationImpl] Could not
>> >> get
>> >>>>>>>> service from ref {com.candata.core.server.services.ServiceRunner,
>> >>>>>>>> com.candata.core.server.services.RunAsService}={component.name
>> >>>>>>> =com.candata.core.server.impl.ServiceRunnerImpl,
>> >>>>>>>> component.id=233, service.id=91} com.candata.core.server_1.0.0
>> >> [141]
>> >>>>>>> null null
>> >>>>>>>>
>> >>>>>>>> If -> getService did not win collecting dependencies, try
>> creating
>> >>>>>>> object
>> >>>>>>>> anyway
>> >>>>>>>>
>> >>>>>>>> then the service never gets activated , if it wins then it does.
>>  I
>> >>>>>>>> can see by the logs that the service is registered with OSGI
>> farther
>> >>>>>>>> up
>> >>>>>>>>
>> >>>>>>>>
>> >>>>>>>> 2013-10-29 10:49:27 3 ServiceEvent REGISTERED
>> >>>>>>>> com.candata.core.server_1.0.0 [141]
>> >>>>>>>> {com.candata.core.server.services.ServiceRunner,
>> >>>>>>>> com.candata.core.server.services.RunAsService}={component.name
>> >>>>>>> =com.candata.core.server.impl.ServiceRunnerImpl,
>> >>>>>>>> component.id=233, service.id=91} null
>> >>>>>>>>
>> >>>>>>>> Is the next release soon? Or has this code not changed and could
>> be
>> >>>>>>>> considered a bug
>> >>>>>>>
>> >>>>>>>
>> >>>>>>>
>> ---------------------------------------------------------------------
>> >>>>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> >>>>>>> For additional commands, e-mail: users-help@felix.apache.org
>> >>>>>>>
>> >>>>>>>
>> >>>>>>
>> >>>>
>> >>>>
>> >>>> ---------------------------------------------------------------------
>> >>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> >>>> For additional commands, e-mail: users-help@felix.apache.org
>> >>>>
>> >>>>
>> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> >> For additional commands, e-mail: users-help@felix.apache.org
>> >>
>> >>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
>

Re: Declarative Services

Posted by Dave Smith <da...@candata.com>.
There is no circular dependency. Here is the graph ..


ServiceConfigurationImpl ->
Logger,PersistenceService,RunAsService,KeyValueDAO

PersistenceService -> Connection

KeyValueDAO ->  PersistenceService,Connection,Logger

RunAsService-> DataSource,Logger, DefaultUserService , activate registers a
Connection


ServiceConfigurationImpl is the problem. It has logger resolved.
RunAsService is activated and in there it registers the connection. This
causes PersistenceService to activate, which then causes KeyValueDAO to
activate and then ServiceConfigurationImpl is now resolved , but when it
goes to inject the RunAsService it is has not exited the activate method.
Back trace below..



 LockInfo: null LockOwnerId: -1 LockOwnerName: null
  sun.management.ThreadImpl.dumpThreads0(Native Method)
  sun.management.ThreadImpl.dumpAllThreads(ThreadImpl.java:374)
  org.apache.felix.scr.impl.manager.ThreadDump.call(ThreadDump.java:36)
  org.apache.felix.scr.impl.manager.AbstractComponentManager.dumpThreads(AbstractComponentManager.java:258)
  org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:780)
  org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:761)
  org.eclipse.osgi.internal.serviceregistry.ServiceUse$1.run(ServiceUse.java:141)
  java.security.AccessController.doPrivileged(Native Method)
  org.eclipse.osgi.internal.serviceregistry.ServiceUse.getService(ServiceUse.java:139)
  org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:468)
  org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.getService(ServiceRegistry.java:467)
  org.eclipse.osgi.framework.internal.core.BundleContextImpl.getService(BundleContextImpl.java:594)
  org.apache.felix.scr.impl.helper.BindMethod.getServiceObject(BindMethod.java:572)
  org.apache.felix.scr.impl.manager.DependencyManager.getServiceObject(DependencyManager.java:1961)
  org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.prebind(DependencyManager.java:969)
  org.apache.felix.scr.impl.manager.DependencyManager.prebind(DependencyManager.java:1392)
  org.apache.felix.scr.impl.manager.AbstractComponentManager.collectDependencies(AbstractComponentManager.java:1097)
  org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:791)
  org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:827)
  org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:907)
  org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:871)
  org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1477)
  org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1398)
  org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.trackAdding(ServiceTracker.java:1210)
  org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.track(ServiceTracker.java:1148)
  org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1429)
  org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:107)
  org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:861)
  org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
  org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
  org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:819)
  org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:771)
  org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130)
  org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:214)
  org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:433)
  org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:983)
  org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:972)
  org.apache.felix.scr.impl.manager.RegistrationManager.changeRegistration(RegistrationManager.java:134)
  org.apache.felix.scr.impl.manager.AbstractComponentManager.registerService(AbstractComponentManager.java:1024)
  org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:818)
  org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:907)
  org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:871)
  org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1477)
  org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1398)
  org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.trackAdding(ServiceTracker.java:1210)
  org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.track(ServiceTracker.java:1148)
  org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1429)
  org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:107)
  org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:861)
  org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
  org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
  org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:819)
  org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:771)
  org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130)
  org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:214)
  org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:433)
  org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:451)
  org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:950)
  com.candata.core.server.impl.ServiceRunnerImpl.activate(ServiceRunnerImpl.java:45)
  sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  java.lang.reflect.Method.invoke(Method.java:597)
  org.apache.felix.scr.impl.helper.BaseMethod.invokeMethod(BaseMethod.java:231)
  org.apache.felix.scr.impl.helper.BaseMethod.access$500(BaseMethod.java:39)
  org.apache.felix.scr.impl.helper.BaseMethod$Resolved.invoke(BaseMethod.java:624)
  org.apache.felix.scr.impl.helper.BaseMethod.invoke(BaseMethod.java:508)
  org.apache.felix.scr.impl.helper.ActivateMethod.invoke(ActivateMethod.java:149)
  org.apache.felix.scr.impl.manager.SingleComponentManager.createImplementationObject(SingleComponentManager.java:300)
  org.apache.felix.scr.impl.manager.SingleComponentManager.createComponent(SingleComponentManager.java:127)
  org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:855)
  org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:822)
  org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:827)
  org.apache.felix.scr.impl.manager.AbstractComponentManager.enable(AbstractComponentManager.java:414)
  org.apache.felix.scr.impl.config.ConfigurableComponentHolder.enableComponents(ConfigurableComponentHolder.java:378)
  org.apache.felix.scr.impl.BundleComponentActivator.initialize(BundleComponentActivator.java:167)
  org.apache.felix.scr.impl.BundleComponentActivator.<init>(BundleComponentActivator.java:115)
  org.apache.felix.scr.impl.Activator.loadComponents(Activator.java:235)
  org.apache.felix.scr.impl.Activator.access$000(Activator.java:44)
  org.apache.felix.scr.impl.Activator$1.start(Activator.java:169)
  org.apache.felix.utils.extender.AbstractExtender.createExtension(AbstractExtender.java:254)
  org.apache.felix.utils.extender.AbstractExtender.modifiedBundle(AbstractExtender.java:227)
  org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:479)
  org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:414)
  org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:232)
  org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:443)
  org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:847)
  org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
  org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
  org.eclipse.osgi.framework.internal.core.Framework.publishBundleEventPrivileged(Framework.java:1568)
  org.eclipse.osgi.framework.internal.core.Framework.publishBundleEvent(Framework.java:1504)
  org.eclipse.osgi.framework.internal.core.Framework.publishBundleEvent(Framework.java:1499)
  org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:391)
  org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:390)
  org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1176)
  org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:559)
  org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:544)
  org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:457)
  org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)
  org.eclipse.osgi.framework.internal.core.EquinoxLauncher.internalStart(EquinoxLauncher.java:271)
  org.eclipse.osgi.framework.internal.core.EquinoxLauncher.start(EquinoxLauncher.java:241)
  org.eclipse.osgi.launch.Equinox.start(Equinox.java:258)
  com.candata.server.boot.Launcher.start(Launcher.java:136)


Dave Smith
Candata Ltd.
416-493-9020x2413
Direct: 416-855-2413


On Fri, Nov 1, 2013 at 5:43 AM, Pierre De Rop <pi...@gmail.com>wrote:

> Hi David,
>
> I'm not sure whether I fully understand or not, can you please clarify and
> describe with more details the circular dependency involved in this problem
> ?
>
> As far as I understand what you are describing:
>
> - C is immediate, enabled, and has two required references on both A, B.
> - A is enabled and activating. And from it's activate method, A manually
> registers B (using bundleContext.registerService).
>
> Then, where is the dependency cycle ?
>
> C -> A, B
>
> but are A and/or B also depending on C ?
>
>
> thanks;
> /Pierre
>
>
>
>
> On Fri, Nov 1, 2013 at 7:53 AM, David Jencks <da...@yahoo.com>
> wrote:
>
> > After some investigation offline we determined that there was effectively
> > a circular dependency that was sometimes preventing some of the services
> > from activating immediately.  Abstracting slightly…
> > component/service A registered service B in its activate method.
> Immediate
> > component C has mandatory dependencies on A and B.  If C is enabled
> before
> > A, then A's activation will result in a problem as B will be registered
> > while the thread is still in A's activate method, so the component
> instance
> > cannot be returned from a getService call.  Sometimes this circle is
> > detected by the service registry and sometimes by the DS circular
> > dependency detector.
> >
> > One solution is to register B in a separate thread started from A's
> > activate method.
> >
> > In general, this illustrates that registering services from within DS
> > lifecycle methods is apt to cause locking problems and should be avoided
> if
> > at all possible.
> >
> > thanks
> > david jencks
> >
> > On Oct 30, 2013, at 3:10 PM, Dave Smith <da...@candata.com> wrote:
> >
> > > Never see it. I will send you a copy of the full log off list. The only
> > > other interesting thing is the Activate method in ServiceRunner does
> > > register 3 other services that will be injected in components.
> > >
> > > Dave Smith
> > > Candata Ltd.
> > > 416-493-9020x2413
> > > Direct: 416-855-2413
> > >
> > >
> > > On Wed, Oct 30, 2013 at 5:52 PM, David Jencks <david_jencks@yahoo.com
> > >wrote:
> > >
> > >> Does the activate method on ServiceRunnerImpl return? there should be
> a
> > >> log entry from
> > >>
> > >>                logger.log( LogService.LOG_DEBUG, "invoked {0}: {1}:
> > >> parameters {2}", new Object[]
> > >>                    { getMethodNamePrefix(), getMethodName(),
> > >> Arrays.asList( params ) }, null );
> > >>
> > >> Are there really no log statements between "found bind method" and
> > "could
> > >> not get service"?
> > >>
> > >> thanks
> > >> david jencks
> > >>
> > >>
> > >> On Oct 30, 2013, at 2:03 PM, Dave Smith <da...@candata.com>
> wrote:
> > >>
> > >>> OK. So I managed to pull the Snapshot from last night. Same problem.
> > >>>
> > >>> So here is where it registers
> > >>>
> > >>> 2013-10-30 04:34:15 4
> > >>> [com.candata.core.server.impl.ServiceConfigurationImpl(220)] dm
> > >>> KeyValueDAO tracking 5 SingleStatic added
> > >>> {com.candata.util.common.services.KeyValueDAO}=
> > >>> {component.name=com.candata.util.server.impl.KeyValueDAOImpl,
> > >>> component.id=39, service.exported.interfaces=*, service.id=130}
> > >>> (enter) com.candata.core.server_1.0.0 [141] null null
> > >>> 2013-10-30 04:34:15 4
> > >>> [com.candata.core.server.impl.ServiceConfigurationImpl(220)]
> > >>> ActivateInternal com.candata.core.server_1.0.0 [141] null null
> > >>> 2013-10-30 04:34:15 4
> > >>> [com.candata.core.server.impl.ServiceConfigurationImpl(220)]
> > >>> Activating component from state 4 com.candata.core.server_1.0.0 [141]
> > >>> null null
> > >>> 2013-10-30 04:34:15 4
> > >>> [com.candata.core.server.impl.ServiceConfigurationImpl(220)]
> > >>> registration change queue [registered] com.candata.core.server_1.0.0
> > >>> [141] null null
> > >>> 2013-10-30 04:34:15 3 ServiceEvent REGISTERED
> > >>> com.candata.core.server_1.0.0 [141]
> > >>> {com.candata.core.server.services.ServiceConfiguration}=
> > >>> {component.name
> =com.candata.core.server.impl.ServiceConfigurationImpl,
> > >>> component.id=220, service.id=133} null
> > >>>
> > >>>
> > >>>
> > >>> And when it is injecting the references ...
> > >>>
> > >>>
> > >>> 2013-10-30 04:34:15 4
> > >>> [com.candata.core.server.impl.ServiceConfigurationImpl(220)] Declared
> > >>> Method
> > >>
> >
> com.candata.core.server.impl.ServiceConfigurationImpl.setRunAsService([interface
> > >>> org.osgi.framework.ServiceReference]) not found
> > >>> com.candata.core.server_1.0.0 [141] null null
> > >>> 2013-10-30 04:34:15 4
> > >>> [com.candata.core.server.impl.ServiceConfigurationImpl(220)]
> > >>> getParameterClass: Looking for interface class
> > >>> com.candata.core.server.services.RunAsService through loader of
> > >>> com.candata.core.server.impl.ServiceConfigurationImpl
> > >>> com.candata.core.server_1.0.0 [141] null null
> > >>> 2013-10-30 04:34:15 4
> > >>> [com.candata.core.server.impl.ServiceConfigurationImpl(220)]
> > >>> getParameterClass: Found class
> > >>> com.candata.core.server.services.RunAsService
> > >>> com.candata.core.server_1.0.0 [141] null null
> > >>> 2013-10-30 04:34:15 4
> > >>> [com.candata.core.server.impl.ServiceConfigurationImpl(220)]
> > >>> doFindMethod: No method taking ServiceReference found, checking
> method
> > >>> taking com.candata.core.server.services.RunAsService
> > >>> com.candata.core.server_1.0.0 [141] null null
> > >>> 2013-10-30 04:34:15 4
> > >>> [com.candata.core.server.impl.ServiceConfigurationImpl(220)] Found
> > >>> bind method: protected void
> > >>>
> > >>
> >
> com.candata.core.server.impl.ServiceConfigurationImpl.setRunAsService(com.candata.core.server.services.RunAsService)
> > >>> com.candata.core.server_1.0.0 [141] null null
> > >>> 2013-10-30 04:34:15 2
> > >>> [com.candata.core.server.impl.ServiceConfigurationImpl(220)] Could
> not
> > >>> get service from ref {com.candata.core.server.services.ServiceRunner,
> > >>> com.candata.core.server.services.RunAsService}={component.name
> > >> =com.candata.core.server.impl.ServiceRunnerImpl,
> > >>> component.id=223, service.id=92} com.candata.core.server_1.0.0 [141]
> > >>> null null
> > >>> 2013-10-30 04:34:15 3 FrameworkEvent WARNING
> > >>> com.candata.core.server_1.0.0 [141] null null
> > >>> 2013-10-30 04:34:15 4
> > >>> [com.candata.core.server.impl.ServiceConfigurationImpl(220)]
> > >>> Deactivating dependency managers com.candata.core.server_1.0.0 [141]
> > >>> null null
> > >>>
> > >>> The only different thing about the RunAsService is that one impl is
> > >>> registered as more than service ..
> > >>>
> > >>> Here is the registration above
> > >>> 2013-10-30 04:34:14 3 ServiceEvent REGISTERED
> > >>> com.candata.core.server_1.0.0 [141]
> > >>> {com.candata.core.server.services.ServiceRunner,
> > >>> com.candata.core.server.services.RunAsService}=
> > >>> {component.name=com.candata.core.server.impl.ServiceRunnerImpl,
> > >>> component.id=223, service.id=92} null
> > >>>
> > >>> and the activate
> > >>> 013-10-30 04:34:14 4
> > >>> [com.candata.core.server.impl.ServiceRunnerImpl(223)] Found activate
> > >>> method: protected void
> > >>>
> > >>
> >
> com.candata.core.server.impl.ServiceRunnerImpl.activate(org.osgi.framework.BundleContext)
> > >>> throws java.lang.Exception com.candata.core.server_1.0.0 [141] null
> > >>> null
> > >>> 2013-10-30 04:34:14 4
> > >>> [com.candata.core.server.impl.ServiceRunnerImpl(223)] invoking
> > >>> activate: activate com.candata.core.server_1.0.0 [141] null null
> > >>>
> > >>>
> > >>> Let me know if you need any more info , debugging code etc ...
> > >>>
> > >>>
> > >>>
> > >>>
> > >>> On Wed, Oct 30, 2013 at 1:09 PM, David Jencks <
> david_jencks@yahoo.com
> > >>> wrote:
> > >>>
> > >>>> There's another release candidate out that you could try, see the
> vote
> > >>>> email.
> > >>>>
> > >>>> I don't commit if I have test failures, and I've never seen the
> > problem
> > >>>> you show below.  I suspect a maven issue.
> > >>>>
> > >>>> In the future please try to include enough information so that
> someone
> > >> who
> > >>>> is not already having the exact same problem you are can figure out
> > what
> > >>>> you are doing.  It's pretty safe to assume that the code in svn
> works
> > >> well
> > >>>> for the developers  so they probably don't know how to reproduce a
> > >> problem
> > >>>> you see.
> > >>>>
> > >>>> thanks
> > >>>> david jencks
> > >>>>
> > >>>> On Oct 30, 2013, at 6:32 AM, Dave Smith <da...@candata.com>
> > wrote:
> > >>>>
> > >>>>> Now the test cases are failing ..
> > >>>>>
> > >>>>> FYI:
> > >>>>>
> > >>>>> [INFO] --- org.apache.aries.versioning.plugin:0.1.0:version-check
> > >>>>> (default-verify) @ org.apache.felix.scr ---
> > >>>>> [WARNING] Error injecting:
> > >>>>> org.apache.aries.versioning.mojo.VersionCheckerMojo
> > >>>>> java.lang.NoClassDefFoundError:
> > >>>>> org/sonatype/aether/resolution/ArtifactResolutionException
> > >>>>>
> > >>>>> Caused by: java.lang.ClassNotFoundException:
> > >>>>> org.sonatype.aether.resolution.ArtifactResolutionException
> > >>>>>      at
> > >>>>>
> > >>>>
> > >>
> >
> org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
> > >>>>>      at
> > >>>>>
> > >>>>
> > >>
> >
> org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:259)
> > >>>>>      at
> > >>>>>
> > >>>>
> > >>
> >
> org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:242)
> > >>>>>      at
> > >>>>>
> > >>>>
> > >>
> >
> org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:227)
> > >>>>>
> > >>>>>
> > >>>>> Looks like you are still a bit raw. Give me a heads up when you
> are a
> > >>>>> little closer and I will test here.....
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>> On Tue, Oct 29, 2013 at 7:39 PM, David Jencks <
> > david_jencks@yahoo.com
> > >>>>> wrote:
> > >>>>>
> > >>>>>> Ah, I'm sort of in the middle of a release.
> > >>>>>>
> > >>>>>> You can alter the scr pom locally to point to 1.5.0-SNAPSHOT, get
> > the
> > >>>> 1.4
> > >>>>>> release candidate from
> > >>>>>>
> > >>
> https://repository.apache.org/content/repositories/orgapachefelix-024/,
> > >>>>>> or build the 1.4 release candidate from
> > >>>>>>
> > >>>>>>
> > >>>>>>
> > >>>>
> > >>
> >
> https://svn.apache.org/repos/asf/felix/releases/org.apache.felix.utils-1.4.0
> > >>>>>>
> > >>>>>> hope this helps
> > >>>>>> david jencks
> > >>>>>>
> > >>>>>> On Oct 29, 2013, at 11:36 AM, Dave Smith <da...@candata.com>
> > >>>> wrote:
> > >>>>>>
> > >>>>>>> [INFO] Building Apache Felix Declarative Services 1.7-SNAPSHOT
> > >>>>>>> [INFO]
> > >>>>>>>
> > >>>>
> > ------------------------------------------------------------------------
> > >>>>>>> [WARNING] The POM for
> > >> org.apache.felix:org.apache.felix.utils:jar:1.4.0
> > >>>>>> is
> > >>>>>>> missing, no dependency information available
> > >>>>>>> [INFO]
> > >>>>>>>
> > >>>>
> > ------------------------------------------------------------------------
> > >>>>>>>
> > >>>>>>> [ERROR] Failed to execute goal on project org.apache.felix.scr:
> > Could
> > >>>> not
> > >>>>>>> resolve dependencies for project
> > >>>>>>> org.apache.felix:org.apache.felix.scr:bundle:1.7-SNAPSHOT:
> Failure
> > to
> > >>>>>> find
> > >>>>>>> org.apache.felix:org.apache.felix.utils:jar:1.4.0 in
> > >>>>>>> http://repo.maven.apache.org/maven2 was cached in the local
> > >>>> repository,
> > >>>>>>> resolution will not be reattempted until the update interval of
> > >> central
> > >>>>>> has
> > >>>>>>> elapsed or updates are forced -> [Help 1]
> > >>>>>>>
> > >>>>>>>
> > >>>>>>>
> > >>>>>>> On Tue, Oct 29, 2013 at 2:04 PM, David Jencks <
> > >> david_jencks@yahoo.com
> > >>>>>>> wrote:
> > >>>>>>>
> > >>>>>>>> Well, the 1.7-SNAPSHOT in the apache nexus snapshot repo is up
> to
> > >>>> date.
> > >>>>>>>>
> > >>>>>>>> I run mvn clean install in scr with no problems, using maven
> > 3.0.4.
> > >>>>>> What
> > >>>>>>>> problems are you seeing?
> > >>>>>>>>
> > >>>>>>>> thanks
> > >>>>>>>> david jencks
> > >>>>>>>>
> > >>>>>>>> On Oct 29, 2013, at 10:54 AM, Dave Smith <
> dave.smith@candata.com>
> > >>>>>> wrote:
> > >>>>>>>>
> > >>>>>>>>> I tried following the instructions but It seems the scr is not
> > >> built
> > >>>> in
> > >>>>>>>> and
> > >>>>>>>>> when I try and run mvn in the scr dir that does not work
> either.
> > >>>>>>>>>
> > >>>>>>>>> I am following ...
> > >>>>>>>>>
> > >>>>>>>>> http://felix.apache.org/site/building-felix.html
> > >>>>>>>>>
> > >>>>>>>>> instructuctions
> > >>>>>>>>>
> > >>>>>>>>> Dave Smith
> > >>>>>>>>> Candata Ltd.
> > >>>>>>>>> 416-493-9020x2413
> > >>>>>>>>> Direct: 416-855-2413
> > >>>>>>>>>
> > >>>>>>>>>
> > >>>>>>>>> On Tue, Oct 29, 2013 at 11:41 AM, Dave Smith <
> > >> dave.smith@candata.com
> > >>>>>
> > >>>>>>>> wrote:
> > >>>>>>>>>
> > >>>>>>>>>> Latest 1.6.2. I will grab the snapshot and report back...
> > >>>>>>>>>>
> > >>>>>>>>>> Dave Smith
> > >>>>>>>>>> Candata Ltd.
> > >>>>>>>>>> 416-493-9020x2413
> > >>>>>>>>>> Direct: 416-855-2413
> > >>>>>>>>>>
> > >>>>>>>>>>
> > >>>>>>>>>> On Tue, Oct 29, 2013 at 11:38 AM, David Jencks <
> > >>>>>> david_jencks@yahoo.com
> > >>>>>>>>> wrote:
> > >>>>>>>>>>
> > >>>>>>>>>>> Not telling us the exact version of the code you are using
> > makes
> > >> it
> > >>>>>>>>>>> pretty much impossible to think about investigating this.
> > >>>>>>>>>>>
> > >>>>>>>>>>> Please see if this is a problem with the current trunk code
> > which
> > >>>> you
> > >>>>>>>> can
> > >>>>>>>>>>> build yourself or use the 1.7-SNAPSHOT on the apache snapshot
> > >> repo.
> > >>>>>>>>>>>
> > >>>>>>>>>>> I'm working on a release and at this point we're finding and
> > >> fixing
> > >>>>>>>> bugs.
> > >>>>>>>>>>> When we've stopped finding bugs I'll release.
> > >>>>>>>>>>>
> > >>>>>>>>>>> thanks
> > >>>>>>>>>>> david jencks
> > >>>>>>>>>>>
> > >>>>>>>>>>> On Oct 29, 2013, at 8:15 AM, Dave Smith <
> > dave.smith@candata.com>
> > >>>>>>>> wrote:
> > >>>>>>>>>>>
> > >>>>>>>>>>>> I posted a bug a few weeks back and the thought was a new
> > >> version
> > >>>> is
> > >>>>>>>>>>> coming
> > >>>>>>>>>>>> soon. Since it was more of an annoyance I decided to wait. I
> > am
> > >>>> now
> > >>>>>>>>>>> having
> > >>>>>>>>>>>> an intermittent problem with a service not getting
> activated.
> > >> Here
> > >>>>>> is
> > >>>>>>>> a
> > >>>>>>>>>>>> snippet from the log
> > >>>>>>>>>>>>
> > >>>>>>>>>>>> 2013-10-29 10:49:27 4
> > >>>>>>>>>>>> [com.candata.core.server.impl.ServiceConfigurationImpl]
> > >>>>>>>>>>>> getParameterClass: Found class
> > >>>>>>>>>>>> com.candata.core.server.services.RunAsService
> > >>>>>>>>>>>> com.candata.core.server_1.0.0 [141] null null
> > >>>>>>>>>>>> 2013-10-29 10:49:27 4
> > >>>>>>>>>>>> [com.candata.core.server.impl.ServiceConfigurationImpl]
> > >>>>>> doFindMethod:
> > >>>>>>>>>>>> No method taking ServiceReference found, checking method
> > taking
> > >>>>>>>>>>>> com.candata.core.server.services.RunAsService
> > >>>>>>>>>>>> com.candata.core.server_1.0.0 [141] null null
> > >>>>>>>>>>>> 2013-10-29 10:49:27 4
> > >>>>>>>>>>>> [com.candata.core.server.impl.ServiceConfigurationImpl]
> Found
> > >> bind
> > >>>>>>>>>>>> method: protected void
> > >>>>>>>>>>>>
> > >>>>>>>>>>>
> > >>>>>>>>
> > >>>>>>
> > >>>>
> > >>
> >
> com.candata.core.server.impl.ServiceConfigurationImpl.setRunAsService(com.candata.core.server.services.RunAsService)
> > >>>>>>>>>>>> com.candata.core.server_1.0.0 [141] null null
> > >>>>>>>>>>>> 2013-10-29 10:49:27 4
> > >>>>>> [com.candata.core.server.impl.ServiceRunnerImpl]
> > >>>>>>>>>>>> dependency map already present, do not collect dependencies
> > >>>>>>>>>>>> com.candata.core.server_1.0.0 [141] null null
> > >>>>>>>>>>>> 2013-10-29 10:49:27 4
> > >>>>>> [com.candata.core.server.impl.ServiceRunnerImpl]
> > >>>>>>>>>>>> getService did not win collecting dependencies, try creating
> > >>>> object
> > >>>>>>>>>>>> anyway. com.candata.core.server_1.0.0 [141] null null
> > >>>>>>>>>>>> 2013-10-29 10:49:27 3 FrameworkEvent WARNING
> > >>>>>>>>>>>> com.candata.core.server_1.0.0 [141] null null
> > >>>>>>>>>>>> 2013-10-29 10:49:27 2
> > >>>>>>>>>>>> [com.candata.core.server.impl.ServiceConfigurationImpl]
> Could
> > >> not
> > >>>>>> get
> > >>>>>>>>>>>> service from ref
> > >> {com.candata.core.server.services.ServiceRunner,
> > >>>>>>>>>>>> com.candata.core.server.services.RunAsService}={
> > component.name
> > >>>>>>>>>>> =com.candata.core.server.impl.ServiceRunnerImpl,
> > >>>>>>>>>>>> component.id=233, service.id=91}
> > com.candata.core.server_1.0.0
> > >>>>>> [141]
> > >>>>>>>>>>> null null
> > >>>>>>>>>>>>
> > >>>>>>>>>>>> If -> getService did not win collecting dependencies, try
> > >> creating
> > >>>>>>>>>>> object
> > >>>>>>>>>>>> anyway
> > >>>>>>>>>>>>
> > >>>>>>>>>>>> then the service never gets activated , if it wins then it
> > does.
> > >>>> I
> > >>>>>>>>>>>> can see by the logs that the service is registered with OSGI
> > >>>> farther
> > >>>>>>>>>>>> up
> > >>>>>>>>>>>>
> > >>>>>>>>>>>>
> > >>>>>>>>>>>> 2013-10-29 10:49:27 3 ServiceEvent REGISTERED
> > >>>>>>>>>>>> com.candata.core.server_1.0.0 [141]
> > >>>>>>>>>>>> {com.candata.core.server.services.ServiceRunner,
> > >>>>>>>>>>>> com.candata.core.server.services.RunAsService}={
> > component.name
> > >>>>>>>>>>> =com.candata.core.server.impl.ServiceRunnerImpl,
> > >>>>>>>>>>>> component.id=233, service.id=91} null
> > >>>>>>>>>>>>
> > >>>>>>>>>>>> Is the next release soon? Or has this code not changed and
> > could
> > >>>> be
> > >>>>>>>>>>>> considered a bug
> > >>>>>>>>>>>
> > >>>>>>>>>>>
> > >>>>>>>>>>>
> > >>>>
> ---------------------------------------------------------------------
> > >>>>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> > >>>>>>>>>>> For additional commands, e-mail: users-help@felix.apache.org
> > >>>>>>>>>>>
> > >>>>>>>>>>>
> > >>>>>>>>>>
> > >>>>>>>>
> > >>>>>>>>
> > >>>>>>>>
> > >> ---------------------------------------------------------------------
> > >>>>>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> > >>>>>>>> For additional commands, e-mail: users-help@felix.apache.org
> > >>>>>>>>
> > >>>>>>>>
> > >>>>>>
> > >>>>>>
> > >>>>>>
> > ---------------------------------------------------------------------
> > >>>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> > >>>>>> For additional commands, e-mail: users-help@felix.apache.org
> > >>>>>>
> > >>>>>>
> > >>>>
> > >>>>
> > >>>>
> ---------------------------------------------------------------------
> > >>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> > >>>> For additional commands, e-mail: users-help@felix.apache.org
> > >>>>
> > >>>>
> > >>
> > >>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> > For additional commands, e-mail: users-help@felix.apache.org
> >
> >
>

Re: Declarative Services

Posted by Pierre De Rop <pi...@gmail.com>.
Hi David,

I'm not sure whether I fully understand or not, can you please clarify and
describe with more details the circular dependency involved in this problem
?

As far as I understand what you are describing:

- C is immediate, enabled, and has two required references on both A, B.
- A is enabled and activating. And from it's activate method, A manually
registers B (using bundleContext.registerService).

Then, where is the dependency cycle ?

C -> A, B

but are A and/or B also depending on C ?


thanks;
/Pierre




On Fri, Nov 1, 2013 at 7:53 AM, David Jencks <da...@yahoo.com> wrote:

> After some investigation offline we determined that there was effectively
> a circular dependency that was sometimes preventing some of the services
> from activating immediately.  Abstracting slightly…
> component/service A registered service B in its activate method. Immediate
> component C has mandatory dependencies on A and B.  If C is enabled before
> A, then A's activation will result in a problem as B will be registered
> while the thread is still in A's activate method, so the component instance
> cannot be returned from a getService call.  Sometimes this circle is
> detected by the service registry and sometimes by the DS circular
> dependency detector.
>
> One solution is to register B in a separate thread started from A's
> activate method.
>
> In general, this illustrates that registering services from within DS
> lifecycle methods is apt to cause locking problems and should be avoided if
> at all possible.
>
> thanks
> david jencks
>
> On Oct 30, 2013, at 3:10 PM, Dave Smith <da...@candata.com> wrote:
>
> > Never see it. I will send you a copy of the full log off list. The only
> > other interesting thing is the Activate method in ServiceRunner does
> > register 3 other services that will be injected in components.
> >
> > Dave Smith
> > Candata Ltd.
> > 416-493-9020x2413
> > Direct: 416-855-2413
> >
> >
> > On Wed, Oct 30, 2013 at 5:52 PM, David Jencks <david_jencks@yahoo.com
> >wrote:
> >
> >> Does the activate method on ServiceRunnerImpl return? there should be a
> >> log entry from
> >>
> >>                logger.log( LogService.LOG_DEBUG, "invoked {0}: {1}:
> >> parameters {2}", new Object[]
> >>                    { getMethodNamePrefix(), getMethodName(),
> >> Arrays.asList( params ) }, null );
> >>
> >> Are there really no log statements between "found bind method" and
> "could
> >> not get service"?
> >>
> >> thanks
> >> david jencks
> >>
> >>
> >> On Oct 30, 2013, at 2:03 PM, Dave Smith <da...@candata.com> wrote:
> >>
> >>> OK. So I managed to pull the Snapshot from last night. Same problem.
> >>>
> >>> So here is where it registers
> >>>
> >>> 2013-10-30 04:34:15 4
> >>> [com.candata.core.server.impl.ServiceConfigurationImpl(220)] dm
> >>> KeyValueDAO tracking 5 SingleStatic added
> >>> {com.candata.util.common.services.KeyValueDAO}=
> >>> {component.name=com.candata.util.server.impl.KeyValueDAOImpl,
> >>> component.id=39, service.exported.interfaces=*, service.id=130}
> >>> (enter) com.candata.core.server_1.0.0 [141] null null
> >>> 2013-10-30 04:34:15 4
> >>> [com.candata.core.server.impl.ServiceConfigurationImpl(220)]
> >>> ActivateInternal com.candata.core.server_1.0.0 [141] null null
> >>> 2013-10-30 04:34:15 4
> >>> [com.candata.core.server.impl.ServiceConfigurationImpl(220)]
> >>> Activating component from state 4 com.candata.core.server_1.0.0 [141]
> >>> null null
> >>> 2013-10-30 04:34:15 4
> >>> [com.candata.core.server.impl.ServiceConfigurationImpl(220)]
> >>> registration change queue [registered] com.candata.core.server_1.0.0
> >>> [141] null null
> >>> 2013-10-30 04:34:15 3 ServiceEvent REGISTERED
> >>> com.candata.core.server_1.0.0 [141]
> >>> {com.candata.core.server.services.ServiceConfiguration}=
> >>> {component.name=com.candata.core.server.impl.ServiceConfigurationImpl,
> >>> component.id=220, service.id=133} null
> >>>
> >>>
> >>>
> >>> And when it is injecting the references ...
> >>>
> >>>
> >>> 2013-10-30 04:34:15 4
> >>> [com.candata.core.server.impl.ServiceConfigurationImpl(220)] Declared
> >>> Method
> >>
> com.candata.core.server.impl.ServiceConfigurationImpl.setRunAsService([interface
> >>> org.osgi.framework.ServiceReference]) not found
> >>> com.candata.core.server_1.0.0 [141] null null
> >>> 2013-10-30 04:34:15 4
> >>> [com.candata.core.server.impl.ServiceConfigurationImpl(220)]
> >>> getParameterClass: Looking for interface class
> >>> com.candata.core.server.services.RunAsService through loader of
> >>> com.candata.core.server.impl.ServiceConfigurationImpl
> >>> com.candata.core.server_1.0.0 [141] null null
> >>> 2013-10-30 04:34:15 4
> >>> [com.candata.core.server.impl.ServiceConfigurationImpl(220)]
> >>> getParameterClass: Found class
> >>> com.candata.core.server.services.RunAsService
> >>> com.candata.core.server_1.0.0 [141] null null
> >>> 2013-10-30 04:34:15 4
> >>> [com.candata.core.server.impl.ServiceConfigurationImpl(220)]
> >>> doFindMethod: No method taking ServiceReference found, checking method
> >>> taking com.candata.core.server.services.RunAsService
> >>> com.candata.core.server_1.0.0 [141] null null
> >>> 2013-10-30 04:34:15 4
> >>> [com.candata.core.server.impl.ServiceConfigurationImpl(220)] Found
> >>> bind method: protected void
> >>>
> >>
> com.candata.core.server.impl.ServiceConfigurationImpl.setRunAsService(com.candata.core.server.services.RunAsService)
> >>> com.candata.core.server_1.0.0 [141] null null
> >>> 2013-10-30 04:34:15 2
> >>> [com.candata.core.server.impl.ServiceConfigurationImpl(220)] Could not
> >>> get service from ref {com.candata.core.server.services.ServiceRunner,
> >>> com.candata.core.server.services.RunAsService}={component.name
> >> =com.candata.core.server.impl.ServiceRunnerImpl,
> >>> component.id=223, service.id=92} com.candata.core.server_1.0.0 [141]
> >>> null null
> >>> 2013-10-30 04:34:15 3 FrameworkEvent WARNING
> >>> com.candata.core.server_1.0.0 [141] null null
> >>> 2013-10-30 04:34:15 4
> >>> [com.candata.core.server.impl.ServiceConfigurationImpl(220)]
> >>> Deactivating dependency managers com.candata.core.server_1.0.0 [141]
> >>> null null
> >>>
> >>> The only different thing about the RunAsService is that one impl is
> >>> registered as more than service ..
> >>>
> >>> Here is the registration above
> >>> 2013-10-30 04:34:14 3 ServiceEvent REGISTERED
> >>> com.candata.core.server_1.0.0 [141]
> >>> {com.candata.core.server.services.ServiceRunner,
> >>> com.candata.core.server.services.RunAsService}=
> >>> {component.name=com.candata.core.server.impl.ServiceRunnerImpl,
> >>> component.id=223, service.id=92} null
> >>>
> >>> and the activate
> >>> 013-10-30 04:34:14 4
> >>> [com.candata.core.server.impl.ServiceRunnerImpl(223)] Found activate
> >>> method: protected void
> >>>
> >>
> com.candata.core.server.impl.ServiceRunnerImpl.activate(org.osgi.framework.BundleContext)
> >>> throws java.lang.Exception com.candata.core.server_1.0.0 [141] null
> >>> null
> >>> 2013-10-30 04:34:14 4
> >>> [com.candata.core.server.impl.ServiceRunnerImpl(223)] invoking
> >>> activate: activate com.candata.core.server_1.0.0 [141] null null
> >>>
> >>>
> >>> Let me know if you need any more info , debugging code etc ...
> >>>
> >>>
> >>>
> >>>
> >>> On Wed, Oct 30, 2013 at 1:09 PM, David Jencks <david_jencks@yahoo.com
> >>> wrote:
> >>>
> >>>> There's another release candidate out that you could try, see the vote
> >>>> email.
> >>>>
> >>>> I don't commit if I have test failures, and I've never seen the
> problem
> >>>> you show below.  I suspect a maven issue.
> >>>>
> >>>> In the future please try to include enough information so that someone
> >> who
> >>>> is not already having the exact same problem you are can figure out
> what
> >>>> you are doing.  It's pretty safe to assume that the code in svn works
> >> well
> >>>> for the developers  so they probably don't know how to reproduce a
> >> problem
> >>>> you see.
> >>>>
> >>>> thanks
> >>>> david jencks
> >>>>
> >>>> On Oct 30, 2013, at 6:32 AM, Dave Smith <da...@candata.com>
> wrote:
> >>>>
> >>>>> Now the test cases are failing ..
> >>>>>
> >>>>> FYI:
> >>>>>
> >>>>> [INFO] --- org.apache.aries.versioning.plugin:0.1.0:version-check
> >>>>> (default-verify) @ org.apache.felix.scr ---
> >>>>> [WARNING] Error injecting:
> >>>>> org.apache.aries.versioning.mojo.VersionCheckerMojo
> >>>>> java.lang.NoClassDefFoundError:
> >>>>> org/sonatype/aether/resolution/ArtifactResolutionException
> >>>>>
> >>>>> Caused by: java.lang.ClassNotFoundException:
> >>>>> org.sonatype.aether.resolution.ArtifactResolutionException
> >>>>>      at
> >>>>>
> >>>>
> >>
> org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
> >>>>>      at
> >>>>>
> >>>>
> >>
> org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:259)
> >>>>>      at
> >>>>>
> >>>>
> >>
> org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:242)
> >>>>>      at
> >>>>>
> >>>>
> >>
> org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:227)
> >>>>>
> >>>>>
> >>>>> Looks like you are still a bit raw. Give me a heads up when you are a
> >>>>> little closer and I will test here.....
> >>>>>
> >>>>>
> >>>>>
> >>>>> On Tue, Oct 29, 2013 at 7:39 PM, David Jencks <
> david_jencks@yahoo.com
> >>>>> wrote:
> >>>>>
> >>>>>> Ah, I'm sort of in the middle of a release.
> >>>>>>
> >>>>>> You can alter the scr pom locally to point to 1.5.0-SNAPSHOT, get
> the
> >>>> 1.4
> >>>>>> release candidate from
> >>>>>>
> >> https://repository.apache.org/content/repositories/orgapachefelix-024/,
> >>>>>> or build the 1.4 release candidate from
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>
> >>
> https://svn.apache.org/repos/asf/felix/releases/org.apache.felix.utils-1.4.0
> >>>>>>
> >>>>>> hope this helps
> >>>>>> david jencks
> >>>>>>
> >>>>>> On Oct 29, 2013, at 11:36 AM, Dave Smith <da...@candata.com>
> >>>> wrote:
> >>>>>>
> >>>>>>> [INFO] Building Apache Felix Declarative Services 1.7-SNAPSHOT
> >>>>>>> [INFO]
> >>>>>>>
> >>>>
> ------------------------------------------------------------------------
> >>>>>>> [WARNING] The POM for
> >> org.apache.felix:org.apache.felix.utils:jar:1.4.0
> >>>>>> is
> >>>>>>> missing, no dependency information available
> >>>>>>> [INFO]
> >>>>>>>
> >>>>
> ------------------------------------------------------------------------
> >>>>>>>
> >>>>>>> [ERROR] Failed to execute goal on project org.apache.felix.scr:
> Could
> >>>> not
> >>>>>>> resolve dependencies for project
> >>>>>>> org.apache.felix:org.apache.felix.scr:bundle:1.7-SNAPSHOT: Failure
> to
> >>>>>> find
> >>>>>>> org.apache.felix:org.apache.felix.utils:jar:1.4.0 in
> >>>>>>> http://repo.maven.apache.org/maven2 was cached in the local
> >>>> repository,
> >>>>>>> resolution will not be reattempted until the update interval of
> >> central
> >>>>>> has
> >>>>>>> elapsed or updates are forced -> [Help 1]
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>> On Tue, Oct 29, 2013 at 2:04 PM, David Jencks <
> >> david_jencks@yahoo.com
> >>>>>>> wrote:
> >>>>>>>
> >>>>>>>> Well, the 1.7-SNAPSHOT in the apache nexus snapshot repo is up to
> >>>> date.
> >>>>>>>>
> >>>>>>>> I run mvn clean install in scr with no problems, using maven
> 3.0.4.
> >>>>>> What
> >>>>>>>> problems are you seeing?
> >>>>>>>>
> >>>>>>>> thanks
> >>>>>>>> david jencks
> >>>>>>>>
> >>>>>>>> On Oct 29, 2013, at 10:54 AM, Dave Smith <da...@candata.com>
> >>>>>> wrote:
> >>>>>>>>
> >>>>>>>>> I tried following the instructions but It seems the scr is not
> >> built
> >>>> in
> >>>>>>>> and
> >>>>>>>>> when I try and run mvn in the scr dir that does not work either.
> >>>>>>>>>
> >>>>>>>>> I am following ...
> >>>>>>>>>
> >>>>>>>>> http://felix.apache.org/site/building-felix.html
> >>>>>>>>>
> >>>>>>>>> instructuctions
> >>>>>>>>>
> >>>>>>>>> Dave Smith
> >>>>>>>>> Candata Ltd.
> >>>>>>>>> 416-493-9020x2413
> >>>>>>>>> Direct: 416-855-2413
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>> On Tue, Oct 29, 2013 at 11:41 AM, Dave Smith <
> >> dave.smith@candata.com
> >>>>>
> >>>>>>>> wrote:
> >>>>>>>>>
> >>>>>>>>>> Latest 1.6.2. I will grab the snapshot and report back...
> >>>>>>>>>>
> >>>>>>>>>> Dave Smith
> >>>>>>>>>> Candata Ltd.
> >>>>>>>>>> 416-493-9020x2413
> >>>>>>>>>> Direct: 416-855-2413
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>> On Tue, Oct 29, 2013 at 11:38 AM, David Jencks <
> >>>>>> david_jencks@yahoo.com
> >>>>>>>>> wrote:
> >>>>>>>>>>
> >>>>>>>>>>> Not telling us the exact version of the code you are using
> makes
> >> it
> >>>>>>>>>>> pretty much impossible to think about investigating this.
> >>>>>>>>>>>
> >>>>>>>>>>> Please see if this is a problem with the current trunk code
> which
> >>>> you
> >>>>>>>> can
> >>>>>>>>>>> build yourself or use the 1.7-SNAPSHOT on the apache snapshot
> >> repo.
> >>>>>>>>>>>
> >>>>>>>>>>> I'm working on a release and at this point we're finding and
> >> fixing
> >>>>>>>> bugs.
> >>>>>>>>>>> When we've stopped finding bugs I'll release.
> >>>>>>>>>>>
> >>>>>>>>>>> thanks
> >>>>>>>>>>> david jencks
> >>>>>>>>>>>
> >>>>>>>>>>> On Oct 29, 2013, at 8:15 AM, Dave Smith <
> dave.smith@candata.com>
> >>>>>>>> wrote:
> >>>>>>>>>>>
> >>>>>>>>>>>> I posted a bug a few weeks back and the thought was a new
> >> version
> >>>> is
> >>>>>>>>>>> coming
> >>>>>>>>>>>> soon. Since it was more of an annoyance I decided to wait. I
> am
> >>>> now
> >>>>>>>>>>> having
> >>>>>>>>>>>> an intermittent problem with a service not getting activated.
> >> Here
> >>>>>> is
> >>>>>>>> a
> >>>>>>>>>>>> snippet from the log
> >>>>>>>>>>>>
> >>>>>>>>>>>> 2013-10-29 10:49:27 4
> >>>>>>>>>>>> [com.candata.core.server.impl.ServiceConfigurationImpl]
> >>>>>>>>>>>> getParameterClass: Found class
> >>>>>>>>>>>> com.candata.core.server.services.RunAsService
> >>>>>>>>>>>> com.candata.core.server_1.0.0 [141] null null
> >>>>>>>>>>>> 2013-10-29 10:49:27 4
> >>>>>>>>>>>> [com.candata.core.server.impl.ServiceConfigurationImpl]
> >>>>>> doFindMethod:
> >>>>>>>>>>>> No method taking ServiceReference found, checking method
> taking
> >>>>>>>>>>>> com.candata.core.server.services.RunAsService
> >>>>>>>>>>>> com.candata.core.server_1.0.0 [141] null null
> >>>>>>>>>>>> 2013-10-29 10:49:27 4
> >>>>>>>>>>>> [com.candata.core.server.impl.ServiceConfigurationImpl] Found
> >> bind
> >>>>>>>>>>>> method: protected void
> >>>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>
> >>>>>>
> >>>>
> >>
> com.candata.core.server.impl.ServiceConfigurationImpl.setRunAsService(com.candata.core.server.services.RunAsService)
> >>>>>>>>>>>> com.candata.core.server_1.0.0 [141] null null
> >>>>>>>>>>>> 2013-10-29 10:49:27 4
> >>>>>> [com.candata.core.server.impl.ServiceRunnerImpl]
> >>>>>>>>>>>> dependency map already present, do not collect dependencies
> >>>>>>>>>>>> com.candata.core.server_1.0.0 [141] null null
> >>>>>>>>>>>> 2013-10-29 10:49:27 4
> >>>>>> [com.candata.core.server.impl.ServiceRunnerImpl]
> >>>>>>>>>>>> getService did not win collecting dependencies, try creating
> >>>> object
> >>>>>>>>>>>> anyway. com.candata.core.server_1.0.0 [141] null null
> >>>>>>>>>>>> 2013-10-29 10:49:27 3 FrameworkEvent WARNING
> >>>>>>>>>>>> com.candata.core.server_1.0.0 [141] null null
> >>>>>>>>>>>> 2013-10-29 10:49:27 2
> >>>>>>>>>>>> [com.candata.core.server.impl.ServiceConfigurationImpl] Could
> >> not
> >>>>>> get
> >>>>>>>>>>>> service from ref
> >> {com.candata.core.server.services.ServiceRunner,
> >>>>>>>>>>>> com.candata.core.server.services.RunAsService}={
> component.name
> >>>>>>>>>>> =com.candata.core.server.impl.ServiceRunnerImpl,
> >>>>>>>>>>>> component.id=233, service.id=91}
> com.candata.core.server_1.0.0
> >>>>>> [141]
> >>>>>>>>>>> null null
> >>>>>>>>>>>>
> >>>>>>>>>>>> If -> getService did not win collecting dependencies, try
> >> creating
> >>>>>>>>>>> object
> >>>>>>>>>>>> anyway
> >>>>>>>>>>>>
> >>>>>>>>>>>> then the service never gets activated , if it wins then it
> does.
> >>>> I
> >>>>>>>>>>>> can see by the logs that the service is registered with OSGI
> >>>> farther
> >>>>>>>>>>>> up
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>> 2013-10-29 10:49:27 3 ServiceEvent REGISTERED
> >>>>>>>>>>>> com.candata.core.server_1.0.0 [141]
> >>>>>>>>>>>> {com.candata.core.server.services.ServiceRunner,
> >>>>>>>>>>>> com.candata.core.server.services.RunAsService}={
> component.name
> >>>>>>>>>>> =com.candata.core.server.impl.ServiceRunnerImpl,
> >>>>>>>>>>>> component.id=233, service.id=91} null
> >>>>>>>>>>>>
> >>>>>>>>>>>> Is the next release soon? Or has this code not changed and
> could
> >>>> be
> >>>>>>>>>>>> considered a bug
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>> ---------------------------------------------------------------------
> >>>>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> >>>>>>>>>>> For additional commands, e-mail: users-help@felix.apache.org
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >> ---------------------------------------------------------------------
> >>>>>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> >>>>>>>> For additional commands, e-mail: users-help@felix.apache.org
> >>>>>>>>
> >>>>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> ---------------------------------------------------------------------
> >>>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> >>>>>> For additional commands, e-mail: users-help@felix.apache.org
> >>>>>>
> >>>>>>
> >>>>
> >>>>
> >>>> ---------------------------------------------------------------------
> >>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> >>>> For additional commands, e-mail: users-help@felix.apache.org
> >>>>
> >>>>
> >>
> >>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>

Re: Declarative Services

Posted by David Jencks <da...@yahoo.com>.
After some investigation offline we determined that there was effectively a circular dependency that was sometimes preventing some of the services from activating immediately.  Abstracting slightly…
component/service A registered service B in its activate method. Immediate component C has mandatory dependencies on A and B.  If C is enabled before A, then A's activation will result in a problem as B will be registered while the thread is still in A's activate method, so the component instance cannot be returned from a getService call.  Sometimes this circle is detected by the service registry and sometimes by the DS circular dependency detector.

One solution is to register B in a separate thread started from A's activate method.

In general, this illustrates that registering services from within DS lifecycle methods is apt to cause locking problems and should be avoided if at all possible.

thanks
david jencks

On Oct 30, 2013, at 3:10 PM, Dave Smith <da...@candata.com> wrote:

> Never see it. I will send you a copy of the full log off list. The only
> other interesting thing is the Activate method in ServiceRunner does
> register 3 other services that will be injected in components.
> 
> Dave Smith
> Candata Ltd.
> 416-493-9020x2413
> Direct: 416-855-2413
> 
> 
> On Wed, Oct 30, 2013 at 5:52 PM, David Jencks <da...@yahoo.com>wrote:
> 
>> Does the activate method on ServiceRunnerImpl return? there should be a
>> log entry from
>> 
>>                logger.log( LogService.LOG_DEBUG, "invoked {0}: {1}:
>> parameters {2}", new Object[]
>>                    { getMethodNamePrefix(), getMethodName(),
>> Arrays.asList( params ) }, null );
>> 
>> Are there really no log statements between "found bind method" and "could
>> not get service"?
>> 
>> thanks
>> david jencks
>> 
>> 
>> On Oct 30, 2013, at 2:03 PM, Dave Smith <da...@candata.com> wrote:
>> 
>>> OK. So I managed to pull the Snapshot from last night. Same problem.
>>> 
>>> So here is where it registers
>>> 
>>> 2013-10-30 04:34:15 4
>>> [com.candata.core.server.impl.ServiceConfigurationImpl(220)] dm
>>> KeyValueDAO tracking 5 SingleStatic added
>>> {com.candata.util.common.services.KeyValueDAO}=
>>> {component.name=com.candata.util.server.impl.KeyValueDAOImpl,
>>> component.id=39, service.exported.interfaces=*, service.id=130}
>>> (enter) com.candata.core.server_1.0.0 [141] null null
>>> 2013-10-30 04:34:15 4
>>> [com.candata.core.server.impl.ServiceConfigurationImpl(220)]
>>> ActivateInternal com.candata.core.server_1.0.0 [141] null null
>>> 2013-10-30 04:34:15 4
>>> [com.candata.core.server.impl.ServiceConfigurationImpl(220)]
>>> Activating component from state 4 com.candata.core.server_1.0.0 [141]
>>> null null
>>> 2013-10-30 04:34:15 4
>>> [com.candata.core.server.impl.ServiceConfigurationImpl(220)]
>>> registration change queue [registered] com.candata.core.server_1.0.0
>>> [141] null null
>>> 2013-10-30 04:34:15 3 ServiceEvent REGISTERED
>>> com.candata.core.server_1.0.0 [141]
>>> {com.candata.core.server.services.ServiceConfiguration}=
>>> {component.name=com.candata.core.server.impl.ServiceConfigurationImpl,
>>> component.id=220, service.id=133} null
>>> 
>>> 
>>> 
>>> And when it is injecting the references ...
>>> 
>>> 
>>> 2013-10-30 04:34:15 4
>>> [com.candata.core.server.impl.ServiceConfigurationImpl(220)] Declared
>>> Method
>> com.candata.core.server.impl.ServiceConfigurationImpl.setRunAsService([interface
>>> org.osgi.framework.ServiceReference]) not found
>>> com.candata.core.server_1.0.0 [141] null null
>>> 2013-10-30 04:34:15 4
>>> [com.candata.core.server.impl.ServiceConfigurationImpl(220)]
>>> getParameterClass: Looking for interface class
>>> com.candata.core.server.services.RunAsService through loader of
>>> com.candata.core.server.impl.ServiceConfigurationImpl
>>> com.candata.core.server_1.0.0 [141] null null
>>> 2013-10-30 04:34:15 4
>>> [com.candata.core.server.impl.ServiceConfigurationImpl(220)]
>>> getParameterClass: Found class
>>> com.candata.core.server.services.RunAsService
>>> com.candata.core.server_1.0.0 [141] null null
>>> 2013-10-30 04:34:15 4
>>> [com.candata.core.server.impl.ServiceConfigurationImpl(220)]
>>> doFindMethod: No method taking ServiceReference found, checking method
>>> taking com.candata.core.server.services.RunAsService
>>> com.candata.core.server_1.0.0 [141] null null
>>> 2013-10-30 04:34:15 4
>>> [com.candata.core.server.impl.ServiceConfigurationImpl(220)] Found
>>> bind method: protected void
>>> 
>> com.candata.core.server.impl.ServiceConfigurationImpl.setRunAsService(com.candata.core.server.services.RunAsService)
>>> com.candata.core.server_1.0.0 [141] null null
>>> 2013-10-30 04:34:15 2
>>> [com.candata.core.server.impl.ServiceConfigurationImpl(220)] Could not
>>> get service from ref {com.candata.core.server.services.ServiceRunner,
>>> com.candata.core.server.services.RunAsService}={component.name
>> =com.candata.core.server.impl.ServiceRunnerImpl,
>>> component.id=223, service.id=92} com.candata.core.server_1.0.0 [141]
>>> null null
>>> 2013-10-30 04:34:15 3 FrameworkEvent WARNING
>>> com.candata.core.server_1.0.0 [141] null null
>>> 2013-10-30 04:34:15 4
>>> [com.candata.core.server.impl.ServiceConfigurationImpl(220)]
>>> Deactivating dependency managers com.candata.core.server_1.0.0 [141]
>>> null null
>>> 
>>> The only different thing about the RunAsService is that one impl is
>>> registered as more than service ..
>>> 
>>> Here is the registration above
>>> 2013-10-30 04:34:14 3 ServiceEvent REGISTERED
>>> com.candata.core.server_1.0.0 [141]
>>> {com.candata.core.server.services.ServiceRunner,
>>> com.candata.core.server.services.RunAsService}=
>>> {component.name=com.candata.core.server.impl.ServiceRunnerImpl,
>>> component.id=223, service.id=92} null
>>> 
>>> and the activate
>>> 013-10-30 04:34:14 4
>>> [com.candata.core.server.impl.ServiceRunnerImpl(223)] Found activate
>>> method: protected void
>>> 
>> com.candata.core.server.impl.ServiceRunnerImpl.activate(org.osgi.framework.BundleContext)
>>> throws java.lang.Exception com.candata.core.server_1.0.0 [141] null
>>> null
>>> 2013-10-30 04:34:14 4
>>> [com.candata.core.server.impl.ServiceRunnerImpl(223)] invoking
>>> activate: activate com.candata.core.server_1.0.0 [141] null null
>>> 
>>> 
>>> Let me know if you need any more info , debugging code etc ...
>>> 
>>> 
>>> 
>>> 
>>> On Wed, Oct 30, 2013 at 1:09 PM, David Jencks <david_jencks@yahoo.com
>>> wrote:
>>> 
>>>> There's another release candidate out that you could try, see the vote
>>>> email.
>>>> 
>>>> I don't commit if I have test failures, and I've never seen the problem
>>>> you show below.  I suspect a maven issue.
>>>> 
>>>> In the future please try to include enough information so that someone
>> who
>>>> is not already having the exact same problem you are can figure out what
>>>> you are doing.  It's pretty safe to assume that the code in svn works
>> well
>>>> for the developers  so they probably don't know how to reproduce a
>> problem
>>>> you see.
>>>> 
>>>> thanks
>>>> david jencks
>>>> 
>>>> On Oct 30, 2013, at 6:32 AM, Dave Smith <da...@candata.com> wrote:
>>>> 
>>>>> Now the test cases are failing ..
>>>>> 
>>>>> FYI:
>>>>> 
>>>>> [INFO] --- org.apache.aries.versioning.plugin:0.1.0:version-check
>>>>> (default-verify) @ org.apache.felix.scr ---
>>>>> [WARNING] Error injecting:
>>>>> org.apache.aries.versioning.mojo.VersionCheckerMojo
>>>>> java.lang.NoClassDefFoundError:
>>>>> org/sonatype/aether/resolution/ArtifactResolutionException
>>>>> 
>>>>> Caused by: java.lang.ClassNotFoundException:
>>>>> org.sonatype.aether.resolution.ArtifactResolutionException
>>>>>      at
>>>>> 
>>>> 
>> org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
>>>>>      at
>>>>> 
>>>> 
>> org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:259)
>>>>>      at
>>>>> 
>>>> 
>> org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:242)
>>>>>      at
>>>>> 
>>>> 
>> org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:227)
>>>>> 
>>>>> 
>>>>> Looks like you are still a bit raw. Give me a heads up when you are a
>>>>> little closer and I will test here.....
>>>>> 
>>>>> 
>>>>> 
>>>>> On Tue, Oct 29, 2013 at 7:39 PM, David Jencks <david_jencks@yahoo.com
>>>>> wrote:
>>>>> 
>>>>>> Ah, I'm sort of in the middle of a release.
>>>>>> 
>>>>>> You can alter the scr pom locally to point to 1.5.0-SNAPSHOT, get the
>>>> 1.4
>>>>>> release candidate from
>>>>>> 
>> https://repository.apache.org/content/repositories/orgapachefelix-024/,
>>>>>> or build the 1.4 release candidate from
>>>>>> 
>>>>>> 
>>>>>> 
>>>> 
>> https://svn.apache.org/repos/asf/felix/releases/org.apache.felix.utils-1.4.0
>>>>>> 
>>>>>> hope this helps
>>>>>> david jencks
>>>>>> 
>>>>>> On Oct 29, 2013, at 11:36 AM, Dave Smith <da...@candata.com>
>>>> wrote:
>>>>>> 
>>>>>>> [INFO] Building Apache Felix Declarative Services 1.7-SNAPSHOT
>>>>>>> [INFO]
>>>>>>> 
>>>> ------------------------------------------------------------------------
>>>>>>> [WARNING] The POM for
>> org.apache.felix:org.apache.felix.utils:jar:1.4.0
>>>>>> is
>>>>>>> missing, no dependency information available
>>>>>>> [INFO]
>>>>>>> 
>>>> ------------------------------------------------------------------------
>>>>>>> 
>>>>>>> [ERROR] Failed to execute goal on project org.apache.felix.scr: Could
>>>> not
>>>>>>> resolve dependencies for project
>>>>>>> org.apache.felix:org.apache.felix.scr:bundle:1.7-SNAPSHOT: Failure to
>>>>>> find
>>>>>>> org.apache.felix:org.apache.felix.utils:jar:1.4.0 in
>>>>>>> http://repo.maven.apache.org/maven2 was cached in the local
>>>> repository,
>>>>>>> resolution will not be reattempted until the update interval of
>> central
>>>>>> has
>>>>>>> elapsed or updates are forced -> [Help 1]
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> On Tue, Oct 29, 2013 at 2:04 PM, David Jencks <
>> david_jencks@yahoo.com
>>>>>>> wrote:
>>>>>>> 
>>>>>>>> Well, the 1.7-SNAPSHOT in the apache nexus snapshot repo is up to
>>>> date.
>>>>>>>> 
>>>>>>>> I run mvn clean install in scr with no problems, using maven 3.0.4.
>>>>>> What
>>>>>>>> problems are you seeing?
>>>>>>>> 
>>>>>>>> thanks
>>>>>>>> david jencks
>>>>>>>> 
>>>>>>>> On Oct 29, 2013, at 10:54 AM, Dave Smith <da...@candata.com>
>>>>>> wrote:
>>>>>>>> 
>>>>>>>>> I tried following the instructions but It seems the scr is not
>> built
>>>> in
>>>>>>>> and
>>>>>>>>> when I try and run mvn in the scr dir that does not work either.
>>>>>>>>> 
>>>>>>>>> I am following ...
>>>>>>>>> 
>>>>>>>>> http://felix.apache.org/site/building-felix.html
>>>>>>>>> 
>>>>>>>>> instructuctions
>>>>>>>>> 
>>>>>>>>> Dave Smith
>>>>>>>>> Candata Ltd.
>>>>>>>>> 416-493-9020x2413
>>>>>>>>> Direct: 416-855-2413
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> On Tue, Oct 29, 2013 at 11:41 AM, Dave Smith <
>> dave.smith@candata.com
>>>>> 
>>>>>>>> wrote:
>>>>>>>>> 
>>>>>>>>>> Latest 1.6.2. I will grab the snapshot and report back...
>>>>>>>>>> 
>>>>>>>>>> Dave Smith
>>>>>>>>>> Candata Ltd.
>>>>>>>>>> 416-493-9020x2413
>>>>>>>>>> Direct: 416-855-2413
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> On Tue, Oct 29, 2013 at 11:38 AM, David Jencks <
>>>>>> david_jencks@yahoo.com
>>>>>>>>> wrote:
>>>>>>>>>> 
>>>>>>>>>>> Not telling us the exact version of the code you are using makes
>> it
>>>>>>>>>>> pretty much impossible to think about investigating this.
>>>>>>>>>>> 
>>>>>>>>>>> Please see if this is a problem with the current trunk code which
>>>> you
>>>>>>>> can
>>>>>>>>>>> build yourself or use the 1.7-SNAPSHOT on the apache snapshot
>> repo.
>>>>>>>>>>> 
>>>>>>>>>>> I'm working on a release and at this point we're finding and
>> fixing
>>>>>>>> bugs.
>>>>>>>>>>> When we've stopped finding bugs I'll release.
>>>>>>>>>>> 
>>>>>>>>>>> thanks
>>>>>>>>>>> david jencks
>>>>>>>>>>> 
>>>>>>>>>>> On Oct 29, 2013, at 8:15 AM, Dave Smith <da...@candata.com>
>>>>>>>> wrote:
>>>>>>>>>>> 
>>>>>>>>>>>> I posted a bug a few weeks back and the thought was a new
>> version
>>>> is
>>>>>>>>>>> coming
>>>>>>>>>>>> soon. Since it was more of an annoyance I decided to wait. I am
>>>> now
>>>>>>>>>>> having
>>>>>>>>>>>> an intermittent problem with a service not getting activated.
>> Here
>>>>>> is
>>>>>>>> a
>>>>>>>>>>>> snippet from the log
>>>>>>>>>>>> 
>>>>>>>>>>>> 2013-10-29 10:49:27 4
>>>>>>>>>>>> [com.candata.core.server.impl.ServiceConfigurationImpl]
>>>>>>>>>>>> getParameterClass: Found class
>>>>>>>>>>>> com.candata.core.server.services.RunAsService
>>>>>>>>>>>> com.candata.core.server_1.0.0 [141] null null
>>>>>>>>>>>> 2013-10-29 10:49:27 4
>>>>>>>>>>>> [com.candata.core.server.impl.ServiceConfigurationImpl]
>>>>>> doFindMethod:
>>>>>>>>>>>> No method taking ServiceReference found, checking method taking
>>>>>>>>>>>> com.candata.core.server.services.RunAsService
>>>>>>>>>>>> com.candata.core.server_1.0.0 [141] null null
>>>>>>>>>>>> 2013-10-29 10:49:27 4
>>>>>>>>>>>> [com.candata.core.server.impl.ServiceConfigurationImpl] Found
>> bind
>>>>>>>>>>>> method: protected void
>>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>> 
>>>>>> 
>>>> 
>> com.candata.core.server.impl.ServiceConfigurationImpl.setRunAsService(com.candata.core.server.services.RunAsService)
>>>>>>>>>>>> com.candata.core.server_1.0.0 [141] null null
>>>>>>>>>>>> 2013-10-29 10:49:27 4
>>>>>> [com.candata.core.server.impl.ServiceRunnerImpl]
>>>>>>>>>>>> dependency map already present, do not collect dependencies
>>>>>>>>>>>> com.candata.core.server_1.0.0 [141] null null
>>>>>>>>>>>> 2013-10-29 10:49:27 4
>>>>>> [com.candata.core.server.impl.ServiceRunnerImpl]
>>>>>>>>>>>> getService did not win collecting dependencies, try creating
>>>> object
>>>>>>>>>>>> anyway. com.candata.core.server_1.0.0 [141] null null
>>>>>>>>>>>> 2013-10-29 10:49:27 3 FrameworkEvent WARNING
>>>>>>>>>>>> com.candata.core.server_1.0.0 [141] null null
>>>>>>>>>>>> 2013-10-29 10:49:27 2
>>>>>>>>>>>> [com.candata.core.server.impl.ServiceConfigurationImpl] Could
>> not
>>>>>> get
>>>>>>>>>>>> service from ref
>> {com.candata.core.server.services.ServiceRunner,
>>>>>>>>>>>> com.candata.core.server.services.RunAsService}={component.name
>>>>>>>>>>> =com.candata.core.server.impl.ServiceRunnerImpl,
>>>>>>>>>>>> component.id=233, service.id=91} com.candata.core.server_1.0.0
>>>>>> [141]
>>>>>>>>>>> null null
>>>>>>>>>>>> 
>>>>>>>>>>>> If -> getService did not win collecting dependencies, try
>> creating
>>>>>>>>>>> object
>>>>>>>>>>>> anyway
>>>>>>>>>>>> 
>>>>>>>>>>>> then the service never gets activated , if it wins then it does.
>>>> I
>>>>>>>>>>>> can see by the logs that the service is registered with OSGI
>>>> farther
>>>>>>>>>>>> up
>>>>>>>>>>>> 
>>>>>>>>>>>> 
>>>>>>>>>>>> 2013-10-29 10:49:27 3 ServiceEvent REGISTERED
>>>>>>>>>>>> com.candata.core.server_1.0.0 [141]
>>>>>>>>>>>> {com.candata.core.server.services.ServiceRunner,
>>>>>>>>>>>> com.candata.core.server.services.RunAsService}={component.name
>>>>>>>>>>> =com.candata.core.server.impl.ServiceRunnerImpl,
>>>>>>>>>>>> component.id=233, service.id=91} null
>>>>>>>>>>>> 
>>>>>>>>>>>> Is the next release soon? Or has this code not changed and could
>>>> be
>>>>>>>>>>>> considered a bug
>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>>>> 
>>>> ---------------------------------------------------------------------
>>>>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>>>>>>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>> ---------------------------------------------------------------------
>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>>>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>>>>> 
>>>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>>> 
>>>>>> 
>>>> 
>>>> 
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>> 
>>>> 
>> 
>> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Declarative Services

Posted by Dave Smith <da...@candata.com>.
Never see it. I will send you a copy of the full log off list. The only
other interesting thing is the Activate method in ServiceRunner does
register 3 other services that will be injected in components.

Dave Smith
Candata Ltd.
416-493-9020x2413
Direct: 416-855-2413


On Wed, Oct 30, 2013 at 5:52 PM, David Jencks <da...@yahoo.com>wrote:

> Does the activate method on ServiceRunnerImpl return? there should be a
> log entry from
>
>                 logger.log( LogService.LOG_DEBUG, "invoked {0}: {1}:
> parameters {2}", new Object[]
>                     { getMethodNamePrefix(), getMethodName(),
> Arrays.asList( params ) }, null );
>
> Are there really no log statements between "found bind method" and "could
> not get service"?
>
> thanks
> david jencks
>
>
> On Oct 30, 2013, at 2:03 PM, Dave Smith <da...@candata.com> wrote:
>
> > OK. So I managed to pull the Snapshot from last night. Same problem.
> >
> > So here is where it registers
> >
> > 2013-10-30 04:34:15 4
> > [com.candata.core.server.impl.ServiceConfigurationImpl(220)] dm
> > KeyValueDAO tracking 5 SingleStatic added
> > {com.candata.util.common.services.KeyValueDAO}=
> > {component.name=com.candata.util.server.impl.KeyValueDAOImpl,
> > component.id=39, service.exported.interfaces=*, service.id=130}
> > (enter) com.candata.core.server_1.0.0 [141] null null
> > 2013-10-30 04:34:15 4
> > [com.candata.core.server.impl.ServiceConfigurationImpl(220)]
> > ActivateInternal com.candata.core.server_1.0.0 [141] null null
> > 2013-10-30 04:34:15 4
> > [com.candata.core.server.impl.ServiceConfigurationImpl(220)]
> > Activating component from state 4 com.candata.core.server_1.0.0 [141]
> > null null
> > 2013-10-30 04:34:15 4
> > [com.candata.core.server.impl.ServiceConfigurationImpl(220)]
> > registration change queue [registered] com.candata.core.server_1.0.0
> > [141] null null
> > 2013-10-30 04:34:15 3 ServiceEvent REGISTERED
> > com.candata.core.server_1.0.0 [141]
> > {com.candata.core.server.services.ServiceConfiguration}=
> > {component.name=com.candata.core.server.impl.ServiceConfigurationImpl,
> > component.id=220, service.id=133} null
> >
> >
> >
> > And when it is injecting the references ...
> >
> >
> > 2013-10-30 04:34:15 4
> > [com.candata.core.server.impl.ServiceConfigurationImpl(220)] Declared
> > Method
> com.candata.core.server.impl.ServiceConfigurationImpl.setRunAsService([interface
> > org.osgi.framework.ServiceReference]) not found
> > com.candata.core.server_1.0.0 [141] null null
> > 2013-10-30 04:34:15 4
> > [com.candata.core.server.impl.ServiceConfigurationImpl(220)]
> > getParameterClass: Looking for interface class
> > com.candata.core.server.services.RunAsService through loader of
> > com.candata.core.server.impl.ServiceConfigurationImpl
> > com.candata.core.server_1.0.0 [141] null null
> > 2013-10-30 04:34:15 4
> > [com.candata.core.server.impl.ServiceConfigurationImpl(220)]
> > getParameterClass: Found class
> > com.candata.core.server.services.RunAsService
> > com.candata.core.server_1.0.0 [141] null null
> > 2013-10-30 04:34:15 4
> > [com.candata.core.server.impl.ServiceConfigurationImpl(220)]
> > doFindMethod: No method taking ServiceReference found, checking method
> > taking com.candata.core.server.services.RunAsService
> > com.candata.core.server_1.0.0 [141] null null
> > 2013-10-30 04:34:15 4
> > [com.candata.core.server.impl.ServiceConfigurationImpl(220)] Found
> > bind method: protected void
> >
> com.candata.core.server.impl.ServiceConfigurationImpl.setRunAsService(com.candata.core.server.services.RunAsService)
> > com.candata.core.server_1.0.0 [141] null null
> > 2013-10-30 04:34:15 2
> > [com.candata.core.server.impl.ServiceConfigurationImpl(220)] Could not
> > get service from ref {com.candata.core.server.services.ServiceRunner,
> > com.candata.core.server.services.RunAsService}={component.name
> =com.candata.core.server.impl.ServiceRunnerImpl,
> > component.id=223, service.id=92} com.candata.core.server_1.0.0 [141]
> > null null
> > 2013-10-30 04:34:15 3 FrameworkEvent WARNING
> > com.candata.core.server_1.0.0 [141] null null
> > 2013-10-30 04:34:15 4
> > [com.candata.core.server.impl.ServiceConfigurationImpl(220)]
> > Deactivating dependency managers com.candata.core.server_1.0.0 [141]
> > null null
> >
> > The only different thing about the RunAsService is that one impl is
> > registered as more than service ..
> >
> > Here is the registration above
> > 2013-10-30 04:34:14 3 ServiceEvent REGISTERED
> > com.candata.core.server_1.0.0 [141]
> > {com.candata.core.server.services.ServiceRunner,
> > com.candata.core.server.services.RunAsService}=
> > {component.name=com.candata.core.server.impl.ServiceRunnerImpl,
> > component.id=223, service.id=92} null
> >
> > and the activate
> > 013-10-30 04:34:14 4
> > [com.candata.core.server.impl.ServiceRunnerImpl(223)] Found activate
> > method: protected void
> >
> com.candata.core.server.impl.ServiceRunnerImpl.activate(org.osgi.framework.BundleContext)
> > throws java.lang.Exception com.candata.core.server_1.0.0 [141] null
> > null
> > 2013-10-30 04:34:14 4
> > [com.candata.core.server.impl.ServiceRunnerImpl(223)] invoking
> > activate: activate com.candata.core.server_1.0.0 [141] null null
> >
> >
> > Let me know if you need any more info , debugging code etc ...
> >
> >
> >
> >
> > On Wed, Oct 30, 2013 at 1:09 PM, David Jencks <david_jencks@yahoo.com
> >wrote:
> >
> >> There's another release candidate out that you could try, see the vote
> >> email.
> >>
> >> I don't commit if I have test failures, and I've never seen the problem
> >> you show below.  I suspect a maven issue.
> >>
> >> In the future please try to include enough information so that someone
> who
> >> is not already having the exact same problem you are can figure out what
> >> you are doing.  It's pretty safe to assume that the code in svn works
> well
> >> for the developers  so they probably don't know how to reproduce a
> problem
> >> you see.
> >>
> >> thanks
> >> david jencks
> >>
> >> On Oct 30, 2013, at 6:32 AM, Dave Smith <da...@candata.com> wrote:
> >>
> >>> Now the test cases are failing ..
> >>>
> >>> FYI:
> >>>
> >>> [INFO] --- org.apache.aries.versioning.plugin:0.1.0:version-check
> >>> (default-verify) @ org.apache.felix.scr ---
> >>> [WARNING] Error injecting:
> >>> org.apache.aries.versioning.mojo.VersionCheckerMojo
> >>> java.lang.NoClassDefFoundError:
> >>> org/sonatype/aether/resolution/ArtifactResolutionException
> >>>
> >>> Caused by: java.lang.ClassNotFoundException:
> >>> org.sonatype.aether.resolution.ArtifactResolutionException
> >>>       at
> >>>
> >>
> org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
> >>>       at
> >>>
> >>
> org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:259)
> >>>       at
> >>>
> >>
> org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:242)
> >>>       at
> >>>
> >>
> org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:227)
> >>>
> >>>
> >>> Looks like you are still a bit raw. Give me a heads up when you are a
> >>> little closer and I will test here.....
> >>>
> >>>
> >>>
> >>> On Tue, Oct 29, 2013 at 7:39 PM, David Jencks <david_jencks@yahoo.com
> >>> wrote:
> >>>
> >>>> Ah, I'm sort of in the middle of a release.
> >>>>
> >>>> You can alter the scr pom locally to point to 1.5.0-SNAPSHOT, get the
> >> 1.4
> >>>> release candidate from
> >>>>
> https://repository.apache.org/content/repositories/orgapachefelix-024/,
> >>>> or build the 1.4 release candidate from
> >>>>
> >>>>
> >>>>
> >>
> https://svn.apache.org/repos/asf/felix/releases/org.apache.felix.utils-1.4.0
> >>>>
> >>>> hope this helps
> >>>> david jencks
> >>>>
> >>>> On Oct 29, 2013, at 11:36 AM, Dave Smith <da...@candata.com>
> >> wrote:
> >>>>
> >>>>> [INFO] Building Apache Felix Declarative Services 1.7-SNAPSHOT
> >>>>> [INFO]
> >>>>>
> >> ------------------------------------------------------------------------
> >>>>> [WARNING] The POM for
> org.apache.felix:org.apache.felix.utils:jar:1.4.0
> >>>> is
> >>>>> missing, no dependency information available
> >>>>> [INFO]
> >>>>>
> >> ------------------------------------------------------------------------
> >>>>>
> >>>>> [ERROR] Failed to execute goal on project org.apache.felix.scr: Could
> >> not
> >>>>> resolve dependencies for project
> >>>>> org.apache.felix:org.apache.felix.scr:bundle:1.7-SNAPSHOT: Failure to
> >>>> find
> >>>>> org.apache.felix:org.apache.felix.utils:jar:1.4.0 in
> >>>>> http://repo.maven.apache.org/maven2 was cached in the local
> >> repository,
> >>>>> resolution will not be reattempted until the update interval of
> central
> >>>> has
> >>>>> elapsed or updates are forced -> [Help 1]
> >>>>>
> >>>>>
> >>>>>
> >>>>> On Tue, Oct 29, 2013 at 2:04 PM, David Jencks <
> david_jencks@yahoo.com
> >>>>> wrote:
> >>>>>
> >>>>>> Well, the 1.7-SNAPSHOT in the apache nexus snapshot repo is up to
> >> date.
> >>>>>>
> >>>>>> I run mvn clean install in scr with no problems, using maven 3.0.4.
> >>>> What
> >>>>>> problems are you seeing?
> >>>>>>
> >>>>>> thanks
> >>>>>> david jencks
> >>>>>>
> >>>>>> On Oct 29, 2013, at 10:54 AM, Dave Smith <da...@candata.com>
> >>>> wrote:
> >>>>>>
> >>>>>>> I tried following the instructions but It seems the scr is not
> built
> >> in
> >>>>>> and
> >>>>>>> when I try and run mvn in the scr dir that does not work either.
> >>>>>>>
> >>>>>>> I am following ...
> >>>>>>>
> >>>>>>> http://felix.apache.org/site/building-felix.html
> >>>>>>>
> >>>>>>> instructuctions
> >>>>>>>
> >>>>>>> Dave Smith
> >>>>>>> Candata Ltd.
> >>>>>>> 416-493-9020x2413
> >>>>>>> Direct: 416-855-2413
> >>>>>>>
> >>>>>>>
> >>>>>>> On Tue, Oct 29, 2013 at 11:41 AM, Dave Smith <
> dave.smith@candata.com
> >>>
> >>>>>> wrote:
> >>>>>>>
> >>>>>>>> Latest 1.6.2. I will grab the snapshot and report back...
> >>>>>>>>
> >>>>>>>> Dave Smith
> >>>>>>>> Candata Ltd.
> >>>>>>>> 416-493-9020x2413
> >>>>>>>> Direct: 416-855-2413
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> On Tue, Oct 29, 2013 at 11:38 AM, David Jencks <
> >>>> david_jencks@yahoo.com
> >>>>>>> wrote:
> >>>>>>>>
> >>>>>>>>> Not telling us the exact version of the code you are using makes
> it
> >>>>>>>>> pretty much impossible to think about investigating this.
> >>>>>>>>>
> >>>>>>>>> Please see if this is a problem with the current trunk code which
> >> you
> >>>>>> can
> >>>>>>>>> build yourself or use the 1.7-SNAPSHOT on the apache snapshot
> repo.
> >>>>>>>>>
> >>>>>>>>> I'm working on a release and at this point we're finding and
> fixing
> >>>>>> bugs.
> >>>>>>>>> When we've stopped finding bugs I'll release.
> >>>>>>>>>
> >>>>>>>>> thanks
> >>>>>>>>> david jencks
> >>>>>>>>>
> >>>>>>>>> On Oct 29, 2013, at 8:15 AM, Dave Smith <da...@candata.com>
> >>>>>> wrote:
> >>>>>>>>>
> >>>>>>>>>> I posted a bug a few weeks back and the thought was a new
> version
> >> is
> >>>>>>>>> coming
> >>>>>>>>>> soon. Since it was more of an annoyance I decided to wait. I am
> >> now
> >>>>>>>>> having
> >>>>>>>>>> an intermittent problem with a service not getting activated.
> Here
> >>>> is
> >>>>>> a
> >>>>>>>>>> snippet from the log
> >>>>>>>>>>
> >>>>>>>>>> 2013-10-29 10:49:27 4
> >>>>>>>>>> [com.candata.core.server.impl.ServiceConfigurationImpl]
> >>>>>>>>>> getParameterClass: Found class
> >>>>>>>>>> com.candata.core.server.services.RunAsService
> >>>>>>>>>> com.candata.core.server_1.0.0 [141] null null
> >>>>>>>>>> 2013-10-29 10:49:27 4
> >>>>>>>>>> [com.candata.core.server.impl.ServiceConfigurationImpl]
> >>>> doFindMethod:
> >>>>>>>>>> No method taking ServiceReference found, checking method taking
> >>>>>>>>>> com.candata.core.server.services.RunAsService
> >>>>>>>>>> com.candata.core.server_1.0.0 [141] null null
> >>>>>>>>>> 2013-10-29 10:49:27 4
> >>>>>>>>>> [com.candata.core.server.impl.ServiceConfigurationImpl] Found
> bind
> >>>>>>>>>> method: protected void
> >>>>>>>>>>
> >>>>>>>>>
> >>>>>>
> >>>>
> >>
> com.candata.core.server.impl.ServiceConfigurationImpl.setRunAsService(com.candata.core.server.services.RunAsService)
> >>>>>>>>>> com.candata.core.server_1.0.0 [141] null null
> >>>>>>>>>> 2013-10-29 10:49:27 4
> >>>> [com.candata.core.server.impl.ServiceRunnerImpl]
> >>>>>>>>>> dependency map already present, do not collect dependencies
> >>>>>>>>>> com.candata.core.server_1.0.0 [141] null null
> >>>>>>>>>> 2013-10-29 10:49:27 4
> >>>> [com.candata.core.server.impl.ServiceRunnerImpl]
> >>>>>>>>>> getService did not win collecting dependencies, try creating
> >> object
> >>>>>>>>>> anyway. com.candata.core.server_1.0.0 [141] null null
> >>>>>>>>>> 2013-10-29 10:49:27 3 FrameworkEvent WARNING
> >>>>>>>>>> com.candata.core.server_1.0.0 [141] null null
> >>>>>>>>>> 2013-10-29 10:49:27 2
> >>>>>>>>>> [com.candata.core.server.impl.ServiceConfigurationImpl] Could
> not
> >>>> get
> >>>>>>>>>> service from ref
> {com.candata.core.server.services.ServiceRunner,
> >>>>>>>>>> com.candata.core.server.services.RunAsService}={component.name
> >>>>>>>>> =com.candata.core.server.impl.ServiceRunnerImpl,
> >>>>>>>>>> component.id=233, service.id=91} com.candata.core.server_1.0.0
> >>>> [141]
> >>>>>>>>> null null
> >>>>>>>>>>
> >>>>>>>>>> If -> getService did not win collecting dependencies, try
> creating
> >>>>>>>>> object
> >>>>>>>>>> anyway
> >>>>>>>>>>
> >>>>>>>>>> then the service never gets activated , if it wins then it does.
> >> I
> >>>>>>>>>> can see by the logs that the service is registered with OSGI
> >> farther
> >>>>>>>>>> up
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>> 2013-10-29 10:49:27 3 ServiceEvent REGISTERED
> >>>>>>>>>> com.candata.core.server_1.0.0 [141]
> >>>>>>>>>> {com.candata.core.server.services.ServiceRunner,
> >>>>>>>>>> com.candata.core.server.services.RunAsService}={component.name
> >>>>>>>>> =com.candata.core.server.impl.ServiceRunnerImpl,
> >>>>>>>>>> component.id=233, service.id=91} null
> >>>>>>>>>>
> >>>>>>>>>> Is the next release soon? Or has this code not changed and could
> >> be
> >>>>>>>>>> considered a bug
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >> ---------------------------------------------------------------------
> >>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> >>>>>>>>> For additional commands, e-mail: users-help@felix.apache.org
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> ---------------------------------------------------------------------
> >>>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> >>>>>> For additional commands, e-mail: users-help@felix.apache.org
> >>>>>>
> >>>>>>
> >>>>
> >>>>
> >>>> ---------------------------------------------------------------------
> >>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> >>>> For additional commands, e-mail: users-help@felix.apache.org
> >>>>
> >>>>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> >> For additional commands, e-mail: users-help@felix.apache.org
> >>
> >>
>
>

Re: Declarative Services

Posted by David Jencks <da...@yahoo.com>.
Does the activate method on ServiceRunnerImpl return? there should be a log entry from

                logger.log( LogService.LOG_DEBUG, "invoked {0}: {1}: parameters {2}", new Object[]
                    { getMethodNamePrefix(), getMethodName(), Arrays.asList( params ) }, null );

Are there really no log statements between "found bind method" and "could not get service"?

thanks
david jencks


On Oct 30, 2013, at 2:03 PM, Dave Smith <da...@candata.com> wrote:

> OK. So I managed to pull the Snapshot from last night. Same problem.
> 
> So here is where it registers
> 
> 2013-10-30 04:34:15 4
> [com.candata.core.server.impl.ServiceConfigurationImpl(220)] dm
> KeyValueDAO tracking 5 SingleStatic added
> {com.candata.util.common.services.KeyValueDAO}=
> {component.name=com.candata.util.server.impl.KeyValueDAOImpl,
> component.id=39, service.exported.interfaces=*, service.id=130}
> (enter) com.candata.core.server_1.0.0 [141] null null
> 2013-10-30 04:34:15 4
> [com.candata.core.server.impl.ServiceConfigurationImpl(220)]
> ActivateInternal com.candata.core.server_1.0.0 [141] null null
> 2013-10-30 04:34:15 4
> [com.candata.core.server.impl.ServiceConfigurationImpl(220)]
> Activating component from state 4 com.candata.core.server_1.0.0 [141]
> null null
> 2013-10-30 04:34:15 4
> [com.candata.core.server.impl.ServiceConfigurationImpl(220)]
> registration change queue [registered] com.candata.core.server_1.0.0
> [141] null null
> 2013-10-30 04:34:15 3 ServiceEvent REGISTERED
> com.candata.core.server_1.0.0 [141]
> {com.candata.core.server.services.ServiceConfiguration}=
> {component.name=com.candata.core.server.impl.ServiceConfigurationImpl,
> component.id=220, service.id=133} null
> 
> 
> 
> And when it is injecting the references ...
> 
> 
> 2013-10-30 04:34:15 4
> [com.candata.core.server.impl.ServiceConfigurationImpl(220)] Declared
> Method com.candata.core.server.impl.ServiceConfigurationImpl.setRunAsService([interface
> org.osgi.framework.ServiceReference]) not found
> com.candata.core.server_1.0.0 [141] null null
> 2013-10-30 04:34:15 4
> [com.candata.core.server.impl.ServiceConfigurationImpl(220)]
> getParameterClass: Looking for interface class
> com.candata.core.server.services.RunAsService through loader of
> com.candata.core.server.impl.ServiceConfigurationImpl
> com.candata.core.server_1.0.0 [141] null null
> 2013-10-30 04:34:15 4
> [com.candata.core.server.impl.ServiceConfigurationImpl(220)]
> getParameterClass: Found class
> com.candata.core.server.services.RunAsService
> com.candata.core.server_1.0.0 [141] null null
> 2013-10-30 04:34:15 4
> [com.candata.core.server.impl.ServiceConfigurationImpl(220)]
> doFindMethod: No method taking ServiceReference found, checking method
> taking com.candata.core.server.services.RunAsService
> com.candata.core.server_1.0.0 [141] null null
> 2013-10-30 04:34:15 4
> [com.candata.core.server.impl.ServiceConfigurationImpl(220)] Found
> bind method: protected void
> com.candata.core.server.impl.ServiceConfigurationImpl.setRunAsService(com.candata.core.server.services.RunAsService)
> com.candata.core.server_1.0.0 [141] null null
> 2013-10-30 04:34:15 2
> [com.candata.core.server.impl.ServiceConfigurationImpl(220)] Could not
> get service from ref {com.candata.core.server.services.ServiceRunner,
> com.candata.core.server.services.RunAsService}={component.name=com.candata.core.server.impl.ServiceRunnerImpl,
> component.id=223, service.id=92} com.candata.core.server_1.0.0 [141]
> null null
> 2013-10-30 04:34:15 3 FrameworkEvent WARNING
> com.candata.core.server_1.0.0 [141] null null
> 2013-10-30 04:34:15 4
> [com.candata.core.server.impl.ServiceConfigurationImpl(220)]
> Deactivating dependency managers com.candata.core.server_1.0.0 [141]
> null null
> 
> The only different thing about the RunAsService is that one impl is
> registered as more than service ..
> 
> Here is the registration above
> 2013-10-30 04:34:14 3 ServiceEvent REGISTERED
> com.candata.core.server_1.0.0 [141]
> {com.candata.core.server.services.ServiceRunner,
> com.candata.core.server.services.RunAsService}=
> {component.name=com.candata.core.server.impl.ServiceRunnerImpl,
> component.id=223, service.id=92} null
> 
> and the activate
> 013-10-30 04:34:14 4
> [com.candata.core.server.impl.ServiceRunnerImpl(223)] Found activate
> method: protected void
> com.candata.core.server.impl.ServiceRunnerImpl.activate(org.osgi.framework.BundleContext)
> throws java.lang.Exception com.candata.core.server_1.0.0 [141] null
> null
> 2013-10-30 04:34:14 4
> [com.candata.core.server.impl.ServiceRunnerImpl(223)] invoking
> activate: activate com.candata.core.server_1.0.0 [141] null null
> 
> 
> Let me know if you need any more info , debugging code etc ...
> 
> 
> 
> 
> On Wed, Oct 30, 2013 at 1:09 PM, David Jencks <da...@yahoo.com>wrote:
> 
>> There's another release candidate out that you could try, see the vote
>> email.
>> 
>> I don't commit if I have test failures, and I've never seen the problem
>> you show below.  I suspect a maven issue.
>> 
>> In the future please try to include enough information so that someone who
>> is not already having the exact same problem you are can figure out what
>> you are doing.  It's pretty safe to assume that the code in svn works well
>> for the developers  so they probably don't know how to reproduce a problem
>> you see.
>> 
>> thanks
>> david jencks
>> 
>> On Oct 30, 2013, at 6:32 AM, Dave Smith <da...@candata.com> wrote:
>> 
>>> Now the test cases are failing ..
>>> 
>>> FYI:
>>> 
>>> [INFO] --- org.apache.aries.versioning.plugin:0.1.0:version-check
>>> (default-verify) @ org.apache.felix.scr ---
>>> [WARNING] Error injecting:
>>> org.apache.aries.versioning.mojo.VersionCheckerMojo
>>> java.lang.NoClassDefFoundError:
>>> org/sonatype/aether/resolution/ArtifactResolutionException
>>> 
>>> Caused by: java.lang.ClassNotFoundException:
>>> org.sonatype.aether.resolution.ArtifactResolutionException
>>>       at
>>> 
>> org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
>>>       at
>>> 
>> org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:259)
>>>       at
>>> 
>> org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:242)
>>>       at
>>> 
>> org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:227)
>>> 
>>> 
>>> Looks like you are still a bit raw. Give me a heads up when you are a
>>> little closer and I will test here.....
>>> 
>>> 
>>> 
>>> On Tue, Oct 29, 2013 at 7:39 PM, David Jencks <david_jencks@yahoo.com
>>> wrote:
>>> 
>>>> Ah, I'm sort of in the middle of a release.
>>>> 
>>>> You can alter the scr pom locally to point to 1.5.0-SNAPSHOT, get the
>> 1.4
>>>> release candidate from
>>>> https://repository.apache.org/content/repositories/orgapachefelix-024/,
>>>> or build the 1.4 release candidate from
>>>> 
>>>> 
>>>> 
>> https://svn.apache.org/repos/asf/felix/releases/org.apache.felix.utils-1.4.0
>>>> 
>>>> hope this helps
>>>> david jencks
>>>> 
>>>> On Oct 29, 2013, at 11:36 AM, Dave Smith <da...@candata.com>
>> wrote:
>>>> 
>>>>> [INFO] Building Apache Felix Declarative Services 1.7-SNAPSHOT
>>>>> [INFO]
>>>>> 
>> ------------------------------------------------------------------------
>>>>> [WARNING] The POM for org.apache.felix:org.apache.felix.utils:jar:1.4.0
>>>> is
>>>>> missing, no dependency information available
>>>>> [INFO]
>>>>> 
>> ------------------------------------------------------------------------
>>>>> 
>>>>> [ERROR] Failed to execute goal on project org.apache.felix.scr: Could
>> not
>>>>> resolve dependencies for project
>>>>> org.apache.felix:org.apache.felix.scr:bundle:1.7-SNAPSHOT: Failure to
>>>> find
>>>>> org.apache.felix:org.apache.felix.utils:jar:1.4.0 in
>>>>> http://repo.maven.apache.org/maven2 was cached in the local
>> repository,
>>>>> resolution will not be reattempted until the update interval of central
>>>> has
>>>>> elapsed or updates are forced -> [Help 1]
>>>>> 
>>>>> 
>>>>> 
>>>>> On Tue, Oct 29, 2013 at 2:04 PM, David Jencks <david_jencks@yahoo.com
>>>>> wrote:
>>>>> 
>>>>>> Well, the 1.7-SNAPSHOT in the apache nexus snapshot repo is up to
>> date.
>>>>>> 
>>>>>> I run mvn clean install in scr with no problems, using maven 3.0.4.
>>>> What
>>>>>> problems are you seeing?
>>>>>> 
>>>>>> thanks
>>>>>> david jencks
>>>>>> 
>>>>>> On Oct 29, 2013, at 10:54 AM, Dave Smith <da...@candata.com>
>>>> wrote:
>>>>>> 
>>>>>>> I tried following the instructions but It seems the scr is not built
>> in
>>>>>> and
>>>>>>> when I try and run mvn in the scr dir that does not work either.
>>>>>>> 
>>>>>>> I am following ...
>>>>>>> 
>>>>>>> http://felix.apache.org/site/building-felix.html
>>>>>>> 
>>>>>>> instructuctions
>>>>>>> 
>>>>>>> Dave Smith
>>>>>>> Candata Ltd.
>>>>>>> 416-493-9020x2413
>>>>>>> Direct: 416-855-2413
>>>>>>> 
>>>>>>> 
>>>>>>> On Tue, Oct 29, 2013 at 11:41 AM, Dave Smith <dave.smith@candata.com
>>> 
>>>>>> wrote:
>>>>>>> 
>>>>>>>> Latest 1.6.2. I will grab the snapshot and report back...
>>>>>>>> 
>>>>>>>> Dave Smith
>>>>>>>> Candata Ltd.
>>>>>>>> 416-493-9020x2413
>>>>>>>> Direct: 416-855-2413
>>>>>>>> 
>>>>>>>> 
>>>>>>>> On Tue, Oct 29, 2013 at 11:38 AM, David Jencks <
>>>> david_jencks@yahoo.com
>>>>>>> wrote:
>>>>>>>> 
>>>>>>>>> Not telling us the exact version of the code you are using makes it
>>>>>>>>> pretty much impossible to think about investigating this.
>>>>>>>>> 
>>>>>>>>> Please see if this is a problem with the current trunk code which
>> you
>>>>>> can
>>>>>>>>> build yourself or use the 1.7-SNAPSHOT on the apache snapshot repo.
>>>>>>>>> 
>>>>>>>>> I'm working on a release and at this point we're finding and fixing
>>>>>> bugs.
>>>>>>>>> When we've stopped finding bugs I'll release.
>>>>>>>>> 
>>>>>>>>> thanks
>>>>>>>>> david jencks
>>>>>>>>> 
>>>>>>>>> On Oct 29, 2013, at 8:15 AM, Dave Smith <da...@candata.com>
>>>>>> wrote:
>>>>>>>>> 
>>>>>>>>>> I posted a bug a few weeks back and the thought was a new version
>> is
>>>>>>>>> coming
>>>>>>>>>> soon. Since it was more of an annoyance I decided to wait. I am
>> now
>>>>>>>>> having
>>>>>>>>>> an intermittent problem with a service not getting activated. Here
>>>> is
>>>>>> a
>>>>>>>>>> snippet from the log
>>>>>>>>>> 
>>>>>>>>>> 2013-10-29 10:49:27 4
>>>>>>>>>> [com.candata.core.server.impl.ServiceConfigurationImpl]
>>>>>>>>>> getParameterClass: Found class
>>>>>>>>>> com.candata.core.server.services.RunAsService
>>>>>>>>>> com.candata.core.server_1.0.0 [141] null null
>>>>>>>>>> 2013-10-29 10:49:27 4
>>>>>>>>>> [com.candata.core.server.impl.ServiceConfigurationImpl]
>>>> doFindMethod:
>>>>>>>>>> No method taking ServiceReference found, checking method taking
>>>>>>>>>> com.candata.core.server.services.RunAsService
>>>>>>>>>> com.candata.core.server_1.0.0 [141] null null
>>>>>>>>>> 2013-10-29 10:49:27 4
>>>>>>>>>> [com.candata.core.server.impl.ServiceConfigurationImpl] Found bind
>>>>>>>>>> method: protected void
>>>>>>>>>> 
>>>>>>>>> 
>>>>>> 
>>>> 
>> com.candata.core.server.impl.ServiceConfigurationImpl.setRunAsService(com.candata.core.server.services.RunAsService)
>>>>>>>>>> com.candata.core.server_1.0.0 [141] null null
>>>>>>>>>> 2013-10-29 10:49:27 4
>>>> [com.candata.core.server.impl.ServiceRunnerImpl]
>>>>>>>>>> dependency map already present, do not collect dependencies
>>>>>>>>>> com.candata.core.server_1.0.0 [141] null null
>>>>>>>>>> 2013-10-29 10:49:27 4
>>>> [com.candata.core.server.impl.ServiceRunnerImpl]
>>>>>>>>>> getService did not win collecting dependencies, try creating
>> object
>>>>>>>>>> anyway. com.candata.core.server_1.0.0 [141] null null
>>>>>>>>>> 2013-10-29 10:49:27 3 FrameworkEvent WARNING
>>>>>>>>>> com.candata.core.server_1.0.0 [141] null null
>>>>>>>>>> 2013-10-29 10:49:27 2
>>>>>>>>>> [com.candata.core.server.impl.ServiceConfigurationImpl] Could not
>>>> get
>>>>>>>>>> service from ref {com.candata.core.server.services.ServiceRunner,
>>>>>>>>>> com.candata.core.server.services.RunAsService}={component.name
>>>>>>>>> =com.candata.core.server.impl.ServiceRunnerImpl,
>>>>>>>>>> component.id=233, service.id=91} com.candata.core.server_1.0.0
>>>> [141]
>>>>>>>>> null null
>>>>>>>>>> 
>>>>>>>>>> If -> getService did not win collecting dependencies, try creating
>>>>>>>>> object
>>>>>>>>>> anyway
>>>>>>>>>> 
>>>>>>>>>> then the service never gets activated , if it wins then it does.
>> I
>>>>>>>>>> can see by the logs that the service is registered with OSGI
>> farther
>>>>>>>>>> up
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> 2013-10-29 10:49:27 3 ServiceEvent REGISTERED
>>>>>>>>>> com.candata.core.server_1.0.0 [141]
>>>>>>>>>> {com.candata.core.server.services.ServiceRunner,
>>>>>>>>>> com.candata.core.server.services.RunAsService}={component.name
>>>>>>>>> =com.candata.core.server.impl.ServiceRunnerImpl,
>>>>>>>>>> component.id=233, service.id=91} null
>>>>>>>>>> 
>>>>>>>>>> Is the next release soon? Or has this code not changed and could
>> be
>>>>>>>>>> considered a bug
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>> ---------------------------------------------------------------------
>>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>>>>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>>> 
>>>>>> 
>>>> 
>>>> 
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>> 
>>>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>> 
>> 


Re: Declarative Services

Posted by Dave Smith <da...@candata.com>.
OK. So I managed to pull the Snapshot from last night. Same problem.

So here is where it registers

2013-10-30 04:34:15 4
[com.candata.core.server.impl.ServiceConfigurationImpl(220)] dm
KeyValueDAO tracking 5 SingleStatic added
{com.candata.util.common.services.KeyValueDAO}=
{component.name=com.candata.util.server.impl.KeyValueDAOImpl,
component.id=39, service.exported.interfaces=*, service.id=130}
(enter) com.candata.core.server_1.0.0 [141] null null
2013-10-30 04:34:15 4
[com.candata.core.server.impl.ServiceConfigurationImpl(220)]
ActivateInternal com.candata.core.server_1.0.0 [141] null null
2013-10-30 04:34:15 4
[com.candata.core.server.impl.ServiceConfigurationImpl(220)]
Activating component from state 4 com.candata.core.server_1.0.0 [141]
null null
2013-10-30 04:34:15 4
[com.candata.core.server.impl.ServiceConfigurationImpl(220)]
registration change queue [registered] com.candata.core.server_1.0.0
[141] null null
2013-10-30 04:34:15 3 ServiceEvent REGISTERED
com.candata.core.server_1.0.0 [141]
{com.candata.core.server.services.ServiceConfiguration}=
{component.name=com.candata.core.server.impl.ServiceConfigurationImpl,
component.id=220, service.id=133} null



And when it is injecting the references ...


2013-10-30 04:34:15 4
[com.candata.core.server.impl.ServiceConfigurationImpl(220)] Declared
Method com.candata.core.server.impl.ServiceConfigurationImpl.setRunAsService([interface
org.osgi.framework.ServiceReference]) not found
com.candata.core.server_1.0.0 [141] null null
2013-10-30 04:34:15 4
[com.candata.core.server.impl.ServiceConfigurationImpl(220)]
getParameterClass: Looking for interface class
com.candata.core.server.services.RunAsService through loader of
com.candata.core.server.impl.ServiceConfigurationImpl
com.candata.core.server_1.0.0 [141] null null
2013-10-30 04:34:15 4
[com.candata.core.server.impl.ServiceConfigurationImpl(220)]
getParameterClass: Found class
com.candata.core.server.services.RunAsService
com.candata.core.server_1.0.0 [141] null null
2013-10-30 04:34:15 4
[com.candata.core.server.impl.ServiceConfigurationImpl(220)]
doFindMethod: No method taking ServiceReference found, checking method
taking com.candata.core.server.services.RunAsService
com.candata.core.server_1.0.0 [141] null null
2013-10-30 04:34:15 4
[com.candata.core.server.impl.ServiceConfigurationImpl(220)] Found
bind method: protected void
com.candata.core.server.impl.ServiceConfigurationImpl.setRunAsService(com.candata.core.server.services.RunAsService)
com.candata.core.server_1.0.0 [141] null null
2013-10-30 04:34:15 2
[com.candata.core.server.impl.ServiceConfigurationImpl(220)] Could not
get service from ref {com.candata.core.server.services.ServiceRunner,
com.candata.core.server.services.RunAsService}={component.name=com.candata.core.server.impl.ServiceRunnerImpl,
component.id=223, service.id=92} com.candata.core.server_1.0.0 [141]
null null
2013-10-30 04:34:15 3 FrameworkEvent WARNING
com.candata.core.server_1.0.0 [141] null null
2013-10-30 04:34:15 4
[com.candata.core.server.impl.ServiceConfigurationImpl(220)]
Deactivating dependency managers com.candata.core.server_1.0.0 [141]
null null

The only different thing about the RunAsService is that one impl is
registered as more than service ..

 Here is the registration above
2013-10-30 04:34:14 3 ServiceEvent REGISTERED
com.candata.core.server_1.0.0 [141]
{com.candata.core.server.services.ServiceRunner,
com.candata.core.server.services.RunAsService}=
{component.name=com.candata.core.server.impl.ServiceRunnerImpl,
component.id=223, service.id=92} null

and the activate
013-10-30 04:34:14 4
[com.candata.core.server.impl.ServiceRunnerImpl(223)] Found activate
method: protected void
com.candata.core.server.impl.ServiceRunnerImpl.activate(org.osgi.framework.BundleContext)
throws java.lang.Exception com.candata.core.server_1.0.0 [141] null
null
2013-10-30 04:34:14 4
[com.candata.core.server.impl.ServiceRunnerImpl(223)] invoking
activate: activate com.candata.core.server_1.0.0 [141] null null


Let me know if you need any more info , debugging code etc ...




On Wed, Oct 30, 2013 at 1:09 PM, David Jencks <da...@yahoo.com>wrote:

> There's another release candidate out that you could try, see the vote
> email.
>
> I don't commit if I have test failures, and I've never seen the problem
> you show below.  I suspect a maven issue.
>
> In the future please try to include enough information so that someone who
> is not already having the exact same problem you are can figure out what
> you are doing.  It's pretty safe to assume that the code in svn works well
> for the developers  so they probably don't know how to reproduce a problem
> you see.
>
> thanks
> david jencks
>
> On Oct 30, 2013, at 6:32 AM, Dave Smith <da...@candata.com> wrote:
>
> > Now the test cases are failing ..
> >
> > FYI:
> >
> > [INFO] --- org.apache.aries.versioning.plugin:0.1.0:version-check
> > (default-verify) @ org.apache.felix.scr ---
> > [WARNING] Error injecting:
> > org.apache.aries.versioning.mojo.VersionCheckerMojo
> > java.lang.NoClassDefFoundError:
> > org/sonatype/aether/resolution/ArtifactResolutionException
> >
> > Caused by: java.lang.ClassNotFoundException:
> > org.sonatype.aether.resolution.ArtifactResolutionException
> >        at
> >
> org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
> >        at
> >
> org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:259)
> >        at
> >
> org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:242)
> >        at
> >
> org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:227)
> >
> >
> > Looks like you are still a bit raw. Give me a heads up when you are a
> > little closer and I will test here.....
> >
> >
> >
> > On Tue, Oct 29, 2013 at 7:39 PM, David Jencks <david_jencks@yahoo.com
> >wrote:
> >
> >> Ah, I'm sort of in the middle of a release.
> >>
> >> You can alter the scr pom locally to point to 1.5.0-SNAPSHOT, get the
> 1.4
> >> release candidate from
> >> https://repository.apache.org/content/repositories/orgapachefelix-024/,
> >> or build the 1.4 release candidate from
> >>
> >>
> >>
> https://svn.apache.org/repos/asf/felix/releases/org.apache.felix.utils-1.4.0
> >>
> >> hope this helps
> >> david jencks
> >>
> >> On Oct 29, 2013, at 11:36 AM, Dave Smith <da...@candata.com>
> wrote:
> >>
> >>> [INFO] Building Apache Felix Declarative Services 1.7-SNAPSHOT
> >>> [INFO]
> >>>
> ------------------------------------------------------------------------
> >>> [WARNING] The POM for org.apache.felix:org.apache.felix.utils:jar:1.4.0
> >> is
> >>> missing, no dependency information available
> >>> [INFO]
> >>>
> ------------------------------------------------------------------------
> >>>
> >>> [ERROR] Failed to execute goal on project org.apache.felix.scr: Could
> not
> >>> resolve dependencies for project
> >>> org.apache.felix:org.apache.felix.scr:bundle:1.7-SNAPSHOT: Failure to
> >> find
> >>> org.apache.felix:org.apache.felix.utils:jar:1.4.0 in
> >>> http://repo.maven.apache.org/maven2 was cached in the local
> repository,
> >>> resolution will not be reattempted until the update interval of central
> >> has
> >>> elapsed or updates are forced -> [Help 1]
> >>>
> >>>
> >>>
> >>> On Tue, Oct 29, 2013 at 2:04 PM, David Jencks <david_jencks@yahoo.com
> >>> wrote:
> >>>
> >>>> Well, the 1.7-SNAPSHOT in the apache nexus snapshot repo is up to
> date.
> >>>>
> >>>> I run mvn clean install in scr with no problems, using maven 3.0.4.
> >> What
> >>>> problems are you seeing?
> >>>>
> >>>> thanks
> >>>> david jencks
> >>>>
> >>>> On Oct 29, 2013, at 10:54 AM, Dave Smith <da...@candata.com>
> >> wrote:
> >>>>
> >>>>> I tried following the instructions but It seems the scr is not built
> in
> >>>> and
> >>>>> when I try and run mvn in the scr dir that does not work either.
> >>>>>
> >>>>> I am following ...
> >>>>>
> >>>>> http://felix.apache.org/site/building-felix.html
> >>>>>
> >>>>> instructuctions
> >>>>>
> >>>>> Dave Smith
> >>>>> Candata Ltd.
> >>>>> 416-493-9020x2413
> >>>>> Direct: 416-855-2413
> >>>>>
> >>>>>
> >>>>> On Tue, Oct 29, 2013 at 11:41 AM, Dave Smith <dave.smith@candata.com
> >
> >>>> wrote:
> >>>>>
> >>>>>> Latest 1.6.2. I will grab the snapshot and report back...
> >>>>>>
> >>>>>> Dave Smith
> >>>>>> Candata Ltd.
> >>>>>> 416-493-9020x2413
> >>>>>> Direct: 416-855-2413
> >>>>>>
> >>>>>>
> >>>>>> On Tue, Oct 29, 2013 at 11:38 AM, David Jencks <
> >> david_jencks@yahoo.com
> >>>>> wrote:
> >>>>>>
> >>>>>>> Not telling us the exact version of the code you are using makes it
> >>>>>>> pretty much impossible to think about investigating this.
> >>>>>>>
> >>>>>>> Please see if this is a problem with the current trunk code which
> you
> >>>> can
> >>>>>>> build yourself or use the 1.7-SNAPSHOT on the apache snapshot repo.
> >>>>>>>
> >>>>>>> I'm working on a release and at this point we're finding and fixing
> >>>> bugs.
> >>>>>>> When we've stopped finding bugs I'll release.
> >>>>>>>
> >>>>>>> thanks
> >>>>>>> david jencks
> >>>>>>>
> >>>>>>> On Oct 29, 2013, at 8:15 AM, Dave Smith <da...@candata.com>
> >>>> wrote:
> >>>>>>>
> >>>>>>>> I posted a bug a few weeks back and the thought was a new version
> is
> >>>>>>> coming
> >>>>>>>> soon. Since it was more of an annoyance I decided to wait. I am
> now
> >>>>>>> having
> >>>>>>>> an intermittent problem with a service not getting activated. Here
> >> is
> >>>> a
> >>>>>>>> snippet from the log
> >>>>>>>>
> >>>>>>>> 2013-10-29 10:49:27 4
> >>>>>>>> [com.candata.core.server.impl.ServiceConfigurationImpl]
> >>>>>>>> getParameterClass: Found class
> >>>>>>>> com.candata.core.server.services.RunAsService
> >>>>>>>> com.candata.core.server_1.0.0 [141] null null
> >>>>>>>> 2013-10-29 10:49:27 4
> >>>>>>>> [com.candata.core.server.impl.ServiceConfigurationImpl]
> >> doFindMethod:
> >>>>>>>> No method taking ServiceReference found, checking method taking
> >>>>>>>> com.candata.core.server.services.RunAsService
> >>>>>>>> com.candata.core.server_1.0.0 [141] null null
> >>>>>>>> 2013-10-29 10:49:27 4
> >>>>>>>> [com.candata.core.server.impl.ServiceConfigurationImpl] Found bind
> >>>>>>>> method: protected void
> >>>>>>>>
> >>>>>>>
> >>>>
> >>
> com.candata.core.server.impl.ServiceConfigurationImpl.setRunAsService(com.candata.core.server.services.RunAsService)
> >>>>>>>> com.candata.core.server_1.0.0 [141] null null
> >>>>>>>> 2013-10-29 10:49:27 4
> >> [com.candata.core.server.impl.ServiceRunnerImpl]
> >>>>>>>> dependency map already present, do not collect dependencies
> >>>>>>>> com.candata.core.server_1.0.0 [141] null null
> >>>>>>>> 2013-10-29 10:49:27 4
> >> [com.candata.core.server.impl.ServiceRunnerImpl]
> >>>>>>>> getService did not win collecting dependencies, try creating
> object
> >>>>>>>> anyway. com.candata.core.server_1.0.0 [141] null null
> >>>>>>>> 2013-10-29 10:49:27 3 FrameworkEvent WARNING
> >>>>>>>> com.candata.core.server_1.0.0 [141] null null
> >>>>>>>> 2013-10-29 10:49:27 2
> >>>>>>>> [com.candata.core.server.impl.ServiceConfigurationImpl] Could not
> >> get
> >>>>>>>> service from ref {com.candata.core.server.services.ServiceRunner,
> >>>>>>>> com.candata.core.server.services.RunAsService}={component.name
> >>>>>>> =com.candata.core.server.impl.ServiceRunnerImpl,
> >>>>>>>> component.id=233, service.id=91} com.candata.core.server_1.0.0
> >> [141]
> >>>>>>> null null
> >>>>>>>>
> >>>>>>>> If -> getService did not win collecting dependencies, try creating
> >>>>>>> object
> >>>>>>>> anyway
> >>>>>>>>
> >>>>>>>> then the service never gets activated , if it wins then it does.
>  I
> >>>>>>>> can see by the logs that the service is registered with OSGI
> farther
> >>>>>>>> up
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> 2013-10-29 10:49:27 3 ServiceEvent REGISTERED
> >>>>>>>> com.candata.core.server_1.0.0 [141]
> >>>>>>>> {com.candata.core.server.services.ServiceRunner,
> >>>>>>>> com.candata.core.server.services.RunAsService}={component.name
> >>>>>>> =com.candata.core.server.impl.ServiceRunnerImpl,
> >>>>>>>> component.id=233, service.id=91} null
> >>>>>>>>
> >>>>>>>> Is the next release soon? Or has this code not changed and could
> be
> >>>>>>>> considered a bug
> >>>>>>>
> >>>>>>>
> >>>>>>>
> ---------------------------------------------------------------------
> >>>>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> >>>>>>> For additional commands, e-mail: users-help@felix.apache.org
> >>>>>>>
> >>>>>>>
> >>>>>>
> >>>>
> >>>>
> >>>> ---------------------------------------------------------------------
> >>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> >>>> For additional commands, e-mail: users-help@felix.apache.org
> >>>>
> >>>>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> >> For additional commands, e-mail: users-help@felix.apache.org
> >>
> >>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>

Re: Declarative Services

Posted by David Jencks <da...@yahoo.com>.
There's another release candidate out that you could try, see the vote email.

I don't commit if I have test failures, and I've never seen the problem you show below.  I suspect a maven issue.

In the future please try to include enough information so that someone who is not already having the exact same problem you are can figure out what you are doing.  It's pretty safe to assume that the code in svn works well for the developers  so they probably don't know how to reproduce a problem you see.

thanks
david jencks

On Oct 30, 2013, at 6:32 AM, Dave Smith <da...@candata.com> wrote:

> Now the test cases are failing ..
> 
> FYI:
> 
> [INFO] --- org.apache.aries.versioning.plugin:0.1.0:version-check
> (default-verify) @ org.apache.felix.scr ---
> [WARNING] Error injecting:
> org.apache.aries.versioning.mojo.VersionCheckerMojo
> java.lang.NoClassDefFoundError:
> org/sonatype/aether/resolution/ArtifactResolutionException
> 
> Caused by: java.lang.ClassNotFoundException:
> org.sonatype.aether.resolution.ArtifactResolutionException
>        at
> org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
>        at
> org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:259)
>        at
> org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:242)
>        at
> org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:227)
> 
> 
> Looks like you are still a bit raw. Give me a heads up when you are a
> little closer and I will test here.....
> 
> 
> 
> On Tue, Oct 29, 2013 at 7:39 PM, David Jencks <da...@yahoo.com>wrote:
> 
>> Ah, I'm sort of in the middle of a release.
>> 
>> You can alter the scr pom locally to point to 1.5.0-SNAPSHOT, get the 1.4
>> release candidate from
>> https://repository.apache.org/content/repositories/orgapachefelix-024/,
>> or build the 1.4 release candidate from
>> 
>> 
>> https://svn.apache.org/repos/asf/felix/releases/org.apache.felix.utils-1.4.0
>> 
>> hope this helps
>> david jencks
>> 
>> On Oct 29, 2013, at 11:36 AM, Dave Smith <da...@candata.com> wrote:
>> 
>>> [INFO] Building Apache Felix Declarative Services 1.7-SNAPSHOT
>>> [INFO]
>>> ------------------------------------------------------------------------
>>> [WARNING] The POM for org.apache.felix:org.apache.felix.utils:jar:1.4.0
>> is
>>> missing, no dependency information available
>>> [INFO]
>>> ------------------------------------------------------------------------
>>> 
>>> [ERROR] Failed to execute goal on project org.apache.felix.scr: Could not
>>> resolve dependencies for project
>>> org.apache.felix:org.apache.felix.scr:bundle:1.7-SNAPSHOT: Failure to
>> find
>>> org.apache.felix:org.apache.felix.utils:jar:1.4.0 in
>>> http://repo.maven.apache.org/maven2 was cached in the local repository,
>>> resolution will not be reattempted until the update interval of central
>> has
>>> elapsed or updates are forced -> [Help 1]
>>> 
>>> 
>>> 
>>> On Tue, Oct 29, 2013 at 2:04 PM, David Jencks <david_jencks@yahoo.com
>>> wrote:
>>> 
>>>> Well, the 1.7-SNAPSHOT in the apache nexus snapshot repo is up to date.
>>>> 
>>>> I run mvn clean install in scr with no problems, using maven 3.0.4.
>> What
>>>> problems are you seeing?
>>>> 
>>>> thanks
>>>> david jencks
>>>> 
>>>> On Oct 29, 2013, at 10:54 AM, Dave Smith <da...@candata.com>
>> wrote:
>>>> 
>>>>> I tried following the instructions but It seems the scr is not built in
>>>> and
>>>>> when I try and run mvn in the scr dir that does not work either.
>>>>> 
>>>>> I am following ...
>>>>> 
>>>>> http://felix.apache.org/site/building-felix.html
>>>>> 
>>>>> instructuctions
>>>>> 
>>>>> Dave Smith
>>>>> Candata Ltd.
>>>>> 416-493-9020x2413
>>>>> Direct: 416-855-2413
>>>>> 
>>>>> 
>>>>> On Tue, Oct 29, 2013 at 11:41 AM, Dave Smith <da...@candata.com>
>>>> wrote:
>>>>> 
>>>>>> Latest 1.6.2. I will grab the snapshot and report back...
>>>>>> 
>>>>>> Dave Smith
>>>>>> Candata Ltd.
>>>>>> 416-493-9020x2413
>>>>>> Direct: 416-855-2413
>>>>>> 
>>>>>> 
>>>>>> On Tue, Oct 29, 2013 at 11:38 AM, David Jencks <
>> david_jencks@yahoo.com
>>>>> wrote:
>>>>>> 
>>>>>>> Not telling us the exact version of the code you are using makes it
>>>>>>> pretty much impossible to think about investigating this.
>>>>>>> 
>>>>>>> Please see if this is a problem with the current trunk code which you
>>>> can
>>>>>>> build yourself or use the 1.7-SNAPSHOT on the apache snapshot repo.
>>>>>>> 
>>>>>>> I'm working on a release and at this point we're finding and fixing
>>>> bugs.
>>>>>>> When we've stopped finding bugs I'll release.
>>>>>>> 
>>>>>>> thanks
>>>>>>> david jencks
>>>>>>> 
>>>>>>> On Oct 29, 2013, at 8:15 AM, Dave Smith <da...@candata.com>
>>>> wrote:
>>>>>>> 
>>>>>>>> I posted a bug a few weeks back and the thought was a new version is
>>>>>>> coming
>>>>>>>> soon. Since it was more of an annoyance I decided to wait. I am now
>>>>>>> having
>>>>>>>> an intermittent problem with a service not getting activated. Here
>> is
>>>> a
>>>>>>>> snippet from the log
>>>>>>>> 
>>>>>>>> 2013-10-29 10:49:27 4
>>>>>>>> [com.candata.core.server.impl.ServiceConfigurationImpl]
>>>>>>>> getParameterClass: Found class
>>>>>>>> com.candata.core.server.services.RunAsService
>>>>>>>> com.candata.core.server_1.0.0 [141] null null
>>>>>>>> 2013-10-29 10:49:27 4
>>>>>>>> [com.candata.core.server.impl.ServiceConfigurationImpl]
>> doFindMethod:
>>>>>>>> No method taking ServiceReference found, checking method taking
>>>>>>>> com.candata.core.server.services.RunAsService
>>>>>>>> com.candata.core.server_1.0.0 [141] null null
>>>>>>>> 2013-10-29 10:49:27 4
>>>>>>>> [com.candata.core.server.impl.ServiceConfigurationImpl] Found bind
>>>>>>>> method: protected void
>>>>>>>> 
>>>>>>> 
>>>> 
>> com.candata.core.server.impl.ServiceConfigurationImpl.setRunAsService(com.candata.core.server.services.RunAsService)
>>>>>>>> com.candata.core.server_1.0.0 [141] null null
>>>>>>>> 2013-10-29 10:49:27 4
>> [com.candata.core.server.impl.ServiceRunnerImpl]
>>>>>>>> dependency map already present, do not collect dependencies
>>>>>>>> com.candata.core.server_1.0.0 [141] null null
>>>>>>>> 2013-10-29 10:49:27 4
>> [com.candata.core.server.impl.ServiceRunnerImpl]
>>>>>>>> getService did not win collecting dependencies, try creating object
>>>>>>>> anyway. com.candata.core.server_1.0.0 [141] null null
>>>>>>>> 2013-10-29 10:49:27 3 FrameworkEvent WARNING
>>>>>>>> com.candata.core.server_1.0.0 [141] null null
>>>>>>>> 2013-10-29 10:49:27 2
>>>>>>>> [com.candata.core.server.impl.ServiceConfigurationImpl] Could not
>> get
>>>>>>>> service from ref {com.candata.core.server.services.ServiceRunner,
>>>>>>>> com.candata.core.server.services.RunAsService}={component.name
>>>>>>> =com.candata.core.server.impl.ServiceRunnerImpl,
>>>>>>>> component.id=233, service.id=91} com.candata.core.server_1.0.0
>> [141]
>>>>>>> null null
>>>>>>>> 
>>>>>>>> If -> getService did not win collecting dependencies, try creating
>>>>>>> object
>>>>>>>> anyway
>>>>>>>> 
>>>>>>>> then the service never gets activated , if it wins then it does.  I
>>>>>>>> can see by the logs that the service is registered with OSGI farther
>>>>>>>> up
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 2013-10-29 10:49:27 3 ServiceEvent REGISTERED
>>>>>>>> com.candata.core.server_1.0.0 [141]
>>>>>>>> {com.candata.core.server.services.ServiceRunner,
>>>>>>>> com.candata.core.server.services.RunAsService}={component.name
>>>>>>> =com.candata.core.server.impl.ServiceRunnerImpl,
>>>>>>>> component.id=233, service.id=91} null
>>>>>>>> 
>>>>>>>> Is the next release soon? Or has this code not changed and could be
>>>>>>>> considered a bug
>>>>>>> 
>>>>>>> 
>>>>>>> ---------------------------------------------------------------------
>>>>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>>>> 
>>>>>>> 
>>>>>> 
>>>> 
>>>> 
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>> 
>>>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>> 
>> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Declarative Services

Posted by Dave Smith <da...@candata.com>.
Now the test cases are failing ..

FYI:

[INFO] --- org.apache.aries.versioning.plugin:0.1.0:version-check
(default-verify) @ org.apache.felix.scr ---
[WARNING] Error injecting:
org.apache.aries.versioning.mojo.VersionCheckerMojo
java.lang.NoClassDefFoundError:
org/sonatype/aether/resolution/ArtifactResolutionException

Caused by: java.lang.ClassNotFoundException:
org.sonatype.aether.resolution.ArtifactResolutionException
        at
org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
        at
org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:259)
        at
org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:242)
        at
org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:227)


Looks like you are still a bit raw. Give me a heads up when you are a
little closer and I will test here.....



On Tue, Oct 29, 2013 at 7:39 PM, David Jencks <da...@yahoo.com>wrote:

> Ah, I'm sort of in the middle of a release.
>
> You can alter the scr pom locally to point to 1.5.0-SNAPSHOT, get the 1.4
> release candidate from
> https://repository.apache.org/content/repositories/orgapachefelix-024/,
> or build the 1.4 release candidate from
>
>
> https://svn.apache.org/repos/asf/felix/releases/org.apache.felix.utils-1.4.0
>
> hope this helps
> david jencks
>
> On Oct 29, 2013, at 11:36 AM, Dave Smith <da...@candata.com> wrote:
>
> > [INFO] Building Apache Felix Declarative Services 1.7-SNAPSHOT
> > [INFO]
> > ------------------------------------------------------------------------
> > [WARNING] The POM for org.apache.felix:org.apache.felix.utils:jar:1.4.0
> is
> > missing, no dependency information available
> > [INFO]
> > ------------------------------------------------------------------------
> >
> > [ERROR] Failed to execute goal on project org.apache.felix.scr: Could not
> > resolve dependencies for project
> > org.apache.felix:org.apache.felix.scr:bundle:1.7-SNAPSHOT: Failure to
> find
> > org.apache.felix:org.apache.felix.utils:jar:1.4.0 in
> > http://repo.maven.apache.org/maven2 was cached in the local repository,
> > resolution will not be reattempted until the update interval of central
> has
> > elapsed or updates are forced -> [Help 1]
> >
> >
> >
> > On Tue, Oct 29, 2013 at 2:04 PM, David Jencks <david_jencks@yahoo.com
> >wrote:
> >
> >> Well, the 1.7-SNAPSHOT in the apache nexus snapshot repo is up to date.
> >>
> >> I run mvn clean install in scr with no problems, using maven 3.0.4.
>  What
> >> problems are you seeing?
> >>
> >> thanks
> >> david jencks
> >>
> >> On Oct 29, 2013, at 10:54 AM, Dave Smith <da...@candata.com>
> wrote:
> >>
> >>> I tried following the instructions but It seems the scr is not built in
> >> and
> >>> when I try and run mvn in the scr dir that does not work either.
> >>>
> >>> I am following ...
> >>>
> >>> http://felix.apache.org/site/building-felix.html
> >>>
> >>> instructuctions
> >>>
> >>> Dave Smith
> >>> Candata Ltd.
> >>> 416-493-9020x2413
> >>> Direct: 416-855-2413
> >>>
> >>>
> >>> On Tue, Oct 29, 2013 at 11:41 AM, Dave Smith <da...@candata.com>
> >> wrote:
> >>>
> >>>> Latest 1.6.2. I will grab the snapshot and report back...
> >>>>
> >>>> Dave Smith
> >>>> Candata Ltd.
> >>>> 416-493-9020x2413
> >>>> Direct: 416-855-2413
> >>>>
> >>>>
> >>>> On Tue, Oct 29, 2013 at 11:38 AM, David Jencks <
> david_jencks@yahoo.com
> >>> wrote:
> >>>>
> >>>>> Not telling us the exact version of the code you are using makes it
> >>>>> pretty much impossible to think about investigating this.
> >>>>>
> >>>>> Please see if this is a problem with the current trunk code which you
> >> can
> >>>>> build yourself or use the 1.7-SNAPSHOT on the apache snapshot repo.
> >>>>>
> >>>>> I'm working on a release and at this point we're finding and fixing
> >> bugs.
> >>>>> When we've stopped finding bugs I'll release.
> >>>>>
> >>>>> thanks
> >>>>> david jencks
> >>>>>
> >>>>> On Oct 29, 2013, at 8:15 AM, Dave Smith <da...@candata.com>
> >> wrote:
> >>>>>
> >>>>>> I posted a bug a few weeks back and the thought was a new version is
> >>>>> coming
> >>>>>> soon. Since it was more of an annoyance I decided to wait. I am now
> >>>>> having
> >>>>>> an intermittent problem with a service not getting activated. Here
> is
> >> a
> >>>>>> snippet from the log
> >>>>>>
> >>>>>> 2013-10-29 10:49:27 4
> >>>>>> [com.candata.core.server.impl.ServiceConfigurationImpl]
> >>>>>> getParameterClass: Found class
> >>>>>> com.candata.core.server.services.RunAsService
> >>>>>> com.candata.core.server_1.0.0 [141] null null
> >>>>>> 2013-10-29 10:49:27 4
> >>>>>> [com.candata.core.server.impl.ServiceConfigurationImpl]
> doFindMethod:
> >>>>>> No method taking ServiceReference found, checking method taking
> >>>>>> com.candata.core.server.services.RunAsService
> >>>>>> com.candata.core.server_1.0.0 [141] null null
> >>>>>> 2013-10-29 10:49:27 4
> >>>>>> [com.candata.core.server.impl.ServiceConfigurationImpl] Found bind
> >>>>>> method: protected void
> >>>>>>
> >>>>>
> >>
> com.candata.core.server.impl.ServiceConfigurationImpl.setRunAsService(com.candata.core.server.services.RunAsService)
> >>>>>> com.candata.core.server_1.0.0 [141] null null
> >>>>>> 2013-10-29 10:49:27 4
> [com.candata.core.server.impl.ServiceRunnerImpl]
> >>>>>> dependency map already present, do not collect dependencies
> >>>>>> com.candata.core.server_1.0.0 [141] null null
> >>>>>> 2013-10-29 10:49:27 4
> [com.candata.core.server.impl.ServiceRunnerImpl]
> >>>>>> getService did not win collecting dependencies, try creating object
> >>>>>> anyway. com.candata.core.server_1.0.0 [141] null null
> >>>>>> 2013-10-29 10:49:27 3 FrameworkEvent WARNING
> >>>>>> com.candata.core.server_1.0.0 [141] null null
> >>>>>> 2013-10-29 10:49:27 2
> >>>>>> [com.candata.core.server.impl.ServiceConfigurationImpl] Could not
> get
> >>>>>> service from ref {com.candata.core.server.services.ServiceRunner,
> >>>>>> com.candata.core.server.services.RunAsService}={component.name
> >>>>> =com.candata.core.server.impl.ServiceRunnerImpl,
> >>>>>> component.id=233, service.id=91} com.candata.core.server_1.0.0
> [141]
> >>>>> null null
> >>>>>>
> >>>>>> If -> getService did not win collecting dependencies, try creating
> >>>>> object
> >>>>>> anyway
> >>>>>>
> >>>>>> then the service never gets activated , if it wins then it does.  I
> >>>>>> can see by the logs that the service is registered with OSGI farther
> >>>>>> up
> >>>>>>
> >>>>>>
> >>>>>> 2013-10-29 10:49:27 3 ServiceEvent REGISTERED
> >>>>>> com.candata.core.server_1.0.0 [141]
> >>>>>> {com.candata.core.server.services.ServiceRunner,
> >>>>>> com.candata.core.server.services.RunAsService}={component.name
> >>>>> =com.candata.core.server.impl.ServiceRunnerImpl,
> >>>>>> component.id=233, service.id=91} null
> >>>>>>
> >>>>>> Is the next release soon? Or has this code not changed and could be
> >>>>>> considered a bug
> >>>>>
> >>>>>
> >>>>> ---------------------------------------------------------------------
> >>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> >>>>> For additional commands, e-mail: users-help@felix.apache.org
> >>>>>
> >>>>>
> >>>>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> >> For additional commands, e-mail: users-help@felix.apache.org
> >>
> >>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>

Re: Declarative Services

Posted by David Jencks <da...@yahoo.com>.
Ah, I'm sort of in the middle of a release.

You can alter the scr pom locally to point to 1.5.0-SNAPSHOT, get the 1.4 release candidate from https://repository.apache.org/content/repositories/orgapachefelix-024/, or build the 1.4 release candidate from

https://svn.apache.org/repos/asf/felix/releases/org.apache.felix.utils-1.4.0

hope this helps
david jencks

On Oct 29, 2013, at 11:36 AM, Dave Smith <da...@candata.com> wrote:

> [INFO] Building Apache Felix Declarative Services 1.7-SNAPSHOT
> [INFO]
> ------------------------------------------------------------------------
> [WARNING] The POM for org.apache.felix:org.apache.felix.utils:jar:1.4.0 is
> missing, no dependency information available
> [INFO]
> ------------------------------------------------------------------------
> 
> [ERROR] Failed to execute goal on project org.apache.felix.scr: Could not
> resolve dependencies for project
> org.apache.felix:org.apache.felix.scr:bundle:1.7-SNAPSHOT: Failure to find
> org.apache.felix:org.apache.felix.utils:jar:1.4.0 in
> http://repo.maven.apache.org/maven2 was cached in the local repository,
> resolution will not be reattempted until the update interval of central has
> elapsed or updates are forced -> [Help 1]
> 
> 
> 
> On Tue, Oct 29, 2013 at 2:04 PM, David Jencks <da...@yahoo.com>wrote:
> 
>> Well, the 1.7-SNAPSHOT in the apache nexus snapshot repo is up to date.
>> 
>> I run mvn clean install in scr with no problems, using maven 3.0.4.  What
>> problems are you seeing?
>> 
>> thanks
>> david jencks
>> 
>> On Oct 29, 2013, at 10:54 AM, Dave Smith <da...@candata.com> wrote:
>> 
>>> I tried following the instructions but It seems the scr is not built in
>> and
>>> when I try and run mvn in the scr dir that does not work either.
>>> 
>>> I am following ...
>>> 
>>> http://felix.apache.org/site/building-felix.html
>>> 
>>> instructuctions
>>> 
>>> Dave Smith
>>> Candata Ltd.
>>> 416-493-9020x2413
>>> Direct: 416-855-2413
>>> 
>>> 
>>> On Tue, Oct 29, 2013 at 11:41 AM, Dave Smith <da...@candata.com>
>> wrote:
>>> 
>>>> Latest 1.6.2. I will grab the snapshot and report back...
>>>> 
>>>> Dave Smith
>>>> Candata Ltd.
>>>> 416-493-9020x2413
>>>> Direct: 416-855-2413
>>>> 
>>>> 
>>>> On Tue, Oct 29, 2013 at 11:38 AM, David Jencks <david_jencks@yahoo.com
>>> wrote:
>>>> 
>>>>> Not telling us the exact version of the code you are using makes it
>>>>> pretty much impossible to think about investigating this.
>>>>> 
>>>>> Please see if this is a problem with the current trunk code which you
>> can
>>>>> build yourself or use the 1.7-SNAPSHOT on the apache snapshot repo.
>>>>> 
>>>>> I'm working on a release and at this point we're finding and fixing
>> bugs.
>>>>> When we've stopped finding bugs I'll release.
>>>>> 
>>>>> thanks
>>>>> david jencks
>>>>> 
>>>>> On Oct 29, 2013, at 8:15 AM, Dave Smith <da...@candata.com>
>> wrote:
>>>>> 
>>>>>> I posted a bug a few weeks back and the thought was a new version is
>>>>> coming
>>>>>> soon. Since it was more of an annoyance I decided to wait. I am now
>>>>> having
>>>>>> an intermittent problem with a service not getting activated. Here is
>> a
>>>>>> snippet from the log
>>>>>> 
>>>>>> 2013-10-29 10:49:27 4
>>>>>> [com.candata.core.server.impl.ServiceConfigurationImpl]
>>>>>> getParameterClass: Found class
>>>>>> com.candata.core.server.services.RunAsService
>>>>>> com.candata.core.server_1.0.0 [141] null null
>>>>>> 2013-10-29 10:49:27 4
>>>>>> [com.candata.core.server.impl.ServiceConfigurationImpl] doFindMethod:
>>>>>> No method taking ServiceReference found, checking method taking
>>>>>> com.candata.core.server.services.RunAsService
>>>>>> com.candata.core.server_1.0.0 [141] null null
>>>>>> 2013-10-29 10:49:27 4
>>>>>> [com.candata.core.server.impl.ServiceConfigurationImpl] Found bind
>>>>>> method: protected void
>>>>>> 
>>>>> 
>> com.candata.core.server.impl.ServiceConfigurationImpl.setRunAsService(com.candata.core.server.services.RunAsService)
>>>>>> com.candata.core.server_1.0.0 [141] null null
>>>>>> 2013-10-29 10:49:27 4 [com.candata.core.server.impl.ServiceRunnerImpl]
>>>>>> dependency map already present, do not collect dependencies
>>>>>> com.candata.core.server_1.0.0 [141] null null
>>>>>> 2013-10-29 10:49:27 4 [com.candata.core.server.impl.ServiceRunnerImpl]
>>>>>> getService did not win collecting dependencies, try creating object
>>>>>> anyway. com.candata.core.server_1.0.0 [141] null null
>>>>>> 2013-10-29 10:49:27 3 FrameworkEvent WARNING
>>>>>> com.candata.core.server_1.0.0 [141] null null
>>>>>> 2013-10-29 10:49:27 2
>>>>>> [com.candata.core.server.impl.ServiceConfigurationImpl] Could not get
>>>>>> service from ref {com.candata.core.server.services.ServiceRunner,
>>>>>> com.candata.core.server.services.RunAsService}={component.name
>>>>> =com.candata.core.server.impl.ServiceRunnerImpl,
>>>>>> component.id=233, service.id=91} com.candata.core.server_1.0.0 [141]
>>>>> null null
>>>>>> 
>>>>>> If -> getService did not win collecting dependencies, try creating
>>>>> object
>>>>>> anyway
>>>>>> 
>>>>>> then the service never gets activated , if it wins then it does.  I
>>>>>> can see by the logs that the service is registered with OSGI farther
>>>>>> up
>>>>>> 
>>>>>> 
>>>>>> 2013-10-29 10:49:27 3 ServiceEvent REGISTERED
>>>>>> com.candata.core.server_1.0.0 [141]
>>>>>> {com.candata.core.server.services.ServiceRunner,
>>>>>> com.candata.core.server.services.RunAsService}={component.name
>>>>> =com.candata.core.server.impl.ServiceRunnerImpl,
>>>>>> component.id=233, service.id=91} null
>>>>>> 
>>>>>> Is the next release soon? Or has this code not changed and could be
>>>>>> considered a bug
>>>>> 
>>>>> 
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>> 
>>>>> 
>>>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>> 
>> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Declarative Services

Posted by Dave Smith <da...@candata.com>.
[INFO] Building Apache Felix Declarative Services 1.7-SNAPSHOT
[INFO]
------------------------------------------------------------------------
[WARNING] The POM for org.apache.felix:org.apache.felix.utils:jar:1.4.0 is
missing, no dependency information available
[INFO]
------------------------------------------------------------------------

[ERROR] Failed to execute goal on project org.apache.felix.scr: Could not
resolve dependencies for project
org.apache.felix:org.apache.felix.scr:bundle:1.7-SNAPSHOT: Failure to find
org.apache.felix:org.apache.felix.utils:jar:1.4.0 in
http://repo.maven.apache.org/maven2 was cached in the local repository,
resolution will not be reattempted until the update interval of central has
elapsed or updates are forced -> [Help 1]



On Tue, Oct 29, 2013 at 2:04 PM, David Jencks <da...@yahoo.com>wrote:

> Well, the 1.7-SNAPSHOT in the apache nexus snapshot repo is up to date.
>
> I run mvn clean install in scr with no problems, using maven 3.0.4.  What
> problems are you seeing?
>
> thanks
> david jencks
>
> On Oct 29, 2013, at 10:54 AM, Dave Smith <da...@candata.com> wrote:
>
> > I tried following the instructions but It seems the scr is not built in
> and
> > when I try and run mvn in the scr dir that does not work either.
> >
> > I am following ...
> >
> > http://felix.apache.org/site/building-felix.html
> >
> > instructuctions
> >
> > Dave Smith
> > Candata Ltd.
> > 416-493-9020x2413
> > Direct: 416-855-2413
> >
> >
> > On Tue, Oct 29, 2013 at 11:41 AM, Dave Smith <da...@candata.com>
> wrote:
> >
> >> Latest 1.6.2. I will grab the snapshot and report back...
> >>
> >> Dave Smith
> >> Candata Ltd.
> >> 416-493-9020x2413
> >> Direct: 416-855-2413
> >>
> >>
> >> On Tue, Oct 29, 2013 at 11:38 AM, David Jencks <david_jencks@yahoo.com
> >wrote:
> >>
> >>> Not telling us the exact version of the code you are using makes it
> >>> pretty much impossible to think about investigating this.
> >>>
> >>> Please see if this is a problem with the current trunk code which you
> can
> >>> build yourself or use the 1.7-SNAPSHOT on the apache snapshot repo.
> >>>
> >>> I'm working on a release and at this point we're finding and fixing
> bugs.
> >>> When we've stopped finding bugs I'll release.
> >>>
> >>> thanks
> >>> david jencks
> >>>
> >>> On Oct 29, 2013, at 8:15 AM, Dave Smith <da...@candata.com>
> wrote:
> >>>
> >>>> I posted a bug a few weeks back and the thought was a new version is
> >>> coming
> >>>> soon. Since it was more of an annoyance I decided to wait. I am now
> >>> having
> >>>> an intermittent problem with a service not getting activated. Here is
> a
> >>>> snippet from the log
> >>>>
> >>>> 2013-10-29 10:49:27 4
> >>>> [com.candata.core.server.impl.ServiceConfigurationImpl]
> >>>> getParameterClass: Found class
> >>>> com.candata.core.server.services.RunAsService
> >>>> com.candata.core.server_1.0.0 [141] null null
> >>>> 2013-10-29 10:49:27 4
> >>>> [com.candata.core.server.impl.ServiceConfigurationImpl] doFindMethod:
> >>>> No method taking ServiceReference found, checking method taking
> >>>> com.candata.core.server.services.RunAsService
> >>>> com.candata.core.server_1.0.0 [141] null null
> >>>> 2013-10-29 10:49:27 4
> >>>> [com.candata.core.server.impl.ServiceConfigurationImpl] Found bind
> >>>> method: protected void
> >>>>
> >>>
> com.candata.core.server.impl.ServiceConfigurationImpl.setRunAsService(com.candata.core.server.services.RunAsService)
> >>>> com.candata.core.server_1.0.0 [141] null null
> >>>> 2013-10-29 10:49:27 4 [com.candata.core.server.impl.ServiceRunnerImpl]
> >>>> dependency map already present, do not collect dependencies
> >>>> com.candata.core.server_1.0.0 [141] null null
> >>>> 2013-10-29 10:49:27 4 [com.candata.core.server.impl.ServiceRunnerImpl]
> >>>> getService did not win collecting dependencies, try creating object
> >>>> anyway. com.candata.core.server_1.0.0 [141] null null
> >>>> 2013-10-29 10:49:27 3 FrameworkEvent WARNING
> >>>> com.candata.core.server_1.0.0 [141] null null
> >>>> 2013-10-29 10:49:27 2
> >>>> [com.candata.core.server.impl.ServiceConfigurationImpl] Could not get
> >>>> service from ref {com.candata.core.server.services.ServiceRunner,
> >>>> com.candata.core.server.services.RunAsService}={component.name
> >>> =com.candata.core.server.impl.ServiceRunnerImpl,
> >>>> component.id=233, service.id=91} com.candata.core.server_1.0.0 [141]
> >>> null null
> >>>>
> >>>> If -> getService did not win collecting dependencies, try creating
> >>> object
> >>>> anyway
> >>>>
> >>>> then the service never gets activated , if it wins then it does.  I
> >>>> can see by the logs that the service is registered with OSGI farther
> >>>> up
> >>>>
> >>>>
> >>>> 2013-10-29 10:49:27 3 ServiceEvent REGISTERED
> >>>> com.candata.core.server_1.0.0 [141]
> >>>> {com.candata.core.server.services.ServiceRunner,
> >>>> com.candata.core.server.services.RunAsService}={component.name
> >>> =com.candata.core.server.impl.ServiceRunnerImpl,
> >>>> component.id=233, service.id=91} null
> >>>>
> >>>> Is the next release soon? Or has this code not changed and could be
> >>>> considered a bug
> >>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> >>> For additional commands, e-mail: users-help@felix.apache.org
> >>>
> >>>
> >>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>

Re: Declarative Services

Posted by David Jencks <da...@yahoo.com>.
Well, the 1.7-SNAPSHOT in the apache nexus snapshot repo is up to date.

I run mvn clean install in scr with no problems, using maven 3.0.4.  What problems are you seeing?

thanks
david jencks

On Oct 29, 2013, at 10:54 AM, Dave Smith <da...@candata.com> wrote:

> I tried following the instructions but It seems the scr is not built in and
> when I try and run mvn in the scr dir that does not work either.
> 
> I am following ...
> 
> http://felix.apache.org/site/building-felix.html
> 
> instructuctions
> 
> Dave Smith
> Candata Ltd.
> 416-493-9020x2413
> Direct: 416-855-2413
> 
> 
> On Tue, Oct 29, 2013 at 11:41 AM, Dave Smith <da...@candata.com> wrote:
> 
>> Latest 1.6.2. I will grab the snapshot and report back...
>> 
>> Dave Smith
>> Candata Ltd.
>> 416-493-9020x2413
>> Direct: 416-855-2413
>> 
>> 
>> On Tue, Oct 29, 2013 at 11:38 AM, David Jencks <da...@yahoo.com>wrote:
>> 
>>> Not telling us the exact version of the code you are using makes it
>>> pretty much impossible to think about investigating this.
>>> 
>>> Please see if this is a problem with the current trunk code which you can
>>> build yourself or use the 1.7-SNAPSHOT on the apache snapshot repo.
>>> 
>>> I'm working on a release and at this point we're finding and fixing bugs.
>>> When we've stopped finding bugs I'll release.
>>> 
>>> thanks
>>> david jencks
>>> 
>>> On Oct 29, 2013, at 8:15 AM, Dave Smith <da...@candata.com> wrote:
>>> 
>>>> I posted a bug a few weeks back and the thought was a new version is
>>> coming
>>>> soon. Since it was more of an annoyance I decided to wait. I am now
>>> having
>>>> an intermittent problem with a service not getting activated. Here is a
>>>> snippet from the log
>>>> 
>>>> 2013-10-29 10:49:27 4
>>>> [com.candata.core.server.impl.ServiceConfigurationImpl]
>>>> getParameterClass: Found class
>>>> com.candata.core.server.services.RunAsService
>>>> com.candata.core.server_1.0.0 [141] null null
>>>> 2013-10-29 10:49:27 4
>>>> [com.candata.core.server.impl.ServiceConfigurationImpl] doFindMethod:
>>>> No method taking ServiceReference found, checking method taking
>>>> com.candata.core.server.services.RunAsService
>>>> com.candata.core.server_1.0.0 [141] null null
>>>> 2013-10-29 10:49:27 4
>>>> [com.candata.core.server.impl.ServiceConfigurationImpl] Found bind
>>>> method: protected void
>>>> 
>>> com.candata.core.server.impl.ServiceConfigurationImpl.setRunAsService(com.candata.core.server.services.RunAsService)
>>>> com.candata.core.server_1.0.0 [141] null null
>>>> 2013-10-29 10:49:27 4 [com.candata.core.server.impl.ServiceRunnerImpl]
>>>> dependency map already present, do not collect dependencies
>>>> com.candata.core.server_1.0.0 [141] null null
>>>> 2013-10-29 10:49:27 4 [com.candata.core.server.impl.ServiceRunnerImpl]
>>>> getService did not win collecting dependencies, try creating object
>>>> anyway. com.candata.core.server_1.0.0 [141] null null
>>>> 2013-10-29 10:49:27 3 FrameworkEvent WARNING
>>>> com.candata.core.server_1.0.0 [141] null null
>>>> 2013-10-29 10:49:27 2
>>>> [com.candata.core.server.impl.ServiceConfigurationImpl] Could not get
>>>> service from ref {com.candata.core.server.services.ServiceRunner,
>>>> com.candata.core.server.services.RunAsService}={component.name
>>> =com.candata.core.server.impl.ServiceRunnerImpl,
>>>> component.id=233, service.id=91} com.candata.core.server_1.0.0 [141]
>>> null null
>>>> 
>>>> If -> getService did not win collecting dependencies, try creating
>>> object
>>>> anyway
>>>> 
>>>> then the service never gets activated , if it wins then it does.  I
>>>> can see by the logs that the service is registered with OSGI farther
>>>> up
>>>> 
>>>> 
>>>> 2013-10-29 10:49:27 3 ServiceEvent REGISTERED
>>>> com.candata.core.server_1.0.0 [141]
>>>> {com.candata.core.server.services.ServiceRunner,
>>>> com.candata.core.server.services.RunAsService}={component.name
>>> =com.candata.core.server.impl.ServiceRunnerImpl,
>>>> component.id=233, service.id=91} null
>>>> 
>>>> Is the next release soon? Or has this code not changed and could be
>>>> considered a bug
>>> 
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>> For additional commands, e-mail: users-help@felix.apache.org
>>> 
>>> 
>> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Declarative Services

Posted by Dave Smith <da...@candata.com>.
I tried following the instructions but It seems the scr is not built in and
when I try and run mvn in the scr dir that does not work either.

I am following ...

http://felix.apache.org/site/building-felix.html

instructuctions

Dave Smith
Candata Ltd.
416-493-9020x2413
Direct: 416-855-2413


On Tue, Oct 29, 2013 at 11:41 AM, Dave Smith <da...@candata.com> wrote:

> Latest 1.6.2. I will grab the snapshot and report back...
>
> Dave Smith
> Candata Ltd.
> 416-493-9020x2413
> Direct: 416-855-2413
>
>
> On Tue, Oct 29, 2013 at 11:38 AM, David Jencks <da...@yahoo.com>wrote:
>
>> Not telling us the exact version of the code you are using makes it
>> pretty much impossible to think about investigating this.
>>
>> Please see if this is a problem with the current trunk code which you can
>> build yourself or use the 1.7-SNAPSHOT on the apache snapshot repo.
>>
>> I'm working on a release and at this point we're finding and fixing bugs.
>>  When we've stopped finding bugs I'll release.
>>
>> thanks
>> david jencks
>>
>> On Oct 29, 2013, at 8:15 AM, Dave Smith <da...@candata.com> wrote:
>>
>> > I posted a bug a few weeks back and the thought was a new version is
>> coming
>> > soon. Since it was more of an annoyance I decided to wait. I am now
>> having
>> > an intermittent problem with a service not getting activated. Here is a
>> > snippet from the log
>> >
>> > 2013-10-29 10:49:27 4
>> > [com.candata.core.server.impl.ServiceConfigurationImpl]
>> > getParameterClass: Found class
>> > com.candata.core.server.services.RunAsService
>> > com.candata.core.server_1.0.0 [141] null null
>> > 2013-10-29 10:49:27 4
>> > [com.candata.core.server.impl.ServiceConfigurationImpl] doFindMethod:
>> > No method taking ServiceReference found, checking method taking
>> > com.candata.core.server.services.RunAsService
>> > com.candata.core.server_1.0.0 [141] null null
>> > 2013-10-29 10:49:27 4
>> > [com.candata.core.server.impl.ServiceConfigurationImpl] Found bind
>> > method: protected void
>> >
>> com.candata.core.server.impl.ServiceConfigurationImpl.setRunAsService(com.candata.core.server.services.RunAsService)
>> > com.candata.core.server_1.0.0 [141] null null
>> > 2013-10-29 10:49:27 4 [com.candata.core.server.impl.ServiceRunnerImpl]
>> > dependency map already present, do not collect dependencies
>> > com.candata.core.server_1.0.0 [141] null null
>> > 2013-10-29 10:49:27 4 [com.candata.core.server.impl.ServiceRunnerImpl]
>> > getService did not win collecting dependencies, try creating object
>> > anyway. com.candata.core.server_1.0.0 [141] null null
>> > 2013-10-29 10:49:27 3 FrameworkEvent WARNING
>> > com.candata.core.server_1.0.0 [141] null null
>> > 2013-10-29 10:49:27 2
>> > [com.candata.core.server.impl.ServiceConfigurationImpl] Could not get
>> > service from ref {com.candata.core.server.services.ServiceRunner,
>> > com.candata.core.server.services.RunAsService}={component.name
>> =com.candata.core.server.impl.ServiceRunnerImpl,
>> > component.id=233, service.id=91} com.candata.core.server_1.0.0 [141]
>> null null
>> >
>> > If -> getService did not win collecting dependencies, try creating
>> object
>> > anyway
>> >
>> > then the service never gets activated , if it wins then it does.  I
>> > can see by the logs that the service is registered with OSGI farther
>> > up
>> >
>> >
>> > 2013-10-29 10:49:27 3 ServiceEvent REGISTERED
>> > com.candata.core.server_1.0.0 [141]
>> > {com.candata.core.server.services.ServiceRunner,
>> > com.candata.core.server.services.RunAsService}={component.name
>> =com.candata.core.server.impl.ServiceRunnerImpl,
>> > component.id=233, service.id=91} null
>> >
>> > Is the next release soon? Or has this code not changed and could be
>> > considered a bug
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
>

Re: Declarative Services

Posted by Dave Smith <da...@candata.com>.
Latest 1.6.2. I will grab the snapshot and report back...

Dave Smith
Candata Ltd.
416-493-9020x2413
Direct: 416-855-2413


On Tue, Oct 29, 2013 at 11:38 AM, David Jencks <da...@yahoo.com>wrote:

> Not telling us the exact version of the code you are using makes it pretty
> much impossible to think about investigating this.
>
> Please see if this is a problem with the current trunk code which you can
> build yourself or use the 1.7-SNAPSHOT on the apache snapshot repo.
>
> I'm working on a release and at this point we're finding and fixing bugs.
>  When we've stopped finding bugs I'll release.
>
> thanks
> david jencks
>
> On Oct 29, 2013, at 8:15 AM, Dave Smith <da...@candata.com> wrote:
>
> > I posted a bug a few weeks back and the thought was a new version is
> coming
> > soon. Since it was more of an annoyance I decided to wait. I am now
> having
> > an intermittent problem with a service not getting activated. Here is a
> > snippet from the log
> >
> > 2013-10-29 10:49:27 4
> > [com.candata.core.server.impl.ServiceConfigurationImpl]
> > getParameterClass: Found class
> > com.candata.core.server.services.RunAsService
> > com.candata.core.server_1.0.0 [141] null null
> > 2013-10-29 10:49:27 4
> > [com.candata.core.server.impl.ServiceConfigurationImpl] doFindMethod:
> > No method taking ServiceReference found, checking method taking
> > com.candata.core.server.services.RunAsService
> > com.candata.core.server_1.0.0 [141] null null
> > 2013-10-29 10:49:27 4
> > [com.candata.core.server.impl.ServiceConfigurationImpl] Found bind
> > method: protected void
> >
> com.candata.core.server.impl.ServiceConfigurationImpl.setRunAsService(com.candata.core.server.services.RunAsService)
> > com.candata.core.server_1.0.0 [141] null null
> > 2013-10-29 10:49:27 4 [com.candata.core.server.impl.ServiceRunnerImpl]
> > dependency map already present, do not collect dependencies
> > com.candata.core.server_1.0.0 [141] null null
> > 2013-10-29 10:49:27 4 [com.candata.core.server.impl.ServiceRunnerImpl]
> > getService did not win collecting dependencies, try creating object
> > anyway. com.candata.core.server_1.0.0 [141] null null
> > 2013-10-29 10:49:27 3 FrameworkEvent WARNING
> > com.candata.core.server_1.0.0 [141] null null
> > 2013-10-29 10:49:27 2
> > [com.candata.core.server.impl.ServiceConfigurationImpl] Could not get
> > service from ref {com.candata.core.server.services.ServiceRunner,
> > com.candata.core.server.services.RunAsService}={component.name
> =com.candata.core.server.impl.ServiceRunnerImpl,
> > component.id=233, service.id=91} com.candata.core.server_1.0.0 [141]
> null null
> >
> > If -> getService did not win collecting dependencies, try creating object
> > anyway
> >
> > then the service never gets activated , if it wins then it does.  I
> > can see by the logs that the service is registered with OSGI farther
> > up
> >
> >
> > 2013-10-29 10:49:27 3 ServiceEvent REGISTERED
> > com.candata.core.server_1.0.0 [141]
> > {com.candata.core.server.services.ServiceRunner,
> > com.candata.core.server.services.RunAsService}={component.name
> =com.candata.core.server.impl.ServiceRunnerImpl,
> > component.id=233, service.id=91} null
> >
> > Is the next release soon? Or has this code not changed and could be
> > considered a bug
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>

Re: Declarative Services

Posted by David Jencks <da...@yahoo.com>.
Not telling us the exact version of the code you are using makes it pretty much impossible to think about investigating this.

Please see if this is a problem with the current trunk code which you can build yourself or use the 1.7-SNAPSHOT on the apache snapshot repo.

I'm working on a release and at this point we're finding and fixing bugs.  When we've stopped finding bugs I'll release.

thanks
david jencks

On Oct 29, 2013, at 8:15 AM, Dave Smith <da...@candata.com> wrote:

> I posted a bug a few weeks back and the thought was a new version is coming
> soon. Since it was more of an annoyance I decided to wait. I am now having
> an intermittent problem with a service not getting activated. Here is a
> snippet from the log
> 
> 2013-10-29 10:49:27 4
> [com.candata.core.server.impl.ServiceConfigurationImpl]
> getParameterClass: Found class
> com.candata.core.server.services.RunAsService
> com.candata.core.server_1.0.0 [141] null null
> 2013-10-29 10:49:27 4
> [com.candata.core.server.impl.ServiceConfigurationImpl] doFindMethod:
> No method taking ServiceReference found, checking method taking
> com.candata.core.server.services.RunAsService
> com.candata.core.server_1.0.0 [141] null null
> 2013-10-29 10:49:27 4
> [com.candata.core.server.impl.ServiceConfigurationImpl] Found bind
> method: protected void
> com.candata.core.server.impl.ServiceConfigurationImpl.setRunAsService(com.candata.core.server.services.RunAsService)
> com.candata.core.server_1.0.0 [141] null null
> 2013-10-29 10:49:27 4 [com.candata.core.server.impl.ServiceRunnerImpl]
> dependency map already present, do not collect dependencies
> com.candata.core.server_1.0.0 [141] null null
> 2013-10-29 10:49:27 4 [com.candata.core.server.impl.ServiceRunnerImpl]
> getService did not win collecting dependencies, try creating object
> anyway. com.candata.core.server_1.0.0 [141] null null
> 2013-10-29 10:49:27 3 FrameworkEvent WARNING
> com.candata.core.server_1.0.0 [141] null null
> 2013-10-29 10:49:27 2
> [com.candata.core.server.impl.ServiceConfigurationImpl] Could not get
> service from ref {com.candata.core.server.services.ServiceRunner,
> com.candata.core.server.services.RunAsService}={component.name=com.candata.core.server.impl.ServiceRunnerImpl,
> component.id=233, service.id=91} com.candata.core.server_1.0.0 [141] null null
> 
> If -> getService did not win collecting dependencies, try creating object
> anyway
> 
> then the service never gets activated , if it wins then it does.  I
> can see by the logs that the service is registered with OSGI farther
> up
> 
> 
> 2013-10-29 10:49:27 3 ServiceEvent REGISTERED
> com.candata.core.server_1.0.0 [141]
> {com.candata.core.server.services.ServiceRunner,
> com.candata.core.server.services.RunAsService}={component.name=com.candata.core.server.impl.ServiceRunnerImpl,
> component.id=233, service.id=91} null
> 
> Is the next release soon? Or has this code not changed and could be
> considered a bug


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org