Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Tutorial Form Issue : ConcurrentModificationException on commit
Hy all of you,
I'm following this tuto https://vaadin.com/tutorial/-/chapter/interaction.form.html.
As I want to save, I have a ConcurrentModificationException issue.
I've checked to pass the app, to setWriteThrough(false) and other stuff.
Unfortunately I have the following issue :
| Error 2012-02-22 10:49:23,581 ["http-bio-8080"-exec-3] ERROR vaadin.Application - Terminal error:
Message: null
Line | Method
->> 532 | receiveEvent in com.vaadin.event.ListenerMethod
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 164 | fireEvent in com.vaadin.event.EventRouter
| 1219 | fireEvent . . . . . in com.vaadin.ui.AbstractComponent
| 550 | fireClick in com.vaadin.ui.Button
| 217 | changeVariables . . in ''
| 1451 | changeVariables in com.vaadin.terminal.gwt.server.AbstractCommunicationManager
| 1399 | handleVariableBurst in ''
| 1318 | handleVariables in ''
| 763 | doHandleUidlRequest in ''
| 296 | handleUidlRequest in com.vaadin.terminal.gwt.server.CommunicationManager
| 501 | service . . . . . . in com.vaadin.terminal.gwt.server.AbstractApplicationServlet
| 193 | service in com.vaadin.grails.terminal.gwt.server.GrailsAwareApplicationServlet
| 886 | runTask . . . . . . in java.util.concurrent.ThreadPoolExecutor$Worker
| 908 | run in ''
^ 662 | run . . . . . . . . in java.lang.Thread
Caused by ConcurrentModificationException: null
->> 761 | checkForComodification in java.util.LinkedList$ListItr
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 696 | next in ''
| 336 | commit . . . . . . in com.vaadin.ui.Form
| 89 | buttonClick in org.electionpro.ui.customer.CustomerForm$$ENPeII3k
| 512 | receiveEvent . . . in com.vaadin.event.ListenerMethod
| 164 | fireEvent in com.vaadin.event.EventRouter
| 1219 | fireEvent . . . . . in com.vaadin.ui.AbstractComponent
| 550 | fireClick in com.vaadin.ui.Button
| 217 | changeVariables . . in ''
| 1451 | changeVariables in com.vaadin.terminal.gwt.server.AbstractCommunicationManager
| 1399 | handleVariableBurst in ''
| 1318 | handleVariables in ''
| 763 | doHandleUidlRequest in ''
| 296 | handleUidlRequest in com.vaadin.terminal.gwt.server.CommunicationManager
| 501 | service . . . . . . in com.vaadin.terminal.gwt.server.AbstractApplicationServlet
| 193 | service in com.vaadin.grails.terminal.gwt.server.GrailsAwareApplicationServlet
| 886 | runTask . . . . . . in java.util.concurrent.ThreadPoolExecutor$Worker
| 908 | run in ''
^ 662 | run . . . . . . . . in java.lang.Thread
I tried to syncrhonized the code in the ButtonEvent,
I also tried to set final the application in the class since the commit is in an event.
Thanks for your help
Well,
I forgot to precise some little points. I made additionnal tests :
- I'm working with grails 2.x and its latest vaadin plugins
- I downloaded the entire tutorial project and put it in a grails projest and the commit aspect is working well
My problem is probably coming from the persistance aspect.
In the project I'm working on, the datas are stored and the model is designed by groovy domain classes.
When I create a new instance and make save, it appears in the list but not in the database. In an another part, when I make a save, no changes appears in the list above.
Should I override the commit() method in order ta handle the groovy aspects?
regards
Maybe,
The getBean method available in the grails plugin could be a worlaround? http://grails.org/plugin/vaadin
Well,
I made ssome additionnal tests : https://vaadin.com/forum/-/message_boards/view_message/54053#_19_message_1165769
The "persist" aspect doesn't seems to be well configured in my project.
Thanks in advance for your help.
regards