[jira] Updated: (FELIX-980) Package.getImplementationVendor() returns null for package loaded by Felix

2009-03-11 Thread Vincent ASTRUC (JIRA)

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

Vincent ASTRUC updated FELIX-980:
-

Description: 
Even though MANIFEST.MF has proper entry for Implementation-Vendor in a jar 
(ex:jai_imageio) , Package.getImplementationVendor() returns null.
For packages provided by the JVM it's OK.

  was:Even though MANIFEST.MF has proper entry for Implementation-Vendor, 
Package.getImplementationVendor() returns null


> Package.getImplementationVendor() returns null for package loaded by Felix
> --
>
> Key: FELIX-980
> URL: https://issues.apache.org/jira/browse/FELIX-980
> Project: Felix
>  Issue Type: Wish
>  Components: Framework
>Affects Versions: felix-1.4.1
> Environment: NA
>Reporter: Vincent ASTRUC
>Assignee: Richard S. Hall
>
> Even though MANIFEST.MF has proper entry for Implementation-Vendor in a jar 
> (ex:jai_imageio) , Package.getImplementationVendor() returns null.
> For packages provided by the JVM it's OK.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (FELIX-980) Package.getImplementationVendor() returns null for package loaded by Felix

2009-03-11 Thread Vincent ASTRUC (JIRA)

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

Vincent ASTRUC updated FELIX-980:
-

Fix Version/s: (was: felix-1.2.0)
  Description: Even though MANIFEST.MF has proper entry for 
Implementation-Vendor, Package.getImplementationVendor() returns null  (was: 
Even though MANIFEST.MF has proper entry for Implementation-Version, 
Package.getImplementationVersion() returns null. A  reproducible test case is 
attached. It is described below:


public class Foo implements BundleActivator {
public void start(BundleContext context) throws Exception {
Package p = getClass().getPackage();
System.out.println(p);
System.out.println(p.getImplementationVersion());
   }
}

The headers for this bundle are:
osgi-test1 (10)
---
Tool = Bnd-0.0.255
Bundle-Activator = sahoo.osgitest1.Foo
Implementation-Version = 1.0-SNAPSHOT
Implementation-Vendor-Id = sahoo
Bundle-Version = 1.0.0.SNAPSHOT
Build-Jdk = 1.5.0_13-rev
Implementation-Title = osgi-test1
Created-By = Apache Maven Bundle Plugin
Bundle-ManifestVersion = 2
Manifest-Version = 1.0
Bnd-LastModified = 1218821794953
Private-Package = sahoo.osgitest1
Bundle-Name = osgi-test1
Built-By = ss141213
Import-Package = org.osgi.framework;version="1.3"
Bundle-SymbolicName = sahoo.osgi-test1
)
Affects Version/s: (was: felix-1.0.4)
   felix-1.4.1

> Package.getImplementationVendor() returns null for package loaded by Felix
> --
>
> Key: FELIX-980
> URL: https://issues.apache.org/jira/browse/FELIX-980
> Project: Felix
>  Issue Type: Wish
>  Components: Framework
>Affects Versions: felix-1.4.1
> Environment: NA
>Reporter: Vincent ASTRUC
>Assignee: Richard S. Hall
>
> Even though MANIFEST.MF has proper entry for Implementation-Vendor, 
> Package.getImplementationVendor() returns null

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Created: (FELIX-980) Package.getImplementationVendor() returns null for package loaded by Felix

2009-03-11 Thread Vincent ASTRUC (JIRA)
Package.getImplementationVendor() returns null for package loaded by Felix
--

 Key: FELIX-980
 URL: https://issues.apache.org/jira/browse/FELIX-980
 Project: Felix
  Issue Type: Wish
  Components: Framework
Affects Versions: felix-1.0.4
 Environment: NA
Reporter: Vincent ASTRUC
Assignee: Richard S. Hall
 Fix For: felix-1.2.0


Even though MANIFEST.MF has proper entry for Implementation-Version, 
Package.getImplementationVersion() returns null. A  reproducible test case is 
attached. It is described below:


public class Foo implements BundleActivator {
public void start(BundleContext context) throws Exception {
Package p = getClass().getPackage();
System.out.println(p);
System.out.println(p.getImplementationVersion());
   }
}

The headers for this bundle are:
osgi-test1 (10)
---
Tool = Bnd-0.0.255
Bundle-Activator = sahoo.osgitest1.Foo
Implementation-Version = 1.0-SNAPSHOT
Implementation-Vendor-Id = sahoo
Bundle-Version = 1.0.0.SNAPSHOT
Build-Jdk = 1.5.0_13-rev
Implementation-Title = osgi-test1
Created-By = Apache Maven Bundle Plugin
Bundle-ManifestVersion = 2
Manifest-Version = 1.0
Bnd-LastModified = 1218821794953
Private-Package = sahoo.osgitest1
Bundle-Name = osgi-test1
Built-By = ss141213
Import-Package = org.osgi.framework;version="1.3"
Bundle-SymbolicName = sahoo.osgi-test1


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (FELIX-733) Exception when uninstalling a bundle that contains a native library (and loaded it at bundle startup).

2009-02-27 Thread Vincent ASTRUC (JIRA)

[ 
https://issues.apache.org/jira/browse/FELIX-733?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12677364#action_12677364
 ] 

Vincent ASTRUC commented on FELIX-733:
--

I have the same problem, i use felix 1.4.1
In the memory profiler all objects "enum" stay in the memory.

> Exception when uninstalling a bundle that contains a native library (and 
> loaded it at bundle startup).
> --
>
> Key: FELIX-733
> URL: https://issues.apache.org/jira/browse/FELIX-733
> Project: Felix
>  Issue Type: Improvement
>  Components: Framework
> Environment: WinXP, eclipse, sun jdk 1.5 or 1.6
>Reporter: Sylvain MARIE
>Assignee: Karl Pauls
>Priority: Minor
> Attachments: native.patch, native2.patch
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> Here is a short description of the problem and how I managed to fix it. Don't 
> hesitate to contact me for details
> or to tell me if something here is wrong ! Cheers. Sylvain.
> 1- bundle "foo" embeds a native library "lib.dll" and declares it in its 
> manifest, with appropriate platform declaration (os, version, processor).
> 2- foo's activator loads that library in the start(bc) method - with 
> System.loadLibrary(...).
> 3- the library loads succesfully (this can be checked with e.g. 
> processExplorer or pmap)
> 4- the bundle is stopped.
> 5- the bundle is uninstalled. 
> > ERROR: org.apache.felix.framework.cache.BundleArchive: Unable to delete 
> > archive directory
> Why does this happen :
> - step 4: the library is not unloaded because foo's contentclassloader is 
> still alive. This is normal.
> - step 5: automatic package refresh : all bundles from uninstalled list are 
> garbaged. Method 
> Felix.garbageCollectBundle attemps to remove the bundle archive from the 
> cache, but
> the dll file is still in use => ERROR. The dll is still in use because foo's 
> contentclassloader has not yet
> been garbaged out.
> How to fix this:  
> 
> We need the ContentClassLoader to be garbaged out. So first release all
> references to foo's activator, then release all references to the 
> ContentClassLoader itself,
> and finally do a System.gc() before attempting to remove the bundle from the 
> cache.
> Two methods are impacted: ContentLoaderImpl.close() and 
> Felix.garbageCollectBundle(...)
> ContentLoaderImpl.java
> ---
> public synchronized void close()
> {
> ...
> ...
> 
> // FIX SMA : release content class loader
> m_classLoader = null;
> }
> Felix.java
> -
> private void garbageCollectBundle(FelixBundle bundle) throws Exception
> {
>   
> 
> 
> // FIX SMA : release reference to the activator
> bundle.getInfo().setActivator(null);
> 
> // Do the garbage collection either systematically, or only if native 
> libraries were loaded, or ... 
> System.gc(); // this destroys the activator, the contentclassloader, 
> and unloads the dll.
> // end FIX SMA
> 
> // Remove the bundle from the cache.
> m_cache.remove(m_cache.getArchive(bundle.getBundleId()));
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.