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 8625441
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T07:47:13+00:00 2026-06-12T07:47:13+00:00

I have an app that is deployed to Tomcat 7 and is currently clustered

  • 0

I have an app that is deployed to Tomcat 7 and is currently clustered among two nodes. I am running into a small issue that occurs when the container tries to deserialize a class which has changed. The read and write methods should handle this gracefully, so I don’t think that is the issue. As best I can tell setting serialVersionUID should solve the issue, but in my code I have it specified as -1 and in the error below that value seems to be ignored.

Exception:

java.io.InvalidClassException: common.user.User; local class
incompatible: st ream classdesc serialVersionUID =
1828770465826288626, local class serialVersion UID =
6192552274218063887

Relevant part of Class definition:

case class User(
    var id: Long = 0l) extends SerialVersionUID(-1l) with KeyedEntity[Long] with Externalizable {

  def readExternal(in: ObjectInput) {
    id = in.readLong()
  }

  def writeExternal(out: ObjectOutput) {
    out.writeLong(id)
  }
}

I have also tried using the following instead of extending the abstract class (as per: http://www.scala-lang.org/node/259)

private val serialVersionUID = -1l

I get the same result. Is there something I am missing in how to properly Externalize a class with Scala?

  • 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-06-12T07:47:14+00:00Added an answer on June 12, 2026 at 7:47 am

    Check the docs for SerialVersionUID, it’s an annotation, so you should use @SerialVersionUID(123) right before the class declaration.

    Making it:

    @SerialVersionUID(123)
    case class User(
        var id: Long = 0l) extends KeyedEntity[Long] with Externalizable {
         ...
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I currently have a deployed app (fortworth.herokuapp.com) that I am attempting to sort movies
I know that after I have deployed my ipad/iphone app into App Store, it
I have a web app deployed to three servers running Apache, Tomcat and a
I have a click-once deployed app that uses a notification icon created using the
I have a Ruby on Rails app that I've recently deployed to a remote
I have a very large problem. I've written a large app using Flex3/Tomcat/BlazeDS/Spring that
I have a Java web app using JDBC created in NetBeans deployed to Tomcat
I have an app that services inbound mail and I have deployed a new
I have a Struts web app deployed to an EAR that has some pretty
I have a web app that I run locally in tomcat and which I

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.