Skip to main content



      Home
Home » Eclipse Projects » Oomph » P2Util.addedTrustedKeys null pointer launching runtime-App(rcp-2020-03 java17 oomph null pointer when run as eclipse application)
P2Util.addedTrustedKeys null pointer launching runtime-App [message #1853177] Tue, 21 June 2022 17:08 Go to next message
Eclipse UserFriend
Two of us have created Eclipse RCP 2020-03 configurations with Java 17 on Windows following identical instructions. When running as an Eclipse application, both of us seem to get good launches the first time. However, on subsequent launches, I get the following error in the development Eclipse console, and some UI menu selections in the launched child will not show because they do not seem to be properly initialized. Any suggestions on what might be causing this and how to fix it are greatly appreciated.

java.lang.NullPointerException: Cannot enter synchronized block because "profile" is null
at org.eclipse.oomph.p2.core.P2Util.addedTrustedKeys(P2Util.java:236)
at org.eclipse.oomph.setup.internal.core.util.IndexManager.handleTrust(IndexManager.java:521)
at org.eclipse.oomph.setup.internal.core.util.IndexManager.addIndex(IndexManager.java:98)
at org.eclipse.oomph.setup.internal.core.SetupContext.createSelf(SetupContext.java:246)
at org.eclipse.oomph.setup.ui.SetupUIPlugin.performStartup(SetupUIPlugin.java:797)
at org.eclipse.oomph.setup.ui.SetupUIPlugin$1$1.run(SetupUIPlugin.java:266)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Re: P2Util.addedTrustedKeys null pointer launching runtime-App [message #1853179 is a reply to message #1853177] Wed, 22 June 2022 02:14 Go to previous messageGo to next message
Eclipse UserFriend
I added a null guard via this bug:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=580237

And that's available in this build:

https://download.eclipse.org/oomph/updates/nightly/latest/
Re: P2Util.addedTrustedKeys null pointer launching runtime-App [message #1853186 is a reply to message #1853179] Wed, 22 June 2022 04:55 Go to previous messageGo to next message
Eclipse UserFriend
What does self-hosting mean? I am curious why this happens to one of us and not the other. Is there a change we can make in our build to avoid this until the fix percolates to a stable release?
Re: P2Util.addedTrustedKeys null pointer launching runtime-App [message #1853188 is a reply to message #1853186] Wed, 22 June 2022 05:30 Go to previous messageGo to next message
Eclipse UserFriend
I would generally never expect the profile of an installation to be null because without a profile it would not be possible to install or update anything. So I assume that happens only when you launch (run/debug) an application from your IDE, which is referred to as self-hosting because the profile ID is "SelfHostingProfile" in that case...

Perhaps on the launch configuration changing the Configuration tab's "Support software installation in the launched application" to true will ensure there is a non-null profile...
Re: P2Util.addedTrustedKeys null pointer launching runtime-App [message #1853194 is a reply to message #1853188] Wed, 22 June 2022 08:25 Go to previous messageGo to next message
Eclipse UserFriend
That stopped the null pointer exception, but now I get

!ENTRY org.eclipse.oomph.setup.core 2 0 2022-06-22 07:22:48.275
!MESSAGE The Eclipse Git-hosted URI 'http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/interim/GMFRuntime.setup' is blocked for direct access.
Please open a Bugzilla to add it to an official Oomph catalog.
For initial testing, use the file system local version of the resource.
Alternatively, run the setup archiver application as follows:
C:\Users\svestal\Documents\Programs\indigo-rcp-2022-03-j17\eclipse\eclipsec.exe -application org.eclipse.oomph.setup.core.SetupArchiver -consoleLog -noSplash -uris http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/interim/GMFRuntime.setup
Re: P2Util.addedTrustedKeys null pointer launching runtime-App [message #1853195 is a reply to message #1853194] Wed, 22 June 2022 09:22 Go to previous messageGo to next message
Eclipse UserFriend
Yes, this was failing to get into the catalog after adding it this morning.

https://ci.eclipse.org/oomph/job/setup-archiver/20118/

But it got just added by this job as I was answering you:

https://ci.eclipse.org/oomph/job/setup-archiver/20119/

There might be another 10 minute delay before the problem goes away for you (until the server serves the new setups.zip).
Re: P2Util.addedTrustedKeys null pointer launching runtime-App [message #1853197 is a reply to message #1853195] Wed, 22 June 2022 10:05 Go to previous message
Eclipse UserFriend
Thank you! I had to create a new runtime-Application, but those two things seem to have fixed the problem.
Previous Topic:Updating setup files from Nexus hosting
Next Topic:Execute ResourceCopyTask when resource is updated
Goto Forum:
  


Current Time: Tue May 13 04:05:28 EDT 2025

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

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

Back to the top