Uploaded image for project: 'Spring Data JDBC'
  1. Spring Data JDBC
  2. DATAJDBC-325

SqlGeneratorSource needs thread safety

    Details

      Description

      Multiple parallel calls to create() at application start-up causes java.util.ConcurrentModificationException. Most likely, Map<Class, SqlGenerator> in SqlGeneratorSource needs to be concurrent.

      Trace

      Caused by: java.util.ConcurrentModificationExceptionCaused by: java.util.ConcurrentModificationException at java.base/java.util.HashMap.computeIfAbsent(HashMap.java:1134) at org.springframework.data.jdbc.core.SqlGeneratorSource.getSqlGenerator(SqlGeneratorSource.java:39) at org.springframework.data.jdbc.core.DefaultDataAccessStrategy.sql(DefaultDataAccessStrategy.java:360) at org.springframework.data.jdbc.core.DefaultDataAccessStrategy.insert(DefaultDataAccessStrategy.java:106) at org.springframework.data.jdbc.core.DefaultJdbcInterpreter.interpret(DefaultJdbcInterpreter.java:73) at org.springframework.data.relational.core.conversion.DbAction$InsertRoot.doExecuteWith(DbAction.java:110) at org.springframework.data.relational.core.conversion.DbAction.executeWith(DbAction.java:55) ... 58 more
      

        Attachments

          Activity

            People

            • Assignee:
              schauder Jens Schauder
              Reporter:
              jschachner@prometheusgroup.com Jenna Schachner
              Last updater:
              Mark Paluch
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: