nb-springboot icon indicating copy to clipboard operation
nb-springboot copied to clipboard

Exception is thrown when saving changes in pom.xml

Open ghost opened this issue 8 years ago • 19 comments

Hi, after saving a modification in the pom.xml a warning message and an exception is thrown:

image the message continues with the project's directory path.

The exception is java.lang.NullPointerException at com.github.alexfalappa.nbspringboot.projects.service.impl.SpringBootServiceImpl.adjustNbActions(SpringBootServiceImpl.java:374) at com.github.alexfalappa.nbspringboot.projects.service.impl.SpringBootServiceImpl.refresh(SpringBootServiceImpl.java:122) at com.github.alexfalappa.nbspringboot.projects.service.impl.SpringBootServiceImpl$1.propertyChange(SpringBootServiceImpl.java:271) at java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:335) at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:327) at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:263) at org.netbeans.modules.maven.api.NbMavenProject.doFireReload(NbMavenProject.java:573) at org.netbeans.modules.maven.api.NbMavenProject.access$200(NbMavenProject.java:95) at org.netbeans.modules.maven.api.NbMavenProject$AccessorImpl.doFireReload(NbMavenProject.java:141) at org.netbeans.modules.maven.NbMavenProjectImpl$1.run(NbMavenProjectImpl.java:151) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1443) at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:68) at org.openide.util.lookup.Lookups.executeWith(Lookups.java:303) [catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2058)

ghost avatar May 22 '18 15:05 ghost

Besides the message, an empty nbactions.tmp file is created at the root of the project.

ghost avatar May 22 '18 16:05 ghost

Hi @wernerblanck , are you using the last version of the plugin?

I remember tweaking some things on nbactions.xml file management recently.

AlexFalappa avatar Jun 01 '18 09:06 AlexFalappa

I have probably the same issue, using version 2.0 from March. Problem occurs with NB 8 and NB 9.0.0 RC1 (incubating).

java.lang.NullPointerException
	at com.github.alexfalappa.nbspringboot.projects.service.impl.SpringBootServiceImpl.adjustNbActions(SpringBootServiceImpl.java:374)
	at com.github.alexfalappa.nbspringboot.projects.service.impl.SpringBootServiceImpl.refresh(SpringBootServiceImpl.java:122)
	at com.github.alexfalappa.nbspringboot.projects.service.impl.SpringBootServiceImpl$1.propertyChange(SpringBootServiceImpl.java:271)
	at java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:335)
	at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:327)
	at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:263)
	at org.netbeans.modules.maven.api.NbMavenProject.doFireReload(NbMavenProject.java:550)
	at org.netbeans.modules.maven.api.NbMavenProject.access$200(NbMavenProject.java:72)
	at org.netbeans.modules.maven.api.NbMavenProject$AccessorImpl.doFireReload(NbMavenProject.java:118)
	at org.netbeans.modules.maven.NbMavenProjectImpl$1.run(NbMavenProjectImpl.java:130)
Caused: org.openide.util.RequestProcessor$SlowItem: task failed due to
	at org.openide.util.RequestProcessor$Task.schedule(RequestProcessor.java:1459)
	at org.netbeans.modules.maven.NbMavenProjectImpl.fireProjectReload(NbMavenProjectImpl.java:463)
	at org.netbeans.modules.maven.api.NbMavenProject.fireProjectReload(NbMavenProject.java:544)
	at org.netbeans.modules.maven.api.NbMavenProject.fireMavenProjectReload(NbMavenProject.java:564)
	at org.netbeans.modules.maven.execute.MavenCommandLineExecutor$2.run(MavenCommandLineExecutor.java:321)
	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)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)

everflux avatar Jun 03 '18 13:06 everflux

Yes, it's Version 2.0 (Mar 2018): Reactive Goodies, from NB Plugin Portal. It is the first version that I use, so I can't ensure that the error was introduced in this version. Let me know if you need more information. Regards

ghost avatar Jun 05 '18 02:06 ghost

It seems to be triggered by performing changes to the pom.xml while the application is running.

everflux avatar Jun 08 '18 06:06 everflux

I have the same issue also : image

java.lang.NullPointerException
	at com.github.alexfalappa.nbspringboot.projects.service.impl.SpringBootServiceImpl.adjustNbActions(SpringBootServiceImpl.java:374)
	at com.github.alexfalappa.nbspringboot.projects.service.impl.SpringBootServiceImpl.refresh(SpringBootServiceImpl.java:122)
	at com.github.alexfalappa.nbspringboot.projects.service.impl.SpringBootServiceImpl$1.propertyChange(SpringBootServiceImpl.java:271)
	at java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:335)
	at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:327)
	at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:263)
	at org.netbeans.modules.maven.api.NbMavenProject.doFireReload(NbMavenProject.java:573)
	at org.netbeans.modules.maven.api.NbMavenProject.access$200(NbMavenProject.java:95)
	at org.netbeans.modules.maven.api.NbMavenProject$AccessorImpl.doFireReload(NbMavenProject.java:141)
	at org.netbeans.modules.maven.NbMavenProjectImpl$1.run(NbMavenProjectImpl.java:151)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1443)
	at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:68)
	at org.openide.util.lookup.Lookups.executeWith(Lookups.java:303)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2058)

Config :

NetBeans IDE 8.2 (Build 201609300101) updated to version NetBeans 8.2 Patch 2
Java: 1.8.0_171; HotSpot(TM) 64-Bit Server VM 25.171-b11
Windows 7 version 6.1 running on amd64; Cp1252; fr_FR (nb)
Plugin Version : 2.0 (Mar 2018)
Spring Boot 2.0.3.RELEASE

Action to reproduce : mvn clean (no project is running in the ide !)

mtbadi39 avatar Jun 20 '18 14:06 mtbadi39

I had the same error. If I delete manually the file nbactions.tmp, it does work normally until the next build process.

dellasavia avatar Jul 05 '18 19:07 dellasavia

I run into the same problem, finally I uninstall it and install a older version. Please fix this problem, it is really sucks.

sgraff avatar Jul 13 '18 13:07 sgraff

Thanks!

everflux avatar Jul 24 '18 18:07 everflux

So, what I should do to resolve this issue? Install an older version?

dellasavia avatar Jul 24 '18 18:07 dellasavia

@dellasavia, the bug should be fixed in master, will be in next version (2.0.1) that I am going to release soon

AlexFalappa avatar Jul 25 '18 08:07 AlexFalappa

To all interested, I couldn't manage to reproduce this bug, I have however reorganized the logic to guard against possible NullPointerEception at the code reported in the stack traces.

AlexFalappa avatar Jul 25 '18 08:07 AlexFalappa

I just installed the update and works fine to me! Tks so much, @AlexFalappa

dellasavia avatar Jul 26 '18 21:07 dellasavia

@wernerblanck , @everflux , @sgraff , @mtbadi39 could you please test and confirm it’s fixed?

AlexFalappa avatar Jul 26 '18 21:07 AlexFalappa

I'm getting this same pop up message with Product Version: NetBeans IDE 8.2 (Build 201609300101)

after every change to pom.xml "cannot create nbactions.tmp"

alexgmuir avatar Oct 19 '18 11:10 alexgmuir

Ok, i can confirme that was fixed. Apache NetBeans 9.0 + Oracle JDK 10 + Windows 7 64bits Tks so much, :+1: @AlexFalappa

mtbadi39 avatar Oct 23 '18 15:10 mtbadi39

Thank you @mtbadi39 !

AlexFalappa avatar Oct 24 '18 13:10 AlexFalappa

Can this issue be re-evaluated? I get this popup everytime any mvn task executes:

Product Version: Apache NetBeans IDE 9.0 (Build incubator-netbeans-release-334-on-20180708)
Updates: NetBeans IDE is updated to version NetBeans 8.2 Patch 2
Java: 11.0.1; OpenJDK 64-Bit Server VM 11.0.1+13
Runtime: OpenJDK Runtime Environment 11.0.1+13
System: Mac OS X version 10.14.3 running on x86_64; UTF-8; en_US (nb)

eggmatters avatar Mar 01 '19 17:03 eggmatters

@eggmatters I would prefer you open up a new issue but please:

  • try to describe how you got the error in the first place, i.e. describe as precisely as possible what you did before stumbling upon this beaviour
  • attach your NetBeans log (it is in <netbeans_user_dir>/var/log/message.log, the user dir is indicated in the about dialog)
  • remove any nbactions.tmp leftover file before opening the project in NetBeans to see if it gets you out of the error loop

AlexFalappa avatar Mar 04 '19 13:03 AlexFalappa