mediumMultiple Choice
CISA Practice Question: Refer to the exhibit
Exhibit
Refer to the exhibit. ``` ERROR 2019-11-15 14:23:45,123 [main] com.example.App - Error processing record ID 1045 java.sql.SQLIntegrityConstraintViolationException: ORA-00001: unique constraint (USERS.UK_USERNAME) violated at com.example.dao.UserDao.insert(UserDao.java:45) ... 8 more ```
Refer to the exhibit. An application log shows an error. What is the MOST likely cause of this error?
⚠ Common exam trap
A common mix-up: candidates confuse a duplicate key error with a privilege or connectivity issue, but the specific error code 1062 and the phrase 'Duplicate entry' directly point to a unique constraint violation, not a server or permission problem.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
A duplicate username was inserted into the USERS table
The error message 'Duplicate entry 'admin' for key 'PRIMARY'' indicates a violation of the PRIMARY KEY constraint on the USERS table. Since the username field is the primary key, inserting a second row with the same username (e.g., 'admin') causes MySQL to reject the INSERT operation with error code 1062. This is a unique constraint violation, not a connectivity or privilege issue.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
The database server is offline
Why it's wrong here
A database server being offline would produce connection or timeout failures across every query, not the specific error recorded in the exhibit. It is tempting because connectivity loss is a common outage cause, and it would be the likely answer if the log showed refused connections or timeouts rather than a statement-level failure.
- ✗
The user does not have insert privileges
Why it's wrong here
Missing insert privileges would return a permission-denied error naming the object and user, which the exhibit does not show. It is tempting because authorisation faults are common in application logs, and it would be the likely cause if the message cited insufficient privileges or an access-denied code for the target table.
- ✗
The data type of the username field is incorrect
Why it's wrong here
An incorrect username field data type would surface as a schema or conversion error at the point of binding, not the error the exhibit records. It is tempting because type mismatches are a frequent coding defect, and it would be correct if the log named a datatype conversion or invalid-format exception on that column.
- ✓
A duplicate username was inserted into the USERS table
Why this is correct
A duplicate username violates the UNIQUE constraint on the USERS table, causing the insert to fail and the application to log the resulting database error. This directly satisfies the stem's constraint: the logged error stems from a rejected insert, not from authentication, connectivity or permission issues elsewhere.
About these practice questions
Courseiva writes every CISA question from scratch — 934 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This CISA practice question is part of Courseiva's free ISACA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CISA exam.