I cannot switch to next sprint.
When I want to move to next sprint, I get such error.
How to solve it?
Server service call error
Calling service SwitchToNextSprint failed.
java.lang.NullPointerException: NullPointerException: null
Statement from Kunagi Team
To solve this problem an upgrade to the latest version (at least 0.26.1) is required.
Status
Bug is fixed. Needs to be tested.
Comments
Wed, Jul 30, 2014, 10:32 by Witek (SM,T)
Which Kunagi version do you have installed?
Please post the error message from the server logs.
Wed, Jul 30, 2014, 12:30 by anonymous
We are using release 0.26.Service method failed: SwitchToNextSprint -> NullPointerException
java.lang.NullPointerException
at scrum.server.journal.Change.compareTo(Change.java:67)
at scrum.server.journal.Change.compareTo(Change.java:29)
at java.util.HashMap.compareComparables(Unknown Source)
at java.util.HashMap$TreeNode.treeify(Unknown Source)
at java.util.HashMap.treeifyBin(Unknown Source)
at java.util.HashMap.putVal(Unknown Source)
at java.util.HashMap.put(Unknown Source)
at java.util.HashSet.add(Unknown Source)
at ilarkesto.persistence.Transaction.registerEntity(Transaction.java:65)
at ilarkesto.persistence.TransactionService.registerEntity(TransactionService.java:133)
at ilarkesto.persistence.ADao.newEntityInstance(ADao.java:208)
at scrum.server.journal.ChangeDao.postChange(ChangeDao.java:40)
at scrum.server.sprint.Sprint.close(Sprint.java:175)
at scrum.server.project.Project.switchToNextSprint(Project.java:517)
at scrum.server.ScrumServiceImpl.onSwitchToNextSprint(ScrumServiceImpl.java:960)
at scrum.server.GScrumServiceImpl.switchToNextSprint(GScrumServiceImpl.java:1188)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:561)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:265)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:305)
at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:646)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Unknown Source)
Wed, Jul 30, 2014, 12:30 by Sebastian Kozioł
We are using release 0.26
Service method failed: SwitchToNextSprint -> NullPointerException
java.lang.NullPointerException
at scrum.server.journal.Change.compareTo(Change.java:67)
at scrum.server.journal.Change.compareTo(Change.java:29)
at java.util.HashMap.compareComparables(Unknown Source)
at java.util.HashMap$TreeNode.treeify(Unknown Source)
at java.util.HashMap.treeifyBin(Unknown Source)
at java.util.HashMap.putVal(Unknown Source)
at java.util.HashMap.put(Unknown Source)
at java.util.HashSet.add(Unknown Source)
at ilarkesto.persistence.Transaction.registerEntity(Transaction.java:65)
at ilarkesto.persistence.TransactionService.registerEntity(TransactionService.java:133)
at ilarkesto.persistence.ADao.newEntityInstance(ADao.java:208)
at scrum.server.journal.ChangeDao.postChange(ChangeDao.java:40)
at scrum.server.sprint.Sprint.close(Sprint.java:175)
at scrum.server.project.Project.switchToNextSprint(Project.java:517)
at scrum.server.ScrumServiceImpl.onSwitchToNextSprint(ScrumServiceImpl.java:960)
at scrum.server.GScrumServiceImpl.switchToNextSprint(GScrumServiceImpl.java:1188)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:561)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:265)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:305)
at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:646)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Unknown Source)
Wed, Jul 30, 2014, 13:26 by Witek (SM,T)
I have no idea how this could happen, but it seams one of your Change
entities is missing the dateAndTime
field.
Did you already try to stop Kunagi and restart? If restart does not help, you will have to fix the data manually:
- Stop the web application server.
- Go to
kunagi-data/entities/Change
directory. - Find the files which have no
dateAndTime
property. (grep -L
should help) - Delete these files (This will only affect the changes log)
- Start the web application server
Mon, Jun 22, 2015, 09:51 by Florian Paul
I have the same issue. There are no change-files which have no dateAndTime tag, which means the command "grep -L dateAndTime" does not return any result. The source code "Change.java" at line 67 in the compare method can also result in an NPE when "other" is null. Maybe a hint for fixing. Witek, can you give us another workaround tip?
Tue, Jun 23, 2015, 22:46 by Jeff Fritz
We're experiencing the same problem. All files in kunagi-data/entities/Change have the dateAndTime element. We removed all of those files, and still have the problem when we switch to the next sprint.
It's worth noting we were able to switch sprints one time (our 1st to 2nd sprint) but subsequent sprints fail.
I don't know enough about the source code to determine what the 'other' argument is and why it would be null at Change.java:67 during a sprint switch. However, it seems like that might be a likely culprit.
If I click "Create an example project" under project selector, I also get a Null Pointer Exception, which might be unrelated.
If I create a new project, then open the new project and immediately switch to the next sprint, that works without issue.
Wed, Jun 24, 2015, 11:32 by Witek (SM,T)
If you need a quick fix and don't care about detailed changes (like who changed a label for a task or story), you can delete all the files from the entities/change
directory.
If you make a backup of these files, you can restore them later, when the problem is fixed.
Wed, Jun 24, 2015, 13:57 by Jeff Fritz
Thanks for your reply Witek,
We did remove all the files from the entities/Change directory and still have the issue after restarting Kunagi. I still see named entries in the Journal for who changed what and when. I suspect there is some caching or some other issue causing the NPE.
Wed, Jun 24, 2015, 14:56 by Witek (SM,T)
As mentioned in the statement: You have to stop the Kunagi server when changing the files on the disk. Kunagi caches all data in memory. It only reads them at startup and writes them when changes occur.
Wed, Jun 24, 2015, 15:13 by Jeff Fritz
Thank you for the correction Witek, I did overlook that. However, I'm still experiencing the issue after the following:
(0) Confirmed Kunagi is not running
(1) delete all items from entities/Change directory,
(2) start Kunagi,
(2a) confirmed Kunagi loaded 0 entity files (log said "INFO FileEntityStore Loading 0 entitiy files: change")
(3) switched sprints, got Null Pointer Exception.
(4) Made a change to a label so that there was one new file in the entities/Change directory
(5) Shut down Kunagi
(6) Deleted all files from entities/Change directory again
(7) Started Kunagi
(7a) confirmed Kunagi loaded 0 entity files (log said "INFO FileEntityStore Loading 0 entitiy files: change")
(8) switched sprints, got Null Pointer Exception again.
Wed, Jun 24, 2015, 15:16 by Jeff Fritz
The following is the stack trace from the null pointer exception from step (8) above, it seems to be similar to other logs posted in this issue.
Wed Jun 24 08:10:33 CDT 2015 INFO AGwtServiceImpl Service method failed: SwitchToNextSprint -> NullPointerException
java.lang.NullPointerException
at scrum.server.journal.Change.compareTo(Change.java:67)
at scrum.server.journal.Change.compareTo(Change.java:29)
at java.util.HashMap.compareComparables(Unknown Source)
at java.util.HashMap$TreeNode.treeify(Unknown Source)
at java.util.HashMap.treeifyBin(Unknown Source)
at java.util.HashMap.putVal(Unknown Source)
at java.util.HashMap.put(Unknown Source)
at java.util.HashSet.add(Unknown Source)
at ilarkesto.persistence.Transaction.registerEntity(Transaction.java:65)
at ilarkesto.persistence.TransactionService.registerEntity(TransactionService.java:133)
at ilarkesto.persistence.ADao.newEntityInstance(ADao.java:208)
at scrum.server.journal.ChangeDao.postChange(ChangeDao.java:40)
at scrum.server.sprint.Sprint.close(Sprint.java:180)
at scrum.server.project.Project.switchToNextSprint(Project.java:517)
at scrum.server.ScrumServiceImpl.onSwitchToNextSprint(ScrumServiceImpl.java:960)
at scrum.server.GScrumServiceImpl.switchToNextSprint(GScrumServiceImpl.java:1188)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:561)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:265)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:305)
at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)
Wed, Jun 24, 2015, 18:59 by Witek (SM,T)
I have just released Kunagi 0.26.1 -> kunagi.org/download.html
Does it fix this problem?
Wed, Jun 24, 2015, 19:35 by Jeff Fritz
Witek, the fix works in my test environment. We will update on production and I will reply again with feedback. Thank you for your help!
Wed, Jun 24, 2015, 19:52 by Jeff Fritz
The 0.26.1 works for switching sprints in our production environment. Again, thank you for the help.
Thu, Jun 25, 2015, 07:55 by Florian Paul
The fix works also for me! Thank you Witek!
(Und noch einen schönen Gruß von mir ;-)