Results 1 to 3 of 3

Thread: eclipse gives warning about slice generated classes

  1. #1
    ctennis is offline Registered User
    Name: Caleb Tennis
    Organization: AEI
    Project: Project GINA
    Join Date
    Mar 2006
    Posts
    123

    eclipse gives warning about slice generated classes

    I don't know if this is an issue or not, but I wanted to share.

    I have a slice exception that looks like this:

    exception CommError {
    int err;
    };

    I've run slice2java on that particular slice file and generated the corresponding java files. When I import it into eclipse, it gives me a warning on the CommError.java file:

    "The serializable class CommError does not declare a static final serialVersionUID field of type long."

    The program compiles fine and runs great, but I didn't see this listed in the forums anywhere so I thought I'd share in case it might present any issues.
    Caleb Tennis
    Analytical Engineering, Inc.
    http://www.aei-tech.com
    Project: Our facility infrastructure heavily utilizes Ice

    Gentoo ebuild maintainer for Ice, IceRuby, etc.

  2. #2
    mefoster is offline Registered User
    Name: Mary Ellen Foster
    Organization: Heriot-Watt University, Edinburgh
    Project: ECHOES learning environment
    Join Date
    Jun 2006
    Posts
    121
    That warning is enabled by default in Eclipse, but I almost always disable it because I don't generally use serialization and don't care if the classes I use do or do not have a serialVersionUID. If you go into the preferences, under Java - Errors/Warnings - Potential programming problems you can change the value for "Serializable class without serialVersionUID" from "Warning" to "Ignore".

    Possibly for the Ice-generated classes this is important.

  3. #3
    ctennis is offline Registered User
    Name: Caleb Tennis
    Organization: AEI
    Project: Project GINA
    Join Date
    Mar 2006
    Posts
    123
    Thank you very much for the tip, Mary Ellen.
    Caleb Tennis
    Analytical Engineering, Inc.
    http://www.aei-tech.com
    Project: Our facility infrastructure heavily utilizes Ice

    Gentoo ebuild maintainer for Ice, IceRuby, etc.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. non-default generated dir in eclipse
    By ngambek2003 in forum Help Center
    Replies: 4
    Last Post: 03-04-2010, 04:28 PM
  2. Helper Classes not Generated
    By zhi in forum Help Center
    Replies: 5
    Last Post: 01-04-2007, 07:18 AM
  3. Replies: 1
    Last Post: 08-07-2005, 07:00 PM
  4. C#: Attributes with Ice generated classes and structs
    By DeepDiver in forum Help Center
    Replies: 2
    Last Post: 07-23-2005, 02:16 AM
  5. Replies: 1
    Last Post: 01-25-2005, 07:30 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •