You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
java.lang.IllegalArgumentException: Key contains code point U+0000 #6076
SEVERE [org.openide.util.RequestProcessor]: Error in RequestProcessor org.apache.tools.ant.module.bridge.impl.BridgeImpl$PostRun
java.lang.IllegalArgumentException: Key contains code point U+0000
at java.prefs/java.util.prefs.AbstractPreferences.get(AbstractPreferences.java:296)
at org.apache.tools.ant.module.api.IntrospectedInfo$3.load(IntrospectedInfo.java:681)
at org.apache.tools.ant.module.AntSettings.getCustomDefs(AntSettings.java:119)
at org.apache.tools.ant.module.bridge.impl.BridgeImpl$PostRun.run(BridgeImpl.java:443)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
at org.openide.util.lookup.Lookups.executeWith(Lookups.java:287)
java.lang.IllegalArgumentException: Key contains code point U+0000
at java.util.prefs.AbstractPreferences.get(AbstractPreferences.java:296)
at java.util.prefs.AbstractPreferences.getBoolean(AbstractPreferences.java:531)
at org.netbeans.core.windows.TopComponentTracker.load(TopComponentTracker.java:99)
at org.netbeans.core.windows.PersistenceHandler.load(PersistenceHandler.java:126)
at org.netbeans.core.windows.WindowSystemImpl.load(WindowSystemImpl.java:81)
at org.netbeans.core.GuiRunLevel$InitWinSys.run(GuiRunLevel.java:229)
and this from stackoverflow
java.lang.IllegalArgumentException: Key contains code point U+0000
at java.prefs/java.util.prefs.AbstractPreferences.get(AbstractPreferences.java:296)
at org.netbeans.modules.maven.queries.MavenFileOwnerQueryImpl.registerCoordinates(MavenFileOwnerQueryImpl.java:153)
at org.netbeans.modules.maven.ProjectOpenedHookImpl.registerWithSubmodules(ProjectOpenedHookImpl.java:431)
at org.netbeans.modules.maven.ProjectOpenedHookImpl.projectOpened(ProjectOpenedHookImpl.java:138)
at org.netbeans.spi.project.ui.ProjectOpenedHook$1.projectOpened(ProjectOpenedHook.java:60)
[catch] at org.netbeans.modules.project.ui.OpenProjectList.notifyOpened(OpenProjectList.java:1273)
at org.netbeans.modules.project.ui.OpenProjectList.doOpenProject(OpenProjectList.java:1354)
at org.netbeans.modules.project.ui.OpenProjectList.open(OpenProjectList.java:798)
at org.netbeans.modules.project.ui.OpenProjectList$6.run(OpenProjectList.java:650)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
at org.openide.util.lookup.Lookups.executeWith(Lookups.java:278)
at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)
changed the title [-]A java lang illegal argument exception has occured[/-][+]java.lang.IllegalArgumentException: Key contains code point U+0000[/+]on Jun 15, 2023
reading @lkishalmicomment makes me think we should change the config importer to only import "recent" configs. E.g N-2,
@mbien yes, that would make sense, and simplify some things in that code. I've thought before we should also merge some of the behaviour in the Options window import and the upgrader. The Options import would remain available for people wanting to import some things from earlier versions anyway.
@maryam-yousefi-Canada It would be good to know if there are more corrupted properties files in your config. Could you run this utility which scans all property files of your netbeans configs for invalid code points?
You can simply paste it into a maven project and run it on JDK 11+, thanks!
Activity
mbien commentedon Jun 15, 2023
duplicate of #5147, #5633
neilcsmith-net commentedon Jun 15, 2023
@mbien probably #5634 as well. Noticed same message in the log there.
mbien commentedon Jun 15, 2023
all reported issues, including the old ones are using windows:
https://bz.apache.org/netbeans/show_bug.cgi?id=271652
https://issues.apache.org/jira/browse/NETBEANS-3284
additional to #6076 (comment)
this is from bugzilla
and this from stackoverflow
[-]A java lang illegal argument exception has occured[/-][+]java.lang.IllegalArgumentException: Key contains code point U+0000[/+]mbien commentedon Jun 15, 2023
reading @lkishalmi comment makes me think we should change the config importer to only import "recent" configs. E.g N-2,
I think this would have avoided several issues by now if we would have restricted it a while ago.
mbien commentedon Jun 15, 2023
here the JDK change: https://bugs.openjdk.org/browse/JDK-8075156
FernandoY2203 commentedon Jun 15, 2023
I had the same problem and this question on stack helped me:
https://stackoverflow.com/questions/51244824/exception-creating-new-maven-project-in-apache-netbeans9
I found a .properties file in that path
C:\Users[your username]\AppData\Roaming\NetBeans\16\config\Preferences\org\apache\tools\ant\module
containing lines full of \u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000
So I removed the file, restarted netbeans and the error was resolved.
neilcsmith-net commentedon Jun 15, 2023
@mbien yes, that would make sense, and simplify some things in that code. I've thought before we should also merge some of the behaviour in the Options window import and the upgrader. The Options import would remain available for people wanting to import some things from earlier versions anyway.
mbien commentedon Jun 19, 2023
@maryam-yousefi-Canada It would be good to know if there are more corrupted properties files in your config. Could you run this utility which scans all property files of your netbeans configs for invalid code points?
You can simply paste it into a maven project and run it on JDK 11+, thanks!