Return-Path: X-Original-To: apmail-felix-dev-archive@www.apache.org Delivered-To: apmail-felix-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3D41218C38 for ; Fri, 20 Nov 2015 22:39:11 +0000 (UTC) Received: (qmail 68148 invoked by uid 500); 20 Nov 2015 22:39:11 -0000 Delivered-To: apmail-felix-dev-archive@felix.apache.org Received: (qmail 68081 invoked by uid 500); 20 Nov 2015 22:39:11 -0000 Mailing-List: contact dev-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@felix.apache.org Delivered-To: mailing list dev@felix.apache.org Received: (qmail 68062 invoked by uid 99); 20 Nov 2015 22:39:11 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Nov 2015 22:39:11 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id E39E02C0450 for ; Fri, 20 Nov 2015 22:39:10 +0000 (UTC) Date: Fri, 20 Nov 2015 22:39:10 +0000 (UTC) From: "Stephen Kahmann (JIRA)" To: dev@felix.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (FELIX-5112) ClassCastException when deploying an OBR Resource already present in the runtime MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/FELIX-5112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15018950#comment-15018950 ] Stephen Kahmann edited comment on FELIX-5112 at 11/20/15 10:38 PM: ------------------------------------------------------------------- [This|https://github.com/apache/felix/blob/trunk/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/ResolverImpl.java#L703] cast is unsafe because the local resources are actually LazyLocalResourceImpl. It may be a better design to create an interface for a LocalResource that has the getBundle method (and any other) required from local resources. was (Author: skahmann): [This|https://github.com/apache/felix/blob/trunk/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/ResolverImpl.java#L703] cast is unsafe because the local resources are actually LazyLocalResourceImpl. > ClassCastException when deploying an OBR Resource already present in the runtime > -------------------------------------------------------------------------------- > > Key: FELIX-5112 > URL: https://issues.apache.org/jira/browse/FELIX-5112 > Project: Felix > Issue Type: Bug > Components: Bundle Repository (OBR) > Affects Versions: bundlerepository-2.0.6 > Reporter: Stephen Kahmann > > When using OBR to deploy a bundle that is already present in the runtime, there is a ClassCastException: > {code} > java.lang.ClassCastException: org.apache.felix.bundlerepository.impl.LazyLocalResourceImpl cannot be cast to org.apache.felix.bundlerepository.impl.LocalResourceImpl > at org.apache.felix.bundlerepository.impl.ResolverImpl.findUpdatableLocalResource(ResolverImpl.java:703) > at org.apache.felix.bundlerepository.impl.ResolverImpl.deploy(ResolverImpl.java:569) > at org.apache.karaf.obr.command.ObrCommandSupport.doDeploy(ObrCommandSupport.java:168) > at org.apache.karaf.obr.command.StartCommand.doExecute(StartCommand.java:38) > at org.apache.karaf.obr.command.ObrCommandSupport.execute(ObrCommandSupport.java:58) > at org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:83) > at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:67) > at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:87) > at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:480) > at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:406) > at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108) > at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:182) > at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:119) > at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:94) > at org.apache.karaf.shell.impl.console.HeadlessSessionImpl.execute(HeadlessSessionImpl.java:90) > at org.matonto.itests.KarafTestSupport$1.call(KarafTestSupport.java:143) > at org.matonto.itests.KarafTestSupport$1.call(KarafTestSupport.java:136) > at java.util.concurrent.FutureTask.run(FutureTask.java:266) > at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) > at java.util.concurrent.FutureTask.run(FutureTask.java:266) > at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) > at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > at java.lang.Thread.run(Thread.java:745) > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)