Monday 25 May 2020

Error While embed the video in Your website page

Error:-
Refused to display '<URL>' in a frame because it set 'X-Frame-Options' to 'sameorigin

Solution:-

if link is https://www.youtube.com/watch?v=8WkuChVeL0s
than,replaced watch?v= with embed/ so the valid link will be: https://www.youtube.com/embed/8WkuChVeL0s
It works well.


Sunday 24 May 2020

Exception in thread "main" org.hibernate.NonUniqueObjectException: A different object with the same identifier value was already associated with the session : [com.dreainno.hibernate.demo.entity.Student#0]

Solution:-

In the hibernate entity class we have to define genertion type strategy of id column. For example we have id column as autoincremented in sql table that will define in hibernate entity class as below:-

@Id
@GeneratedValue(strategy=GenerationType.IDENTITY)
@Column(name="id")
private int id;

 I hope your error will be solve.
Happy Coding

Saturday 16 May 2020

Spring Error display on front end :- Failed to convert property value of type java.lang.String to required type int for property freePasses; nested exception is java.lang.NumberFormatException: For input string: ""

Solution:-


This error is occurred because we are applying @NotNull annotation on int feild so we have to change that field into Integer to solve the error.

Error While embed the video in Your website page

Error:- Refused to display '<URL>' in a frame because it set 'X-Frame-Options' to 'sameorigin Solution:- if ...