Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.NullPointerException: null values not allowed at org.eclipse.core.internal.registry.ReferenceMap.put(ReferenceMap.java:364) #117

Closed
col-panic opened this issue Jul 22, 2022 · 5 comments

Comments

@col-panic
Copy link

col-panic commented Jul 22, 2022

I have an ant / download.target.platform job running, as described in https://github.com/elexis/elexis-target/blob/0f81a3ccfbe5026c745670d1c99529de89bf0d5b/target/pom.xml#L381 respectively https://github.com/elexis/elexis-target/blob/2022-06-java17/target/elexis.target.p2mirror.xml.

I'm running the job using Java temurin-17.jdk and Eclipse 2022-06 using mvn tycho-eclipserun:eclipse-run. It can be re-rcreated by checking out the 2022-06-java17 branch from https://github.com/elexis/elexis-target/

During execution, the following exception is thrown

!ENTRY org.eclipse.osgi 4 0 2022-07-22 11:17:58.330
!MESSAGE Application error
!STACK 1
java.lang.NullPointerException: null values not allowed
	at org.eclipse.core.internal.registry.ReferenceMap.put(ReferenceMap.java:364)
	at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.getBundle(RegistryStrategyOSGI.java:169)
	at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:188)
	at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:920)
	at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:246)
	at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:63)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:198)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:136)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:402)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:596)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1467)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1440)
An error has occurred. See the log file
/Users/marco/git/elexis-target/target/target/eclipserun-work/configuration/1658481477515.log.

I don't know what value is being refered to here, or what to do. Any hints appreciated.

@merks
Copy link
Contributor

merks commented Jul 22, 2022

I'm not sure what's all in launched ant application that registers various things, but this purely an OSGi initialization problem where the bundle is null which should never happen:

image

Perhaps it would be better to use this without ant:

https://www.eclipse.org/tycho/sitedocs/tycho-extras/tycho-p2-extras-plugin/mirror-mojo.html

@col-panic
Copy link
Author

Thank you @merks - as far as I remember, I tried without ant in the beginning, but was not capable to use a target file as source, which is where I found eclipse-tycho/tycho#176

I think I tried for some time to get it running, but reverted to the ant solution - as it worked.

After some more fiddling around, also reverting to older tycho versions, i removed the entire .m2/repository and restarted the task. Now it got execute without a problem - the exception did not occur anymore.

Not sure hence what the problem was, but works for me now.

@col-panic
Copy link
Author

Same just happend with 2023-09, removing repo directory does not work. Could this be architecture specific?
I switched to intel x64 linux and it runs as expected (first i tried OS X M2)

@iloveeclipse
Copy link
Member

I assume some other process deletes Eclipse config area while Eclipse is running. This can easily happen if you start Eclipse with -clean argument, or if the config area placed on NFS that disconnects etc.

@col-panic
Copy link
Author

I assume some other process deletes Eclipse config area while Eclipse is running. This can easily happen if you start Eclipse with -clean argument, or if the config area placed on NFS that disconnects etc.

The task is run via maven, and here is the definition of it https://github.com/elexis/elexis-target/blob/f39e15b01b16a19d2da1fac638326ec124b5e724/target/pom.xml#L513 - do you see any hint on why this could happen here? It seems to download a fresh Eclipse, but I don't know, ehere this eclipse does store its config - maybe if interfers with the currently running instance of Eclipse which then removes the files?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants