[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [p2-dev] strangeness when running p2 as web archive
- From: Simon Kaegi <Simon_Kaegi@xxxxxxxxxx>
- Date: Tue, 20 Oct 2009 22:21:09 -0400
- Delivered-to: email@example.com
That particular error usually indicates that there is a problem making sense of what's in eclipse.ini vs. what is on disk and in particular there was a bug for the situation you describe found late in 3.5 where we did the path math wrong and left an extra "plugins" folder in the path. We decided not to do the fix in 3.5.x because the situation was not one we ever expected someone to run into -- until now. In addition to this one path fix I know Andrew Niefer has been making other changes in HEAD to help make better sense of what's going on and we should be able to handle an empty or missing eclipse.ini better. So, I'd suggest a switch to HEAD as even if that doesn't help work out the problems that's we're going to have to do the fix.
Scott Lewis ---10/20/2009 07:56:30 PM---I'm fussing with running p2 with a web archive (war) installation, and am getting some strangeness
Scott Lewis <slewis@xxxxxxxxxxxxx>
P2 developer discussions <p2-dev@xxxxxxxxxxx>
10/20/2009 07:56 PM
[p2-dev] strangeness when running p2 as web archive
I'm fussing with running p2 with a web archive (war) installation, and
am getting some strangeness RE: the equinox frameworkadmin
implementation when trying to revert/uninstall IUs. Before describing
what's happening in the source, I need to say that this is on the
Here's what's happening:
I create/install and run (under tomcat servlet container) an Equinox
war. The webapp starts up/runs in Tomcat, and the OSGi console comes up
(and the p2 console commands are present as the p2 command provider is
present). All is well at this point.
I can then use the p2 console commands to install a group IU (i.e.
But then when I try to revert to a previous profile timestamp (via new
p2 console command I'm working on), the revert fails, because this
fwConfigLocation.equals(fwPersistentDataLocation) fails and throws:
throw new IllegalStateException(message removed);
In debugging into this code, I noticed that *before* this code throws,
there is code in EquinoxManipulatorImpl.loadWithoutFwPersistentData that
*sets* the launcerData.fwPersistentDataLocation to a non-null value.
That is, I can see that at
EquinoxManipulatorImpl.loadWithoutFwPersistentData line:353, the
contents of launcherData field is:
jvmArgs = null
programArgs = null
But then the following code is executed (this code is in
File launcherConfigFile =
getLauncherConfigLocation(launcherData); <-line 353
// After this is executed,
if (launcherConfigFile != null &&
// This block is entered, and the parser.read call is made.
// use launcher. -- > load from LaucnherConfig file.
// the parameters in memory will be updated.
EclipseLauncherParser parser = new EclipseLauncherParser();
And at this point in the code (i.e. after the parser.read), the value of
launcherData is now:
jvmArgs = null
programArgs = null
Notice that the fwConfigLocation and the fwPersistentDataLocation are
not equal (and now both non-null). The fwPersistentDataLocation has
...eclipse\plugins\configuration (incorrect) while the fwConfigLocation
has ...eclipse\configuration. So the !equals test succeeds and the
IllegalStateException is now thrown.
I noticed that the eclipse.ini file that is actually read with the
parser.read is *empty* (0 bytes). So somehow the
parser.read(launcherConfigFile, launcherData); line is changing the
launcherData value for fwPersistentDataLocation even when the
eclipse.ini is completely empty.
Then if I *delete* the eclipse.ini file from the directory above before
doing the revert the revert then succeeds. But here's an interesting
part...as a side effect of the revert (or the confapply) an *empty*
eclipse.ini file is then introduced back into the
directory. I have no idea why an empty eclipse.ini is introduced...so
the problem described above then shows up again (because the eclipse.ini
file is present).
p2-dev mailing list