Community
Participate
Working Groups
Build Identifier: Steps to reproduce: 1. Create a new file in the config directory with content like this: smallcaps=some property SMALLCAPS=some other property 2. Start Virgo Observed: * Virgo never starts * The following gets dumped in the log file: [2012-01-27 10:46:44.147] main System.err Exception in thread "main" org.osgi.framework.BundleException: Bundle org.eclipse.virgo.kernel.core 2.1.1.RELEASE failed to start. [2012-01-27 10:46:44.147] main System.err at org.eclipse.virgo.osgi.launcher.FrameworkBuilder.installAndStartBundles(FrameworkBuilder.java:175) [2012-01-27 10:46:44.147] main System.err at org.eclipse.virgo.osgi.launcher.FrameworkBuilder.start(FrameworkBuilder.java:155) [2012-01-27 10:46:44.147] main System.err at org.eclipse.virgo.osgi.launcher.Launcher.main(Launcher.java:53) [2012-01-27 10:46:44.147] main System.err Caused by: org.osgi.framework.BundleException: Exception in org.eclipse.virgo.kernel.core.internal.CoreBundleActivator.start() of bundle org.eclipse.virgo.kernel.core. [2012-01-27 10:46:44.148] main System.err at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:806) [2012-01-27 10:46:44.148] main System.err at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:755) [2012-01-27 10:46:44.148] main System.err at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:370) [2012-01-27 10:46:44.148] main System.err at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:284) [2012-01-27 10:46:44.148] main System.err at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:276) [2012-01-27 10:46:44.148] main System.err at org.eclipse.virgo.osgi.launcher.FrameworkBuilder.installAndStartBundles(FrameworkBuilder.java:173) [2012-01-27 10:46:44.148] main System.err ... 2 more [2012-01-27 10:46:44.148] main System.err Caused by: java.lang.IllegalArgumentException: Key [smallcaps] already present in different case [2012-01-27 10:46:44.149] main System.err at org.apache.felix.cm.impl.CaseInsensitiveDictionary.<init>(CaseInsensitiveDictionary.java:78) [2012-01-27 10:46:44.149] main System.err at org.apache.felix.cm.impl.ConfigurationImpl.update(ConfigurationImpl.java:278) [2012-01-27 10:46:44.149] main System.err at org.apache.felix.cm.impl.ConfigurationAdapter.update(ConfigurationAdapter.java:110) [2012-01-27 10:46:44.149] main System.err at org.eclipse.virgo.kernel.config.internal.ConfigurationPublisher.populateConfigurationWithProperties(ConfigurationPublisher.java:79) [2012-01-27 10:46:44.149] main System.err at org.eclipse.virgo.kernel.config.internal.ConfigurationPublisher.publishConfigurations(ConfigurationPublisher.java:58) [2012-01-27 10:46:44.149] main System.err at org.eclipse.virgo.kernel.config.internal.ConfigurationInitialiser.publishConfiguration(ConfigurationInitialiser.java:69) [2012-01-27 10:46:44.149] main System.err at org.eclipse.virgo.kernel.config.internal.ConfigurationInitialiser.start(ConfigurationInitialiser.java:56) [2012-01-27 10:46:44.149] main System.err at org.eclipse.virgo.kernel.core.internal.CoreBundleActivator.start(CoreBundleActivator.java:95) [2012-01-27 10:46:44.149] main System.err at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:783) [2012-01-27 10:46:44.150] main System.err at java.security.AccessController.doPrivileged(Native Method) [2012-01-27 10:46:44.150] main System.err at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:774) [2012-01-27 10:46:44.150] main System.err ... 7 more Reproducible: Always Steps to Reproduce: 1. Create a new file in the config directory with content like this: smallcaps=some property SMALLCAPS=some other property 2. Start Virgo
Thanks for raising this bug. I'm a little puzzled that it is marked as critical as there appears to be an easy workaround - just don't put such a file in config. Please could you kindly change the importance to "normal" to reflect this. By the way, the config directory is really intended for Virgo configuration files (so you'd really only need it there if you have added your own bundle to the kernel). If you want to make a configuration available in the user region, it is more usual to place the corresponding properties file in pickup or deploy it as part of a plan or via the initialArtifacts property in the user region configuration file. If you try any of those techniques, it would be interesting to know whether similar problems occur. But at least I would expect the first two of those techniques to have no impact on Virgo startup if they fail.
Thanks for explaining how to properly configure Virgo. I have put "Critical" because of the bug login form instructions. There it says "Critical: The software crashes, hangs, or causes you to lose data". Since the server does not start as result of this I tough that it is the right category.
Thanks for dropping the importance to normal - the description of critical really should mention workarounds.
Out of interest I tried this in the pickup dir. The server starts fine but gives a small stack trace when trying to start the configuration complaining that it has a duplicate property. This is correct. As for the configuration dir, yup, it properly breaks it. You do get some decent output at the end of the serviceability log warning about the duplicate property but it should be able to handle such things.
Virgo is now more tolerant of problem properties in the configuration folder. It will now give an error and a single stack trace in the log along with some useful message and continue on. Before it was giving loads of stack traces and finally failing. Tests updated in Nano repo to cover the new code.