You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Snorre Lothar von Gohren Edwin <sn...@gmail.com> on 2013/11/05 17:18:47 UTC

NullPointer exception fileInstall and ServiceManagedFactory

Hi, I seem to get a weird NullPointer exception when I use the combination
of fileInstall and ManagedServiceFactory. The exception rises when a config
is either updated or created and after the whole update method has
succsefully run.

My factory is implemented like this:
https://gist.github.com/Snorlock/7321523
The null pointer exception looks like this:
https://gist.github.com/Snorlock/7321535
And my config looks like this: https://gist.github.com/Snorlock/7321546

i would appriciate some help to get rid of this nullpointer exception:)
Thx

-- 
Mvh
Snorre Lothar von Gohren Edwin
MeetMe: http://doodle.com/vonGohren
+47 411 611 94

Re: NullPointer exception fileInstall and ServiceManagedFactory

Posted by Snorre Lothar von Gohren Edwin <sn...@gmail.com>.
If anyone want to know what the problem might have been il let you know.
I did not get t o do the debug as you suggested, but during my refactoring
i figured out something
I had the file install and cm.dir to the same config dir.
This seemed to not be a ok case.

It might have been because cm creates a factoryBinding config file, or what
not, but the error messages does not show up now.
Might be something to look into, or notify on the pages of the two bundles.


On Tue, Nov 12, 2013 at 5:35 PM, David Jencks <da...@yahoo.com>wrote:

> I use eclipse for debugging.  You'll need to have a workspace with felix
> configadmin and fileinstall loaded, but you probably don't need your
> project loaded.  I find getting code into an eclipse workspace
> incomprehensible so I will tell you in this case to use the eclipse m2e
> plugin to get the felix maven projects in your workspace.  I would put a
> breakpoint where config admin persists the configuration and see if the
> service.id is missing.
>
> hope this helps
> david jencks
>
> On Nov 12, 2013, at 3:31 AM, Snorre Lothar von Gohren Edwin <
> snorre.edwin@gmail.com> wrote:
>
> > Thanks for feedback.
> > Just a quick question, what kind of debugger would I use?
> > This is not a familiar term for me.
> > Im working in eclipse on a regular basis.
> >
> >
> > On Mon, Nov 11, 2013 at 7:57 PM, David Jencks <david_jencks@yahoo.com
> >wrote:
> >
> >> I looked into this a tiny bit and the immediate cause seems to be that a
> >> configuration has been persisted inside the configuration manager
> without a
> >> key for "service.id" (Constants.SERVICE_PID).  I have no idea how this
> >> might happen, but you might be able to figure out in a debugger without
> too
> >> much trouble.
> >>
> >> david jencks
> >>
> >> On Nov 11, 2013, at 3:53 AM, Snorre Lothar von Gohren Edwin <
> >> snorre.edwin@gmail.com> wrote:
> >>
> >>> This is an annoying problem for my thesis and it has to be someone who
> >> have
> >>> had some experience with this.
> >>> Its a simple ManagedServiceFactory implementation but get a strange
> >> error.
> >>> Might be something Im missing in the config or something.
> >>> I would appriciate alot some kind of feedback.
> >>>
> >>> ---------- Forwarded message ----------
> >>> From: Snorre Lothar von Gohren Edwin <sn...@gmail.com>
> >>> Date: Tue, Nov 5, 2013 at 5:18 PM
> >>> Subject: NullPointer exception fileInstall and ServiceManagedFactory
> >>> To: users <us...@felix.apache.org>
> >>>
> >>>
> >>> Hi, I seem to get a weird NullPointer exception when I use the
> >> combination
> >>> of fileInstall and ManagedServiceFactory. The exception rises when a
> >> config
> >>> is either updated or created and after the whole update method has
> >>> succsefully run.
> >>>
> >>> My factory is implemented like this:
> >>> https://gist.github.com/Snorlock/7321523
> >>> The null pointer exception looks like this:
> >>> https://gist.github.com/Snorlock/7321535
> >>> And my config looks like this:
> https://gist.github.com/Snorlock/7321546
> >>>
> >>> i would appriciate some help to get rid of this nullpointer exception:)
> >>> Thx
> >>>
> >>> --
> >>> Mvh
> >>> Snorre Lothar von Gohren Edwin
> >>> MeetMe: http://doodle.com/vonGohren
> >>> +47 411 611 94
> >>>
> >>>
> >>>
> >>> --
> >>> Mvh
> >>> Snorre Lothar von Gohren Edwin
> >>> MeetMe: http://doodle.com/vonGohren
> >>> +47 411 611 94
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> >> For additional commands, e-mail: users-help@felix.apache.org
> >>
> >>
> >
> >
> > --
> > Mvh
> > Snorre Lothar von Gohren Edwin
> > MeetMe: http://doodle.com/vonGohren
> > +47 411 611 94
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>


