[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[p2-dev] Why is the director needed during install?

During install with our headless version of the director application, we sometimes see this error:

!ENTRY org.eclipse.equinox.p2.touchpoint.eclipse 4 0 2009-09-24 12:31:15.429
!MESSAGE The partial IU could not be updated. Publisher not available: org.eclipse.equinox.p2.publisher.eclipse.BundlesAction.

it seems to indicate that the publisher is needed during install. After some investigation, I found the following code:

Class c = null;
try {
c = Class.forName("org.eclipse.equinox.p2.publisher.eclipse.BundlesAction"); //$NON-NLS-1$
if (c != null)
c = Class.forName("org.eclipse.osgi.service.resolver.PlatformAdmin"); //$NON-NLS-1$
} catch (ClassNotFoundException e) {
LogHelper.log(Util.createError(NLS.bind(Messages.publisher_not_available, e.getMessage())));
return null;

Am I correct to assume that the if statement here is incorrect and really should be if (c == null)? Or is the presence of the publisher a prerequisite for using the PlatformAdmin?

- thomas