karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Baptiste Onofré ...@nanthrax.net>
Subject Re: org.apache.karaf.config.core (24): Error while creating extension
Date Thu, 11 Apr 2019 14:05:58 GMT
Yes, it's rarely null for the service reference, but you are right, we
should improve the code to fallback when it's null.

Can you please create a Jira, I will tackle that ?

Sorry about that.

Regards
JB

On 11/04/2019 15:56, Martin Lichtin wrote:
> Has anyone seen this at Karaf startup and understands what the cause is?
> 
> 2019-04-10T20:23:42,571 | INFO  | FelixStartLevel          |
> CommandExtension                 | mpl.action.osgi.CommandExtension 
146
> | 44 - org.apache.karaf.shell.core - 4.1.7 | Registering commands for
> bundle org.apache.karaf.config.core/4.1.7
> 2019-04-10T20:23:42,578 | WARN  | FelixStartLevel          |
> CommandExtender                  | impl.action.osgi.CommandExtender  
87
> | 44 - org.apache.karaf.shell.core - 4.1.7 |
> org.apache.karaf.config.core (24): Error while creating extension
> java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
>     at
> org.apache.karaf.shell.impl.action.command.ManagerImpl.register(ManagerImpl.java:159)
> [44:org.apache.karaf.shell.core:4.1.7]
>     at
> org.apache.karaf.shell.impl.action.osgi.CommandExtension.updateState(CommandExtension.java:168)
> [44:org.apache.karaf.shell.core:4.1.7]
>     at
> org.apache.karaf.shell.impl.action.osgi.CommandExtension.start(CommandExtension.java:113)
> [44:org.apache.karaf.shell.core:4.1.7]
>     at
> org.apache.felix.utils.extender.AbstractExtender.createExtension(AbstractExtender.java:254)
> [44:org.apache.karaf.shell.core:4.1.7]
>     at
> org.apache.felix.utils.extender.AbstractExtender.modifiedBundle(AbstractExtender.java:227)
> [44:org.apache.karaf.shell.core:4.1.7]
>     at
> org.apache.felix.utils.extender.AbstractExtender.addingBundle(AbstractExtender.java:187)
> [44:org.apache.karaf.shell.core:4.1.7]
>     at
> org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:469)
> [?:?]
>     at
> org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:415)
> [?:?]
>     at
> org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
> [?:?]
>     at
> org.osgi.util.tracker.AbstractTracked.trackInitial(AbstractTracked.java:183)
> [?:?]
>     at org.osgi.util.tracker.BundleTracker.open(BundleTracker.java:156)
> [?:?]
>     at
> org.apache.felix.utils.extender.AbstractExtender.startTracking(AbstractExtender.java:150)
> [44:org.apache.karaf.shell.core:4.1.7]
>     at
> org.apache.felix.utils.extender.AbstractExtender.doStart(AbstractExtender.java:142)
> [44:org.apache.karaf.shell.core:4.1.7]
>     at
> org.apache.felix.utils.extender.AbstractExtender.start(AbstractExtender.java:114)
> [44:org.apache.karaf.shell.core:4.1.7]
>     at
> org.apache.karaf.shell.impl.console.osgi.Activator.start(Activator.java:107)
> [44:org.apache.karaf.shell.core:4.1.7]
>     at
> org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:697)
> [?:?]
>     at org.apache.felix.framework.Felix.activateBundle(Felix.java:2240)
> [?:?]
>     at org.apache.felix.framework.Felix.startBundle(Felix.java:2146) [?:?]
>     at
> org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1373) [?:?]
>     at
> org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
> [?:?]
>     at java.lang.Thread.run(Thread.java:748) [?:?]
> Caused by: java.lang.reflect.InvocationTargetException
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
>     at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> ~[?:?]
>     at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> ~[?:?]
>     at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
>     at
> org.apache.karaf.shell.impl.action.command.ManagerImpl.instantiate(ManagerImpl.java:103)
> ~[?:?]
>     at
> org.apache.karaf.shell.impl.action.command.ManagerImpl.instantiate(ManagerImpl.java:60)
> ~[?:?]
>     at
> org.apache.karaf.shell.impl.action.command.ManagerImpl.register(ManagerImpl.java:151)
> ~[?:?]
>     ... 20 more
> Caused by: java.lang.NullPointerException: Specified service reference
> cannot be null.
>     at
> org.apache.felix.framework.BundleContextImpl.ungetService(BundleContextImpl.java:479)
> ~[?:?]
>     at
> org.apache.karaf.config.core.impl.MetaServiceCaller.withMetaTypeService(MetaServiceCaller.java:38)
> ~[?:?]
>     at
> org.apache.karaf.config.command.completers.MetaCompleter.updateMeta(MetaCompleter.java:63)
> ~[?:?]
>     at
> org.apache.karaf.config.command.completers.MetaCompleter.init(MetaCompleter.java:49)
> ~[?:?]
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
>     at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> ~[?:?]
>     at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> ~[?:?]
>     at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
>     at
> org.apache.karaf.shell.impl.action.command.ManagerImpl.instantiate(ManagerImpl.java:103)
> ~[?:?]
>     at
> org.apache.karaf.shell.impl.action.command.ManagerImpl.instantiate(ManagerImpl.java:60)
> ~[?:?]
>     at
> org.apache.karaf.shell.impl.action.command.ManagerImpl.register(ManagerImpl.java:151)
> ~[?:?]
>     ... 20 more
> 2019-04-10T20:23:42,584 | INFO  | FelixStartLevel          |
> CommandExtension                 | mpl.action.osgi.CommandExtension 
146
> | 44 - org.apache.karaf.shell.core - 4.1.7 | Registering commands for
> bundle org.apache.karaf.deployer.kar/4.1.7
> 
> Just looking at MetaServiceCaller.withMetaTypeService(), "ref" could be
> null but the code does not handle that.
> 
> - Martin

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Mime
View raw message