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

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Hibernate JIRA by Cody Lerum, 1 year ago
java.lang.Long cannot be cast to java.lang.Integer
via Hibernate JIRA by Cody Lerum, 1 year ago
java.lang.Long cannot be cast to java.lang.Integer
via Stack Overflow by Silvio Troia
, 1 year ago
it.domain.InterventoPK cannot be cast to java.lang.Integer
via Stack Overflow by Ioan Tiba
, 1 year ago
package.entities.module.fi.pk.PK_FAKVS_DB cannot be cast to java.lang.Integer
via Stack Overflow by Unknown author, 2 years ago
java.lang.String cannot be cast to java.lang.Integer
via GitHub by goeh
, 1 year ago
java.lang.Long cannot be cast to java.lang.Integer
java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer
at org.hibernate.type.descriptor.java.IntegerTypeDescriptor.unwrap(IntegerTypeDescriptor.java:36)
at org.hibernate.type.descriptor.sql.IntegerTypeDescriptor$1.doBind(IntegerTypeDescriptor.java:57)
at org.hibernate.type.descriptor.sql.BasicBinder.bind(BasicBinder.java:82)
at org.hibernate.type.AbstractStandardBasicType.nullSafeSet(AbstractStandardBasicType.java:305)
at org.hibernate.type.AbstractStandardBasicType.nullSafeSet(AbstractStandardBasicType.java:300)
at org.hibernate.loader.Loader.bindPositionalParameters(Loader.java:1909)
at org.hibernate.loader.Loader.bindParameterValues(Loader.java:1880)
at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1758)
at org.hibernate.loader.Loader.doQuery(Loader.java:828)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:289)
at org.hibernate.loader.Loader.doList(Loader.java:2449)
at org.hibernate.loader.Loader.doList(Loader.java:2435)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2276)
at org.hibernate.loader.Loader.list(Loader.java:2271)
at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:121)
at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1484)
at org.hibernate.internal.CriteriaImpl.list(CriteriaImpl.java:373)
at org.hibernate.search.query.hibernate.impl.CriteriaObjectsInitializer.initializeObjects(CriteriaObjectsInitializer.java:107)
at org.hibernate.search.query.hibernate.impl.QueryLoader.executeLoad(QueryLoader.java:91)
at org.hibernate.search.query.hibernate.impl.AbstractLoader.load(AbstractLoader.java:72)
at org.hibernate.search.query.hibernate.impl.FullTextQueryImpl.list(FullTextQueryImpl.java:211)
at com.domain.search.SearchUtil.search(SearchUtil.java:55)

Users with the same issue

12 times, 7 months ago
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Once, 4 months ago
3 more bugmates

Know the solutions? Share your knowledge to help other developers to debug faster.