felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <david_jen...@yahoo.com>
Subject Re: Declarative Services
Date Wed, 30 Oct 2013 21:52:37 GMT
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 <dave.smith@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 <dave.smith@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 <dave.smith@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
>> 
>> 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message