#305 NoClassDefFoundError

open
nobody
5
2013-04-06
2013-04-06
michael michaud
No

I get this NoClassDefFoundError after I've opened a new project done a few clicks (probably in the layerNamePanel)

This is related to the clipboard management, and this is not the first time I get this kind of error,
but don't know yet how to reproduce it.

Discussion

  • Root cause of the problem is still not clear,
    but here is a good article about NoClassDefFoundError
    http://javarevisited.blogspot.fr/2011/06/noclassdeffounderror-exception-in.html

    Seems like
    - A problem hapened in the static blocks of jump.workbench.ui.plugin.clipboard.CollectionOfLayerablesTransferable
    - Or maybe a kind of race condition hapened between initialization of
    CollectionOfLayerablesTransferable and PasteLayersPlugIn UI initialization
    (the errors comes from the "AWT-EventQueue-0" thread

     
  • ede
    ede
    2013-04-07

    please post the complete error stack or steps to reproduce.

    generally this error only occurs when trying to instantiate classes from strings or such during runtime. all other classes are checked for availability during compilation/build process.

    ..ede

     
  • StackTrace is attached.
    CollectionOfLayerablesTransferable has some static attributes initialized calling methods. I think this is related to that.
    The problem you mention is generally throwing ClassNotFoundException, which is a different problem (even if this error also appears in the stacktrace). At least this is what I understood from the article.

     
  • ede
    ede
    2013-04-07

    this build seems hackish. it still contains the apple stubs. how did you throw it together?

    easiest explanation would be. maybe it really isn't there (the class). so can you please attach the lib\openjump-1.6.0alpha.jar for me to check?

    ..ede

     
  • What do you mean ? Which apple stubs ?
    the jar file is the one I generate after each compilation cycle so I have no more the exact jar used.
    My current jar contains the class incriminated in the stacktrace.
    Do you still want me to upload my current jar somewhere ?

     
  • ede
    ede
    2013-04-07

    > What do you mean ? Which apple stubs ?

    lib\OrangeExtensions-1.2.jar are not distributed but used during development only

    >the jar file is the one I generate after each compilation cycle so I have no more the exact jar used. My current jar contains the class incriminated in the stacktrace. Do you still want me to upload my current jar somewhere ?

    nope just the which actually throws the error. better even the whole OJ structure just to be safe.

    what i don't understand is why you do not use the snapshots. they are the intended builds to test.

    also, why exactly do you generate a jar that you run with the batch fileas opposed to starting OJ simply directly out of your ide?

    ..ede