haumacher / phoneblock

Der Spam-Filter für die Fritz!Box
https://phoneblock.net
GNU General Public License v3.0
161 stars 15 forks source link

Mehrfaches Löschen derselben Nummer führt zu IntegrityConstraintViolationException #1

Closed haumacher closed 2 years ago

haumacher commented 2 years ago
[2022-09-14 16:05:35] [info] DELETE /addresses/xxx@yyy.de/000000000000
[2022-09-14 16:05:35] [info] org.apache.ibatis.exceptions.PersistenceException:
[2022-09-14 16:05:35] [info] ### Error updating database.  Cause: org.h2.jdbc.JdbcSQLIntegrityConstraintViolationException: Unique index or primary key violation:
 "PUBLIC.PRIMARY_KEY_C ON PUBLIC.EXCLUDES(OWNER, PHONE) VALUES ( /* key:1 */ CAST(54 AS BIGINT), '000000000000')"; SQL statement:
[2022-09-14 16:05:35] [info] insert into EXCLUDES (OWNER, PHONE) values (?, ?) [23505-210]
[2022-09-14 16:05:35] [info] ### The error may exist in de/haumacher/phoneblock/db/BlockList.java (best guess)
[2022-09-14 16:05:35] [info] ### The error may involve de.haumacher.phoneblock.db.BlockList.addExclude-Inline
[2022-09-14 16:05:35] [info] ### The error occurred while setting parameters
[2022-09-14 16:05:35] [info] ### SQL: insert into EXCLUDES (OWNER, PHONE) values (?, ?)
[2022-09-14 16:05:35] [info] ### Cause: org.h2.jdbc.JdbcSQLIntegrityConstraintViolationException: Unique index or primary key violation: "PUBLIC.PRIMARY_KEY_C ON 
PUBLIC.EXCLUDES(OWNER, PHONE) VALUES ( /* key:1 */ CAST(54 AS BIGINT), '080033024242')"; SQL statement:
[2022-09-14 16:05:35] [info] insert into EXCLUDES (OWNER, PHONE) values (?, ?) [23505-210]
[2022-09-14 16:05:35] [info] #011at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
[2022-09-14 16:05:35] [info] #011at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:196)
[2022-09-14 16:05:35] [info] #011at org.apache.ibatis.session.defaults.DefaultSqlSession.insert(DefaultSqlSession.java:181)
[2022-09-14 16:05:35] [info] #011at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:62)
[2022-09-14 16:05:35] [info] #011at org.apache.ibatis.binding.MapperProxy$PlainMethodInvoker.invoke(MapperProxy.java:145)
[2022-09-14 16:05:35] [info] #011at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:86)
[2022-09-14 16:05:35] [info] #011at com.sun.proxy.$Proxy28.addExclude(Unknown Source)
[2022-09-14 16:05:35] [info] #011at de.haumacher.phoneblock.db.DB.deleteEntry(DB.java:415)
[2022-09-14 16:05:35] [info] #011at de.haumacher.phoneblock.carddav.resource.AddressResource.delete(AddressResource.java:132)
[2022-09-14 16:05:35] [info] #011at de.haumacher.phoneblock.carddav.CardDavServlet.doDelete(CardDavServlet.java:126)