Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3357642
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T02:39:26+00:00 2026-05-18T02:39:26+00:00

I’ve just started using hibernate 3.6.0 and JPA 2.0 and I’m having some troubles.

  • 0

I’ve just started using hibernate 3.6.0 and JPA 2.0 and I’m having some troubles.

I get InvalidClassException on some queries. By the way I’m using metamodel with hibernate-jpamodelgen.

I.e. one below runs fine:

CriteriaBuilder cb = getCriteriaBuilder();
CriteriaQuery<UserEntity> cq = getCriteriaQuery(cb);
cq.where(cb.equal(cq.from(UserEntity.class).get(UserEntity_.username), username));

but with this one I’m having trouble:

CriteriaBuilder cb = getCriteriaBuilder();
CriteriaQuery<UserGroup> cq = getCriteriaQuery(cb);

cq.where(cb.equal(cq.from(UserGroup.class).join(UserGroup_.entries).join(UserGroupEntry_.user).get(UserEntity_.id), user.getId()));

I get exception like below.
All classes used in query implements Serializable.

I’m kinda lost here so any help would be appreciated.

java.io.InvalidClassException: com.ptm.model.BaseEntity; local class incompatible: stream classdesc serialVersionUID = 7662749495871325837, local class serialVersionUID = 8176072949097236524
     at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:579)
     at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1600)
     at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1513)
     at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1600)
     at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1513)
     at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1749)
     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1346)
     at java.io.ObjectInputStream.readObject(ObjectInputStream.java:368)
     at org.hibernate.util.SerializationHelper.doDeserialize(SerializationHelper.java:244)
     at org.hibernate.util.SerializationHelper.deserialize(SerializationHelper.java:306)
     at org.hibernate.type.descriptor.java.SerializableTypeDescriptor.fromBytes(SerializableTypeDescriptor.java:130)
     at org.hibernate.type.descriptor.java.SerializableTypeDescriptor.wrap(SerializableTypeDescriptor.java:116)
     at org.hibernate.type.descriptor.java.SerializableTypeDescriptor.wrap(SerializableTypeDescriptor.java:39)
     at org.hibernate.type.descriptor.sql.VarbinaryTypeDescriptor$2.doExtract(VarbinaryTypeDescriptor.java:62)
     at org.hibernate.type.descriptor.sql.BasicExtractor.extract(BasicExtractor.java:64)
     at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:253)
     at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:249)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T02:39:27+00:00Added an answer on May 18, 2026 at 2:39 am

    This exception says that an object of class BaseEntity was stored in the database in serialized form and can’t be deserialized because the class have been changed.

    Storing objects in serialized form is a fallback strategy used by Hibernate when it can’t figure out how object should be stored (i.e. it’s not configured). Usually it’s not a desired behaviour.

    Perhaps in your case it means that one of the relationships between entities (UserGroup_.entries or UserGroupEntry_.user) is improperly configured.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have just tried to save a simple *.rtf file with some websites and
link Im having trouble converting the html entites into html characters, (&# 8217;) i
We're building an app, our first using Rails 3, and we're having to build
For some reason, after submitting a string like this Jack’s Spindle from a text
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We are using XSLT to translate a RIXML file to XML. Our RIXML contains

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.