-- 
Mvh
Snorre Lothar von Gohren Edwin
MeetMe: http://doodle.com/vonGohren
+47 411 611 94

Re: NullPointer exception fileInstall and ServiceManagedFactory

Posted by David Jencks <da...@yahoo.com>.
I use eclipse for debugging.  You'll need to have a workspace with felix configadmin and fileinstall loaded, but you probably don't need your project loaded.  I find getting code into an eclipse workspace incomprehensible so I will tell you in this case to use the eclipse m2e plugin to get the felix maven projects in your workspace.  I would put a breakpoint where config admin persists the configuration and see if the service.id is missing.

hope this helps
david jencks

On Nov 12, 2013, at 3:31 AM, Snorre Lothar von Gohren Edwin <sn...@gmail.com> wrote:

> Thanks for feedback.
> Just a quick question, what kind of debugger would I use?
> This is not a familiar term for me.
> Im working in eclipse on a regular basis.
> 
> 
> On Mon, Nov 11, 2013 at 7:57 PM, David Jencks <da...@yahoo.com>wrote:
> 
>> I looked into this a tiny bit and the immediate cause seems to be that a
>> configuration has been persisted inside the configuration manager without a
>> key for "service.id" (Constants.SERVICE_PID).  I have no idea how this
>> might happen, but you might be able to figure out in a debugger without too
>> much trouble.
>> 
>> david jencks
>> 
>> On Nov 11, 2013, at 3:53 AM, Snorre Lothar von Gohren Edwin <
>> snorre.edwin@gmail.com> wrote:
>> 
>>> This is an annoying problem for my thesis and it has to be someone who
>> have
>>> had some experience with this.
>>> Its a simple ManagedServiceFactory implementation but get a strange
>> error.
>>> Might be something Im missing in the config or something.
>>> I would appriciate alot some kind of feedback.
>>> 
>>> ---------- Forwarded message ----------
>>> From: Snorre Lothar von Gohren Edwin <sn...@gmail.com>
>>> Date: Tue, Nov 5, 2013 at 5:18 PM
>>> Subject: NullPointer exception fileInstall and ServiceManagedFactory
>>> To: users <us...@felix.apache.org>
>>> 
>>> 
>>> Hi, I seem to get a weird NullPointer exception when I use the
>> combination
>>> of fileInstall and ManagedServiceFactory. The exception rises when a
>> config
>>> is either updated or created and after the whole update method has
>>> succsefully run.
>>> 
>>> My factory is implemented like this:
>>> https://gist.github.com/Snorlock/7321523
>>> The null pointer exception looks like this:
>>> https://gist.github.com/Snorlock/7321535
>>> And my config looks like this: https://gist.github.com/Snorlock/7321546
>>> 
>>> i would appriciate some help to get rid of this nullpointer exception:)
>>> Thx
>>> 
>>> --
>>> Mvh
>>> Snorre Lothar von Gohren Edwin
>>> MeetMe: http://doodle.com/vonGohren
>>> +47 411 611 94
>>> 
>>> 
>>> 
>>> --
>>> Mvh
>>> Snorre Lothar von Gohren Edwin
>>> MeetMe: http://doodle.com/vonGohren
>>> +47 411 611 94
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>> 
>> 
> 
> 
> -- 
> Mvh
> Snorre Lothar von Gohren Edwin
> MeetMe: http://doodle.com/vonGohren
> +47 411 611 94


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


Re: NullPointer exception fileInstall and ServiceManagedFactory

Posted by Snorre Lothar von Gohren Edwin <sn...@gmail.com>.
Thanks for feedback.
Just a quick question, what kind of debugger would I use?
This is not a familiar term for me.
Im working in eclipse on a regular basis.


On Mon, Nov 11, 2013 at 7:57 PM, David Jencks <da...@yahoo.com>wrote:

> I looked into this a tiny bit and the immediate cause seems to be that a
> configuration has been persisted inside the configuration manager without a
> key for "service.id" (Constants.SERVICE_PID).  I have no idea how this
> might happen, but you might be able to figure out in a debugger without too
> much trouble.
>
> david jencks
>
> On Nov 11, 2013, at 3:53 AM, Snorre Lothar von Gohren Edwin <
> snorre.edwin@gmail.com> wrote:
>
> > This is an annoying problem for my thesis and it has to be someone who
> have
> > had some experience with this.
> > Its a simple ManagedServiceFactory implementation but get a strange
> error.
> > Might be something Im missing in the config or something.
> > I would appriciate alot some kind of feedback.
> >
> > ---------- Forwarded message ----------
> > From: Snorre Lothar von Gohren Edwin <sn...@gmail.com>
> > Date: Tue, Nov 5, 2013 at 5:18 PM
> > Subject: NullPointer exception fileInstall and ServiceManagedFactory
> > To: users <us...@felix.apache.org>
> >
> >
> > Hi, I seem to get a weird NullPointer exception when I use the
> combination
> > of fileInstall and ManagedServiceFactory. The exception rises when a
> config
> > is either updated or created and after the whole update method has
> > succsefully run.
> >
> > My factory is implemented like this:
> > https://gist.github.com/Snorlock/7321523
> > The null pointer exception looks like this:
> > https://gist.github.com/Snorlock/7321535
> > And my config looks like this: https://gist.github.com/Snorlock/7321546
> >
> > i would appriciate some help to get rid of this nullpointer exception:)
> > Thx
> >
> > --
> > Mvh
> > Snorre Lothar von Gohren Edwin
> > MeetMe: http://doodle.com/vonGohren
> > +47 411 611 94
> >
> >
> >
> > --
> > Mvh
> > Snorre Lothar von Gohren Edwin
> > MeetMe: http://doodle.com/vonGohren
> > +47 411 611 94
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>


-- 
Mvh
Snorre Lothar von Gohren Edwin
MeetMe: http://doodle.com/vonGohren
+47 411 611 94

Re: NullPointer exception fileInstall and ServiceManagedFactory

Posted by David Jencks <da...@yahoo.com>.
I looked into this a tiny bit and the immediate cause seems to be that a configuration has been persisted inside the configuration manager without a key for "service.id" (Constants.SERVICE_PID).  I have no idea how this might happen, but you might be able to figure out in a debugger without too much trouble.

david jencks

On Nov 11, 2013, at 3:53 AM, Snorre Lothar von Gohren Edwin <sn...@gmail.com> wrote:

