[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[virgo-dev] Virgo fails to start if BundleException is thrown on startup

Hi,

During framework start the call stack seems to be:
Thread [main] (Suspended)	
	FrameworkBuilder.installAndStartBundles(BundleContext) line: 162	
	FrameworkBuilder.start() line: 155	
	Launcher.main(String[]) line: 53	

In FrameworkBuilder.installAndStartBundles() method all the bundles described in the org.eclipse.virgo.kernel.launch.properties are installed and then started. If some of the bundles fails to start a BundleException is caught and then rethrown. 

The problem is that this exception is not processed and the current thread is killed. From this point on the Virgo server is in inconsistent state - the kernel region is partially started and there is no user region initialized. The server seems started but is unusable. An example would be a fragment bundle included in the launch.properties file.

Since I did not find similar issue I created a bug:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=322132

It seems that the issue can be fixed relatively easy. The question however is what should be the behavior of Virgo in this case:
	* not all bundles bring core functionality and are mandatory for the work of the kernel region - the exception should be just logged and the starting of the other bundles should continue
	* every bundle is needed - launcher should process the exception and exit the java process with some explanation

Regards,
Hristo Iliev