Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 21:08 Go to next message
Steve Vestal is currently offline Steve VestalFriend
Messages: 37
Registered: March 2013
Member
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 06:14 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
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/


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: P2Util.addedTrustedKeys null pointer launching runtime-App [message #1853186 is a reply to message #1853179] Wed, 22 June 2022 08:55 Go to previous messageGo to next message
Steve Vestal is currently offline Steve VestalFriend
Messages: 37
Registered: March 2013
Member
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 09:30 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
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...


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: P2Util.addedTrustedKeys null pointer launching runtime-App [message #1853194 is a reply to message #1853188] Wed, 22 June 2022 12:25 Go to previous messageGo to next message
Steve Vestal is currently offline Steve VestalFriend
Messages: 37
Registered: March 2013
Member
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 13:22 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
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).


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: P2Util.addedTrustedKeys null pointer launching runtime-App [message #1853197 is a reply to message #1853195] Wed, 22 June 2022 14:05 Go to previous message
Steve Vestal is currently offline Steve VestalFriend
Messages: 37
Registered: March 2013
Member
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: Fri Apr 19 18:10:37 GMT 2024

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

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

Back to the top