karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Baptiste Onofré (JIRA) <j...@apache.org>
Subject [jira] [Assigned] (KARAF-6234) Handle null reference in MetaServiceCaller.withMetaTypeService()
Date Wed, 17 Apr 2019 11:52:00 GMT

     [ https://issues.apache.org/jira/browse/KARAF-6234?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jean-Baptiste Onofré reassigned KARAF-6234:
-------------------------------------------

    Assignee: Jean-Baptiste Onofré

> Handle null reference in MetaServiceCaller.withMetaTypeService()
> ----------------------------------------------------------------
>
>                 Key: KARAF-6234
>                 URL: https://issues.apache.org/jira/browse/KARAF-6234
>             Project: Karaf
>          Issue Type: Improvement
>          Components: karaf
>    Affects Versions: 4.1.7
>            Reporter: Martin Lichtin
>            Assignee: Jean-Baptiste Onofré
>            Priority: Minor
>
> {noformat}
> 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
> {noformat}
> Just looking at MetaServiceCaller.withMetaTypeService(), "ref" could be null but the
code does not handle that.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message