Getting "ORA-00001: unique constraint violated" error with Web Service Provider

Scenario: While invoking or updating a Web service Provider activity, we find some error log traces in Webrunner Application logs like as shown below:-

2021-01-12 09:02:48 ERROR [qtp141610465-14779] org.hibernate.engine.jdbc.spi.SqlExceptionHelper org.hibernate.engine.jdbc.spi.SqlExceptionHelper.logExceptions(SqlExceptionHelper.java:142) - ORA-00001: unique constraint (xxx.xxx) violated
2021-01-12 09:02:48
2021-01-12 09:02:48,228 ERROR [qtp141610465-14779] system com.adeptia.connect2.utils.ApplicationUtils.addWsProviderClient(ApplicationUtils.java:3308) - category="BPMServer" message="could not execute statement; SQL [n/a]; constraint [xxx.xxx]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement[could not execute statement; SQL [n/a]; constraint [ADEPMDBO.CLIENT]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement]" nodeName="vc2coma2529050n.fmr.com"
2021-01-12 09:02:48 org.springframework.dao.DataIntegrityViolationException: could not execute statement; SQL [n/a]; constraint [xxx.xxx]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement
2021-01-12 09:02:48 at org.springframework.orm.jpa.vendor.HibernateJpaDialect.convertHibernateAccessException(HibernateJpaDialect.java:298)
...
2021-01-12 09:02:48 Caused by: Error : 1, Position : 0, Sql = insert into AC_WSPROVIDERCLIENTS (ACCESS_MONTH, ACCESS_TIME, CLIENT_IP, PROVIDER_ID, ID) values (:1 , :2 , :3 , :4 , :5 ), OriginalSql = insert into AC_WSPROVIDERCLIENTS (ACCESS_MONTH, ACCESS_TIME, CLIENT_IP, PROVIDER_ID, ID) values (?, ?, ?, ?, ?), Error Msg = ORA-00001: unique constraint (xxx.xxx) violated

 

Cause: This exception comes when the client accessing a Ws Provider is already accounted for. In Connect v3.4, there is an enhancement to count all unique clients accessing a Ws Provider. The table in which clients are stored is AC_WSPROVIDERCLIENTS wherein, the IP Address is a unique column. Therefore, when a client (IP Address) who has already accessed a Ws Provider before, if accessing it again, then the client (IP Address) cannot be inserted into the table, due to a violation of unique constraint on the IP address. Therefore, the unique constraint violation is logged in the Webrunner log file.

 

Solution: Although the exception is being logged, it will not interrupt the working of the process flows or Ws Provider services that are activated in the product. So, these error traces can be ignored.

Have more questions? Submit a request

0 Comments

Article is closed for comments.