> This is an annoying problem for my thesis and it has to be someone who have
> had some experience with this.
> Its a simple ManagedServiceFactory implementation but get a strange error.
> Might be something Im missing in the config or something.
> I would appriciate alot some kind of feedback.
> 
> ---------- Forwarded message ----------
> From: Snorre Lothar von Gohren Edwin <sn...@gmail.com>
> Date: Tue, Nov 5, 2013 at 5:18 PM
> Subject: NullPointer exception fileInstall and ServiceManagedFactory
> To: users <us...@felix.apache.org>
> 
> 
> Hi, I seem to get a weird NullPointer exception when I use the combination
> of fileInstall and ManagedServiceFactory. The exception rises when a config
> is either updated or created and after the whole update method has
> succsefully run.
> 
> My factory is implemented like this:
> https://gist.github.com/Snorlock/7321523
> The null pointer exception looks like this:
> https://gist.github.com/Snorlock/7321535
> And my config looks like this: https://gist.github.com/Snorlock/7321546
> 
> i would appriciate some help to get rid of this nullpointer exception:)
> Thx
> 
> -- 
> Mvh
> Snorre Lothar von Gohren Edwin
> MeetMe: http://doodle.com/vonGohren
> +47 411 611 94
> 
> 
> 
> -- 
> Mvh
> Snorre Lothar von Gohren Edwin
> MeetMe: http://doodle.com/vonGohren
> +47 411 611 94


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


Fwd: NullPointer exception fileInstall and ServiceManagedFactory

Posted by Snorre Lothar von Gohren Edwin <sn...@gmail.com>.
This is an annoying problem for my thesis and it has to be someone who have
had some experience with this.
Its a simple ManagedServiceFactory implementation but get a strange error.
Might be something Im missing in the config or something.
I would appriciate alot some kind of feedback.

---------- Forwarded message ----------
From: Snorre Lothar von Gohren Edwin <sn...@gmail.com>
Date: Tue, Nov 5, 2013 at 5:18 PM
Subject: NullPointer exception fileInstall and ServiceManagedFactory
To: users <us...@felix.apache.org>


Hi, I seem to get a weird NullPointer exception when I use the combination
of fileInstall and ManagedServiceFactory. The exception rises when a config
is either updated or created and after the whole update method has
succsefully run.

My factory is implemented like this:
https://gist.github.com/Snorlock/7321523
The null pointer exception looks like this:
https://gist.github.com/Snorlock/7321535
And my config looks like this: https://gist.github.com/Snorlock/7321546

i would appriciate some help to get rid of this nullpointer exception:)
Thx

-- 
Mvh
Snorre Lothar von Gohren Edwin
MeetMe: http://doodle.com/vonGohren
+47 411 611 94



-- 
Mvh
Snorre Lothar von Gohren Edwin
MeetMe: http://doodle.com/vonGohren
+47 411 611 94

Fwd: NullPointer exception fileInstall and ServiceManagedFactory

Posted by Snorre Lothar von Gohren Edwin <sn...@gmail.com>.
I didnt get much reply on this one, maybe a little nugde helps.

---------- Forwarded message ----------
From: Snorre Lothar von Gohren Edwin <sn...@gmail.com>
Date: Tue, Nov 5, 2013 at 5:18 PM
Subject: NullPointer exception fileInstall and ServiceManagedFactory
To: users <us...@felix.apache.org>


Hi, I seem to get a weird NullPointer exception when I use the combination
of fileInstall and ManagedServiceFactory. The exception rises when a config
is either updated or created and after the whole update method has
succsefully run. My system is not affected but I dont like the nullpointer
exception

My factory is implemented like this:
https://gist.github.com/Snorlock/7321523
The null pointer exception looks like this:
https://gist.github.com/Snorlock/7321535
And my config looks like this: https://gist.github.com/Snorlock/7321546

i would appriciate some help to get rid of this nullpointer exception:)
Thx

-- 
Mvh
Snorre Lothar von Gohren Edwin
MeetMe: http://doodle.com/vonGohren
+47 411 611 94



-- 
Mvh
Snorre Lothar von Gohren Edwin
MeetMe: http://doodle.com/vonGohren
+47 411 611 94