Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrity Constraint Violation #24

Open
ayoubfalah opened this issue Dec 13, 2016 · 0 comments
Open

Integrity Constraint Violation #24

ayoubfalah opened this issue Dec 13, 2016 · 0 comments

Comments

@ayoubfalah
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant