Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » p2 prestartupdate example fails
p2 prestartupdate example fails [message #683991] Tue, 14 June 2011 20:16 Go to next message
Timm  is currently offline Timm Friend
Messages: 5
Registered: March 2010
Junior Member
I am having problems with the prestartupdate example (as mentioned on the equinox p2 wiki). I am using eclipse 3.6.2

cvs -d ':pserver:anonymous@dev.eclipse.org/cvsroot/rt' co org.eclipse.equinox/p2/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate


I import the project into my workspace and run prestartupdate.product

The application starts but I get the following error log. One of the problems is nullpointer exception in UpdateOperation.getInstalledIUs.

Any help would be greatly appreciated.

Timm

!SESSION 2011-06-14 16:03:19.640 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.6.0_25
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Framework arguments:  -product org.eclipse.equinox.p2.examples.rcp.prestartupdate.product
Command-line arguments:  -product org.eclipse.equinox.p2.examples.rcp.prestartupdate.product -data C:\timm\src\forma/../runtime-prestartupdate.product -dev file:C:/timm/src/forma/.metadata/.plugins/org.eclipse.pde.core/prestartupdate.product/dev.properties -os win32 -ws win32 -arch x86 -consoleLog

!ENTRY org.eclipse.equinox.ds 4 0 2011-06-14 16:03:20.812
!MESSAGE 
!STACK 0
org.osgi.framework.BundleException: The bundle "org.eclipse.equinox.ds_1.2.1.R36x_v20100803 [25]" could not be resolved. Reason: Missing Constraint: Import-Package: org.eclipse.equinox.internal.util.event; version="1.0.0"
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolverError(AbstractBundle.java:1317)
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolutionFailureException(AbstractBundle.java:1301)
	at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:319)
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:374)
	at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1067)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:561)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:546)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:459)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:440)
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227)
	at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:337)

!ENTRY org.eclipse.equinox.ds 4 0 2011-06-14 16:03:20.890
!MESSAGE 
!STACK 0
org.osgi.framework.BundleException: The bundle "org.eclipse.equinox.ds_1.2.1.R36x_v20100803 [25]" could not be resolved. Reason: Missing Constraint: Import-Package: org.eclipse.equinox.internal.util.event; version="1.0.0"
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolverError(AbstractBundle.java:1317)
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolutionFailureException(AbstractBundle.java:1301)
	at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:319)
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:374)
	at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1067)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.setBundleSL(StartLevelManager.java:695)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:437)
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227)
	at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:337)

!ENTRY org.eclipse.osgi 2 0 2011-06-14 16:03:20.906
!MESSAGE One or more bundles are not resolved because the following root constraints are not resolved:
!SUBENTRY 1 org.eclipse.osgi 2 0 2011-06-14 16:03:20.906
!MESSAGE Bundle reference:file:/C:/tools/eclipse3.6.2/plugins/org.eclipse.equinox.ds_1.2.1.R36x_v20100803.jar was not resolved.
!SUBENTRY 2 org.eclipse.equinox.ds 2 0 2011-06-14 16:03:20.906
!MESSAGE Missing imported package org.eclipse.equinox.internal.util.pool_1.0.0.
!SUBENTRY 2 org.eclipse.equinox.ds 2 0 2011-06-14 16:03:20.906
!MESSAGE Missing imported package org.eclipse.equinox.internal.util.threadpool_1.0.0.
!SUBENTRY 2 org.eclipse.equinox.ds 2 0 2011-06-14 16:03:20.906
!MESSAGE Missing imported package org.eclipse.equinox.internal.util.ref_1.0.0.
!SUBENTRY 2 org.eclipse.equinox.ds 2 0 2011-06-14 16:03:20.906
!MESSAGE Missing imported package org.eclipse.equinox.internal.util.event_1.0.0.
!SUBENTRY 2 org.eclipse.equinox.ds 2 0 2011-06-14 16:03:20.906
!MESSAGE Missing imported package org.eclipse.equinox.internal.util.hash_1.0.0.
!SUBENTRY 2 org.eclipse.equinox.ds 2 0 2011-06-14 16:03:20.906
!MESSAGE Missing imported package org.eclipse.equinox.internal.util.timer_1.0.0.

!ENTRY org.eclipse.osgi 2 0 2011-06-14 16:03:20.906
!MESSAGE The following is a complete list of bundles which are not resolved, see the prior log entry for the root cause if it exists:
!SUBENTRY 1 org.eclipse.osgi 2 0 2011-06-14 16:03:20.906
!MESSAGE Bundle org.eclipse.equinox.ds_1.2.1.R36x_v20100803 [25] was not resolved.
!SUBENTRY 2 org.eclipse.equinox.ds 2 0 2011-06-14 16:03:20.906
!MESSAGE Missing imported package org.eclipse.equinox.internal.util.event_1.0.0.
!SUBENTRY 2 org.eclipse.equinox.ds 2 0 2011-06-14 16:03:20.906
!MESSAGE Missing imported package org.eclipse.equinox.internal.util.hash_1.0.0.
!SUBENTRY 2 org.eclipse.equinox.ds 2 0 2011-06-14 16:03:20.906
!MESSAGE Missing imported package org.eclipse.equinox.internal.util.pool_1.0.0.
!SUBENTRY 2 org.eclipse.equinox.ds 2 0 2011-06-14 16:03:20.906
!MESSAGE Missing imported package org.eclipse.equinox.internal.util.ref_1.0.0.
!SUBENTRY 2 org.eclipse.equinox.ds 2 0 2011-06-14 16:03:20.906
!MESSAGE Missing imported package org.eclipse.equinox.internal.util.threadpool_1.0.0.
!SUBENTRY 2 org.eclipse.equinox.ds 2 0 2011-06-14 16:03:20.906
!MESSAGE Missing imported package org.eclipse.equinox.internal.util.timer_1.0.0.
java.lang.reflect.InvocationTargetException
	at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:477)
	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372)
	at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:507)
	at org.eclipse.equinox.p2.examples.rcp.prestartupdate.ApplicationWorkbenchWindowAdvisor.postWindowOpen(ApplicationWorkbenchWindowAdvisor.java:94)
	at org.eclipse.ui.internal.WorkbenchWindow.fireWindowOpened(WorkbenchWindow.java:1338)
	at org.eclipse.ui.internal.WorkbenchWindow.open(WorkbenchWindow.java:798)
	at org.eclipse.ui.internal.Workbench$24.runWithException(Workbench.java:1235)
	at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4041)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3660)
	at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:803)
	at org.eclipse.ui.internal.Workbench$31.runWithException(Workbench.java:1567)
	at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4041)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3660)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2548)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.equinox.p2.examples.rcp.prestartupdate.Application.start(Application.java:20)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1408)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1384)
Caused by: java.lang.NullPointerException
	at org.eclipse.equinox.p2.operations.UpdateOperation.getInstalledIUs(UpdateOperation.java:296)
	at org.eclipse.equinox.p2.operations.UpdateOperation.prepareToResolve(UpdateOperation.java:281)
	at org.eclipse.equinox.p2.operations.ProfileChangeOperation.resolveModal(ProfileChangeOperation.java:112)
	at org.eclipse.equinox.p2.examples.rcp.prestartupdate.P2Util.checkForUpdates(P2Util.java:49)
	at org.eclipse.equinox.p2.examples.rcp.prestartupdate.ApplicationWorkbenchWindowAdvisor$1.run(ApplicationWorkbenchWindowAdvisor.java:76)
	at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464)

[Updated on: Tue, 14 June 2011 22:03]

Report message to a moderator

Re: p2 prestartupdate example fails [message #684321 is a reply to message #683991] Wed, 15 June 2011 12:02 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

You need DS to start, and that bundle can't yet because of missing Import-Package: org.eclipse.equinox.internal.util.event; version="1.0.0"

You need to add org.eclipse.equinox.util to your product (and then add it to your launch config for testing, or delete your launch config and regenerate it.

PW


Re: p2 prestartupdate example fails [message #684559 is a reply to message #684321] Wed, 15 June 2011 19:54 Go to previous messageGo to next message
Timm  is currently offline Timm Friend
Messages: 5
Registered: March 2010
Junior Member
Quote:

You need to add org.eclipse.equinox.util to your product (and then add it to your launch config for testing, or delete your launch config and regenerate it.


If I do so, there is another null pointer exception, this time in the example's code:

java.lang.reflect.InvocationTargetException
	at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:477)
	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372)
	at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:507)
	at org.eclipse.equinox.p2.examples.rcp.prestartupdate.ApplicationWorkbenchWindowAdvisor.postWindowOpen(ApplicationWorkbenchWindowAdvisor.java:94)
	at org.eclipse.ui.internal.WorkbenchWindow.fireWindowOpened(WorkbenchWindow.java:1338)
	at org.eclipse.ui.internal.WorkbenchWindow.open(WorkbenchWindow.java:798)
	at org.eclipse.ui.internal.Workbench$24.runWithException(Workbench.java:1235)
	at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4041)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3660)
	at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:803)
	at org.eclipse.ui.internal.Workbench$31.runWithException(Workbench.java:1567)
	at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4041)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3660)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2548)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.equinox.p2.examples.rcp.prestartupdate.Application.start(Application.java:20)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1408)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1384)
Caused by: java.lang.NullPointerException
	at org.eclipse.equinox.p2.examples.rcp.prestartupdate.P2Util.checkForUpdates(P2Util.java:61)
	at org.eclipse.equinox.p2.examples.rcp.prestartupdate.ApplicationWorkbenchWindowAdvisor$1.run(ApplicationWorkbenchWindowAdvisor.java:76)
	at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464)
	... 38 more


ProvisioningJob job = operation.getProvisioningJob(null);
status = job.runModal(sub.newChild(100));

with getProvisioningJob returning null.

When I export everything as an eclipse product and run it externally, it works (I get the checking for updates dialog). I guess the simple answer to the problem is that p2 cannot be tested when run from a launch config inside the ide, as the product's file structure differs from what p2 expects.

Timm

Re: p2 prestartupdate example fails [message #731914 is a reply to message #684559] Mon, 03 October 2011 13:24 Go to previous messageGo to next message
Turgay Celik is currently offline Turgay CelikFriend
Messages: 9
Registered: January 2010
Junior Member
I have exactly the same problem, I added org.eclipse.equinox.util to product configuration but I got the InvocationTargetException. It works fine when I export the product, but I cant run it inside Eclipse. Is there a solution or workaround for this problem?
Turgay Celik
Re: p2 prestartupdate example fails [message #733612 is a reply to message #731914] Wed, 05 October 2011 08:25 Go to previous message
Turgay Celik is currently offline Turgay CelikFriend
Messages: 9
Registered: January 2010
Junior Member
Problem solved. As explained in http://www.ralfebert.de/blog/eclipsercp/p2_updates_tutorial_36/ a modification in launch configuration is required.
Selecting "Run Configuration -> Configuration -> Software Installation -> Support software installation in the launched application" checkbox solves the problem.
Regards,
Previous Topic:Announcing The Eclipse Fall 2011 Training Series
Next Topic:script to install Eclipse *and plugins*
Goto Forum:
  


Current Time: Tue Oct 19 13:32:07 GMT 2021

Powered by FUDForum. Page generated in 0.01939 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top