org.h2.jdbc.JdbcSQLException: Unique index or primary key violation: "UC_COUNTRIES_SLUG_INDEX_F ON PUBLIC.COUNTRIES(SLUG) VALUES ('test', 3)"; SQL statement: INSERT INTO countries ( name , name_ru , slug , created_at , created_by , updated_at , updated_by ) VALUES ( ? , ? , ? , ? , ? , ? , ? ) [23505-192]

GitHub | php-coder | 4 months ago
  1. 0

    /country/add: DuplicateKeyException when name differs from existing only by case

    GitHub | 4 months ago | php-coder
    org.h2.jdbc.JdbcSQLException: Unique index or primary key violation: "UC_COUNTRIES_SLUG_INDEX_F ON PUBLIC.COUNTRIES(SLUG) VALUES ('test', 3)"; SQL statement: INSERT INTO countries ( name , name_ru , slug , created_at , created_by , updated_at , updated_by ) VALUES ( ? , ? , ? , ? , ? , ? , ? ) [23505-192]
  2. 0

    /category/add: DuplicateKeyException when name differs from existing only by case

    GitHub | 4 months ago | php-coder
    org.h2.jdbc.JdbcSQLException: Unique index or primary key violation: "UC_CATEGORIES_SLUG_INDEX_6 ON PUBLIC.CATEGORIES(SLUG) VALUES ('test', 5)"; SQL statement: INSERT INTO categories ( name , name_ru , slug , created_at , created_by , updated_at , updated_by ) VALUES ( ? , ? , ? , ? , ? , ? , ? ) [23505-192]
  3. 0

    javax.persistence.PersistenceException

    GitHub | 3 years ago | guwirth
    org.h2.jdbc.JdbcSQLException: Unique index or primary key violation: "RULES_PLUGIN_KEY_AND_NAME ON PUBLIC.RULES(PLUGIN_RULE_KEY, PLUGIN_NAME)"; SQL statement:|insert into rules (id, cardinality, plugin_config_key, created_at, description, plugin_rule_key, language, name, parent_id, plugin_name, priority, status, updated_at) values (null, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [23505-172]<|?at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)<|?at org.h2.message.DbException.get(DbException.java:169)<|?at org.h2.message.DbException.get(DbException.java:146)<|?at org.h2.index.BaseIndex.getDuplicateKeyException(BaseIndex.java:83)<|?at org.h2.index.PageBtree.find(PageBtree.java:121)<|?at org.h2.index.PageBtreeLeaf.addRow(PageBtreeLeaf.java:148)<|?at org.h2.index.PageBtreeLeaf.addRowTry(PageBtreeLeaf.java:101)<|?at org.h2.index.PageBtreeNode.addRowTry(PageBtreeNode.java:201)<|?at org.h2.index.PageBtreeNode.addRowTry(PageBtreeNode.java:201)<|?at org.h2.index.PageBtreeIndex.addRow(PageBtreeIndex.java:104)<|?at org.h2.index.PageBtreeIndex.add(PageBtreeIndex.java:95)<|?at org.h2.table.RegularTable.addRow(RegularTable.java:124)<|?at org.h2.command.dml.Insert.insertRows(Insert.java:126)<|?at org.h2.command.dml.Insert.update(Insert.java:86)<|?at org.h2.command.CommandContainer.update(CommandContainer.java:79)<|?at org.h2.command.Command.executeUpdate(Command.java:235)<|?at org.h2.server.TcpServerThread.process(TcpServerThread.java:335)<|?at org.h2.server.TcpServerThread.run(TcpServerThread.java:151)<|?at java.lang.Thread.run(Unknown Source)<|
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Grails: Hibernate and Data migrations

    Stack Overflow | 4 years ago | TroyB
    org.h2.jdbc.JdbcSQLException: NULL not allowed for column "ZIPCODE"; SQL statement: insert into customer (id, version, billaddr, billcity, billstate, billzipcode, cell, contact, country_id, custcode, custname, date_created, email, fax, last_updated, organization, phone, shipaddr, shipasbill, shipcity, shipstate, shipzipcode, status, tenant_id) values (null, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [23502-164]
  6. 0

    MVCC and SELECT FOR UPDATE

    Google Groups | 6 years ago | Dashie
    org.h2.jdbc.JdbcSQLException: Timeout trying to lock table ; SQL statement: insert into materials (id, a, b, c, d, e, f) values (null, ?, ?, ?, ?, ?, 'a') [50200-168]

  1. j.kienzle 2 times, last 1 month ago
  2. Shadd518 4 times, last 3 months ago
  3. MoYapro 1 times, last 4 months ago
11 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. org.h2.jdbc.JdbcSQLException

    Unique index or primary key violation: "UC_COUNTRIES_SLUG_INDEX_F ON PUBLIC.COUNTRIES(SLUG) VALUES ('test', 3)"; SQL statement: INSERT INTO countries ( name , name_ru , slug , created_at , created_by , updated_at , updated_by ) VALUES ( ? , ? , ? , ? , ? , ? , ? ) [23505-192]

    at org.h2.message.DbException.getJdbcSQLException()
  2. H2 Database Engine
    JdbcPreparedStatement.executeUpdate
    1. org.h2.message.DbException.getJdbcSQLException(DbException.java:345)
    2. org.h2.message.DbException.get(DbException.java:179)
    3. org.h2.message.DbException.get(DbException.java:155)
    4. org.h2.index.BaseIndex.getDuplicateKeyException(BaseIndex.java:103)
    5. org.h2.mvstore.db.MVSecondaryIndex.checkUnique(MVSecondaryIndex.java:231)
    6. org.h2.mvstore.db.MVSecondaryIndex.add(MVSecondaryIndex.java:190)
    7. org.h2.mvstore.db.MVTable.addRow(MVTable.java:704)
    8. org.h2.command.dml.Insert.insertRows(Insert.java:156)
    9. org.h2.command.dml.Insert.update(Insert.java:114)
    10. org.h2.command.CommandContainer.update(CommandContainer.java:98)
    11. org.h2.command.Command.executeUpdate(Command.java:258)
    12. org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal(JdbcPreparedStatement.java:160)
    13. org.h2.jdbc.JdbcPreparedStatement.executeUpdate(JdbcPreparedStatement.java:146)
    13 frames
  3. Commons DBCP
    DelegatingPreparedStatement.executeUpdate
    1. org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
    2. org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
    2 frames
  4. Spring Framework
    NamedParameterJdbcTemplate.update
    1. org.springframework.jdbc.core.JdbcTemplate$3.doInPreparedStatement(JdbcTemplate.java:903)
    2. org.springframework.jdbc.core.JdbcTemplate$3.doInPreparedStatement(JdbcTemplate.java:900)
    3. org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:629)
    4. org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:239)
    5. org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:73)
    6. org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:645)
    7. org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:900)
    8. org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate.update(NamedParameterJdbcTemplate.java:318)
    9. org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate.update(NamedParameterJdbcTemplate.java:299)
    9 frames
  5. ru.mystamps.web
    CountryServiceImpl.add
    1. ru.mystamps.web.dao.impl.JdbcCountryDao.add(JdbcCountryDao.java:87)
    2. ru.mystamps.web.service.CountryServiceImpl.add(CountryServiceImpl.java:76)
    2 frames
  6. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    4. java.lang.reflect.Method.invoke(Method.java:497)
    4 frames
  7. Spring AOP
    ReflectiveMethodInvocation.proceed
    1. org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)
    2. org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
    3. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
    3 frames
  8. spring-security-core
    MethodSecurityInterceptor.invoke
    1. org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:68)
    1 frame
  9. Spring AOP
    ReflectiveMethodInvocation.proceed
    1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    1 frame
  10. Spring Tx
    TransactionInterceptor.invoke
    1. org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
    2. org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
    3. org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
    3 frames
  11. Spring AOP
    JdkDynamicAopProxy.invoke
    1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208)
    2 frames
  12. com.sun.proxy
    $Proxy138.add
    1. com.sun.proxy.$Proxy138.add(Unknown Source)
    1 frame
  13. ru.mystamps.web
    CountryController.processInput
    1. ru.mystamps.web.controller.CountryController.processInput(CountryController.java:85)
    1 frame
  14. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    4. java.lang.reflect.Method.invoke(Method.java:497)
    4 frames
  15. Spring
    InvocableHandlerMethod.invokeForRequest
    1. org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221)
    2. org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:136)
    2 frames
  16. Spring MVC
    FrameworkServlet.processRequest
    1. org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110)
    2. org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:832)
    3. org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:743)
    4. org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
    5. org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:961)
    6. org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:895)
    7. org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:967)
    7 frames