Return-Path: X-Original-To: apmail-felix-users-archive@minotaur.apache.org Delivered-To: apmail-felix-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0DDC810784 for ; Wed, 19 Mar 2014 08:01:09 +0000 (UTC) Received: (qmail 48836 invoked by uid 500); 19 Mar 2014 08:01:08 -0000 Delivered-To: apmail-felix-users-archive@felix.apache.org Received: (qmail 48148 invoked by uid 500); 19 Mar 2014 08:01:03 -0000 Mailing-List: contact users-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@felix.apache.org Delivered-To: mailing list users@felix.apache.org Received: (qmail 48131 invoked by uid 99); 19 Mar 2014 08:01:00 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Mar 2014 08:01:00 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [194.109.24.33] (HELO smtp-vbr13.xs4all.nl) (194.109.24.33) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Mar 2014 08:00:55 +0000 Received: from macpro.fritz.box (planetmarrs.xs4all.nl [82.95.193.148]) (authenticated bits=0) by smtp-vbr13.xs4all.nl (8.13.8/8.13.8) with ESMTP id s2J80WF2095456 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Wed, 19 Mar 2014 09:00:33 +0100 (CET) (envelope-from marcel.offermans@luminis.nl) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) Subject: Re: Classloader exception From: Marcel Offermans In-Reply-To: Date: Wed, 19 Mar 2014 08:59:17 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <49B21A11-47FD-4381-A537-7CA443AF281E@luminis.nl> References: To: "" X-Mailer: Apple Mail (2.1827) X-Virus-Scanned: by XS4ALL Virus Scanner X-Virus-Checked: Checked by ClamAV on apache.org Hello Frizz, That is exactly why OSGi has a built-in mechanism to load native code, = to deal with such problems. You say you are loading the DLL yourself, = but did you look at the specification and its abilities to load native = code? If for some reason you really can=92t use the spec for this, I suggest = you study the implementation of loading native code in the Felix = framework (which shows you what tricks to play) but to be honest, I = would not go there but leverage what is already present. Greetings, Marcel On 19 Mar 2014, at 4:32 , Frizz wrote: > Hi all, >=20 > I load a DLL using JNI. Because I'm still in development phase, I use > "dev:watch" to automatically update my bundle in the container. >=20 > I understood that this results in an exception: "UnsatisfiedLinkError: > Native Library xyz already loaded in another classloader" - because = the DLL > is already loaded by the JVM. >=20 > I also understood that only after the classloader that loaded the DLL = is > garbage collected, the DLL is unloaded. >=20 > So I uninstalled the bundle - yet I still get the UnsatisfiedLinkError > exception. Which means the classloader is still alive. >=20 > Shouldn't the bundles classloader be gone once I uninstalled the = bundle? >=20 > cheers, > Frizz --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@felix.apache.org For additional commands, e-mail: users-help@felix.apache.org