• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Why does Eclipse 3.1.0 show these 2 warnings? any work arounds

 
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ranchers,

I am getting these 2 peculiar problems with Eclipse 3.1.0 on RH Linux 8.3:

Issue#1
Some of my GUI classes show these warnings

Severity 1:The serializable class xxxPanel does not declare a static final serialVersionUID field of type long

Issue#2
On the command line I get these repeated warnings:
** (<unknown>:22753): WARNING **: pango-layout.c:2435: broken PangoLayout

Anyone else facing same problems? any work-arounds

Thanks
Ravi
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I can't say about #1, but #2 is caused by having a debug build of GTK++ 2.
Older RedHat systems often have such a library. Updating your GTK library makes these (harmless) messages go away.
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ravi,
This is an optional compilation check in Eclipse 3.1. While you could turn it off, I think you would be better served to add the constant. You can add it by running the serialver tool at the command line. Some plugins allow you to right click the message to generate the id as well. I don't recall whether Eclipse does by default.

[edited to add that I'm discussing message #1]
[ March 03, 2005: Message edited by: Jeanne Boyarsky ]
 
Ravi Sathish
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Jeanne

Thanks for the response.

I did a little bit of reaidng about serialVersionUID and found this from
http://serialver.sourceforge.net/serialver.html

The static member variable called serialVersionUID can be included in the code of the new class version that implements a compatible modification. So, all objects serialized by the original class are compatible with the new class.

There they say a versioned class must declare something like this:
private static final long serialVersionUID = 3487495895819393L;

My question is will adding a constant like this have any problems viz. different JVM"s ? We run our code on different platforms

TIA
RAVI
 
Jeanne Boyarsky
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ravi,
In that case, you are actually better off having the serialVersionUID explicitly stated. If you do not have it, the JVM has to calculate one. Aside from taking time, this introduces the [slight] risk that the platforms will calculate it different ways.

In other words using the serialVersionUID will make your code faster and more uniform across platforms.
 
I want my playground back. Here, I'll give you this tiny ad for it:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic