java.lang.ClassCastException

java.lang.Long cannot be cast to java.lang.Integer

Solutions on the web19167

  • via GitHub by EvilOlaf
    , 1 year ago
    java.lang.Integer cannot be cast to java.lang.Long
  • via GitHub by dohst
    , 1 year ago
    java.lang.Integer cannot be cast to java.lang.Long
  • via GitHub by Priyalks
    , 6 months ago
    java.lang.Integer cannot be cast to java.lang.Long
  • Stack trace

    • java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer at org.hibernate.type.IntegerType.set(IntegerType.java:64) at org.hibernate.type.NullableType.nullSafeSet(NullableType.java:154) at org.hibernate.type.NullableType.nullSafeSet(NullableType.java:136) at org.hibernate.param.PositionalParameterSpecification.bind(PositionalParameterSpecification.java:68) at org.hibernate.loader.hql.QueryLoader.bindParameterValues(QueryLoader.java:514) at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1593)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    You are the first who have seen this exception. Write a tip to help other users and build your expert profile.