{"action":"created","issue":{"url":"https://api.github.com/repos/eclipse/concierge/issues/59","repository_url":"https://api.github.com/repos/eclipse/concierge","labels_url":"https://api.github.com/repos/eclipse/concierge/issues/59/labels{/name}","comments_url":"https://api.github.com/repos/eclipse/concierge/issues/59/comments","events_url":"https://api.github.com/repos/eclipse/concierge/issues/59/events","html_url":"https://github.com/eclipse/concierge/issues/59","id":364871396,"node_id":"MDU6SXNzdWUzNjQ4NzEzOTY=","number":59,"title":"PackageAdminImpl.getBundleType throws NullPointerException","user":{"login":"svilenvul","id":7120104,"node_id":"MDQ6VXNlcjcxMjAxMDQ=","avatar_url":"https://avatars0.githubusercontent.com/u/7120104?v=4","gravatar_id":"","url":"https://api.github.com/users/svilenvul","html_url":"https://github.com/svilenvul","followers_url":"https://api.github.com/users/svilenvul/followers","following_url":"https://api.github.com/users/svilenvul/following{/other_user}","gists_url":"https://api.github.com/users/svilenvul/gists{/gist_id}","starred_url":"https://api.github.com/users/svilenvul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svilenvul/subscriptions","organizations_url":"https://api.github.com/users/svilenvul/orgs","repos_url":"https://api.github.com/users/svilenvul/repos","events_url":"https://api.github.com/users/svilenvul/events{/privacy}","received_events_url":"https://api.github.com/users/svilenvul/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-09-28T12:38:27Z","updated_at":"2018-10-19T12:47:28Z","closed_at":"2018-10-19T12:45:59Z","author_association":"NONE","body":"I have confirmed that the exception is still there with the latest Concierge snapshot that I could find - 5.1.0.SNAPSHOT-20180523024817.\r\n\r\nThe scenario is following:\r\n\r\n- I trigger uninstallation of OSGi Deployment Package;\r\n- Bundle Tracker is notified about the removed bundle and checks if the bundle is a fragment;\r\n- NullPointerException occurs.\r\n\r\nThe `test-ext` deployment package contains a single bundle, which is not a fragment.\r\n\r\nLogs:\r\n\r\n```\r\nConcierge> 13:28:56.638 ERROR org.eclipse.kura.deployment.agent.impl.DeploymentAgent[:360] - Exception uninstalling package test-ext\r\njava.lang.NullPointerException: null\r\n\tat org.eclipse.concierge.compat.packageadmin.PackageAdminImpl.isFragment(PackageAdminImpl.java:374)\r\n\tat org.eclipse.concierge.compat.packageadmin.PackageAdminImpl.getBundleType(PackageAdminImpl.java:370)\r\n\tat org.eclipse.smarthome.core.internal.i18n.ResourceBundleTracker.isFragmentBundle(ResourceBundleTracker.java:144)\r\n\tat org.eclipse.smarthome.core.internal.i18n.ResourceBundleTracker.removedBundle(ResourceBundleTracker.java:85)\r\n\tat org.osgi.util.tracker.BundleTracker$Tracked.customizerRemoved(BundleTracker.java:491)\r\n\tat org.osgi.util.tracker.BundleTracker$Tracked.customizerRemoved(BundleTracker.java:414)\r\n\tat org.osgi.util.tracker.AbstractTracked.untrack(AbstractTracked.java:341)\r\n\tat org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:449)\r\n\tat org.eclipse.concierge.Concierge.notifyBundleListeners(Concierge.java:3697)\r\n\tat org.eclipse.concierge.Concierge.notifyBundleListeners(Concierge.java:3632)\r\n\tat org.eclipse.concierge.BundleImpl.uninstall(BundleImpl.java:780)\r\n\tat org.apache.felix.deploymentadmin.spi.DropAllBundlesCommand.execute(DropAllBundlesCommand.java:48)\r\n\tat org.apache.felix.deploymentadmin.spi.DeploymentSessionImpl.call(DeploymentSessionImpl.java:73)\r\n\tat org.apache.felix.deploymentadmin.DeploymentAdminImpl.uninstallDeploymentPackage(DeploymentAdminImpl.java:352)\r\n\tat org.apache.felix.deploymentadmin.AbstractDeploymentPackage.uninstall(AbstractDeploymentPackage.java:296)\r\n\tat org.eclipse.kura.deployment.agent.impl.DeploymentAgent.uninstaller(DeploymentAgent.java:347)\r\n\tat org.eclipse.kura.deployment.agent.impl.DeploymentAgent.lambda$1(DeploymentAgent.java:178)\r\n\tat java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)\r\n\tat java.util.concurrent.FutureTask.run(FutureTask.java:266)\r\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)\r\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)\r\n\tat java.lang.Thread.run(Thread.java:748)\r\n\r\n```\r\n\r\nIf I understand correctly expected result is int or IllegalArgumentException - https://osgi.org/javadoc/r5/core/org/osgi/service/packageadmin/PackageAdmin.html#getBundleType(org.osgi.framework.Bundle)\r\n\r\nI would really appreciate your assistance with this issue, please let me know if you need additional information."},"comment":{"url":"https://api.github.com/repos/eclipse/concierge/issues/comments/431351381","html_url":"https://github.com/eclipse/concierge/issues/59#issuecomment-431351381","issue_url":"https://api.github.com/repos/eclipse/concierge/issues/59","id":431351381,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMTM1MTM4MQ==","user":{"login":"rellermeyer","id":6497919,"node_id":"MDQ6VXNlcjY0OTc5MTk=","avatar_url":"https://avatars3.githubusercontent.com/u/6497919?v=4","gravatar_id":"","url":"https://api.github.com/users/rellermeyer","html_url":"https://github.com/rellermeyer","followers_url":"https://api.github.com/users/rellermeyer/followers","following_url":"https://api.github.com/users/rellermeyer/following{/other_user}","gists_url":"https://api.github.com/users/rellermeyer/gists{/gist_id}","starred_url":"https://api.github.com/users/rellermeyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rellermeyer/subscriptions","organizations_url":"https://api.github.com/users/rellermeyer/orgs","repos_url":"https://api.github.com/users/rellermeyer/repos","events_url":"https://api.github.com/users/rellermeyer/events{/privacy}","received_events_url":"https://api.github.com/users/rellermeyer/received_events","type":"User","site_admin":false},"created_at":"2018-10-19T12:47:28Z","updated_at":"2018-10-19T12:47:28Z","author_association":"CONTRIBUTOR","body":"Did not mean to close it. \r\n\r\nSvilen, I committed a fix. Could you please let me know if this works. \r\n\r\nI am not quite sure what the result of isFragment should be for an uninstalled bundle but at least it should not NPE anymore."}}
{"actor":{"display_login":"rellermeyer"}}