Skip to content

Integrity Constraint Violation #24

@ayoubfalah

Description

@ayoubfalah

Hello Mr. Gupta,

First let me thank you for the great samples and well explanation.

I think that the controller MovieClientBean which is responsible for adding a new movie to the database associated with the Movie Plex 7 Web App does not work correctly. To identify the error let us consider the following scenario:

Step 1: Running the project
Step 2: Clicking Movies in the left navigation bar.
Step 3: Clicking the New Movie button.
Step 4: Entering the data for a new movie, e.g., Movie Id: 22, Movie Name: Skyfall, Movie Actors: Daniel Craig
Step 5: Clicking the Add button
Step 6: Reloading you browser
The Application server shows of trace of java.sql.SQLIntegrityConstraintViolationException, because when reloading the browser, the app tried to add the last added movie again to the database, this operation will be rejected by the DBMS, because the attribute Movie_Id must be unique.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions