Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 361462

Summary: Apache Felix 3.0 fails to start on Windows
Product: z_Archived Reporter: Kaloyan Raev <kaloyan>
Component: LibraAssignee: Kaloyan Raev <kaloyan>
Status: RESOLVED FIXED QA Contact: Naci Dai <naci.dai>
Severity: major    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Kaloyan Raev CLA 2011-10-19 15:39:46 EDT
It's always reproduced on Windows using the suggested 3.0.4 automatically downloaded Felix runtime. 

Actually, the server reports 'started', but the bundles are not started. In the console I find lots of errors like the one below:

java.lang.RuntimeException: Unable to create cache directory.
	at org.apache.felix.framework.cache.BundleCache.getArchives(BundleCache.java:124)
	at org.apache.felix.framework.Felix.init(Felix.java:651)
	at org.apache.felix.main.Main.main(Main.java:288)
Auto-properties install: reference:file:/C:/Work/Libra/felix-framework-3.0.4/bin/felix.jar (org.osgi.framework.BundleException: Unable to cache bundle: reference:file:/C:/Work/Libra/felix-framework-3.0.4/bin/felix.jar - java.io.IOException: Unable to create archive directory.)
org.osgi.framework.BundleException: Unable to cache bundle: reference:file:/C:/Work/Libra/felix-framework-3.0.4/bin/felix.jar
	at org.apache.felix.framework.Felix.installBundle(Felix.java:2468)
	at org.apache.felix.framework.Felix.installBundle(Felix.java:2424)
	at org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:129)
	at org.apache.felix.main.AutoProcessor.processAutoProperties(AutoProcessor.java:272)
	at org.apache.felix.main.AutoProcessor.process(AutoProcessor.java:75)
	at org.apache.felix.main.Main.main(Main.java:291)
Caused by: java.io.IOException: Unable to create archive directory.
	at org.apache.felix.framework.cache.BundleArchive.initialize(BundleArchive.java:860)
	at org.apache.felix.framework.cache.BundleArchive.<init>(BundleArchive.java:141)
	at org.apache.felix.framework.cache.BundleCache.create(BundleCache.java:169)
	at org.apache.felix.framework.Felix.installBundle(Felix.java:2464)
	... 5 more


The same works perfectly on Linux. 
On Windows I can successfully run the Equinox server adapter. 
So, it seems to be a platform-specific issue for the Felix server adapter.
Comment 1 Kaloyan Raev CLA 2011-11-01 08:44:25 EDT
I pushed the following patch to master:
http://git.eclipse.org/c/libra/org.eclipse.libra.git/commit/?id=0aedc4698ab7e2520fd759900a5a9b22fc812df1

Tested on Windows and Linux.